Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve Flutter 3.13 analyze issues #612

Merged
merged 2 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/audioplayers/example/lib/tabs/audio_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class AudioContextTabState extends State<AudioContextTab>
LabeledDropDown<AndroidContentType>(
label: 'contentType',
key: const Key('contentType'),
options: {for (var e in AndroidContentType.values) e: e.name},
options: {for (final e in AndroidContentType.values) e: e.name},
selected: audioContext.android.contentType,
onChange: (v) => updateAudioContextAndroid(
audioContext.android.copy(contentType: v),
Expand All @@ -160,7 +160,7 @@ class AudioContextTabState extends State<AudioContextTab>
LabeledDropDown<AndroidUsageType>(
label: 'usageType',
key: const Key('usageType'),
options: {for (var e in AndroidUsageType.values) e: e.name},
options: {for (final e in AndroidUsageType.values) e: e.name},
selected: audioContext.android.usageType,
onChange: (v) => updateAudioContextAndroid(
audioContext.android.copy(usageType: v),
Expand All @@ -169,7 +169,7 @@ class AudioContextTabState extends State<AudioContextTab>
LabeledDropDown<AndroidAudioFocus?>(
key: const Key('audioFocus'),
label: 'audioFocus',
options: {for (var e in AndroidAudioFocus.values) e: e.name},
options: {for (final e in AndroidAudioFocus.values) e: e.name},
selected: audioContext.android.audioFocus,
onChange: (v) => updateAudioContextAndroid(
audioContext.android.copy(audioFocus: v),
Expand All @@ -178,7 +178,7 @@ class AudioContextTabState extends State<AudioContextTab>
LabeledDropDown<AndroidAudioMode>(
key: const Key('audioMode'),
label: 'audioMode',
options: {for (var e in AndroidAudioMode.values) e: e.name},
options: {for (final e in AndroidAudioMode.values) e: e.name},
selected: audioContext.android.audioMode,
onChange: (v) => updateAudioContextAndroid(
audioContext.android.copy(audioMode: v),
Expand Down Expand Up @@ -213,13 +213,13 @@ class AudioContextTabState extends State<AudioContextTab>
LabeledDropDown<AVAudioSessionCategory>(
key: const Key('category'),
label: 'category',
options: {for (var e in AVAudioSessionCategory.values) e: e.name},
options: {for (final e in AVAudioSessionCategory.values) e: e.name},
selected: audioContext.iOS.category,
onChange: (v) => updateAudioContextIOS(
audioContext.iOS.copy(category: v),
),
),
...iosOptions
...iosOptions,
],
);
}
Expand Down
8 changes: 4 additions & 4 deletions packages/audioplayers/example/lib/tabs/controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ class _ControlsTabState extends State<ControlsTab>
EnumTgl<PlayerMode>(
key: const Key('control-player-mode'),
options: {
for (var e in PlayerMode.values)
'control-player-mode-${e.name}': e
for (final e in PlayerMode.values)
'control-player-mode-${e.name}': e,
},
selected: widget.player.mode,
onChange: (playerMode) async {
Expand All @@ -132,8 +132,8 @@ class _ControlsTabState extends State<ControlsTab>
EnumTgl<ReleaseMode>(
key: const Key('control-release-mode'),
options: {
for (var e in ReleaseMode.values)
'control-release-mode-${e.name}': e
for (final e in ReleaseMode.values)
'control-release-mode-${e.name}': e,
},
selected: widget.player.releaseMode,
onChange: (releaseMode) async {
Expand Down
4 changes: 2 additions & 2 deletions packages/audioplayers/example/lib/tabs/logger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class LogView extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(title),
IconButton(onPressed: onDelete, icon: const Icon(Icons.delete))
IconButton(onPressed: onDelete, icon: const Icon(Icons.delete)),
],
),
Expanded(
Expand All @@ -165,7 +165,7 @@ class LogView extends StatelessWidget {
? const TextStyle(color: Colors.red)
: null,
),
Divider(color: Colors.grey.shade400)
Divider(color: Colors.grey.shade400),
],
),
)
Expand Down
3 changes: 2 additions & 1 deletion packages/flutter_secure_storage/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class ItemsWidgetState extends State<ItemsWidget> {
child: Text('Delete all'),
),
],
)
),
],
),
body: Column(
Expand Down Expand Up @@ -186,6 +186,7 @@ class ItemsWidgetState extends State<ItemsWidget> {

break;
case _ItemActions.edit:
if (!context.mounted) return;
final result = await showDialog<String>(
context: context,
builder: (context) => _EditItemWidget(item.value),
Expand Down
3 changes: 1 addition & 2 deletions packages/sqflite/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ linter:
- directives_ordering
- empty_catches
- hash_and_equals
- iterable_contains_unrelated_type
- list_remove_unrelated_type
- collection_methods_unrelated_type
- no_adjacent_strings_in_list
- no_duplicate_case_values
- non_constant_identifier_names
Expand Down