added localization
This commit is contained in:
3
l10n.yaml
Normal file
3
l10n.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
arb-dir: lib/l10n
|
||||||
|
template-arb-file: app_en.arb
|
||||||
|
output-localization-file: app_localizations.dart
|
||||||
4
lib/l10n/app_de.arb
Normal file
4
lib/l10n/app_de.arb
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"german": "Deutsch",
|
||||||
|
"english": "Englisch"
|
||||||
|
}
|
||||||
4
lib/l10n/app_en.arb
Normal file
4
lib/l10n/app_en.arb
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"german": "German",
|
||||||
|
"english": "English"
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'package:resume/pages/landing_page.dart';
|
import 'package:resume/pages/landing_page.dart';
|
||||||
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||||
import 'theme.dart' show darkTheme;
|
import 'theme.dart' show darkTheme;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
@@ -14,6 +16,17 @@ class Resume extends StatelessWidget {
|
|||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: 'Resume',
|
title: 'Resume',
|
||||||
theme: darkTheme,
|
theme: darkTheme,
|
||||||
|
localizationsDelegates: const [
|
||||||
|
AppLocalizations.delegate,
|
||||||
|
GlobalMaterialLocalizations.delegate,
|
||||||
|
GlobalWidgetsLocalizations.delegate,
|
||||||
|
GlobalCupertinoLocalizations.delegate,
|
||||||
|
],
|
||||||
|
supportedLocales: const [
|
||||||
|
Locale('en'),
|
||||||
|
Locale('de'),
|
||||||
|
],
|
||||||
|
locale: const Locale('en'),
|
||||||
routes: {
|
routes: {
|
||||||
'/': (context) => const LandingPage(),
|
'/': (context) => const LandingPage(),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ dependencies:
|
|||||||
|
|
||||||
cupertino_icons: ^1.0.8
|
cupertino_icons: ^1.0.8
|
||||||
url_launcher: ^6.3.1
|
url_launcher: ^6.3.1
|
||||||
|
flutter_localizations:
|
||||||
|
sdk: flutter
|
||||||
|
intl: any
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
@@ -20,6 +23,7 @@ dev_dependencies:
|
|||||||
flutter_lints: ^4.0.0
|
flutter_lints: ^4.0.0
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
|
generate: true
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
|
|
||||||
assets:
|
assets:
|
||||||
|
|||||||
Reference in New Issue
Block a user