Skip to content

Commit 0746d1f

Browse files
chore: ignore MaterialStateProperty warnings (#4836)
1 parent 2149060 commit 0746d1f

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

packages/amplify_datastore/example/lib/queries_display_widgets.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Widget displayQueryButtons(bool isAmplifyConfigured, String queriesToView,
2020
return null;
2121
},
2222
style: ButtonStyle(
23+
// TODO(Jordan-Nelson): use `WidgetStateProperty` when min flutter sdk is 3.22.0
24+
// ignore: deprecated_member_use
2325
backgroundColor: MaterialStateProperty.all(
2426
queriesToView == "Blog" ? Colors.white10 : Colors.white60,
2527
),
@@ -38,6 +40,8 @@ Widget displayQueryButtons(bool isAmplifyConfigured, String queriesToView,
3840
return null;
3941
},
4042
style: ButtonStyle(
43+
// TODO(Jordan-Nelson): use `WidgetStateProperty` when min flutter sdk is 3.22.0
44+
// ignore: deprecated_member_use
4145
backgroundColor: MaterialStateProperty.all(
4246
queriesToView == "Post" ? Colors.white10 : Colors.white60,
4347
),
@@ -56,6 +60,8 @@ Widget displayQueryButtons(bool isAmplifyConfigured, String queriesToView,
5660
return null;
5761
},
5862
style: ButtonStyle(
63+
// TODO(Jordan-Nelson): use `WidgetStateProperty` when min flutter sdk is 3.22.0
64+
// ignore: deprecated_member_use
5965
backgroundColor: MaterialStateProperty.all(
6066
queriesToView == "Comment" ? Colors.white10 : Colors.white60,
6167
),

packages/authenticator/amplify_authenticator/lib/src/widgets/social/social_button.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ class _SocialSignInButtonState
188188
);
189189
}
190190

191+
// TODO(Jordan-Nelson): use `WidgetStateProperty` when min flutter sdk is 3.22.0
192+
// ignore: deprecated_member_use
191193
MaterialStateProperty<Color?> getButtonForegroundColor(BuildContext context) {
192194
final theme = Theme.of(context);
193195
final foregroundColor = theme.outlinedButtonTheme.style?.foregroundColor;
@@ -196,6 +198,8 @@ class _SocialSignInButtonState
196198
}
197199

198200
final isDark = Theme.of(context).brightness == Brightness.dark;
201+
// TODO(Jordan-Nelson): use `WidgetStateProperty` when min flutter sdk is 3.22.0
202+
// ignore: deprecated_member_use
199203
return MaterialStateProperty.all(isDark ? Colors.white : Colors.black);
200204
}
201205

packages/storage/amplify_storage_s3/example/lib/main.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ class _HomeScreenState extends State<HomeScreen> {
311311
padding: const EdgeInsets.all(20),
312312
child: ElevatedButton(
313313
style: ButtonStyle(
314+
// TODO(Jordan-Nelson): use `WidgetStateProperty` when min flutter sdk is 3.22.0
315+
// ignore: deprecated_member_use
314316
backgroundColor: MaterialStateProperty.all(Colors.red),
315317
),
316318
onPressed: _signOut,

0 commit comments

Comments
 (0)