mirror of
https://github.com/flutter/packages.git
synced 2025-07-01 23:51:55 +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>[
|
children: <Widget>[
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
// ignore: deprecated_member_use
|
backgroundColor: Colors.blue,
|
||||||
primary: Colors.blue,
|
foregroundColor: Colors.white,
|
||||||
// ignore: deprecated_member_use
|
|
||||||
onPrimary: Colors.white,
|
|
||||||
),
|
),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Press to ask user to choose multiple directories'),
|
'Press to ask user to choose multiple directories'),
|
||||||
|
@ -42,10 +42,8 @@ class GetMultipleDirectoriesPage extends StatelessWidget {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
// ignore: deprecated_member_use
|
backgroundColor: Colors.blue,
|
||||||
primary: Colors.blue,
|
foregroundColor: Colors.white,
|
||||||
// ignore: deprecated_member_use
|
|
||||||
onPrimary: Colors.white,
|
|
||||||
),
|
),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Press to ask user to choose multiple directories'),
|
'Press to ask user to choose multiple directories'),
|
||||||
|
Reference in New Issue
Block a user