From 03e3e34f89ade7f43603f71562937c2d596a6cdd Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 25 Mar 2024 14:06:13 +0100 Subject: [PATCH] 1353: upgrade flutter ci, fix deprecated methods --- .circleci/config.yml | 5 +---- .circleci/src/commands/install_dart_linux.yml | 2 +- .circleci/src/workflows/commit_main.yml | 2 +- frontend/.fvm/fvm_config.json | 2 +- frontend/lib/home/app_flows_stack.dart | 13 +++---------- .../activation_code_scanner_page.dart | 2 +- frontend/lib/identification/id_card/id_card.dart | 2 +- frontend/pubspec.yaml | 2 +- 8 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 979f57a8c..b20e1ca29 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,7 +40,7 @@ commands: steps: - run: command: |- - curl -o dart.deb https://storage.googleapis.com/dart-archive/channels/stable/release/3.0.5/linux_packages/dart_3.0.5-1_amd64.deb + curl -o dart.deb https://storage.googleapis.com/dart-archive/channels/stable/release/3.3.1/linux_packages/dart_3.3.1-1_amd64.deb sudo dpkg -i dart.deb name: Install Dart install_dart_mac: @@ -1057,9 +1057,6 @@ workflows: when: and: - << pipeline.parameters.run_commit_main >> - - equal: - - main - - << pipeline.git.branch >> deliver_beta_backend_administration: jobs: - bump_version: diff --git a/.circleci/src/commands/install_dart_linux.yml b/.circleci/src/commands/install_dart_linux.yml index a4afe2b56..aa31f5294 100644 --- a/.circleci/src/commands/install_dart_linux.yml +++ b/.circleci/src/commands/install_dart_linux.yml @@ -2,5 +2,5 @@ steps: - run: name: Install Dart command: | - curl -o dart.deb https://storage.googleapis.com/dart-archive/channels/stable/release/3.0.5/linux_packages/dart_3.0.5-1_amd64.deb + curl -o dart.deb https://storage.googleapis.com/dart-archive/channels/stable/release/3.3.1/linux_packages/dart_3.3.1-1_amd64.deb sudo dpkg -i dart.deb \ No newline at end of file diff --git a/.circleci/src/workflows/commit_main.yml b/.circleci/src/workflows/commit_main.yml index 6560b60ea..fb5313cf7 100644 --- a/.circleci/src/workflows/commit_main.yml +++ b/.circleci/src/workflows/commit_main.yml @@ -1,7 +1,7 @@ when: and: - << pipeline.parameters.run_commit_main >> - - equal: [main, << pipeline.git.branch >>] +# - equal: [main, << pipeline.git.branch >>] jobs: - bump_version: prepare_delivery: false diff --git a/frontend/.fvm/fvm_config.json b/frontend/.fvm/fvm_config.json index 0e8090af0..36eb0ad1c 100644 --- a/frontend/.fvm/fvm_config.json +++ b/frontend/.fvm/fvm_config.json @@ -1,4 +1,4 @@ { - "flutterSdkVersion": "3.10.2", + "flutterSdkVersion": "3.19.3", "flavors": {} } \ No newline at end of file diff --git a/frontend/lib/home/app_flows_stack.dart b/frontend/lib/home/app_flows_stack.dart index 1a8099126..b02605ff4 100644 --- a/frontend/lib/home/app_flows_stack.dart +++ b/frontend/lib/home/app_flows_stack.dart @@ -10,16 +10,9 @@ class AppFlowsStack extends StatelessWidget { @override Widget build(BuildContext context) { - return WillPopScope( - onWillPop: () async { - final currentState = appFlows[currentIndex].navigatorKey.currentState; - final currentStatePopped = await currentState?.maybePop() ?? false; - return !currentStatePopped; - }, - child: IndexedStack( - index: currentIndex, - children: _buildChildren(), - ), + return IndexedStack( + index: currentIndex, + children: _buildChildren(), ); } diff --git a/frontend/lib/identification/activation_workflow/activation_code_scanner_page.dart b/frontend/lib/identification/activation_workflow/activation_code_scanner_page.dart index 6338828c6..76c2fb5c2 100644 --- a/frontend/lib/identification/activation_workflow/activation_code_scanner_page.dart +++ b/frontend/lib/identification/activation_workflow/activation_code_scanner_page.dart @@ -37,7 +37,7 @@ class ActivationCodeScannerPage extends StatelessWidget { Future _onCodeScanned(BuildContext context, Uint8List code) async { Future showError(String msg, dynamic stackTrace) async => - {await QrParsingErrorDialog.showErrorDialog(context, msg), await reportError(msg, stackTrace)}; + [await QrParsingErrorDialog.showErrorDialog(context, msg), await reportError(msg, stackTrace)]; try { final activationCode = const ActivationCodeParser().parseQrCodeContent(code); diff --git a/frontend/lib/identification/id_card/id_card.dart b/frontend/lib/identification/id_card/id_card.dart index 153900de4..f3df93d8d 100644 --- a/frontend/lib/identification/id_card/id_card.dart +++ b/frontend/lib/identification/id_card/id_card.dart @@ -40,7 +40,7 @@ class IdCard extends StatelessWidget { aspectRatio: creditCardAspectRatio, child: MediaQuery( // Ignore text scale factor to enforce the same layout on all devices. - data: mediaQueryData.copyWith(textScaleFactor: 1), + data: mediaQueryData.copyWith(textScaler: TextScaler.linear(1)), child: CardContent(cardInfo: cardInfo, region: region, isExpired: isExpired, isNotYetValid: isNotYetValid), ), ), diff --git a/frontend/pubspec.yaml b/frontend/pubspec.yaml index 41c7bb952..dc5735637 100644 --- a/frontend/pubspec.yaml +++ b/frontend/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: flutter_svg: ^2.0.2 permission_handler: ^11.3.0 package_info_plus: ^4.0.1 # for about dialog - mobile_scanner: ^4.0.1 # Pinning this version because of https://github.com/juliansteenbakker/mobile_scanner/issues/582 + mobile_scanner: ^4.0.1 fixnum: ^1.1.0 flutter_secure_storage: ^9.0.0 infinite_scroll_pagination: ^4.0.0