Migrate to Flutter 3.3.2

This commit is contained in:
Dain Nilsson 2022-09-23 10:12:54 +02:00
parent 38a2a852e0
commit 2e9a51d720
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8
11 changed files with 78 additions and 117 deletions

View File

@ -16,7 +16,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.0.5'
flutter-version: '3.3.2'
- run: |
flutter config
flutter --version

View File

@ -33,7 +33,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.0.5'
flutter-version: '3.3.2'
- run: flutter config --enable-linux-desktop
- run: flutter --version

View File

@ -31,7 +31,7 @@ jobs:
with:
channel: 'stable'
architecture: 'x64'
flutter-version: '3.0.5'
flutter-version: '3.3.2'
- run: flutter config --enable-macos-desktop
- run: flutter --version

View File

@ -29,7 +29,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.0.5'
flutter-version: '3.3.2'
- run: flutter config --enable-windows-desktop
- run: flutter --version
@ -42,7 +42,9 @@ jobs:
run: .\build-helper.bat
- name: Build the app
run: flutter build windows
run: |
$version = python set-version.py | select-object -first 1
flutter build windows --build-name=$version
- name: Check generated files
run: git diff -I '.*android.*flutter_plugins.*qrscanner_zxing' --exit-code

View File

@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.2"
version: "2.9.0"
boolean_selector:
dependency: transitive
description:
@ -21,21 +21,14 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
version: "1.2.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
collection:
dependency: transitive
description:
@ -56,7 +49,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.3.1"
flutter:
dependency: "direct main"
description: flutter
@ -87,28 +80,28 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
version: "0.12.12"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
version: "0.1.5"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.8.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
plugin_platform_interface:
dependency: transitive
description:
@ -134,7 +127,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.2"
version: "1.9.0"
stack_trace:
dependency: transitive
description:
@ -155,21 +148,21 @@ packages:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.9"
version: "0.4.12"
vector_math:
dependency: transitive
description:

View File

@ -36,12 +36,7 @@ class DeviceButton extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
return IconButton(
tooltip: 'More actions',
// TODO: Remove OverflowBox on Flutter 3.3
icon: OverflowBox(
maxHeight: 44,
maxWidth: 44,
child: _CircledDeviceAvatar(radius),
),
icon: _CircledDeviceAvatar(radius),
onPressed: () {
final withContext = ref.read(withContextProvider);

View File

@ -76,18 +76,15 @@ class AccountDialog extends ConsumerWidget with AccountMixin {
backgroundColor: action != null ? color.first : theme.secondary,
foregroundColor: color.second,
child: IconButton(
/* use this in Flutter 3.3
style: IconButton.styleFrom(
backgroundColor: action != null ? color.first : theme.secondary,
foregroundColor: color.second,
disabledBackgroundColor: theme.onSecondary.withOpacity(0.2),
fixedSize: const Size.square(38),
),*/
),
icon: e.icon,
iconSize: 22,
tooltip: e.text,
// Remove the following line in Flutter 3.3:
disabledColor: theme.onSecondary.withOpacity(0.2),
onPressed: action != null
? () {
action(context);
@ -181,9 +178,7 @@ class AccountDialog extends ConsumerWidget with AccountMixin {
),
],
),
actionsPadding: const EdgeInsets.only(top: 10.0, right: -16.0),
// use this in Flutter 3.3:
// actionsPadding: const EdgeInsets.symmetric(vertical: 10.0),
actionsPadding: const EdgeInsets.symmetric(vertical: 10.0),
actions: [
Center(
child: FittedBox(

View File

@ -24,17 +24,15 @@ class AppTheme {
//backgroundColor: Colors.white,
toggleableActiveColor: accentGreen,
appBarTheme: AppBarTheme(
elevation: 0,
toolbarHeight: 48,
//shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)),
backgroundColor: Colors.transparent,
foregroundColor: Colors.grey.shade800,
systemOverlayStyle: const SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.dark,
systemNavigationBarIconBrightness: Brightness.dark
)
),
elevation: 0,
toolbarHeight: 48,
//shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)),
backgroundColor: Colors.transparent,
foregroundColor: Colors.grey.shade800,
systemOverlayStyle: const SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.dark,
systemNavigationBarIconBrightness: Brightness.dark)),
// Mainly used for the OATH dialog view at the moment
buttonTheme: ButtonThemeData(
colorScheme: ColorScheme.light(
@ -48,8 +46,8 @@ class AppTheme {
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
onPrimary: Colors.white,
primary: primaryBlue,
foregroundColor: Colors.white,
backgroundColor: primaryBlue,
)),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
@ -59,11 +57,8 @@ class AppTheme {
color: Colors.grey.shade300,
),
chipTheme: ChipThemeData(
backgroundColor: Colors.transparent, // Remove 3.3
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8)), // Remove 3.3
selectedColor: const Color(0xffd2dbdf),
side: _ChipBorder(color: Colors.grey.shade400),
side: _chipBorder(Colors.grey.shade400),
checkmarkColor: Colors.black,
),
floatingActionButtonTheme: const FloatingActionButtonThemeData(
@ -84,9 +79,7 @@ class AppTheme {
//labelLarge: TextStyle(color: Colors.cyan.shade500),
//titleSmall: TextStyle(color: Colors.grey.shade600),
//titleMedium: const TextStyle(),
titleMedium: TextStyle(
fontWeight: FontWeight.w300,
fontSize: 16),
titleMedium: TextStyle(fontWeight: FontWeight.w300, fontSize: 16),
titleLarge: TextStyle(
//color: Colors.grey.shade500,
fontWeight: FontWeight.w400,
@ -114,17 +107,15 @@ class AppTheme {
),
toggleableActiveColor: primaryGreen,
appBarTheme: AppBarTheme(
elevation: 0,
toolbarHeight: 48,
//shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)),
backgroundColor: Colors.transparent,
foregroundColor: Colors.grey.shade400,
systemOverlayStyle: const SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.light,
systemNavigationBarIconBrightness: Brightness.light
)
),
elevation: 0,
toolbarHeight: 48,
//shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)),
backgroundColor: Colors.transparent,
foregroundColor: Colors.grey.shade400,
systemOverlayStyle: const SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.light,
systemNavigationBarIconBrightness: Brightness.light)),
// Mainly used for the OATH dialog view at the moment
buttonTheme: ButtonThemeData(
colorScheme: ColorScheme.dark(
@ -138,8 +129,8 @@ class AppTheme {
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
onPrimary: Colors.black,
primary: primaryGreen,
foregroundColor: Colors.black,
backgroundColor: primaryGreen,
)),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
@ -149,11 +140,8 @@ class AppTheme {
color: Colors.grey.shade800,
),
chipTheme: ChipThemeData(
backgroundColor: Colors.transparent, // Remove 3.3
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8)), // Remove 3.3
selectedColor: Colors.white12,
side: const _ChipBorder(color: Colors.white12),
side: _chipBorder(Colors.white12),
labelStyle: TextStyle(
color: Colors.grey.shade200,
),
@ -197,14 +185,9 @@ class AppTheme {
}
/// This fixes the issue with FilterChip resizing vertically on toggle.
class _ChipBorder extends BorderSide implements MaterialStateBorderSide {
const _ChipBorder({super.color});
@override
BorderSide? resolve(Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
return const BorderSide(width: 1, color: Colors.transparent);
}
return BorderSide(width: 1, color: color);
}
}
BorderSide? _chipBorder(Color color) =>
MaterialStateBorderSide.resolveWith((states) => BorderSide(
width: 1,
color: states.contains(MaterialState.selected)
? Colors.transparent
: color));

View File

@ -35,7 +35,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
desktop_drop: 69eeff437544aa619c8db7f4481b3a65f7696898
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38
shared_preferences_macos: a64dc611287ed6cbe28fd1297898db1336975727
url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3

View File

@ -21,7 +21,7 @@ packages:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.11"
version: "3.3.0"
args:
dependency: transitive
description:
@ -35,7 +35,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.2"
version: "2.9.0"
boolean_selector:
dependency: transitive
description:
@ -105,14 +105,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
version: "1.2.1"
checked_yaml:
dependency: transitive
description:
@ -126,7 +119,7 @@ packages:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
code_builder:
dependency: transitive
description:
@ -161,7 +154,7 @@ packages:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "3.0.2"
dart_style:
dependency: transitive
description:
@ -182,7 +175,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.3.1"
ffi:
dependency: transitive
description:
@ -357,21 +350,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
version: "0.12.12"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
version: "0.1.5"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.8.0"
mime:
dependency: transitive
description:
@ -392,7 +385,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
path_provider_linux:
dependency: transitive
description:
@ -572,7 +565,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.2"
version: "1.9.0"
stack_trace:
dependency: transitive
description:
@ -607,28 +600,28 @@ packages:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
sync_http:
dependency: transitive
description:
name: sync_http
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
version: "0.3.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.9"
version: "0.4.12"
timing:
dependency: transitive
description:
@ -642,7 +635,7 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.3.1"
url_launcher:
dependency: "direct main"
description:
@ -712,7 +705,7 @@ packages:
name: vm_service
url: "https://pub.dartlang.org"
source: hosted
version: "8.2.2"
version: "9.0.0"
watcher:
dependency: transitive
description:

View File

@ -60,16 +60,16 @@ IDI_APP_ICON ICON "resources\\app_icon.ico"
// Version
//
#ifdef FLUTTER_BUILD_NUMBER
#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER
#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD)
#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD
#else
#define VERSION_AS_NUMBER 6,0,0
#define VERSION_AS_NUMBER 1,0,0,0
#endif
#ifdef FLUTTER_BUILD_NAME
#define VERSION_AS_STRING #FLUTTER_BUILD_NAME
#if defined(FLUTTER_VERSION)
#define VERSION_AS_STRING FLUTTER_VERSION
#else
#define VERSION_AS_STRING "6.0.0-dev.0"
#define VERSION_AS_STRING "1.0.0"
#endif
VS_VERSION_INFO VERSIONINFO
@ -93,7 +93,7 @@ BEGIN
VALUE "FileDescription", "Yubico Authenticator" "\0"
VALUE "FileVersion", VERSION_AS_STRING "\0"
VALUE "InternalName", "authenticator" "\0"
VALUE "LegalCopyright", "Copyright (C) 2021 Yubico. All rights reserved." "\0"
VALUE "LegalCopyright", "Copyright (C) 2022 Yubico. All rights reserved." "\0"
VALUE "OriginalFilename", "authenticator.exe" "\0"
VALUE "ProductName", "Yubico Authenticator" "\0"
VALUE "ProductVersion", VERSION_AS_STRING "\0"