builds: migrate to dart 3.0/flutter 3.10

This commit is contained in:
lauren n. liberda 2023-05-15 16:52:03 +00:00 committed by Krille
parent 77e1da8318
commit b1c38d766f
8 changed files with 106 additions and 106 deletions

View File

@ -1,5 +1,5 @@
variables:
FLUTTER_VERSION: 3.7.11
FLUTTER_VERSION: 3.10.0
image: ghcr.io/cirruslabs/flutter:${FLUTTER_VERSION}
@ -19,7 +19,7 @@ code_analyze:
script:
- flutter pub get
- dart run import_sorter:main --no-comments --exit-if-changed
- flutter format lib/ test/ --set-exit-if-changed
- dart format lib/ test/ --set-exit-if-changed
- flutter analyze
- git apply ./scripts/enable-android-google-services.patch
- flutter pub get

View File

@ -375,7 +375,7 @@ class _Emoji extends StatelessWidget {
sasEmoji[emoji.number]['translated_descriptions'],
);
translations['en'] = emoji.name;
for (final locale in window.locales) {
for (final locale in PlatformDispatcher.instance.locales) {
final wantLocaleParts = locale.toString().split('_');
final wantLanguage = wantLocaleParts.removeAt(0);
for (final haveLocale in translations.keys) {

View File

@ -60,7 +60,7 @@ class BackgroundPush {
Future<void> loadLocale() async {
// inspired by _lookupL10n in .dart_tool/flutter_gen/gen_l10n/l10n.dart
l10n ??= (context != null ? L10n.of(context!) : null) ??
(await L10n.delegate.load(window.locale));
(await L10n.delegate.load(PlatformDispatcher.instance.locale));
}
final pendingTests = <String, Completer<void>>{};

View File

@ -82,7 +82,7 @@ Future<void> _tryPushHelper(
if (!isBackgroundMessage &&
activeRoomId == notification.roomId &&
activeRoomId != null &&
client?.syncPresence == null) {
client.syncPresence == null) {
Logs().v('Room is in foreground. Stop push helper here.');
return;
}
@ -144,7 +144,7 @@ Future<void> _tryPushHelper(
return;
}
l10n ??= await L10n.delegate.load(window.locale);
l10n ??= await L10n.delegate.load(PlatformDispatcher.instance.locale);
final matrixLocals = MatrixLocals(l10n);
// Calculate the body

View File

@ -47,7 +47,6 @@ extension UiaRequestManager on MatrixState {
),
);
case AuthenticationTypes.emailIdentity:
final currentThreepidCreds = this.currentThreepidCreds;
if (currentThreepidCreds == null) {
return uiaRequest.cancel(
UiaException(L10n.of(widget.context)!.serverRequiresEmail),
@ -57,7 +56,7 @@ extension UiaRequestManager on MatrixState {
session: uiaRequest.session,
type: AuthenticationTypes.emailIdentity,
threepidCreds: ThreepidCreds(
sid: currentThreepidCreds.sid,
sid: currentThreepidCreds!.sid,
clientSecret: currentClientSecret,
),
);

View File

@ -20,7 +20,8 @@ import flutter_webrtc
import geolocator_apple
import just_audio
import macos_ui
import package_info_plus_macos
import macos_window_utils
import package_info_plus
import path_provider_foundation
import record_macos
import share_plus
@ -47,6 +48,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
MacOSUiPlugin.register(with: registry.registrar(forPlugin: "MacOSUiPlugin"))
MacOSWindowUtilsPlugin.register(with: registry.registrar(forPlugin: "MacOSWindowUtilsPlugin"))
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
RecordMacosPlugin.register(with: registry.registrar(forPlugin: "RecordMacosPlugin"))

View File

@ -69,10 +69,10 @@ packages:
dependency: transitive
description:
name: async
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
version: "2.10.0"
version: "2.11.0"
audio_session:
dependency: transitive
description:
@ -157,10 +157,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.3.0"
charcode:
dependency: transitive
description:
@ -197,10 +197,10 @@ packages:
dependency: "direct main"
description:
name: collection
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
url: "https://pub.dev"
source: hosted
version: "1.17.0"
version: "1.17.1"
connectivity_plus:
dependency: "direct main"
description:
@ -413,10 +413,10 @@ packages:
dependency: "direct main"
description:
name: file_picker
sha256: d8e9ca7e5d1983365c277f12c21b4362df6cf659c99af146ad4d04eb33033013
sha256: c7a8e25ca60e7f331b153b0cb3d405828f18d3e72a6fa1d9440c86556fffc877
url: "https://pub.dev"
source: hosted
version: "5.2.6"
version: "5.3.0"
flutter:
dependency: "direct main"
description: flutter
@ -569,13 +569,13 @@ packages:
source: hosted
version: "3.1.0"
flutter_math_fork:
dependency: transitive
dependency: "direct overridden"
description:
name: flutter_math_fork
sha256: fa511bdcb91fc35eac155ec5790883886dd9de6572fea549f1ad4660ef6804e9
sha256: "012ca684618b74286ab84fcc2f0e8d66b03ad623b8f79aea738f6b9c287f432c"
url: "https://pub.dev"
source: hosted
version: "0.6.3+1"
version: "0.7.0"
flutter_matrix_html:
dependency: "direct main"
description:
@ -931,10 +931,10 @@ packages:
dependency: "direct main"
description:
name: intl
sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91"
sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6
url: "https://pub.dev"
source: hosted
version: "0.17.0"
version: "0.18.0"
isolate:
dependency: transitive
description:
@ -947,10 +947,10 @@ packages:
dependency: transitive
description:
name: js
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.6.5"
version: "0.6.7"
json_annotation:
dependency: transitive
description:
@ -1025,13 +1025,22 @@ packages:
source: hosted
version: "1.0.1"
macos_ui:
dependency: "direct overridden"
description:
path: "."
ref: "5bbc2de46f8c032ca6f8d1b01377316eefe00e54"
resolved-ref: "5bbc2de46f8c032ca6f8d1b01377316eefe00e54"
url: "https://github.com/the-best-is-best/macos_ui.git"
source: git
version: "2.0.0-beta.1"
macos_window_utils:
dependency: transitive
description:
name: macos_ui
sha256: "57208eec8180656acd379e1c754e9b6d8830f32a020b94571ae2188f8112075b"
name: macos_window_utils
sha256: "510de576b5432dd9ef9e4c258abcc021c6dfbb17a78a344688848a6784b352b8"
url: "https://pub.dev"
source: hosted
version: "1.12.2"
version: "1.1.2"
markdown:
dependency: transitive
description:
@ -1044,10 +1053,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
url: "https://pub.dev"
source: hosted
version: "0.12.13"
version: "0.12.15"
material_color_utilities:
dependency: transitive
description:
@ -1083,19 +1092,20 @@ packages:
matrix_link_text:
dependency: "direct main"
description:
name: matrix_link_text
sha256: "1860efd69df505807d1b7963794708d1f76cf67b866a00d11ee81e05dc56aaca"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
path: "."
ref: "9b4d5c28dc602c17757d0eb689aafffe02719f26"
resolved-ref: "9b4d5c28dc602c17757d0eb689aafffe02719f26"
url: "https://github.com/TheOneWithTheBraid/matrix_link_text.git"
source: git
version: "1.1.0"
meta:
dependency: transitive
description:
name: meta
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.9.1"
mgrs_dart:
dependency: transitive
description:
@ -1188,58 +1198,26 @@ packages:
dependency: "direct main"
description:
name: package_info_plus
sha256: f62d7253edc197fe3c88d7c2ddab82d68f555e778d55390ccc3537eca8e8d637
sha256: d39e8fbff4c5aef4592737e25ad6ac500df006ce7a7a8e1f838ce1256e167542
url: "https://pub.dev"
source: hosted
version: "1.4.3+1"
package_info_plus_linux:
dependency: transitive
description:
name: package_info_plus_linux
sha256: "04b575f44233d30edbb80a94e57cad9107aada334fc02aabb42b6becd13c43fc"
url: "https://pub.dev"
source: hosted
version: "1.0.5"
package_info_plus_macos:
dependency: transitive
description:
name: package_info_plus_macos
sha256: a2ad8b4acf4cd479d4a0afa5a74ea3f5b1c7563b77e52cc32b3ee6956d5482a6
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "4.0.0"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
sha256: f7a0c8f1e7e981bc65f8b64137a53fd3c195b18d429fba960babc59a5a1c7ae8
sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
package_info_plus_web:
dependency: transitive
description:
name: package_info_plus_web
sha256: f0829327eb534789e0a16ccac8936a80beed4e2401c4d3a74f3f39094a822d3b
url: "https://pub.dev"
source: hosted
version: "1.0.6"
package_info_plus_windows:
dependency: transitive
description:
name: package_info_plus_windows
sha256: "79524f11c42dd9078b96d797b3cf79c0a2883a50c4920dc43da8562c115089bc"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.0.1"
path:
dependency: transitive
description:
name: path
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev"
source: hosted
version: "1.8.2"
version: "1.8.3"
path_drawing:
dependency: transitive
description:
@ -1300,10 +1278,10 @@ packages:
dependency: transitive
description:
name: path_provider_windows
sha256: f53720498d5a543f9607db4b0e997c4b5438884de25b0f73098cc2671a51b130
sha256: d3f80b32e83ec208ac95253e0cd4d298e104fbc63cb29c5c69edaed43b0c69d6
url: "https://pub.dev"
source: hosted
version: "2.1.5"
version: "2.1.6"
pedantic:
dependency: transitive
description:
@ -1588,18 +1566,18 @@ packages:
dependency: "direct main"
description:
name: share_plus
sha256: "8c6892037b1824e2d7e8f59d54b3105932899008642e6372e5079c6939b4b625"
sha256: "322a1ec9d9fe07e2e2252c098ce93d12dbd06133cc4c00ffe6a4ef505c295c17"
url: "https://pub.dev"
source: hosted
version: "6.3.1"
version: "7.0.0"
share_plus_platform_interface:
dependency: transitive
description:
name: share_plus_platform_interface
sha256: "82ddd4ab9260c295e6e39612d4ff00390b9a7a21f1bb1da771e2f232d80ab8a1"
sha256: "0c6e61471bd71b04a138b8b588fa388e66d8b005e6f2deda63371c5c505a0981"
url: "https://pub.dev"
source: hosted
version: "3.2.0"
version: "3.2.1"
shared_preferences:
dependency: "direct main"
description:
@ -1761,10 +1739,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
url: "https://pub.dev"
source: hosted
version: "0.4.16"
version: "0.5.1"
timezone:
dependency: transitive
description:
@ -1921,10 +1899,10 @@ packages:
dependency: transitive
description:
name: url_launcher_linux
sha256: "206fb8334a700ef7754d6a9ed119e7349bc830448098f21a69bf1b4ed038cabc"
sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5"
url: "https://pub.dev"
source: hosted
version: "3.0.4"
version: "3.0.5"
url_launcher_macos:
dependency: transitive
description:
@ -1953,10 +1931,10 @@ packages:
dependency: transitive
description:
name: url_launcher_windows
sha256: a83ba3607a507758669cfafb03f9de09bf6e6280c14d9b9cb18f013e406dcacd
sha256: "254708f17f7c20a9c8c471f67d86d76d4a3f9c1591aad1e15292008aceb82771"
url: "https://pub.dev"
source: hosted
version: "3.0.5"
version: "3.0.6"
url_strategy:
dependency: transitive
description:
@ -2049,10 +2027,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: e7fb6c2282f7631712b69c19d1bff82f3767eea33a2321c14fa59ad67ea391c7
sha256: f6deed8ed625c52864792459709183da231ebf66ff0cf09e69b573227c377efe
url: "https://pub.dev"
source: hosted
version: "9.4.0"
version: "11.3.0"
vrouter:
dependency: "direct main"
description:
@ -2094,13 +2072,14 @@ packages:
source: hosted
version: "0.4.0"
wakelock_windows:
dependency: transitive
dependency: "direct overridden"
description:
name: wakelock_windows
sha256: "857f77b3fe6ae82dd045455baa626bc4b93cb9bb6c86bf3f27c182167c3a5567"
url: "https://pub.dev"
source: hosted
version: "0.2.1"
path: wakelock_windows
ref: "2a9bca63a540771f241d688562351482b2cf234c"
resolved-ref: "2a9bca63a540771f241d688562351482b2cf234c"
url: "https://github.com/timsneath/wakelock.git"
source: git
version: "0.2.2"
watcher:
dependency: transitive
description:
@ -2113,10 +2092,10 @@ packages:
dependency: transitive
description:
name: webdriver
sha256: ef67178f0cc7e32c1494645b11639dd1335f1d18814aa8435113a92e9ef9d841
sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "3.0.2"
webrtc_interface:
dependency: "direct main"
description:
@ -2129,10 +2108,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46
sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c"
url: "https://pub.dev"
source: hosted
version: "3.1.3"
version: "4.1.4"
window_to_front:
dependency: transitive
description:
@ -2174,5 +2153,5 @@ packages:
source: hosted
version: "3.1.1"
sdks:
dart: ">=2.19.0 <3.0.0"
flutter: ">=3.4.0-17.0.pre"
dart: ">=3.0.0 <4.0.0"
flutter: ">=3.7.0"

View File

@ -4,7 +4,7 @@ publish_to: none
version: 1.11.2+3360
environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=3.0.0 <4.0.0"
dependencies:
adaptive_dialog: ^1.8.0+1
@ -61,7 +61,7 @@ dependencies:
matrix_homeserver_recommendations: ^0.3.0
matrix_link_text: ^1.0.2
native_imaging: ^0.1.0
package_info_plus: ^1.3.0
package_info_plus: ^4.0.0
path_provider: ^2.0.9
permission_handler: ^10.0.0
pin_code_text_field: ^1.8.0
@ -72,7 +72,7 @@ dependencies:
receive_sharing_intent: ^1.4.5
record: ^4.4.4
scroll_to_index: ^3.0.1
share_plus: ^6.3.1
share_plus: ^7.0.0
shared_preferences: 2.0.15 # Pinned because https://github.com/flutter/flutter/issues/118401
slugify: ^2.0.0
swipe_to_action: ^0.2.0
@ -85,7 +85,7 @@ dependencies:
video_compress: ^3.1.1
video_player: ^2.2.18
vrouter: ^1.2.0+21
wakelock: ^0.6.1+1
wakelock: ^0.6.2
webrtc_interface: ^1.0.13
dev_dependencies:
@ -143,12 +143,14 @@ msix_config:
install_certificate: false
dependency_overrides:
# fake secure storage plugin for Windows
# See: https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/15161
# null safety
flutter_math_fork: ">=0.7.0"
flutter_matrix_html:
git:
url: https://github.com/Sorunome/flutter_matrix_html.git
ref: krille/update-dependencies
# fake secure storage plugin for Windows
# See: https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/15161
flutter_secure_storage_windows:
git:
url: https://gitlab.com/TheOneWithTheBraid/flutter_secure_storage_windows.git
@ -166,3 +168,21 @@ dependency_overrides:
git:
url: https://github.com/TheOneWithTheBraid/keyboard_shortcuts.git
ref: null-safety
# null safety
# https://github.com/macosui/macos_ui/pull/426
macos_ui:
git:
url: https://github.com/the-best-is-best/macos_ui.git
ref: 5bbc2de46f8c032ca6f8d1b01377316eefe00e54
# https://github.com/Sorunome/matrix_link_text/pull/2
matrix_link_text:
git:
url: https://github.com/TheOneWithTheBraid/matrix_link_text.git
ref: 9b4d5c28dc602c17757d0eb689aafffe02719f26
# blocked upgrade of package_info_plus for null safety
# https://github.com/creativecreatorormaybenot/wakelock/pull/203
wakelock_windows:
git:
url: https://github.com/timsneath/wakelock.git
ref: 2a9bca63a540771f241d688562351482b2cf234c
path: wakelock_windows