fixed warnings after update

This commit is contained in:
Kima
2024-06-19 22:34:56 +02:00
parent ce02dda46c
commit 8860a0269c
46 changed files with 177 additions and 132 deletions

View File

@@ -110,10 +110,10 @@ class ErrorReportScreen extends StatelessWidget {
height: 48,
child: TextButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(
padding: WidgetStateProperty.all(
const EdgeInsets.symmetric(vertical: 10.0)),
backgroundColor: MaterialStateProperty.all(Colors.black),
shape: MaterialStateProperty.all(
backgroundColor: WidgetStateProperty.all(Colors.black),
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0)),
),
@@ -135,18 +135,18 @@ class ErrorReportScreen extends StatelessWidget {
height: 48,
child: OutlinedButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(
padding: WidgetStateProperty.all(
const EdgeInsets.symmetric(vertical: 14.0),
),
backgroundColor: MaterialStateProperty.all(
backgroundColor: WidgetStateProperty.all(
const Color(0xFFF3F7FE),
),
shape: MaterialStateProperty.all(
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0),
),
),
side: MaterialStateProperty.all(
side: WidgetStateProperty.all(
const BorderSide(width: 1.0, color: Color(0xFFC7D3EB)),
),
),

View File

@@ -39,7 +39,7 @@ class ErrorScreen extends StatelessWidget {
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14.0),
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
),
child: CupertinoScrollbar(
child: SingleChildScrollView(

View File

@@ -221,7 +221,7 @@
// horizontal: 16),
// child: FilledButton(
// style: ButtonStyle(
// shape: MaterialStateProperty.all<
// shape: WidgetStateProperty.all<
// RoundedRectangleBorder>(
// const RoundedRectangleBorder(
// borderRadius: BorderRadius.all(

View File

@@ -47,7 +47,7 @@ class SchoolInputOverlayWidget extends StatelessWidget {
showWhenUnlinked: false,
offset: Offset(0.0, size.height + 5.0),
child: Material(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0)),
elevation: 4.0,

View File

@@ -302,7 +302,7 @@ class NavigationScreenState extends State<NavigationScreen>
children: [
// Status bar
Material(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
child: const StatusBar(),
),

View File

@@ -178,8 +178,8 @@ class _ModifySubjectNamesState extends State<ModifySubjectNames> {
elevation: 8,
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(40),
thickness: MaterialStateProperty.all<double>(6.0),
trackVisibility: MaterialStateProperty.all<bool>(true),
thickness: WidgetStateProperty.all<double>(6.0),
trackVisibility: WidgetStateProperty.all<bool>(true),
),
offset: const Offset(-10, -10),
),

View File

@@ -993,7 +993,7 @@ class SettingsScreenState extends State<SettingsScreen>
fontWeight: FontWeight.w500,
color: AppColors.of(context).text),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(

View File

@@ -202,7 +202,7 @@ class EditSubjectScreenState extends State<EditSubjectScreen> {
children: [
Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius:
const BorderRadius.all(Radius.circular(12.0))),
padding: const EdgeInsets.symmetric(vertical: 10.0),
@@ -302,7 +302,7 @@ class EditSubjectScreenState extends State<EditSubjectScreen> {
children: [
Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius:
const BorderRadius.all(Radius.circular(12.0))),
padding: const EdgeInsets.symmetric(vertical: 10.0),

View File

@@ -79,7 +79,7 @@ class GradeColorsSettingsScreenState extends State<GradeColorsSettingsScreen> {
children: [
Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(75.0),
boxShadow: [
BoxShadow(

View File

@@ -454,7 +454,7 @@ class PaintListScreenState extends State<PaintListScreen>
),
Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius:
const BorderRadius.all(Radius.circular(12.0))),
padding: const EdgeInsets.symmetric(vertical: 10.0),

View File

@@ -842,11 +842,11 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(40),
thickness:
MaterialStateProperty.all<double>(6.0),
WidgetStateProperty.all<double>(6.0),
trackVisibility:
MaterialStateProperty.all<bool>(true),
WidgetStateProperty.all<bool>(true),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
WidgetStateProperty.all<bool>(true),
),
),
customButton: PanelButton(

View File

@@ -234,7 +234,7 @@ class _PremiumCustomAccentColorSettingState
// bool hasAccess = Provider.of<PlusProvider>(context)
// .hasScope(PremiumScopes.customColors);
bool hasAccess = true;
bool isBackgroundDifferent = Theme.of(context).colorScheme.background !=
bool isBackgroundDifferent = Theme.of(context).colorScheme.surface !=
AppColors.of(context).background;
ThemeMode currentTheme = Theme.of(context).brightness == Brightness.light
@@ -251,8 +251,8 @@ class _PremiumCustomAccentColorSettingState
animation: _openAnimController,
builder: (context, child) {
final backgroundGradientBottomColor = isBackgroundDifferent
? Theme.of(context).colorScheme.background
: HSVColor.fromColor(Theme.of(context).colorScheme.background)
? Theme.of(context).colorScheme.surface
: HSVColor.fromColor(Theme.of(context).colorScheme.surface)
.withValue(currentTheme == ThemeMode.dark
? 0.1 * _openAnimController.value
: 1.0 - (0.1 * _openAnimController.value))
@@ -271,7 +271,7 @@ class _PremiumCustomAccentColorSettingState
stops: const [0.0, 0.75],
colors: isBackgroundDifferent
? [
Theme.of(context).colorScheme.background.withOpacity(1 -
Theme.of(context).colorScheme.surface.withOpacity(1 -
((currentTheme == ThemeMode.dark ? 0.65 : 0.25) *
backgroundAnimation.value)),
backgroundGradientBottomColor,
@@ -383,7 +383,7 @@ class _PremiumCustomAccentColorSettingState
],
colors: [
settings.customBackgroundColor ??
Theme.of(context).colorScheme.background,
Theme.of(context).colorScheme.surface,
isBackgroundDifferent
? HSVColor.fromColor(Theme.of(context)
.colorScheme

View File

@@ -96,7 +96,7 @@ class PersonalityBodyState extends State<PersonalityBody> {
size: 30,
),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(
backgroundColor: WidgetStateProperty.all(
Colors.white.withOpacity(0.2)),
),
),
@@ -113,7 +113,7 @@ class PersonalityBodyState extends State<PersonalityBody> {
size: 30,
),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(
backgroundColor: WidgetStateProperty.all(
Colors.white.withOpacity(0.2)),
),
),