Deprecated: ColorScheme.background is now ColorScheme.surface

master
Rafael 2024-06-03 23:22:43 +02:00
parent e350bdf91c
commit fec48737c7
6 changed files with 6 additions and 6 deletions

View File

@ -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,

View File

@ -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(

View File

@ -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: [

View File

@ -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"),
),

View File

@ -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,

View File

@ -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,