mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 01:01:56 +01:00
refactor: Migrate deprecated member
This commit is contained in:
parent
e9cee0abe2
commit
c6f9e36f4b
5 changed files with 23 additions and 27 deletions
|
@ -10,7 +10,7 @@ var lightCustomTheme = ThemeData(
|
|||
useMaterial3: true,
|
||||
colorScheme: lightCustomColorScheme,
|
||||
navigationBarTheme: NavigationBarThemeData(
|
||||
labelTextStyle: MaterialStateProperty.all(
|
||||
labelTextStyle: WidgetStateProperty.all(
|
||||
TextStyle(
|
||||
color: lightCustomColorScheme.onSurface,
|
||||
fontWeight: FontWeight.w500,
|
||||
|
@ -31,7 +31,7 @@ var darkCustomTheme = ThemeData(
|
|||
useMaterial3: true,
|
||||
colorScheme: darkCustomColorScheme,
|
||||
navigationBarTheme: NavigationBarThemeData(
|
||||
labelTextStyle: MaterialStateProperty.all(
|
||||
labelTextStyle: WidgetStateProperty.all(
|
||||
TextStyle(
|
||||
color: darkCustomColorScheme.onSurface,
|
||||
fontWeight: FontWeight.w500,
|
||||
|
|
|
@ -2,7 +2,6 @@ import 'dart:ui';
|
|||
import 'package:dynamic_color/dynamic_color.dart';
|
||||
import 'package:dynamic_themes/dynamic_themes.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:revanced_manager/app/app.router.dart';
|
||||
|
@ -52,7 +51,7 @@ class _DynamicThemeBuilderState extends State<DynamicThemeBuilder>
|
|||
final ThemeData lightDynamicTheme = ThemeData(
|
||||
useMaterial3: true,
|
||||
navigationBarTheme: NavigationBarThemeData(
|
||||
labelTextStyle: MaterialStateProperty.all(
|
||||
labelTextStyle: WidgetStateProperty.all(
|
||||
GoogleFonts.roboto(
|
||||
color: lightColorScheme?.onSurface,
|
||||
fontWeight: FontWeight.w500,
|
||||
|
@ -66,7 +65,7 @@ class _DynamicThemeBuilderState extends State<DynamicThemeBuilder>
|
|||
brightness: Brightness.dark,
|
||||
useMaterial3: true,
|
||||
navigationBarTheme: NavigationBarThemeData(
|
||||
labelTextStyle: MaterialStateProperty.all(
|
||||
labelTextStyle: WidgetStateProperty.all(
|
||||
GoogleFonts.roboto(
|
||||
color: darkColorScheme?.onSurface,
|
||||
fontWeight: FontWeight.w500,
|
||||
|
|
|
@ -4,8 +4,8 @@ import 'package:revanced_manager/app/app.locator.dart';
|
|||
import 'package:revanced_manager/gen/strings.g.dart';
|
||||
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
|
||||
import 'package:revanced_manager/ui/widgets/homeView/installed_apps_card.dart';
|
||||
import 'package:revanced_manager/ui/widgets/homeView/latest_commit_card.dart';
|
||||
import 'package:revanced_manager/ui/widgets/homeView/last_patched_app_card.dart';
|
||||
import 'package:revanced_manager/ui/widgets/homeView/latest_commit_card.dart';
|
||||
import 'package:revanced_manager/ui/widgets/shared/custom_sliver_app_bar.dart';
|
||||
import 'package:stacked/stacked.dart';
|
||||
|
||||
|
@ -48,20 +48,19 @@ class HomeView extends StatelessWidget {
|
|||
LatestCommitCard(model: model, parentContext: context),
|
||||
const SizedBox(height: 23),
|
||||
Visibility(
|
||||
visible: model.isLastPatchedAppEnabled(),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
t.homeView.lastPatchedAppSubtitle,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
LastPatchedAppCard(),
|
||||
const SizedBox(height: 10),
|
||||
|
||||
],
|
||||
),
|
||||
visible: model.isLastPatchedAppEnabled(),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
t.homeView.lastPatchedAppSubtitle,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
LastPatchedAppCard(),
|
||||
const SizedBox(height: 10),
|
||||
],
|
||||
),
|
||||
),
|
||||
Text(
|
||||
t.homeView.patchedSubtitle,
|
||||
|
|
|
@ -170,7 +170,7 @@ class _PatchItemState extends State<PatchItem> {
|
|||
onPressed: () =>
|
||||
_showUnsupportedWarningDialog(),
|
||||
style: ButtonStyle(
|
||||
shape: MaterialStateProperty.all(
|
||||
shape: WidgetStateProperty.all(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(8),
|
||||
|
@ -181,12 +181,10 @@ class _PatchItemState extends State<PatchItem> {
|
|||
),
|
||||
),
|
||||
),
|
||||
backgroundColor:
|
||||
MaterialStateProperty.all(
|
||||
backgroundColor: WidgetStateProperty.all(
|
||||
Colors.transparent,
|
||||
),
|
||||
foregroundColor:
|
||||
MaterialStateProperty.all(
|
||||
foregroundColor: WidgetStateProperty.all(
|
||||
Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
),
|
||||
|
|
|
@ -38,8 +38,8 @@ class CustomSliverAppBar extends StatelessWidget {
|
|||
onPressed:
|
||||
onBackButtonPressed ?? () => Navigator.of(context).pop(),
|
||||
),
|
||||
backgroundColor: MaterialStateColor.resolveWith(
|
||||
(states) => states.contains(MaterialState.scrolledUnder)
|
||||
backgroundColor: WidgetStateColor.resolveWith(
|
||||
(states) => states.contains(WidgetState.scrolledUnder)
|
||||
? Theme.of(context).colorScheme.surface
|
||||
: Theme.of(context).canvasColor,
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue