mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-19 05:58:50 +02:00
* add dashboard page indicator * refactor dashboard page indicator and UI * refactor fade animation * smoother UI transitions * Improve accessibility for page indicator * localize action names * Update page indicator colors and blur effect * fix page indicator layout * Update Spanish translations for 'apps', 'history', and 'home' * update dashboard labels * changed settings page label * Modify page_indicator.dart * refactor page indicator animation * review fixes --------- Co-authored-by: Jaim3 <github@jaim3.com> Co-authored-by: tuxsudo <tuxsudo@tux.pizza>
44 lines
1.4 KiB
Dart
44 lines
1.4 KiB
Dart
import 'package:cake_wallet/generated/i18n.dart';
|
|
import 'package:cake_wallet/routes.dart';
|
|
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class PageIndicatorActions {
|
|
final String Function(BuildContext context) name;
|
|
final String image;
|
|
final Key key;
|
|
final bool Function(DashboardViewModel viewModel)? isEnabled;
|
|
|
|
PageIndicatorActions._({
|
|
required this.name,
|
|
required this.image,
|
|
required this.key,
|
|
this.isEnabled,
|
|
});
|
|
|
|
static List<PageIndicatorActions> all = [
|
|
appsAction,
|
|
homeAction,
|
|
historyAction,
|
|
];
|
|
|
|
static PageIndicatorActions appsAction = PageIndicatorActions._(
|
|
name: (context) => S.of(context).apps,
|
|
image: 'assets/images/main_actions/apps.svg',
|
|
key: ValueKey('dashboard_page_indicator_apps_action_button_key'),
|
|
isEnabled: (viewModel) => viewModel.shouldShowMarketPlaceInDashboard,
|
|
);
|
|
|
|
static PageIndicatorActions homeAction = PageIndicatorActions._(
|
|
name: (context) => S.of(context).home,
|
|
image: 'assets/images/main_actions/home.svg',
|
|
key: ValueKey('dashboard_page_indicator_home_action_button_key'),
|
|
);
|
|
|
|
static PageIndicatorActions historyAction = PageIndicatorActions._(
|
|
name: (context) => S.of(context).history,
|
|
image: 'assets/images/main_actions/history.svg',
|
|
key: ValueKey('dashboard_page_indicator_history_action_button_key'),
|
|
);
|
|
}
|