Skip to content

Commit

Permalink
Resolve Flutter 3.19 analyze issues (flutter-tizen#671)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaowei-guan authored Feb 19, 2024
1 parent a893eeb commit 0bbced7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/flutter_secure_storage/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class ItemsWidgetState extends State<ItemsWidget> {
if (!context.mounted) return;
final key = await _displayTextInputDialog(context, item.key);
final result = await _storage.containsKey(key: key);
if (!mounted) return;
if (!context.mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('Contains Key: $result, key checked: $key'),
Expand All @@ -225,7 +225,7 @@ class ItemsWidgetState extends State<ItemsWidget> {
final key = await _displayTextInputDialog(context, item.key);
final result =
await _storage.read(key: key, aOptions: _getAndroidOptions());
if (!mounted) return;
if (!context.mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('value: $result'),
Expand Down
4 changes: 0 additions & 4 deletions packages/in_app_purchase/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,6 @@ class _MyAppState extends State<_MyApp> {
trailing: TextButton(
style: TextButton.styleFrom(
backgroundColor: Colors.green[800],
// ignore: deprecated_member_use
primary: Colors.white,
),
onPressed: () {
final PurchaseParam purchaseParam = PurchaseParam(
Expand Down Expand Up @@ -278,8 +276,6 @@ class _MyAppState extends State<_MyApp> {
TextButton(
style: TextButton.styleFrom(
backgroundColor: Theme.of(context).colorScheme.primary,
// ignore: deprecated_member_use
primary: Colors.white,
),
onPressed: () => _inAppPurchase.restorePurchases(),
child: const Text('Restore purchases'),
Expand Down
1 change: 0 additions & 1 deletion packages/sqflite/example/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ linter:
- prefer_initializing_formals
- prefer_void_to_null
#
- always_require_non_null_named_parameters
- annotate_overrides
- avoid_init_to_null
- avoid_null_checks_in_equality_operators
Expand Down
2 changes: 1 addition & 1 deletion packages/sqflite/example/lib/manual_test_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ class _SimpleDbTestPageState extends State<SimpleDbTestPage> {
final result =
firstIntValue(await db.query('test', columns: ['COUNT(*)']));
// Temp for nnbd successfull lint
if (mounted) {
if (context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text('$result records'),
duration: const Duration(milliseconds: 700),
Expand Down

0 comments on commit 0bbced7

Please sign in to comment.