Fix android UX

This commit is contained in:
zontreck 2025-03-22 19:56:49 -07:00
parent c62a39edcb
commit 2ade0cca22
2 changed files with 37 additions and 29 deletions

View file

@ -94,16 +94,16 @@ class _HomeState extends State<Home> {
children: [
Image.asset(
Pokemon.values[index].toDexPath(),
width: 198,
height: 198,
width: 64,
height: 64,
),
Text(
Pokemon.values[index].name,
style: TextStyle(fontSize: 32, color: Colors.black),
style: TextStyle(fontSize: 16, color: Colors.black),
),
Text(
"#${Pokemon.values[index].id}",
style: TextStyle(fontSize: 24, color: Colors.black),
style: TextStyle(fontSize: 16, color: Colors.black),
),
],
),
@ -113,7 +113,7 @@ class _HomeState extends State<Home> {
},
itemCount: Pokemon.values.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4,
crossAxisCount: 3,
),
),
),
@ -148,25 +148,27 @@ class _DexEntryState extends State<DexEntry> {
),
body: Padding(
padding: EdgeInsets.all(8),
child: Column(
children: [
Image.asset(_pkmn.toDexPath()),
Text("ID: ${_pkmn.id}", style: TextStyle(fontSize: 24)),
Row(
children: [
Text("Type: ", style: TextStyle(fontSize: 24)),
_pkmn.getTypeWidgets(),
],
),
SizedBox(height: 24),
if (_pkmn.hasEvolutions)
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Center(child: Image.asset(_pkmn.toDexPath())),
Text("ID: ${_pkmn.id}", style: TextStyle(fontSize: 24)),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Evolutions: ", style: TextStyle(fontSize: 24)),
_pkmn.getEvolutions(0),
Text("Type: ", style: TextStyle(fontSize: 24)),
_pkmn.getTypeWidgets(),
],
),
],
SizedBox(height: 32),
if (_pkmn.hasEvolutions)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: _pkmn.getEvolutions(0),
),
],
),
),
),
);