fix: made root destination list const, removed translations from objects

This commit is contained in:
Aliaksei Tratseuski 2024-05-15 14:45:24 +04:00
parent 1c8cb82e2a
commit 161c5b7fc5

View file

@ -1,5 +1,4 @@
import 'package:auto_route/auto_route.dart'; import 'package:auto_route/auto_route.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart';
import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/ui/router/router.dart';
@ -18,29 +17,29 @@ class RouteDestination {
final String title; final String title;
} }
final rootDestinations = [ const List<RouteDestination> rootDestinations = [
RouteDestination( RouteDestination(
route: const ProvidersRoute(), route: ProvidersRoute(),
icon: BrandIcons.server, icon: BrandIcons.server,
label: 'basis.providers'.tr(), label: 'basis.providers',
title: 'basis.providers_title'.tr(), title: 'basis.providers_title',
), ),
RouteDestination( RouteDestination(
route: const ServicesRoute(), route: ServicesRoute(),
icon: BrandIcons.box, icon: BrandIcons.box,
label: 'basis.services'.tr(), label: 'basis.services',
title: 'basis.services'.tr(), title: 'basis.services',
), ),
RouteDestination( RouteDestination(
route: const UsersRoute(), route: UsersRoute(),
icon: BrandIcons.users, icon: BrandIcons.users,
label: 'basis.users'.tr(), label: 'basis.users',
title: 'basis.users'.tr(), title: 'basis.users',
), ),
RouteDestination( RouteDestination(
route: const MoreRoute(), route: MoreRoute(),
icon: Icons.menu_rounded, icon: Icons.menu_rounded,
label: 'basis.more'.tr(), label: 'basis.more',
title: 'basis.more'.tr(), title: 'basis.more',
), ),
]; ];