localizations fixes
This commit is contained in:
14
packages/navigation/lib/app_routes.dart
Normal file
14
packages/navigation/lib/app_routes.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
class AppRoutes {
|
||||
static const login = '/login';
|
||||
static const onboarding = '/onboarding';
|
||||
static const linkPhone = '/link_phone';
|
||||
static const phoneCode = '/phone_code';
|
||||
static const recoverPassword = '/recover_password';
|
||||
|
||||
static const dashboard = '/dashboard';
|
||||
|
||||
static const dashboardHome = '$dashboard/home';
|
||||
static const dashboardActivity = '$dashboard/activity';
|
||||
static const dashboardNotifications = '$dashboard/notifications';
|
||||
static const dashboardProfile = '$dashboard/profile';
|
||||
}
|
||||
@@ -1,34 +1,3 @@
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
abstract class NavigationContract {
|
||||
void setRouter(GoRouter goRouter);
|
||||
void goTo(String path);
|
||||
void pushTo(String path);
|
||||
void goBack();
|
||||
}
|
||||
|
||||
class Navigation implements NavigationContract {
|
||||
late final GoRouter router;
|
||||
|
||||
@override
|
||||
void setRouter(GoRouter goRouter) {
|
||||
router = goRouter;
|
||||
}
|
||||
|
||||
@override
|
||||
void goTo(String path) {
|
||||
router.go(path);
|
||||
}
|
||||
|
||||
@override
|
||||
void pushTo(String path) {
|
||||
router.push(path);
|
||||
}
|
||||
|
||||
@override
|
||||
void goBack() {
|
||||
if (router.canPop()) {
|
||||
router.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
export 'navigation_contract.dart';
|
||||
export 'navigation_module.dart';
|
||||
export 'app_routes.dart';
|
||||
|
||||
34
packages/navigation/lib/navigation_contract.dart
Normal file
34
packages/navigation/lib/navigation_contract.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
abstract class NavigationContract {
|
||||
void setRouter(GoRouter goRouter);
|
||||
void goTo(String path);
|
||||
void pushTo(String path);
|
||||
void goBack();
|
||||
}
|
||||
|
||||
class Navigation implements NavigationContract {
|
||||
late final GoRouter router;
|
||||
|
||||
@override
|
||||
void setRouter(GoRouter goRouter) {
|
||||
router = goRouter;
|
||||
}
|
||||
|
||||
@override
|
||||
void goTo(String path) {
|
||||
router.go(path);
|
||||
}
|
||||
|
||||
@override
|
||||
void pushTo(String path) {
|
||||
router.push(path);
|
||||
}
|
||||
|
||||
@override
|
||||
void goBack() {
|
||||
if (router.canPop()) {
|
||||
router.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
3
packages/sf_localizations/assets/l10n/de.json
Normal file
3
packages/sf_localizations/assets/l10n/de.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"example": "Beispiel"
|
||||
}
|
||||
3
packages/sf_localizations/assets/l10n/fr.json
Normal file
3
packages/sf_localizations/assets/l10n/fr.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"example": "exemple"
|
||||
}
|
||||
3
packages/sf_localizations/assets/l10n/it.json
Normal file
3
packages/sf_localizations/assets/l10n/it.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"example": "esempio"
|
||||
}
|
||||
3
packages/sf_localizations/assets/l10n/pt.json
Normal file
3
packages/sf_localizations/assets/l10n/pt.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"example": "exemplo"
|
||||
}
|
||||
@@ -3,3 +3,4 @@ export 'src/generated/i18n.dart';
|
||||
export 'src/utils/constants.dart';
|
||||
export 'src/utils/context_extension.dart';
|
||||
export 'src/utils/string_extension.dart';
|
||||
export 'src/utils/locale_extension.dart';
|
||||
|
||||
@@ -1 +1 @@
|
||||
const supportedLanguages = ['en', 'es'];
|
||||
const supportedLanguages = ['en', 'es', 'fr', 'de', 'it', 'pt'];
|
||||
|
||||
Reference in New Issue
Block a user