From fec48737c74a3ef4e3836d385b8b1dd0c108314c Mon Sep 17 00:00:00 2001 From: Rafael <1024481@stud.hs-mannheim.de> Date: Mon, 3 Jun 2024 23:22:43 +0200 Subject: [PATCH] Deprecated: ColorScheme.background is now ColorScheme.surface --- lib/components/my_drawer.dart | 2 +- lib/pages/login_page.dart | 2 +- lib/pages/register_page.dart | 2 +- lib/pages/settings_page.dart | 2 +- lib/themes/dark_mode.dart | 2 +- lib/themes/light_mode.dart | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/components/my_drawer.dart b/lib/components/my_drawer.dart index d4f2201..560b53a 100644 --- a/lib/components/my_drawer.dart +++ b/lib/components/my_drawer.dart @@ -16,7 +16,7 @@ class MyDrawer extends StatelessWidget { @override Widget build(BuildContext context) { return Drawer( - backgroundColor: Theme.of(context).colorScheme.background, + backgroundColor: Theme.of(context).colorScheme.surface, child: CustomScrollView(slivers: [ SliverFillRemaining( hasScrollBody: false, diff --git a/lib/pages/login_page.dart b/lib/pages/login_page.dart index bdf7816..5217077 100644 --- a/lib/pages/login_page.dart +++ b/lib/pages/login_page.dart @@ -50,7 +50,7 @@ class LoginPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: Theme.of(context).colorScheme.background, + backgroundColor: Theme.of(context).colorScheme.surface, body: Center( child: SingleChildScrollView( child: Column( diff --git a/lib/pages/register_page.dart b/lib/pages/register_page.dart index 80dbc31..8354fc6 100644 --- a/lib/pages/register_page.dart +++ b/lib/pages/register_page.dart @@ -54,7 +54,7 @@ class RegisterPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: Theme.of(context).colorScheme.background, + backgroundColor: Theme.of(context).colorScheme.surface, body: Center( child: ListView(children: [ Column(mainAxisAlignment: MainAxisAlignment.center, children: [ diff --git a/lib/pages/settings_page.dart b/lib/pages/settings_page.dart index 60f7392..3046b6c 100644 --- a/lib/pages/settings_page.dart +++ b/lib/pages/settings_page.dart @@ -9,7 +9,7 @@ class SettingsPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: Theme.of(context).colorScheme.background, + backgroundColor: Theme.of(context).colorScheme.surface, appBar: AppBar( title: const Text("Settings"), ), diff --git a/lib/themes/dark_mode.dart b/lib/themes/dark_mode.dart index 53fed29..3c7cf3e 100644 --- a/lib/themes/dark_mode.dart +++ b/lib/themes/dark_mode.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; ThemeData darkMode = ThemeData( colorScheme: ColorScheme.dark( - background: Colors.grey.shade900, + surface: Colors.grey.shade900, primary: Colors.grey.shade600, secondary: Colors.grey.shade700, tertiary: Colors.grey.shade800, diff --git a/lib/themes/light_mode.dart b/lib/themes/light_mode.dart index 71a20b8..f48d9f4 100644 --- a/lib/themes/light_mode.dart +++ b/lib/themes/light_mode.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; ThemeData lightMode = ThemeData( colorScheme: ColorScheme.light( - background: Colors.grey.shade300, + surface: Colors.grey.shade300, primary: Colors.grey.shade500, secondary: Colors.grey.shade200, tertiary: Colors.white,