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,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