2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 13:36:50 +00:00

Init basic localizations

This commit is contained in:
Oliver Walters 2021-02-01 16:58:08 +11:00
parent 40df490a21
commit 171d808410
3 changed files with 23 additions and 2 deletions

View File

@ -1,5 +1,7 @@
import 'dart:async';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:InvenTree/widget/category_display.dart';
import 'package:InvenTree/widget/company_list.dart';
import 'package:InvenTree/widget/location_display.dart';
@ -77,6 +79,20 @@ class InvenTreeApp extends StatelessWidget {
secondaryHeaderColor: Colors.blueGrey,
),
home: MyHomePage(title: 'InvenTree'),
localizationsDelegates: [
// ... app-specific localization delegate[s] here
// TODO: uncomment the line below after codegen
// AppLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: [
const Locale('en', ''), // English, no country code
const Locale('de', ''),
const Locale('fr', ''),
const Locale('it', ''),
],
);
}
}

View File

@ -174,6 +174,11 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.1"
flutter_localizations:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_plugin_android_lifecycle:
dependency: transitive
description:

View File

@ -19,9 +19,9 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3
http: ^0.12.1
shared_preferences: ^0.5.7