chore: upgrade flutter to 3.22.0
This commit is contained in:
parent
62fcea5b0b
commit
ae0c8f73d2
30 changed files with 68 additions and 71 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ class ChatView extends StatelessWidget {
|
|||
clipBehavior: Clip.hardEdge,
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.surfaceVariant,
|
||||
.surfaceContainerHighest,
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(24),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ class ChatDetailsView extends StatelessWidget {
|
|||
style: TextButton.styleFrom(
|
||||
foregroundColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.onBackground,
|
||||
.onSurface,
|
||||
),
|
||||
label: Text(
|
||||
room.isDirectChat
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue