Add more entries, restore desktop app support
This commit is contained in:
parent
2ade0cca22
commit
2b52ada9b9
28 changed files with 79 additions and 19 deletions
|
@ -94,16 +94,22 @@ class _HomeState extends State<Home> {
|
|||
children: [
|
||||
Image.asset(
|
||||
Pokemon.values[index].toDexPath(),
|
||||
width: 64,
|
||||
height: 64,
|
||||
width: Constants.isMobile ? 64 : 198,
|
||||
height: Constants.isMobile ? 64 : 198,
|
||||
),
|
||||
Text(
|
||||
Pokemon.values[index].name,
|
||||
style: TextStyle(fontSize: 16, color: Colors.black),
|
||||
style: TextStyle(
|
||||
fontSize: Constants.isMobile ? 16 : 32,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"#${Pokemon.values[index].id}",
|
||||
style: TextStyle(fontSize: 16, color: Colors.black),
|
||||
style: TextStyle(
|
||||
fontSize: Constants.isMobile ? 16 : 32,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -113,7 +119,7 @@ class _HomeState extends State<Home> {
|
|||
},
|
||||
itemCount: Pokemon.values.length,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
crossAxisCount: Constants.isMobile ? 3 : 4,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -153,7 +159,9 @@ class _DexEntryState extends State<DexEntry> {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Center(child: Image.asset(_pkmn.toDexPath())),
|
||||
Text("ID: ${_pkmn.id}", style: TextStyle(fontSize: 24)),
|
||||
Center(
|
||||
child: Text("ID: ${_pkmn.id}", style: TextStyle(fontSize: 24)),
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
@ -163,10 +171,12 @@ class _DexEntryState extends State<DexEntry> {
|
|||
),
|
||||
SizedBox(height: 32),
|
||||
if (_pkmn.hasEvolutions)
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: _pkmn.getEvolutions(0),
|
||||
),
|
||||
if (Constants.isMobile)
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: _pkmn.getEvolutions(0),
|
||||
),
|
||||
if (!Constants.isMobile) Row(children: _pkmn.getEvolutions(0)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue