Update parameters to the styleFrom button methods. (#105291)
* Update parameters to the `styleFrom` button methods. * Updated the Flutter fix data to point to this PR. * Updated handling of background color to better maintain backwards compatibility with previous API.
This commit is contained in:
@@ -247,7 +247,7 @@ class TravelDestinationContent extends StatelessWidget {
|
||||
final ThemeData theme = Theme.of(context);
|
||||
final TextStyle titleStyle = theme.textTheme.headline5!.copyWith(color: Colors.white);
|
||||
final TextStyle descriptionStyle = theme.textTheme.subtitle1!;
|
||||
final ButtonStyle textButtonStyle = TextButton.styleFrom(primary: Colors.amber.shade500);
|
||||
final ButtonStyle textButtonStyle = TextButton.styleFrom(foregroundColor: Colors.amber.shade500);
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
@@ -78,7 +78,7 @@ class _ShoppingCartPageState extends State<ShoppingCartPage> {
|
||||
right: 16.0,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: kShrinePink100,
|
||||
backgroundColor: kShrinePink100,
|
||||
shape: const BeveledRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(7.0)),
|
||||
),
|
||||
|
||||
@@ -177,7 +177,7 @@ class _TextButton extends StatelessWidget {
|
||||
final ThemeData theme = Theme.of(context);
|
||||
return TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
primary: theme.colorScheme.onPrimary,
|
||||
foregroundColor: theme.colorScheme.onPrimary,
|
||||
textStyle: theme.textTheme.subtitle1,
|
||||
padding: EdgeInsets.zero,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user