mirror of
https://github.com/flutter/packages.git
synced 2025-06-30 06:37:17 +08:00
[file_selector] Remove deprecated primary
and onPrimary
references from ElevatedButton.styleFrom
(#5566)
This PR is to remove deprecated `primary` and `onPrimary` references([deprecation PR](https://github.com/flutter/flutter/pull/105291)) from `ElevatedButton.styleFrom`. `primary` should be replaced with `backgroundColor` and `onPrimary` should be replaced with `foregroundColor`. No new tests needed. Please let me know if I incorrectly handled the CHANGELOG and version change.
This commit is contained in:
@ -42,10 +42,8 @@ class GetMultipleDirectoriesPage extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
// ignore: deprecated_member_use
|
||||
primary: Colors.blue,
|
||||
// ignore: deprecated_member_use
|
||||
onPrimary: Colors.white,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text(
|
||||
'Press to ask user to choose multiple directories'),
|
||||
|
@ -42,10 +42,8 @@ class GetMultipleDirectoriesPage extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
// ignore: deprecated_member_use
|
||||
primary: Colors.blue,
|
||||
// ignore: deprecated_member_use
|
||||
onPrimary: Colors.white,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text(
|
||||
'Press to ask user to choose multiple directories'),
|
||||
|
Reference in New Issue
Block a user