mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 04:37:37 +02:00
feat(style): use native switch & chip (#732)
* chore: remove useless themedata * feat(style): new switch * feat(style): use native chip components * chore: remove unused import * feat(accessibility): set tooltip * chore: remove unneeded themedata * chore: fix theme * feat(i18n): add 3 new strings * feat(style): correct material 3 theme on nondynamic
This commit is contained in:
@ -7,7 +7,6 @@ import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
|
||||
import 'package:revanced_manager/ui/widgets/homeView/available_updates_card.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/shared/custom_chip.dart';
|
||||
import 'package:revanced_manager/ui/widgets/shared/custom_sliver_app_bar.dart';
|
||||
import 'package:stacked/stacked.dart';
|
||||
|
||||
@ -22,8 +21,6 @@ class HomeView extends StatelessWidget {
|
||||
viewModelBuilder: () => locator<HomeViewModel>(),
|
||||
builder: (context, model, child) => Scaffold(
|
||||
body: RefreshIndicator(
|
||||
color: Theme.of(context).colorScheme.secondary,
|
||||
backgroundColor: Theme.of(context).colorScheme.secondaryContainer,
|
||||
onRefresh: () => model.forceRefresh(context),
|
||||
child: CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
@ -67,21 +64,47 @@ class HomeView extends StatelessWidget {
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
CustomChip(
|
||||
ActionChip(
|
||||
avatar: const Icon(Icons.grid_view),
|
||||
label: I18nText('homeView.installed'),
|
||||
isSelected: !model.showUpdatableApps,
|
||||
onSelected: (value) {
|
||||
side: BorderSide(
|
||||
color: model.showUpdatableApps
|
||||
? Theme.of(context).colorScheme.outline
|
||||
: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondaryContainer,
|
||||
width: model.showUpdatableApps ? 1 : 1,
|
||||
),
|
||||
backgroundColor: model.showUpdatableApps
|
||||
? Theme.of(context).colorScheme.background
|
||||
: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondaryContainer,
|
||||
onPressed: () {
|
||||
model.toggleUpdatableApps(false);
|
||||
},
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
CustomChip(
|
||||
ActionChip(
|
||||
avatar: const Icon(Icons.update),
|
||||
label: I18nText('homeView.updatesAvailable'),
|
||||
isSelected: model.showUpdatableApps,
|
||||
onSelected: (value) {
|
||||
side: BorderSide(
|
||||
color: !model.showUpdatableApps
|
||||
? Theme.of(context).colorScheme.outline
|
||||
: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondaryContainer,
|
||||
width: !model.showUpdatableApps ? 1 : 1,
|
||||
),
|
||||
backgroundColor: !model.showUpdatableApps
|
||||
? Theme.of(context).colorScheme.background
|
||||
: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondaryContainer,
|
||||
onPressed: () {
|
||||
model.toggleUpdatableApps(true);
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 14),
|
||||
|
Reference in New Issue
Block a user