Skip to content

Commit 0bbced7

Browse files
authored
Resolve Flutter 3.19 analyze issues (#671)
1 parent a893eeb commit 0bbced7

File tree

4 files changed

+3
-8
lines changed

4 files changed

+3
-8
lines changed

packages/flutter_secure_storage/example/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class ItemsWidgetState extends State<ItemsWidget> {
212212
if (!context.mounted) return;
213213
final key = await _displayTextInputDialog(context, item.key);
214214
final result = await _storage.containsKey(key: key);
215-
if (!mounted) return;
215+
if (!context.mounted) return;
216216
ScaffoldMessenger.of(context).showSnackBar(
217217
SnackBar(
218218
content: Text('Contains Key: $result, key checked: $key'),
@@ -225,7 +225,7 @@ class ItemsWidgetState extends State<ItemsWidget> {
225225
final key = await _displayTextInputDialog(context, item.key);
226226
final result =
227227
await _storage.read(key: key, aOptions: _getAndroidOptions());
228-
if (!mounted) return;
228+
if (!context.mounted) return;
229229
ScaffoldMessenger.of(context).showSnackBar(
230230
SnackBar(
231231
content: Text('value: $result'),

packages/in_app_purchase/example/lib/main.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,6 @@ class _MyAppState extends State<_MyApp> {
234234
trailing: TextButton(
235235
style: TextButton.styleFrom(
236236
backgroundColor: Colors.green[800],
237-
// ignore: deprecated_member_use
238-
primary: Colors.white,
239237
),
240238
onPressed: () {
241239
final PurchaseParam purchaseParam = PurchaseParam(
@@ -278,8 +276,6 @@ class _MyAppState extends State<_MyApp> {
278276
TextButton(
279277
style: TextButton.styleFrom(
280278
backgroundColor: Theme.of(context).colorScheme.primary,
281-
// ignore: deprecated_member_use
282-
primary: Colors.white,
283279
),
284280
onPressed: () => _inAppPurchase.restorePurchases(),
285281
child: const Text('Restore purchases'),

packages/sqflite/example/analysis_options.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ linter:
7676
- prefer_initializing_formals
7777
- prefer_void_to_null
7878
#
79-
- always_require_non_null_named_parameters
8079
- annotate_overrides
8180
- avoid_init_to_null
8281
- avoid_null_checks_in_equality_operators

packages/sqflite/example/lib/manual_test_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class _SimpleDbTestPageState extends State<SimpleDbTestPage> {
315315
final result =
316316
firstIntValue(await db.query('test', columns: ['COUNT(*)']));
317317
// Temp for nnbd successfull lint
318-
if (mounted) {
318+
if (context.mounted) {
319319
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
320320
content: Text('$result records'),
321321
duration: const Duration(milliseconds: 700),

0 commit comments

Comments
 (0)