mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-30 06:56:10 +00:00
Localization + theme
This commit is contained in:
parent
622b6a3196
commit
1197df6527
13 changed files with 223 additions and 95 deletions
|
|
@ -1,39 +1,57 @@
|
||||||
{
|
{
|
||||||
"@@locale": "en",
|
"@@locale": "en",
|
||||||
"app_title": "Hello World",
|
"appTitle": "Hello World",
|
||||||
"@app_title": {
|
"@appTitle": {
|
||||||
"description": "Title for the application",
|
"description": "Title for the application",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"library_title": "Library",
|
"libraryTitle": "Library",
|
||||||
"@library_title": {
|
"@libraryTitle": {
|
||||||
"description": "Title for the Library page",
|
"description": "Title for the Library page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"pceditor_title": "Player Characters",
|
"pceditorTitle": "Player Characters",
|
||||||
"@pceditor_title": {
|
"@pceditorTitle": {
|
||||||
"description": "Title for the Player Characters page",
|
"description": "Title for the Player Characters page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"about_title": "About...",
|
"aboutTitle": "About...",
|
||||||
"@about_title": {
|
"@aboutTitle": {
|
||||||
"description": "Title for the About page",
|
"description": "Title for the About page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"bookmarks_title": "Bookmarks",
|
"bookmarksTitle": "Bookmarks",
|
||||||
"@bookmarks_title": {
|
"@bookmarksTitle": {
|
||||||
"description": "Title for the Bookmarks page",
|
"description": "Title for the Bookmarks page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"search_title": "Search",
|
"searchTitle": "Search",
|
||||||
"@search_title": {
|
"@searchTitle": {
|
||||||
"description": "Title for the Search page",
|
"description": "Title for the Search page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"raceTitle": "Race",
|
||||||
|
"@raceTitle": {
|
||||||
|
"description": "Title for the Race page",
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"backgroundTitle": "Background",
|
||||||
|
"@backgroundTitle": {
|
||||||
|
"description": "Title for the Background page",
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"classTitle": "Class",
|
||||||
|
"@classTitle": {
|
||||||
|
"description": "Title for the Class page",
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,39 +1,57 @@
|
||||||
{
|
{
|
||||||
"@@locale": "fr",
|
"@@locale": "fr",
|
||||||
"app_title": "Bonjour Monde",
|
"appTitle": "Bonjour Monde",
|
||||||
"@app_title": {
|
"@appTitle": {
|
||||||
"description": "Title for the application",
|
"description": "Title for the application",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"library_title": "Bibliothèque",
|
"libraryTitle": "Bibliothèque",
|
||||||
"@library_title": {
|
"@libraryTitle": {
|
||||||
"description": "Title for the Library page",
|
"description": "Title for the Library page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"pceditor_title": "Personnages",
|
"pceditorTitle": "Personnages",
|
||||||
"@pceditor_title": {
|
"@pceditorTitle": {
|
||||||
"description": "Title for the Player Characters page",
|
"description": "Title for the Player Characters page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"about_title": "A propos de...",
|
"aboutTitle": "A propos de...",
|
||||||
"@about_title": {
|
"@aboutTitle": {
|
||||||
"description": "Title for the About page",
|
"description": "Title for the About page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"bookmarks_title": "Favoris",
|
"bookmarksTitle": "Favoris",
|
||||||
"@bookmarks_title": {
|
"@bookmarksTitle": {
|
||||||
"description": "Title for the Bookmarks page",
|
"description": "Title for the Bookmarks page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"search_title": "Recherche",
|
"searchTitle": "Recherche",
|
||||||
"@search_title": {
|
"@searchTitle": {
|
||||||
"description": "Title for the Search page",
|
"description": "Title for the Search page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"raceTitle": "Race",
|
||||||
|
"@raceTitle": {
|
||||||
|
"description": "Title for the Race page",
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"backgroundTitle": "Historique",
|
||||||
|
"@backgroundTitle": {
|
||||||
|
"description": "Title for the Background page",
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"classTitle": "Classe",
|
||||||
|
"@classTitle": {
|
||||||
|
"description": "Title for the Class page",
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,39 +1,57 @@
|
||||||
{
|
{
|
||||||
"@@last_modified": "2020-03-02T17:41:08.588343",
|
"@@last_modified": "2020-03-03T11:00:06.908535",
|
||||||
"app_title": "Hello World",
|
"appTitle": "Hello World",
|
||||||
"@app_title": {
|
"@appTitle": {
|
||||||
"description": "Title for the application",
|
"description": "Title for the application",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"library_title": "Library",
|
"libraryTitle": "Library",
|
||||||
"@library_title": {
|
"@libraryTitle": {
|
||||||
"description": "Title for the Library page",
|
"description": "Title for the Library page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"pceditor_title": "Player Characters",
|
"pceditorTitle": "Player Characters",
|
||||||
"@pceditor_title": {
|
"@pceditorTitle": {
|
||||||
"description": "Title for the Player Characters page",
|
"description": "Title for the Player Characters page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"about_title": "About...",
|
"aboutTitle": "About...",
|
||||||
"@about_title": {
|
"@aboutTitle": {
|
||||||
"description": "Title for the About page",
|
"description": "Title for the About page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"bookmarks_title": "Bookmarks",
|
"bookmarksTitle": "Bookmarks",
|
||||||
"@bookmarks_title": {
|
"@bookmarksTitle": {
|
||||||
"description": "Title for the Bookmarks page",
|
"description": "Title for the Bookmarks page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"search_title": "Search",
|
"searchTitle": "Search",
|
||||||
"@search_title": {
|
"@searchTitle": {
|
||||||
"description": "Title for the Search page",
|
"description": "Title for the Search page",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"raceTitle": "Race",
|
||||||
|
"@raceTitle": {
|
||||||
|
"description": "Title for the Race page",
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"backgroundTitle": "Background",
|
||||||
|
"@backgroundTitle": {
|
||||||
|
"description": "Title for the Background page",
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"classTitle": "Class",
|
||||||
|
"@classTitle": {
|
||||||
|
"description": "Title for the Class page",
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -21,11 +21,14 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
|
|
||||||
final messages = _notInlinedMessages(_notInlinedMessages);
|
final messages = _notInlinedMessages(_notInlinedMessages);
|
||||||
static _notInlinedMessages(_) => <String, Function> {
|
static _notInlinedMessages(_) => <String, Function> {
|
||||||
"about_title" : MessageLookupByLibrary.simpleMessage("About..."),
|
"aboutTitle" : MessageLookupByLibrary.simpleMessage("About..."),
|
||||||
"app_title" : MessageLookupByLibrary.simpleMessage("Hello World"),
|
"appTitle" : MessageLookupByLibrary.simpleMessage("Hello World"),
|
||||||
"bookmarks_title" : MessageLookupByLibrary.simpleMessage("Bookmarks"),
|
"backgroundTitle" : MessageLookupByLibrary.simpleMessage("Background"),
|
||||||
"library_title" : MessageLookupByLibrary.simpleMessage("Library"),
|
"bookmarksTitle" : MessageLookupByLibrary.simpleMessage("Bookmarks"),
|
||||||
"pceditor_title" : MessageLookupByLibrary.simpleMessage("Player Characters"),
|
"classTitle" : MessageLookupByLibrary.simpleMessage("Class"),
|
||||||
"search_title" : MessageLookupByLibrary.simpleMessage("Search")
|
"libraryTitle" : MessageLookupByLibrary.simpleMessage("Library"),
|
||||||
|
"pceditorTitle" : MessageLookupByLibrary.simpleMessage("Player Characters"),
|
||||||
|
"raceTitle" : MessageLookupByLibrary.simpleMessage("Race"),
|
||||||
|
"searchTitle" : MessageLookupByLibrary.simpleMessage("Search")
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,14 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
|
|
||||||
final messages = _notInlinedMessages(_notInlinedMessages);
|
final messages = _notInlinedMessages(_notInlinedMessages);
|
||||||
static _notInlinedMessages(_) => <String, Function> {
|
static _notInlinedMessages(_) => <String, Function> {
|
||||||
"about_title" : MessageLookupByLibrary.simpleMessage("A propos de..."),
|
"aboutTitle" : MessageLookupByLibrary.simpleMessage("A propos de..."),
|
||||||
"app_title" : MessageLookupByLibrary.simpleMessage("Bonjour Monde"),
|
"appTitle" : MessageLookupByLibrary.simpleMessage("Bonjour Monde"),
|
||||||
"bookmarks_title" : MessageLookupByLibrary.simpleMessage("Favoris"),
|
"backgroundTitle" : MessageLookupByLibrary.simpleMessage("Historique"),
|
||||||
"library_title" : MessageLookupByLibrary.simpleMessage("Bibliothèque"),
|
"bookmarksTitle" : MessageLookupByLibrary.simpleMessage("Favoris"),
|
||||||
"pceditor_title" : MessageLookupByLibrary.simpleMessage("Personnages"),
|
"classTitle" : MessageLookupByLibrary.simpleMessage("Classe"),
|
||||||
"search_title" : MessageLookupByLibrary.simpleMessage("Recherche")
|
"libraryTitle" : MessageLookupByLibrary.simpleMessage("Bibliothèque"),
|
||||||
|
"pceditorTitle" : MessageLookupByLibrary.simpleMessage("Personnages"),
|
||||||
|
"raceTitle" : MessageLookupByLibrary.simpleMessage("Race"),
|
||||||
|
"searchTitle" : MessageLookupByLibrary.simpleMessage("Recherche")
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,59 +21,106 @@ class AppLocalizations {
|
||||||
|
|
||||||
final String localeName;
|
final String localeName;
|
||||||
|
|
||||||
String get app_title {
|
String get appTitle {
|
||||||
return Intl.message(
|
return Intl.message(
|
||||||
'Hello World',
|
'Hello World',
|
||||||
name: 'app_title',
|
name: 'appTitle',
|
||||||
desc: 'Title for the application',
|
desc: 'Title for the application',
|
||||||
locale: localeName,
|
locale: localeName,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String get library_title {
|
String get libraryTitle {
|
||||||
return Intl.message(
|
return Intl.message(
|
||||||
'Library',
|
'Library',
|
||||||
name: 'library_title',
|
name: 'libraryTitle',
|
||||||
desc: 'Title for the Library page',
|
desc: 'Title for the Library page',
|
||||||
locale: localeName,
|
locale: localeName,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String get pceditor_title {
|
String get pceditorTitle {
|
||||||
return Intl.message(
|
return Intl.message(
|
||||||
'Player Characters',
|
'Player Characters',
|
||||||
name: 'pceditor_title',
|
name: 'pceditorTitle',
|
||||||
desc: 'Title for the Player Characters page',
|
desc: 'Title for the Player Characters page',
|
||||||
locale: localeName,
|
locale: localeName,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String get about_title {
|
String get aboutTitle {
|
||||||
return Intl.message(
|
return Intl.message(
|
||||||
'About...',
|
'About...',
|
||||||
name: 'about_title',
|
name: 'aboutTitle',
|
||||||
desc: 'Title for the About page',
|
desc: 'Title for the About page',
|
||||||
locale: localeName,
|
locale: localeName,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String get bookmarks_title {
|
String get bookmarksTitle {
|
||||||
return Intl.message(
|
return Intl.message(
|
||||||
'Bookmarks',
|
'Bookmarks',
|
||||||
name: 'bookmarks_title',
|
name: 'bookmarksTitle',
|
||||||
desc: 'Title for the Bookmarks page',
|
desc: 'Title for the Bookmarks page',
|
||||||
locale: localeName,
|
locale: localeName,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String get search_title {
|
String get searchTitle {
|
||||||
return Intl.message(
|
return Intl.message(
|
||||||
'Search',
|
'Search',
|
||||||
name: 'search_title',
|
name: 'searchTitle',
|
||||||
desc: 'Title for the Search page',
|
desc: 'Title for the Search page',
|
||||||
locale: localeName,
|
locale: localeName,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String get raceTitle {
|
||||||
|
return Intl.message(
|
||||||
|
'Race',
|
||||||
|
name: 'raceTitle',
|
||||||
|
desc: 'Title for the Race page',
|
||||||
|
locale: localeName,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
String get backgroundTitle {
|
||||||
|
return Intl.message(
|
||||||
|
'Background',
|
||||||
|
name: 'backgroundTitle',
|
||||||
|
desc: 'Title for the Background page',
|
||||||
|
locale: localeName,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
String get classTitle {
|
||||||
|
return Intl.message(
|
||||||
|
'Class',
|
||||||
|
name: 'classTitle',
|
||||||
|
desc: 'Title for the Class page',
|
||||||
|
locale: localeName,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
String get abilitiesTitle {
|
||||||
|
return Intl.message(
|
||||||
|
'Abilities',
|
||||||
|
name: 'abilitiesTitle',
|
||||||
|
desc: 'Title for the Abilities page',
|
||||||
|
locale: localeName,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
String get othersTitle {
|
||||||
|
return Intl.message(
|
||||||
|
'Others',
|
||||||
|
name: 'othersTitle',
|
||||||
|
desc: 'Title for the Others page',
|
||||||
|
locale: localeName,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
|
class AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,10 @@ class MyApp extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
|
//title: AppLocalizations.of(context).appTitle,
|
||||||
//title: 'Haches & Dés',
|
//title: 'Haches & Dés',
|
||||||
onGenerateTitle: (BuildContext context) =>
|
onGenerateTitle: (BuildContext context) =>
|
||||||
AppLocalizations.of(context).app_title,
|
AppLocalizations.of(context).appTitle,
|
||||||
localizationsDelegates: [
|
localizationsDelegates: [
|
||||||
const AppLocalizationsDelegate(),
|
const AppLocalizationsDelegate(),
|
||||||
GlobalMaterialLocalizations.delegate,
|
GlobalMaterialLocalizations.delegate,
|
||||||
|
|
|
||||||
|
|
@ -8,16 +8,21 @@ ThemeData mainTheme() {
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
iconTheme: IconThemeData(color: Colors.black),
|
iconTheme: IconThemeData(color: Colors.black),
|
||||||
textTheme: TextTheme(
|
textTheme: TextTheme(
|
||||||
headline6: TextStyle(fontSize: 28.0, color: Colors.black, fontWeight: FontWeight.bold, fontFamily: 'Cinzel')),
|
title: TextStyle(
|
||||||
|
fontSize: 28.0,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontFamily: 'Cinzel')),
|
||||||
),
|
),
|
||||||
brightness: Brightness.light,
|
brightness: Brightness.light,
|
||||||
primaryColor: Colors.lightBlue[800],
|
primaryColor: Colors.lightBlue[800],
|
||||||
accentColor: Colors.cyan[600],
|
accentColor: Colors.cyan[600],
|
||||||
fontFamily: 'LinuxLibertine',
|
fontFamily: 'LinuxLibertine',
|
||||||
textTheme: TextTheme(
|
textTheme: TextTheme(
|
||||||
headline5: TextStyle(fontSize: 28.0, fontWeight: FontWeight.bold, fontFamily: 'Cinzel'),
|
headline: TextStyle(
|
||||||
headline6: TextStyle(fontSize: 22.0, fontStyle: FontStyle.normal),
|
fontSize: 28.0, fontWeight: FontWeight.bold, fontFamily: 'Cinzel'),
|
||||||
bodyText2: TextStyle(fontSize: 16.0),
|
title: TextStyle(fontSize: 22.0, fontStyle: FontStyle.normal),
|
||||||
|
body1: TextStyle(fontSize: 16.0),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,14 +12,14 @@ class HomePage extends StatelessWidget {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(
|
title: Text(
|
||||||
AppLocalizations.of(context).app_title,
|
AppLocalizations.of(context).appTitle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
FlatButton.icon(
|
FlatButton.icon(
|
||||||
label: Text(
|
label: Text(
|
||||||
AppLocalizations.of(context).library_title,
|
AppLocalizations.of(context).libraryTitle,
|
||||||
),
|
),
|
||||||
icon: SvgPicture.asset(
|
icon: SvgPicture.asset(
|
||||||
"assets/spell-book.svg",
|
"assets/spell-book.svg",
|
||||||
|
|
@ -38,7 +38,7 @@ class HomePage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
FlatButton.icon(
|
FlatButton.icon(
|
||||||
label: Text(
|
label: Text(
|
||||||
AppLocalizations.of(context).pceditor_title,
|
AppLocalizations.of(context).pceditorTitle,
|
||||||
),
|
),
|
||||||
icon: SvgPicture.asset(
|
icon: SvgPicture.asset(
|
||||||
"assets/swordman.svg",
|
"assets/swordman.svg",
|
||||||
|
|
@ -55,7 +55,7 @@ class HomePage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
FlatButton.icon(
|
FlatButton.icon(
|
||||||
label: Text(
|
label: Text(
|
||||||
AppLocalizations.of(context).about_title,
|
AppLocalizations.of(context).aboutTitle,
|
||||||
),
|
),
|
||||||
icon: SvgPicture.asset(
|
icon: SvgPicture.asset(
|
||||||
"assets/wooden-sign.svg",
|
"assets/wooden-sign.svg",
|
||||||
|
|
|
||||||
|
|
@ -139,15 +139,15 @@ class _LibraryPageState extends State<LibraryPage> {
|
||||||
List _buildBottomNavigationBarItems() {
|
List _buildBottomNavigationBarItems() {
|
||||||
return <BottomNavigationBarItem>[
|
return <BottomNavigationBarItem>[
|
||||||
_buildBottomNavigationBarItem(
|
_buildBottomNavigationBarItem(
|
||||||
AppLocalizations.of(context).library_title,
|
AppLocalizations.of(context).libraryTitle,
|
||||||
"assets/spell-book.svg",
|
"assets/spell-book.svg",
|
||||||
),
|
),
|
||||||
_buildBottomNavigationBarItem(
|
_buildBottomNavigationBarItem(
|
||||||
AppLocalizations.of(context).bookmarks_title,
|
AppLocalizations.of(context).bookmarksTitle,
|
||||||
"assets/stars-stack.svg",
|
"assets/stars-stack.svg",
|
||||||
),
|
),
|
||||||
_buildBottomNavigationBarItem(
|
_buildBottomNavigationBarItem(
|
||||||
AppLocalizations.of(context).search_title,
|
AppLocalizations.of(context).searchTitle,
|
||||||
"assets/crystal-ball.svg",
|
"assets/crystal-ball.svg",
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
import 'package:aidedejeu_flutter/database.dart';
|
import 'package:aidedejeu_flutter/database.dart';
|
||||||
|
import 'package:aidedejeu_flutter/localization.dart';
|
||||||
import 'package:aidedejeu_flutter/models/items.dart';
|
import 'package:aidedejeu_flutter/models/items.dart';
|
||||||
|
import 'package:aidedejeu_flutter/theme.dart';
|
||||||
import 'package:aidedejeu_flutter/widgets/library.dart';
|
import 'package:aidedejeu_flutter/widgets/library.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||||
|
|
@ -7,15 +9,6 @@ import 'package:flutter_markdown/flutter_markdown.dart';
|
||||||
class PCEditorPage extends StatefulWidget {
|
class PCEditorPage extends StatefulWidget {
|
||||||
PCEditorPage({Key key}) : super(key: key);
|
PCEditorPage({Key key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
appBar: AppBar(
|
|
||||||
title: Text("Personnage"),
|
|
||||||
),
|
|
||||||
body: Column());
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<StatefulWidget> createState() => _PCEditorPageState();
|
State<StatefulWidget> createState() => _PCEditorPageState();
|
||||||
}
|
}
|
||||||
|
|
@ -164,20 +157,27 @@ class _PCEditorPageState extends State<PCEditorPage> {
|
||||||
Widget _loadRaceDetailsWidget() {
|
Widget _loadRaceDetailsWidget() {
|
||||||
return _race != null
|
return _race != null
|
||||||
? Column(
|
? Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text("Augmentation de caractéristiques"),
|
Text("Augmentation de caractéristiques", style: TextStyle(fontSize: 16, fontFamily: "Cinzel",)),
|
||||||
_loadMarkdown(_race?.abilityScoreIncrease),
|
_loadMarkdown(_race?.abilityScoreIncrease),
|
||||||
_loadMarkdown(_subRace?.abilityScoreIncrease),
|
_loadMarkdown(_subRace?.abilityScoreIncrease),
|
||||||
|
Text(""),
|
||||||
Text("Âge"),
|
Text("Âge"),
|
||||||
_loadMarkdown(_race?.age),
|
_loadMarkdown(_race?.age),
|
||||||
|
Text(""),
|
||||||
Text("Alignement"),
|
Text("Alignement"),
|
||||||
_loadMarkdown(_race?.alignment),
|
_loadMarkdown(_race?.alignment),
|
||||||
|
Text(""),
|
||||||
Text("Taille"),
|
Text("Taille"),
|
||||||
_loadMarkdown(_race?.size),
|
_loadMarkdown(_race?.size),
|
||||||
|
Text(""),
|
||||||
Text("Vitesse"),
|
Text("Vitesse"),
|
||||||
_loadMarkdown(_race?.speed),
|
_loadMarkdown(_race?.speed),
|
||||||
|
Text(""),
|
||||||
Text("Vision dans le noir"),
|
Text("Vision dans le noir"),
|
||||||
_loadMarkdown(_race?.darkvision),
|
_loadMarkdown(_race?.darkvision),
|
||||||
|
Text(""),
|
||||||
Text("Langues"),
|
Text("Langues"),
|
||||||
_loadMarkdown(_race?.languages),
|
_loadMarkdown(_race?.languages),
|
||||||
],
|
],
|
||||||
|
|
@ -212,23 +212,35 @@ class _PCEditorPageState extends State<PCEditorPage> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return DefaultTabController(
|
return DefaultTabController(
|
||||||
length: 3,
|
length: 5,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text("Personnage"),
|
title: Text(AppLocalizations.of(context).pceditorTitle),
|
||||||
bottom: TabBar(
|
bottom: TabBar(
|
||||||
|
labelColor: Colors.black,
|
||||||
|
isScrollable: true,
|
||||||
|
indicatorColor: Theme.of(context).accentColor, // Colors.red,
|
||||||
|
indicatorSize: TabBarIndicatorSize.label,
|
||||||
tabs: <Widget>[
|
tabs: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
"Race",
|
AppLocalizations.of(context).raceTitle,
|
||||||
style: TextStyle(color: Colors.black),
|
style: TextStyle(fontSize: 25, fontFamily: "Cinzel",),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"Historique",
|
AppLocalizations.of(context).backgroundTitle,
|
||||||
style: TextStyle(color: Colors.black),
|
style: TextStyle(fontSize: 25, fontFamily: "Cinzel",),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"Classe",
|
AppLocalizations.of(context).classTitle,
|
||||||
style: TextStyle(color: Colors.black),
|
style: TextStyle(fontSize: 25, fontFamily: "Cinzel",),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
AppLocalizations.of(context).abilitiesTitle,
|
||||||
|
style: TextStyle(fontSize: 25, fontFamily: "Cinzel",),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
AppLocalizations.of(context).othersTitle,
|
||||||
|
style: TextStyle(fontSize: 25, fontFamily: "Cinzel",),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -248,7 +260,9 @@ class _PCEditorPageState extends State<PCEditorPage> {
|
||||||
_loadSubBackgroundsWidget(),
|
_loadSubBackgroundsWidget(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Text(""),
|
Text(AppLocalizations.of(context).classTitle),
|
||||||
|
Text(AppLocalizations.of(context).abilitiesTitle),
|
||||||
|
Text(AppLocalizations.of(context).othersTitle),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ packages:
|
||||||
name: intl
|
name: intl
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.16.1"
|
version: "0.16.0"
|
||||||
intl_translation:
|
intl_translation:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -387,4 +387,4 @@ packages:
|
||||||
version: "2.2.0"
|
version: "2.2.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.7.0 <3.0.0"
|
dart: ">=2.7.0 <3.0.0"
|
||||||
flutter: ">=1.12.1 <2.0.0"
|
flutter: ">=1.12.13+hotfix.8 <2.0.0"
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ version: 1.0.0+1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.2.0 <3.0.0"
|
sdk: ">=2.2.0 <3.0.0"
|
||||||
|
flutter: ^1.12.13+hotfix.8
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue