Initial version of the descriptions and Locations provider
This commit is contained in:
parent
e5901e62bb
commit
18641d5606
7 changed files with 604 additions and 60 deletions
|
@ -111,22 +111,16 @@ class _HomeState extends State<Home> {
|
|||
children: [
|
||||
Image.asset(
|
||||
Pokemon.values[index].toDexPath(),
|
||||
width: Constants.isMobile ? 64 : 198,
|
||||
height: Constants.isMobile ? 64 : 198,
|
||||
width: 64,
|
||||
height: 64,
|
||||
),
|
||||
Text(
|
||||
Pokemon.values[index].printName(proper: true),
|
||||
style: TextStyle(
|
||||
fontSize: Constants.isMobile ? 16 : 32,
|
||||
color: Colors.black,
|
||||
),
|
||||
style: TextStyle(fontSize: 16, color: Colors.black),
|
||||
),
|
||||
Text(
|
||||
"#${Pokemon.values[index].id}",
|
||||
style: TextStyle(
|
||||
fontSize: Constants.isMobile ? 16 : 32,
|
||||
color: Colors.black,
|
||||
),
|
||||
style: TextStyle(fontSize: 16, color: Colors.black),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -136,7 +130,7 @@ class _HomeState extends State<Home> {
|
|||
},
|
||||
itemCount: SessionData.highestGenID(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: Constants.isMobile ? 3 : 4,
|
||||
crossAxisCount: 3,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -205,19 +199,23 @@ class _DexEntryState extends State<DexEntry> {
|
|||
if (_pkmn.extraVariants.isNotEmpty) _pkmn.getVariations(),
|
||||
|
||||
SizedBox(height: 32),
|
||||
if (Constants.isMobile)
|
||||
SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: _pkmn.getEvolutions(0),
|
||||
),
|
||||
),
|
||||
if (!Constants.isMobile)
|
||||
SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(children: _pkmn.getEvolutions(0)),
|
||||
SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: _pkmn.getEvolutions(0),
|
||||
),
|
||||
),
|
||||
if (SessionData.enableDescription && _pkmn.dexEntries.isNotEmpty)
|
||||
Text("Description: ", style: TextStyle(fontSize: 24)),
|
||||
if (SessionData.enableDescription && _pkmn.dexEntries.isNotEmpty)
|
||||
_pkmn.printDescription(),
|
||||
|
||||
SizedBox(height: 50),
|
||||
|
||||
if (_pkmn.locations.isNotEmpty)
|
||||
Text("Where to find:", style: TextStyle(fontSize: 24)),
|
||||
if (_pkmn.locations.isNotEmpty) _pkmn.printLocations(),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue