mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 02:01:36 +03:00
Fix deprecated use of background color
This commit is contained in:
parent
3d1345577f
commit
55740e62ac
@ -448,7 +448,7 @@ class _AppPageState extends ConsumerState<AppPage> {
|
||||
pinned: true,
|
||||
delegate: _SliverTitleDelegate(
|
||||
child: ColoredBox(
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
child: Padding(
|
||||
key: _sliverTitleWrapperGlobalKey,
|
||||
padding: const EdgeInsets.only(
|
||||
@ -622,7 +622,7 @@ class _AppPageState extends ConsumerState<AppPage> {
|
||||
),
|
||||
scrolledUnderElevation: 0.0,
|
||||
leadingWidth: hasRail ? 84 : null,
|
||||
backgroundColor: Theme.of(context).colorScheme.background,
|
||||
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||
title: _buildAppBarTitle(
|
||||
context,
|
||||
hasRail,
|
||||
|
@ -28,8 +28,7 @@ class FsDialog extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
return Dialog.fullscreen(
|
||||
backgroundColor:
|
||||
Theme.of(context).colorScheme.background.withOpacity(0.7),
|
||||
backgroundColor: Theme.of(context).colorScheme.surface.withOpacity(0.7),
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
|
@ -80,7 +80,7 @@ class _AccountViewState extends ConsumerState<AccountView> {
|
||||
final helper = AccountHelper(context, ref, credential);
|
||||
final subtitle = helper.subtitle;
|
||||
final circleAvatar = CircleAvatar(
|
||||
foregroundColor: Theme.of(context).colorScheme.background,
|
||||
foregroundColor: Theme.of(context).colorScheme.surface,
|
||||
backgroundColor: _iconColor(400),
|
||||
child: Text(
|
||||
(credential.issuer ?? credential.name).characters.first.toUpperCase(),
|
||||
|
@ -30,7 +30,7 @@ class AppTheme {
|
||||
Brightness.dark => ColorScheme.fromSeed(
|
||||
seedColor: primaryColor,
|
||||
brightness: brightness,
|
||||
background: const Color(0xff282828),
|
||||
surface: const Color(0xff282828),
|
||||
onSurface: const Color(0xeeffffff),
|
||||
onSurfaceVariant: const Color(0xaaffffff),
|
||||
),
|
||||
@ -78,6 +78,7 @@ class AppTheme {
|
||||
useMaterial3: true,
|
||||
colorScheme: colorScheme,
|
||||
fontFamily: 'Roboto',
|
||||
scaffoldBackgroundColor: colorScheme.surface,
|
||||
appBarTheme: const AppBarTheme(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
@ -102,13 +103,3 @@ class AppTheme {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: Remove this. It is left here as a reference as we adjust styles to work with Flutter 3.7.
|
||||
/// This fixes the issue with FilterChip resizing vertically on toggle.
|
||||
BorderSide? _chipBorder(Color color) =>
|
||||
MaterialStateBorderSide.resolveWith((states) => BorderSide(
|
||||
width: 1,
|
||||
color: states.contains(MaterialState.selected)
|
||||
? Colors.transparent
|
||||
: color));
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user