build: Update to flutter 3.22.0

This commit is contained in:
krille-chan 2024-05-19 07:55:07 +02:00
parent ff54610e5b
commit 3cc9d04e9f
No known key found for this signature in database
31 changed files with 76 additions and 71 deletions

View file

@ -15,6 +15,10 @@ jobs:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- run: flutter pub get
- name: workaround for https://github.com/flutter/flutter/issues/148333
run: |
flutter gen-l10n
flutter pub get
- name: Check formatting
run: dart format lib/ test/ --set-exit-if-changed
- name: Check import formatting
@ -24,6 +28,10 @@ jobs:
- run: flutter analyze
- name: Apply google services patch
run: git apply ./scripts/enable-android-google-services.patch
- name: workaround for https://github.com/flutter/flutter/issues/148333
run: |
flutter gen-l10n
flutter pub get
- run: flutter analyze
- run: flutter test

View file

@ -1,2 +1,2 @@
FLUTTER_VERSION=3.19.6
FLUTTER_VERSION=3.22.0
JAVA_VERSION=17

View file

@ -89,7 +89,7 @@ abstract class FluffyThemes {
),
),
textSelectionTheme: TextSelectionThemeData(
selectionColor: colorScheme.onBackground.withAlpha(128),
selectionColor: colorScheme.onSurface.withAlpha(128),
selectionHandleColor: colorScheme.secondary,
),
inputDecorationTheme: InputDecorationTheme(
@ -106,13 +106,13 @@ abstract class FluffyThemes {
? Colors.grey.withAlpha(64)
: null,
surfaceTintColor:
FluffyThemes.isColumnMode(context) ? colorScheme.background : null,
FluffyThemes.isColumnMode(context) ? colorScheme.surface : null,
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: brightness.reversed,
statusBarBrightness: brightness,
systemNavigationBarIconBrightness: brightness.reversed,
systemNavigationBarColor: colorScheme.background,
systemNavigationBarColor: colorScheme.surface,
),
),
textButtonTheme: TextButtonThemeData(

View file

@ -59,11 +59,11 @@ class ChatEmojiPicker extends StatelessWidget {
),
skinToneConfig: SkinToneConfig(
dialogBackgroundColor: Color.lerp(
theme.colorScheme.background,
theme.colorScheme.surface,
theme.colorScheme.primaryContainer,
0.75,
)!,
indicatorColor: theme.colorScheme.onBackground,
indicatorColor: theme.colorScheme.onSurface,
),
),
),

View file

@ -303,7 +303,7 @@ class ChatView extends StatelessWidget {
clipBehavior: Clip.hardEdge,
color: Theme.of(context)
.colorScheme
.surfaceVariant,
.surfaceContainerHighest,
borderRadius: const BorderRadius.all(
Radius.circular(24),
),

View file

@ -77,7 +77,7 @@ class Message extends StatelessWidget {
final client = Matrix.of(context).client;
final ownMessage = event.senderId == client.userID;
final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft;
var color = Theme.of(context).colorScheme.surfaceVariant;
var color = Theme.of(context).colorScheme.surfaceContainerHighest;
final displayTime = event.type == EventTypes.RoomCreate ||
nextEvent == null ||
!event.originServerTs.sameEnvironment(nextEvent!.originServerTs);
@ -101,7 +101,7 @@ class Message extends StatelessWidget {
final textColor = ownMessage
? Theme.of(context).colorScheme.onPrimary
: Theme.of(context).colorScheme.onBackground;
: Theme.of(context).colorScheme.onSurface;
final rowMainAxisAlignment =
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
@ -413,11 +413,8 @@ class Message extends StatelessWidget {
child: Center(
child: Material(
color: displayTime
? Theme.of(context).colorScheme.background
: Theme.of(context)
.colorScheme
.background
.withOpacity(0.33),
? Theme.of(context).colorScheme.surface
: Theme.of(context).colorScheme.surface.withOpacity(0.33),
borderRadius:
BorderRadius.circular(AppConfig.borderRadius / 2),
clipBehavior: Clip.antiAlias,

View file

@ -111,7 +111,7 @@ class _Reaction extends StatelessWidget {
final textColor = Theme.of(context).brightness == Brightness.dark
? Colors.white
: Colors.black;
final color = Theme.of(context).colorScheme.background;
final color = Theme.of(context).colorScheme.surface;
Widget content;
if (reactionKey.startsWith('mxc://')) {
content = Row(

View file

@ -39,7 +39,7 @@ class ReplyContent extends StatelessWidget {
color: backgroundColor ??
Theme.of(context)
.colorScheme
.background
.surface
.withOpacity(ownMessage ? 0.2 : 0.33),
borderRadius: borderRadius,
child: Row(
@ -82,7 +82,7 @@ class ReplyContent extends StatelessWidget {
style: TextStyle(
color: ownMessage
? Theme.of(context).colorScheme.onPrimary
: Theme.of(context).colorScheme.onBackground,
: Theme.of(context).colorScheme.onSurface,
fontSize: fontSize,
),
),

View file

@ -18,7 +18,7 @@ class StateMessage extends StatelessWidget {
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(AppConfig.borderRadius / 2),
),
child: Text(

View file

@ -39,7 +39,7 @@ class VerificationRequestContent extends StatelessWidget {
color: Theme.of(context).dividerColor,
),
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
),
child: Row(
mainAxisSize: MainAxisSize.min,

View file

@ -123,8 +123,7 @@ class EventVideoPlayerState extends State<EventVideoPlayer> {
Center(
child: IconButton(
style: IconButton.styleFrom(
backgroundColor:
Theme.of(context).colorScheme.background,
backgroundColor: Theme.of(context).colorScheme.surface,
),
icon: _isDownloading
? const SizedBox(

View file

@ -50,7 +50,7 @@ class SeenByRow extends StatelessWidget {
width: 16,
height: 16,
child: Material(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(32),
child: Center(
child: Text(

View file

@ -72,7 +72,7 @@ class TypingIndicators extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(top: topPadding),
child: Material(
color: Theme.of(context).colorScheme.surfaceVariant,
color: Theme.of(context).colorScheme.surfaceContainerHighest,
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(2),
topRight: Radius.circular(AppConfig.borderRadius),

View file

@ -163,7 +163,7 @@ class ChatDetailsView extends StatelessWidget {
style: TextButton.styleFrom(
foregroundColor: Theme.of(context)
.colorScheme
.onBackground,
.onSurface,
),
label: Text(
room.isDirectChat

View file

@ -189,9 +189,9 @@ class ChatListView extends StatelessWidget {
labelBehavior:
NavigationDestinationLabelBehavior.alwaysShow,
shadowColor:
Theme.of(context).colorScheme.onBackground,
Theme.of(context).colorScheme.onSurface,
surfaceTintColor:
Theme.of(context).colorScheme.background,
Theme.of(context).colorScheme.surface,
selectedIndex: controller.selectedIndex,
onDestinationSelected:
controller.onDestinationSelected,

View file

@ -67,7 +67,7 @@ class _NaviRailItemState extends State<NaviRailItem> {
borderRadius: borderRadius,
color: widget.isSelected
? Theme.of(context).colorScheme.primaryContainer
: Theme.of(context).colorScheme.background,
: Theme.of(context).colorScheme.surface,
child: Tooltip(
message: widget.toolTip,
child: InkWell(

View file

@ -307,7 +307,7 @@ class _SpaceViewState extends State<SpaceView> {
MatrixLocals(L10n.of(context)!),
);
return Material(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
child: ListTile(
leading: Avatar(
mxContent: rootSpace.avatar,
@ -545,7 +545,7 @@ class _SpaceViewState extends State<SpaceView> {
: L10n.of(context)!.enterRoom),
maxLines: 1,
style: TextStyle(
color: Theme.of(context).colorScheme.onBackground,
color: Theme.of(context).colorScheme.onSurface,
),
),
trailing: isSpace

View file

@ -125,7 +125,7 @@ class PresenceAvatar extends StatelessWidget {
final statusMsgBubbleElevation =
Theme.of(context).appBarTheme.scrolledUnderElevation ?? 4;
final statusMsgBubbleShadowColor =
Theme.of(context).colorScheme.onBackground;
Theme.of(context).colorScheme.onSurface;
final statusMsgBubbleColor = Colors.white.withAlpha(245);
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),

View file

@ -92,8 +92,8 @@ class HomeserverAppBar extends StatelessWidget {
)
: null,
fillColor: FluffyThemes.isColumnMode(context)
? Theme.of(context).colorScheme.background
: Theme.of(context).colorScheme.surfaceVariant,
? Theme.of(context).colorScheme.surface
: Theme.of(context).colorScheme.surfaceContainerHighest,
prefixText: '${L10n.of(context)!.homeserver}: ',
hintText: L10n.of(context)!.enterYourHomeserver,
suffixIcon: const Icon(Icons.search),

View file

@ -32,7 +32,7 @@ class HomeserverPickerView extends StatelessWidget {
appBar: AppBar(
titleSpacing: 12,
automaticallyImplyLeading: false,
surfaceTintColor: Theme.of(context).colorScheme.background,
surfaceTintColor: Theme.of(context).colorScheme.surface,
title: HomeserverAppBar(controller: controller),
),
body: Column(
@ -207,9 +207,9 @@ class _LoginButton extends StatelessWidget {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(99),
),
foregroundColor: Theme.of(context).colorScheme.onBackground,
foregroundColor: Theme.of(context).colorScheme.onSurface,
backgroundColor: withBorder
? Theme.of(context).colorScheme.background
? Theme.of(context).colorScheme.surface
: Colors.transparent,
),
onPressed: onPressed,

View file

@ -23,8 +23,8 @@ class LoginView extends StatelessWidget {
final titleParts = title.split(homeserver);
final textFieldFillColor = FluffyThemes.isColumnMode(context)
? Theme.of(context).colorScheme.background
: Theme.of(context).colorScheme.surfaceVariant;
? Theme.of(context).colorScheme.surface
: Theme.of(context).colorScheme.surfaceContainerHighest;
return LoginScaffold(
enforceMobileMode: Matrix.of(context).client.isLogged(),

View file

@ -105,12 +105,12 @@ class NewGroupView extends StatelessWidget {
SwitchListTile.adaptive(
secondary: Icon(
Icons.lock_outlined,
color: Theme.of(context).colorScheme.onBackground,
color: Theme.of(context).colorScheme.onSurface,
),
title: Text(
L10n.of(context)!.enableEncryption,
style: TextStyle(
color: Theme.of(context).colorScheme.onBackground,
color: Theme.of(context).colorScheme.onSurface,
),
),
value: !controller.publicGroup,

View file

@ -37,7 +37,7 @@ class SettingsView extends StatelessWidget {
],
),
body: ListTileTheme(
iconColor: Theme.of(context).colorScheme.onBackground,
iconColor: Theme.of(context).colorScheme.onSurface,
child: ListView(
key: const Key('SettingsListViewContent'),
children: <Widget>[
@ -103,7 +103,7 @@ class SettingsView extends StatelessWidget {
),
style: TextButton.styleFrom(
foregroundColor:
Theme.of(context).colorScheme.onBackground,
Theme.of(context).colorScheme.onSurface,
),
label: Text(
displayname,

View file

@ -23,7 +23,7 @@ class SettingsPasswordView extends StatelessWidget {
],
),
body: ListTileTheme(
iconColor: Theme.of(context).colorScheme.onBackground,
iconColor: Theme.of(context).colorScheme.onSurface,
child: MaxWidthBody(
child: Padding(
padding: const EdgeInsets.all(16.0),

View file

@ -21,7 +21,7 @@ class SettingsSecurityView extends StatelessWidget {
return Scaffold(
appBar: AppBar(title: Text(L10n.of(context)!.security)),
body: ListTileTheme(
iconColor: Theme.of(context).colorScheme.onBackground,
iconColor: Theme.of(context).colorScheme.onSurface,
child: MaxWidthBody(
child: FutureBuilder(
future: Matrix.of(context)

View file

@ -90,7 +90,7 @@ class SettingsStyleView extends StatelessWidget {
size: 16,
color: Theme.of(context)
.colorScheme
.onBackground,
.onSurface,
),
),
Text(
@ -99,7 +99,7 @@ class SettingsStyleView extends StatelessWidget {
style: TextStyle(
color: Theme.of(context)
.colorScheme
.onBackground,
.onSurface,
),
),
],

View file

@ -119,7 +119,8 @@ class UserBottomSheetView extends StatelessWidget {
Padding(
padding: const EdgeInsets.all(12.0),
child: Material(
color: Theme.of(context).colorScheme.surfaceVariant,
color:
Theme.of(context).colorScheme.surfaceContainerHighest,
borderRadius:
BorderRadius.circular(AppConfig.borderRadius),
child: ListTile(
@ -136,7 +137,7 @@ class UserBottomSheetView extends StatelessWidget {
TextButton.icon(
style: TextButton.styleFrom(
backgroundColor:
Theme.of(context).colorScheme.background,
Theme.of(context).colorScheme.surface,
foregroundColor:
Theme.of(context).colorScheme.primary,
),
@ -205,7 +206,7 @@ class UserBottomSheetView extends StatelessWidget {
),
style: TextButton.styleFrom(
foregroundColor:
Theme.of(context).colorScheme.onBackground,
Theme.of(context).colorScheme.onSurface,
),
label: Text(
displayname,

View file

@ -99,7 +99,7 @@ class Avatar extends StatelessWidget {
height: 16,
decoration: BoxDecoration(
color: presenceBackgroundColor ??
Theme.of(context).colorScheme.background,
Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(32),
),
alignment: Alignment.center,
@ -111,7 +111,7 @@ class Avatar extends StatelessWidget {
borderRadius: BorderRadius.circular(16),
border: Border.all(
width: 1,
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
),
),
),

View file

@ -42,11 +42,11 @@ class LoginScaffold extends StatelessWidget {
body: body,
backgroundColor: isMobileMode
? null
: Theme.of(context).colorScheme.background.withOpacity(0.8),
: Theme.of(context).colorScheme.surface.withOpacity(0.8),
bottomNavigationBar: isMobileMode
? Material(
elevation: 4,
shadowColor: Theme.of(context).colorScheme.onBackground,
shadowColor: Theme.of(context).colorScheme.onSurface,
child: const _PrivacyButtons(
mainAxisAlignment: MainAxisAlignment.center,
),

View file

@ -37,7 +37,7 @@ class UnreadRoomsBadge extends StatelessWidget {
badgeColor: Theme.of(context).colorScheme.primary,
elevation: 4,
borderSide: BorderSide(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
width: 2,
),
),

View file

@ -1017,10 +1017,10 @@ packages:
dependency: "direct main"
description:
name: intl
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
url: "https://pub.dev"
source: hosted
version: "0.18.1"
version: "0.19.0"
io:
dependency: transitive
description:
@ -1090,26 +1090,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
version: "10.0.4"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.3"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.1"
license_checker:
dependency: "direct dev"
description:
@ -1218,10 +1218,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.12.0"
mgrs_dart:
dependency: transitive
description:
@ -1983,26 +1983,26 @@ packages:
dependency: transitive
description:
name: test
sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f
sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073"
url: "https://pub.dev"
source: hosted
version: "1.24.9"
version: "1.25.2"
test_api:
dependency: transitive
description:
name: test_api
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
url: "https://pub.dev"
source: hosted
version: "0.6.1"
version: "0.7.0"
test_core:
dependency: transitive
description:
name: test_core
sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a
sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4"
url: "https://pub.dev"
source: hosted
version: "0.5.9"
version: "0.6.0"
timezone:
dependency: transitive
description:
@ -2295,10 +2295,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
url: "https://pub.dev"
source: hosted
version: "13.0.0"
version: "14.2.1"
wakelock_plus:
dependency: "direct main"
description: