refactor: Migrate to Flutter 3.7.0

This commit is contained in:
Christian Pauly 2023-01-26 09:47:30 +01:00
commit 35174cb859
54 changed files with 876 additions and 2124 deletions

View file

@ -228,9 +228,9 @@ class ChatListViewBody extends StatelessWidget {
}
const dummyChatCount = 5;
final titleColor =
Theme.of(context).textTheme.bodyText1!.color!.withAlpha(100);
Theme.of(context).textTheme.bodyLarge!.color!.withAlpha(100);
final subtitleColor =
Theme.of(context).textTheme.bodyText1!.color!.withAlpha(50);
Theme.of(context).textTheme.bodyLarge!.color!.withAlpha(50);
return ListView.builder(
key: const Key('dummychats'),
itemCount: dummyChatCount,
@ -241,7 +241,7 @@ class ChatListViewBody extends StatelessWidget {
backgroundColor: titleColor,
child: CircularProgressIndicator(
strokeWidth: 1,
color: Theme.of(context).textTheme.bodyText1!.color,
color: Theme.of(context).textTheme.bodyLarge!.color,
),
),
title: Row(

View file

@ -189,7 +189,7 @@ class ChatListItem extends StatelessWidget {
fontSize: 13,
color: unread
? Theme.of(context).colorScheme.secondary
: Theme.of(context).textTheme.bodyText2!.color,
: Theme.of(context).textTheme.bodyMedium!.color,
),
),
),

View file

@ -102,7 +102,7 @@ class ClientChooserButton extends StatelessWidget {
Text(
bundle!,
style: TextStyle(
color: Theme.of(context).textTheme.subtitle1!.color,
color: Theme.of(context).textTheme.titleMedium!.color,
fontSize: 14,
),
),

View file

@ -158,7 +158,7 @@ class _SpaceViewState extends State<SpaceView> {
MatrixLocals(L10n.of(context)!),
);
return Material(
color: Theme.of(context).backgroundColor,
color: Theme.of(context).colorScheme.background,
child: ListTile(
leading: Avatar(
mxContent: rootSpace.avatar,

View file

@ -94,7 +94,7 @@ class StoriesHeader extends StatelessWidget {
leading: CircleAvatar(
radius: Avatar.defaultSize / 2,
backgroundColor: Theme.of(context).colorScheme.surface,
foregroundColor: Theme.of(context).textTheme.bodyText1?.color,
foregroundColor: Theme.of(context).textTheme.bodyLarge?.color,
child: const Icon(Icons.camera_alt_outlined),
),
title: Text(L10n.of(context)!.addToStory),
@ -226,7 +226,7 @@ class _StoryButton extends StatelessWidget {
backgroundColor:
Theme.of(context).colorScheme.surface,
foregroundColor:
Theme.of(context).textTheme.bodyText1?.color,
Theme.of(context).textTheme.bodyLarge?.color,
child: Hero(
tag: heroTag,
child: Avatar(