Skip to content

Commit

Permalink
chore!: Upgrade to Flutter 3.13.0 (#1612)
Browse files Browse the repository at this point in the history
# Description

- Adapt linting
- audioplayers_linux: raise min Flutter version to 3.13.0 due to
flutter/flutter#129534
- Raise min testing Flutter version to 3.13.0 due to
flutter/flutter#129534, flutter/flutter#127628, flutter/flutter#125657
  • Loading branch information
Gustl22 authored Aug 19, 2023
1 parent 23d0904 commit 1a3de1a
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 26 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
type: choice
options:
- 'any'
- '3.13.x'
- '3.10.x'
- '3.7.x'
- '3.3.x'
Expand Down Expand Up @@ -47,7 +48,7 @@ on:
inputs:
flutter_version:
required: false
default: '3.10.6'
default: '3.13.0'
type: string
enable_android:
required: false
Expand Down Expand Up @@ -104,9 +105,8 @@ jobs:
java-version: '17'
- uses: subosito/flutter-action@v2
with:
# TODO: use `inputs.flutter_version` and change to `stable`, when flutter/flutter#127628 has been released.
flutter-version: '3.13.0-0.1.pre'
channel: 'beta'
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
- uses: bluefireteam/melos-action@main

- name: Example App - Build Android APK
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ jobs:
call-min-flutter-test:
uses: ./.github/workflows/test.yml
with:
flutter_version: '3.10.x'
flutter_version: '3.13.0'
fatal_warnings: false
13 changes: 6 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
type: choice
options:
- 'any'
- '3.13.x'
- '3.10.x'
- '3.7.x'
- '3.3.x'
Expand Down Expand Up @@ -51,7 +52,7 @@ on:
inputs:
flutter_version:
required: false
default: '3.10.6'
default: '3.13.0'
type: string
fatal_warnings:
required: false
Expand Down Expand Up @@ -158,9 +159,8 @@ jobs:
java-version: '17'
- uses: subosito/flutter-action@v2
with:
# TODO: use `inputs.flutter_version` and change to `stable`, when flutter/flutter#125657 has been released.
flutter-version: '3.13.0-0.1.pre'
channel: 'beta'
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
- uses: bluefireteam/melos-action@main

- name: Download Android emulator image
Expand Down Expand Up @@ -295,9 +295,8 @@ jobs:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
# TODO: use `inputs.flutter_version` and change to `stable`, when flutter/flutter#129534 has been released.
flutter-version: '3.13.0-0.1.pre'
channel: 'beta'
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
- uses: bluefireteam/melos-action@main
- name: Install Flutter requirements for Linux
run: |
Expand Down
14 changes: 7 additions & 7 deletions packages/audioplayers/example/lib/tabs/audio_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class AudioContextTabState extends State<AudioContextTab>
LabeledDropDown<AudioContextConfigRoute>(
label: 'Audio Route',
key: const Key('audioRoute'),
options: {for (var e in AudioContextConfigRoute.values) e: e.name},
options: {for (final e in AudioContextConfigRoute.values) e: e.name},
selected: audioContextConfig.route,
onChange: (v) => updateConfig(
audioContextConfig.copy(route: v),
Expand Down Expand Up @@ -154,7 +154,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 @@ -163,7 +163,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 @@ -172,7 +172,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 @@ -181,7 +181,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 @@ -216,13 +216,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
2 changes: 1 addition & 1 deletion packages/audioplayers_linux/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ dev_dependencies:

environment:
sdk: '>=3.0.0 <4.0.0'
flutter: '>=3.10.0'
flutter: '>=3.13.0'

0 comments on commit 1a3de1a

Please sign in to comment.