mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-30 15:06:06 +00:00
Localization + theme
This commit is contained in:
parent
622b6a3196
commit
1197df6527
13 changed files with 223 additions and 95 deletions
|
|
@ -12,14 +12,14 @@ class HomePage extends StatelessWidget {
|
|||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
AppLocalizations.of(context).app_title,
|
||||
AppLocalizations.of(context).appTitle,
|
||||
),
|
||||
),
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
FlatButton.icon(
|
||||
label: Text(
|
||||
AppLocalizations.of(context).library_title,
|
||||
AppLocalizations.of(context).libraryTitle,
|
||||
),
|
||||
icon: SvgPicture.asset(
|
||||
"assets/spell-book.svg",
|
||||
|
|
@ -38,7 +38,7 @@ class HomePage extends StatelessWidget {
|
|||
),
|
||||
FlatButton.icon(
|
||||
label: Text(
|
||||
AppLocalizations.of(context).pceditor_title,
|
||||
AppLocalizations.of(context).pceditorTitle,
|
||||
),
|
||||
icon: SvgPicture.asset(
|
||||
"assets/swordman.svg",
|
||||
|
|
@ -55,7 +55,7 @@ class HomePage extends StatelessWidget {
|
|||
),
|
||||
FlatButton.icon(
|
||||
label: Text(
|
||||
AppLocalizations.of(context).about_title,
|
||||
AppLocalizations.of(context).aboutTitle,
|
||||
),
|
||||
icon: SvgPicture.asset(
|
||||
"assets/wooden-sign.svg",
|
||||
|
|
|
|||
|
|
@ -139,15 +139,15 @@ class _LibraryPageState extends State<LibraryPage> {
|
|||
List _buildBottomNavigationBarItems() {
|
||||
return <BottomNavigationBarItem>[
|
||||
_buildBottomNavigationBarItem(
|
||||
AppLocalizations.of(context).library_title,
|
||||
AppLocalizations.of(context).libraryTitle,
|
||||
"assets/spell-book.svg",
|
||||
),
|
||||
_buildBottomNavigationBarItem(
|
||||
AppLocalizations.of(context).bookmarks_title,
|
||||
AppLocalizations.of(context).bookmarksTitle,
|
||||
"assets/stars-stack.svg",
|
||||
),
|
||||
_buildBottomNavigationBarItem(
|
||||
AppLocalizations.of(context).search_title,
|
||||
AppLocalizations.of(context).searchTitle,
|
||||
"assets/crystal-ball.svg",
|
||||
),
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import 'package:aidedejeu_flutter/database.dart';
|
||||
import 'package:aidedejeu_flutter/localization.dart';
|
||||
import 'package:aidedejeu_flutter/models/items.dart';
|
||||
import 'package:aidedejeu_flutter/theme.dart';
|
||||
import 'package:aidedejeu_flutter/widgets/library.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||
|
|
@ -7,15 +9,6 @@ import 'package:flutter_markdown/flutter_markdown.dart';
|
|||
class PCEditorPage extends StatefulWidget {
|
||||
PCEditorPage({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text("Personnage"),
|
||||
),
|
||||
body: Column());
|
||||
}
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _PCEditorPageState();
|
||||
}
|
||||
|
|
@ -164,20 +157,27 @@ class _PCEditorPageState extends State<PCEditorPage> {
|
|||
Widget _loadRaceDetailsWidget() {
|
||||
return _race != null
|
||||
? Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("Augmentation de caractéristiques"),
|
||||
Text("Augmentation de caractéristiques", style: TextStyle(fontSize: 16, fontFamily: "Cinzel",)),
|
||||
_loadMarkdown(_race?.abilityScoreIncrease),
|
||||
_loadMarkdown(_subRace?.abilityScoreIncrease),
|
||||
Text(""),
|
||||
Text("Âge"),
|
||||
_loadMarkdown(_race?.age),
|
||||
Text(""),
|
||||
Text("Alignement"),
|
||||
_loadMarkdown(_race?.alignment),
|
||||
Text(""),
|
||||
Text("Taille"),
|
||||
_loadMarkdown(_race?.size),
|
||||
Text(""),
|
||||
Text("Vitesse"),
|
||||
_loadMarkdown(_race?.speed),
|
||||
Text(""),
|
||||
Text("Vision dans le noir"),
|
||||
_loadMarkdown(_race?.darkvision),
|
||||
Text(""),
|
||||
Text("Langues"),
|
||||
_loadMarkdown(_race?.languages),
|
||||
],
|
||||
|
|
@ -212,23 +212,35 @@ class _PCEditorPageState extends State<PCEditorPage> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTabController(
|
||||
length: 3,
|
||||
length: 5,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text("Personnage"),
|
||||
title: Text(AppLocalizations.of(context).pceditorTitle),
|
||||
bottom: TabBar(
|
||||
labelColor: Colors.black,
|
||||
isScrollable: true,
|
||||
indicatorColor: Theme.of(context).accentColor, // Colors.red,
|
||||
indicatorSize: TabBarIndicatorSize.label,
|
||||
tabs: <Widget>[
|
||||
Text(
|
||||
"Race",
|
||||
style: TextStyle(color: Colors.black),
|
||||
AppLocalizations.of(context).raceTitle,
|
||||
style: TextStyle(fontSize: 25, fontFamily: "Cinzel",),
|
||||
),
|
||||
Text(
|
||||
"Historique",
|
||||
style: TextStyle(color: Colors.black),
|
||||
AppLocalizations.of(context).backgroundTitle,
|
||||
style: TextStyle(fontSize: 25, fontFamily: "Cinzel",),
|
||||
),
|
||||
Text(
|
||||
"Classe",
|
||||
style: TextStyle(color: Colors.black),
|
||||
AppLocalizations.of(context).classTitle,
|
||||
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(),
|
||||
],
|
||||
),
|
||||
Text(""),
|
||||
Text(AppLocalizations.of(context).classTitle),
|
||||
Text(AppLocalizations.of(context).abilitiesTitle),
|
||||
Text(AppLocalizations.of(context).othersTitle),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue