Solian/lib/widgets/navigation/app_navigation.dart

49 lines
1.2 KiB
Dart
Raw Normal View History

2024-05-18 10:17:16 +00:00
import 'package:flutter/material.dart';
import 'package:get/utils.dart';
import 'package:solian/widgets/navigation/app_account_widget.dart';
2024-05-18 10:17:16 +00:00
abstract class AppNavigation {
static List<AppNavigationDestination> destinations = [
AppNavigationDestination(
icon: const Icon(Icons.dashboard),
label: 'dashboardNav'.tr,
2024-09-02 15:11:40 +00:00
page: 'dashboard',
),
AppNavigationDestination(
icon: const Icon(Icons.explore),
label: 'explore'.tr,
page: 'explore',
2024-05-18 10:17:16 +00:00
),
AppNavigationDestination(
icon: const Icon(Icons.forum),
2024-09-13 15:19:33 +00:00
label: 'chat'.tr,
page: 'chat',
),
2024-10-05 07:11:48 +00:00
AppNavigationDestination(
icon: const Icon(Icons.workspaces),
label: 'realms'.tr,
page: 'realms',
),
AppNavigationDestination(
icon: const AppAccountWidget(),
label: 'accountNav'.tr,
page: 'account',
),
2024-05-18 10:17:16 +00:00
];
2024-06-27 07:50:13 +00:00
static List<String> get destinationPages =>
AppNavigation.destinations.map((x) => x.page).toList();
2024-05-18 10:17:16 +00:00
}
class AppNavigationDestination {
final Widget icon;
2024-05-18 10:17:16 +00:00
final String label;
final String page;
2024-05-28 14:13:23 +00:00
AppNavigationDestination({
required this.icon,
required this.label,
required this.page,
});
2024-05-18 10:17:16 +00:00
}