[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:
Qun Cheng
2023-12-05 10:44:31 -08:00
committed by GitHub
parent 4e7f160127
commit 8be3268d97
2 changed files with 4 additions and 8 deletions

View File

@ -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'),

View File

@ -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'),