Add more entries
BIN
assets/sprites/abra.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
assets/sprites/alakazam.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
assets/sprites/bellsprout.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
assets/sprites/cloyster.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
assets/sprites/dewgong.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
assets/sprites/dodrio.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
assets/sprites/doduo.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
assets/sprites/farfetchd.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
assets/sprites/geodude.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
assets/sprites/golem.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/sprites/graveler.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
assets/sprites/grimer.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
assets/sprites/kadabra.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
assets/sprites/machamp.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
assets/sprites/machoke.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/sprites/machop.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
assets/sprites/magnemite.png
Normal file
After Width: | Height: | Size: 8.1 KiB |
BIN
assets/sprites/magneton.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
assets/sprites/muk.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
assets/sprites/ponyta.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
assets/sprites/rapidash.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/sprites/seel.png
Normal file
After Width: | Height: | Size: 9 KiB |
BIN
assets/sprites/shellder.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
assets/sprites/slowbro.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
assets/sprites/slowpoke.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
assets/sprites/tentacool.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
assets/sprites/tentacruel.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
assets/sprites/victreebel.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/sprites/weepinbell.png
Normal file
After Width: | Height: | Size: 10 KiB |
|
@ -1,7 +1,7 @@
|
|||
import 'dart:io';
|
||||
|
||||
class Constants {
|
||||
static const VERSION = "1.0.032225+2230";
|
||||
static const VERSION = "1.0.032325+1427";
|
||||
|
||||
static bool get isMobile => Platform.isAndroid || Platform.isIOS;
|
||||
}
|
||||
|
|
|
@ -169,6 +169,15 @@ class _DexEntryState extends State<DexEntry> {
|
|||
_pkmn.getTypeWidgets(),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"First Seen in Generation ${_pkmn.generation.name}",
|
||||
style: TextStyle(fontSize: 24),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 32),
|
||||
if (_pkmn.hasEvolutions)
|
||||
if (Constants.isMobile)
|
||||
|
|
240
lib/pokemon.dart
|
@ -72,12 +72,19 @@ enum EvolutionCondition {
|
|||
LeafStone,
|
||||
}
|
||||
|
||||
class Evolution {
|
||||
abstract class Evolution {
|
||||
const Evolution();
|
||||
String printEvolution();
|
||||
}
|
||||
|
||||
class SingleEvolution extends Evolution {
|
||||
final int to;
|
||||
final int level;
|
||||
final EvolutionCondition? condition;
|
||||
const Evolution(this.to, this.level, {this.condition = null});
|
||||
final List<EvolutionCondition>? condition;
|
||||
|
||||
const SingleEvolution(this.to, this.level, {this.condition = null});
|
||||
|
||||
@override
|
||||
String printEvolution() {
|
||||
String sRet = "";
|
||||
if (level != -1) {
|
||||
|
@ -87,12 +94,28 @@ class Evolution {
|
|||
if (sRet.isNotEmpty) {
|
||||
sRet += "\n";
|
||||
}
|
||||
sRet += condition.toString().split('.').last;
|
||||
|
||||
for (var cond in condition!) {
|
||||
sRet += cond.name;
|
||||
}
|
||||
}
|
||||
return sRet;
|
||||
}
|
||||
}
|
||||
|
||||
class BranchedEvolution extends Evolution {
|
||||
final List<int> alternates;
|
||||
final List<int> levels;
|
||||
final List<List<EvolutionCondition>?> conditions;
|
||||
|
||||
const BranchedEvolution(this.alternates, this.levels, this.conditions);
|
||||
|
||||
@override
|
||||
String printEvolution() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
enum LearnType { TM, HM }
|
||||
|
||||
enum Move {
|
||||
|
@ -129,81 +152,183 @@ enum Move {
|
|||
}
|
||||
|
||||
enum Pokemon {
|
||||
Bulbasaur(1, Generation.One, [Type.Grass, Type.Poison], Evolution(2, 16)),
|
||||
Ivysaur(2, Generation.One, [Type.Grass, Type.Poison], Evolution(3, 32)),
|
||||
Bulbasaur(1, Generation.One, [
|
||||
Type.Grass,
|
||||
Type.Poison,
|
||||
], SingleEvolution(2, 16)),
|
||||
Ivysaur(2, Generation.One, [Type.Grass, Type.Poison], SingleEvolution(3, 32)),
|
||||
Venusaur(3, Generation.One, [Type.Grass, Type.Poison], null),
|
||||
Charmander(4, Generation.One, [Type.Fire], Evolution(5, 16)),
|
||||
Charmeleon(5, Generation.One, [Type.Fire], Evolution(6, 36)),
|
||||
Charmander(4, Generation.One, [Type.Fire], SingleEvolution(5, 16)),
|
||||
Charmeleon(5, Generation.One, [Type.Fire], SingleEvolution(6, 36)),
|
||||
Charizard(6, Generation.One, [Type.Fire, Type.Flying], null),
|
||||
Squirtle(7, Generation.One, [Type.Water], Evolution(8, 16)),
|
||||
Wartortle(8, Generation.One, [Type.Water], Evolution(9, 36)),
|
||||
Squirtle(7, Generation.One, [Type.Water], SingleEvolution(8, 16)),
|
||||
Wartortle(8, Generation.One, [Type.Water], SingleEvolution(9, 36)),
|
||||
Blastoise(9, Generation.One, [Type.Water], null),
|
||||
Caterpie(10, Generation.One, [Type.Bug], Evolution(11, 7)),
|
||||
Metapod(11, Generation.One, [Type.Bug], Evolution(12, 10)),
|
||||
Caterpie(10, Generation.One, [Type.Bug], SingleEvolution(11, 7)),
|
||||
Metapod(11, Generation.One, [Type.Bug], SingleEvolution(12, 10)),
|
||||
Butterfree(12, Generation.One, [Type.Bug, Type.Flying], null),
|
||||
Weedle(13, Generation.One, [Type.Bug, Type.Poison], Evolution(14, 7)),
|
||||
Kakuna(14, Generation.One, [Type.Bug, Type.Poison], Evolution(15, 10)),
|
||||
Weedle(13, Generation.One, [Type.Bug, Type.Poison], SingleEvolution(14, 7)),
|
||||
Kakuna(14, Generation.One, [Type.Bug, Type.Poison], SingleEvolution(15, 10)),
|
||||
Beedrill(15, Generation.One, [Type.Bug, Type.Poison], null),
|
||||
Pidgey(16, Generation.One, [Type.Normal, Type.Flying], Evolution(17, 18)),
|
||||
Pidgeotto(17, Generation.One, [Type.Normal, Type.Flying], Evolution(18, 36)),
|
||||
Pidgey(16, Generation.One, [
|
||||
Type.Normal,
|
||||
Type.Flying,
|
||||
], SingleEvolution(17, 18)),
|
||||
Pidgeotto(17, Generation.One, [
|
||||
Type.Normal,
|
||||
Type.Flying,
|
||||
], SingleEvolution(18, 36)),
|
||||
Pidgeot(18, Generation.One, [Type.Normal, Type.Flying], null),
|
||||
Rattata(19, Generation.One, [Type.Normal], Evolution(20, 20)),
|
||||
Rattata(19, Generation.One, [Type.Normal], SingleEvolution(20, 20)),
|
||||
Raticate(20, Generation.One, [Type.Normal], null),
|
||||
Spearow(21, Generation.One, [Type.Normal, Type.Flying], Evolution(22, 20)),
|
||||
Spearow(21, Generation.One, [
|
||||
Type.Normal,
|
||||
Type.Flying,
|
||||
], SingleEvolution(22, 20)),
|
||||
Fearow(22, Generation.One, [Type.Normal, Type.Flying], null),
|
||||
Pikachu(25, Generation.One, [
|
||||
Type.Electric,
|
||||
], Evolution(26, -1, condition: EvolutionCondition.ThunderStone)),
|
||||
Pikachu(
|
||||
25,
|
||||
Generation.One,
|
||||
[Type.Electric],
|
||||
SingleEvolution(26, -1, condition: [EvolutionCondition.ThunderStone]),
|
||||
),
|
||||
Raichu(26, Generation.One, [Type.Electric], null),
|
||||
Sandshrew(27, Generation.One, [Type.Ground], Evolution(28, 22)),
|
||||
Sandshrew(27, Generation.One, [Type.Ground], SingleEvolution(28, 22)),
|
||||
Sandslash(28, Generation.One, [Type.Ground], null),
|
||||
NidoranF(29, Generation.One, [Type.Poison], Evolution(30, 16)),
|
||||
Nidorina(30, Generation.One, [Type.Poison], Evolution(31, 36)),
|
||||
NidoranF(29, Generation.One, [Type.Poison], SingleEvolution(30, 16)),
|
||||
Nidorina(30, Generation.One, [Type.Poison], SingleEvolution(31, 36)),
|
||||
NidoQueen(31, Generation.One, [Type.Poison, Type.Ground], null),
|
||||
NidoranM(32, Generation.One, [Type.Poison], Evolution(33, 16)),
|
||||
Nidorino(33, Generation.One, [Type.Poison], Evolution(34, 36)),
|
||||
NidoranM(32, Generation.One, [Type.Poison], SingleEvolution(33, 16)),
|
||||
Nidorino(33, Generation.One, [Type.Poison], SingleEvolution(34, 36)),
|
||||
NidoKing(34, Generation.One, [Type.Poison, Type.Ground], null),
|
||||
Clefairy(35, Generation.One, [
|
||||
Type.Fairy,
|
||||
], Evolution(36, -1, condition: EvolutionCondition.MoonStone)),
|
||||
Clefairy(
|
||||
35,
|
||||
Generation.One,
|
||||
[Type.Fairy],
|
||||
SingleEvolution(36, -1, condition: [EvolutionCondition.MoonStone]),
|
||||
),
|
||||
Clefable(36, Generation.One, [Type.Fairy], null),
|
||||
Vulpix(37, Generation.One, [
|
||||
Type.Fire,
|
||||
], Evolution(38, -1, condition: EvolutionCondition.FireStone)),
|
||||
Vulpix(
|
||||
37,
|
||||
Generation.One,
|
||||
[Type.Fire],
|
||||
SingleEvolution(38, -1, condition: [EvolutionCondition.FireStone]),
|
||||
),
|
||||
NineTales(38, Generation.One, [Type.Fire], null),
|
||||
Jigglypuff(39, Generation.One, [
|
||||
Type.Fairy,
|
||||
], Evolution(40, -1, condition: EvolutionCondition.MoonStone)),
|
||||
Jigglypuff(
|
||||
39,
|
||||
Generation.One,
|
||||
[Type.Fairy],
|
||||
SingleEvolution(40, -1, condition: [EvolutionCondition.MoonStone]),
|
||||
),
|
||||
WigglyTuff(40, Generation.One, [Type.Fairy], null),
|
||||
Zubat(41, Generation.One, [Type.Poison, Type.Flying], Evolution(42, 22)),
|
||||
Zubat(41, Generation.One, [
|
||||
Type.Poison,
|
||||
Type.Flying,
|
||||
], SingleEvolution(42, 22)),
|
||||
Golbat(42, Generation.One, [Type.Poison, Type.Flying], null),
|
||||
Oddish(43, Generation.One, [Type.Poison, Type.Grass], Evolution(44, 21)),
|
||||
Gloom(44, Generation.One, [
|
||||
Oddish(43, Generation.One, [
|
||||
Type.Poison,
|
||||
Type.Grass,
|
||||
], Evolution(45, -1, condition: EvolutionCondition.LeafStone)),
|
||||
], SingleEvolution(44, 21)),
|
||||
Gloom(
|
||||
44,
|
||||
Generation.One,
|
||||
[Type.Poison, Type.Grass],
|
||||
SingleEvolution(45, -1, condition: [EvolutionCondition.LeafStone]),
|
||||
),
|
||||
Vileplume(45, Generation.One, [Type.Poison, Type.Grass], null),
|
||||
Paras(46, Generation.One, [Type.Bug, Type.Grass], Evolution(47, 24)),
|
||||
Paras(46, Generation.One, [Type.Bug, Type.Grass], SingleEvolution(47, 24)),
|
||||
Parasect(47, Generation.One, [Type.Bug, Type.Grass], null),
|
||||
Venonat(48, Generation.One, [Type.Bug, Type.Poison], Evolution(49, 31)),
|
||||
Venonat(48, Generation.One, [Type.Bug, Type.Poison], SingleEvolution(49, 31)),
|
||||
Venomoth(49, Generation.One, [Type.Bug, Type.Poison], null),
|
||||
Diglett(50, Generation.One, [Type.Ground], Evolution(51, 26)),
|
||||
Diglett(50, Generation.One, [Type.Ground], SingleEvolution(51, 26)),
|
||||
Dugtrio(51, Generation.One, [Type.Ground], null),
|
||||
Meowth(52, Generation.One, [Type.Normal], Evolution(53, 28)),
|
||||
Meowth(52, Generation.One, [Type.Normal], SingleEvolution(53, 28)),
|
||||
Persian(53, Generation.One, [Type.Normal], null),
|
||||
Psyduck(54, Generation.One, [Type.Water], Evolution(55, 33)),
|
||||
Psyduck(54, Generation.One, [Type.Water], SingleEvolution(55, 33)),
|
||||
Golduck(55, Generation.One, [Type.Water], null),
|
||||
Mankey(56, Generation.One, [Type.Fighting], Evolution(57, 28)),
|
||||
Mankey(56, Generation.One, [Type.Fighting], SingleEvolution(57, 28)),
|
||||
Primeape(57, Generation.One, [Type.Fighting], null),
|
||||
Growlithe(58, Generation.One, [
|
||||
Type.Fire,
|
||||
], Evolution(59, -1, condition: EvolutionCondition.FireStone)),
|
||||
Growlithe(
|
||||
58,
|
||||
Generation.One,
|
||||
[Type.Fire],
|
||||
SingleEvolution(59, -1, condition: [EvolutionCondition.FireStone]),
|
||||
),
|
||||
Arcanine(59, Generation.One, [Type.Fire], null),
|
||||
Poliwag(60, Generation.One, [Type.Water], Evolution(61, 25)),
|
||||
Poliwhirl(61, Generation.One, [
|
||||
Poliwag(60, Generation.One, [Type.Water], SingleEvolution(61, 25)),
|
||||
Poliwhirl(
|
||||
61,
|
||||
Generation.One,
|
||||
[Type.Water],
|
||||
SingleEvolution(62, -1, condition: [EvolutionCondition.WaterStone]),
|
||||
),
|
||||
Poliwrath(62, Generation.One, [Type.Water], null),
|
||||
Abra(63, Generation.One, [Type.Psychic], SingleEvolution(64, 16)),
|
||||
Kadabra(64, Generation.One, [
|
||||
Type.Psychic,
|
||||
], SingleEvolution(65, -1, condition: [EvolutionCondition.Trading])),
|
||||
Alakazam(65, Generation.One, [Type.Psychic], null),
|
||||
Machop(66, Generation.One, [Type.Fighting], SingleEvolution(67, 28)),
|
||||
Machoke(67, Generation.One, [
|
||||
Type.Fighting,
|
||||
], SingleEvolution(68, -1, condition: [EvolutionCondition.Trading])),
|
||||
Machamp(68, Generation.One, [Type.Fighting], null),
|
||||
Bellsprout(69, Generation.One, [
|
||||
Type.Grass,
|
||||
Type.Poison,
|
||||
], SingleEvolution(70, 21)),
|
||||
Weepinbell(
|
||||
70,
|
||||
Generation.One,
|
||||
[Type.Grass, Type.Poison],
|
||||
SingleEvolution(71, -1, condition: [EvolutionCondition.LeafStone]),
|
||||
),
|
||||
Victreebel(71, Generation.One, [Type.Grass, Type.Poison], null),
|
||||
Tentacool(72, Generation.One, [
|
||||
Type.Water,
|
||||
], Evolution(62, -1, condition: EvolutionCondition.WaterStone)),
|
||||
Poliwrath(62, Generation.One, [Type.Water], null);
|
||||
Type.Poison,
|
||||
], SingleEvolution(73, 30)),
|
||||
Tentacruel(73, Generation.One, [Type.Water, Type.Poison], null),
|
||||
Geodude(74, Generation.One, [
|
||||
Type.Rock,
|
||||
Type.Ground,
|
||||
], SingleEvolution(75, 25)),
|
||||
Graveler(75, Generation.One, [
|
||||
Type.Rock,
|
||||
Type.Ground,
|
||||
], SingleEvolution(76, -1, condition: [EvolutionCondition.Trading])),
|
||||
Golem(76, Generation.One, [Type.Rock, Type.Ground], null),
|
||||
Ponyta(77, Generation.One, [Type.Fire], SingleEvolution(78, 40)),
|
||||
Rapidash(78, Generation.One, [Type.Fire], null),
|
||||
Slowpoke(79, Generation.One, [
|
||||
Type.Water,
|
||||
Type.Psychic,
|
||||
], SingleEvolution(80, 37)),
|
||||
Slowbro(80, Generation.One, [Type.Water, Type.Psychic], null),
|
||||
Magnemite(81, Generation.One, [
|
||||
Type.Electric,
|
||||
Type.Steel,
|
||||
], SingleEvolution(82, 30)),
|
||||
Magneton(82, Generation.One, [Type.Electric, Type.Steel], null),
|
||||
Farfetchd(83, Generation.One, [Type.Fighting], null),
|
||||
Doduo(84, Generation.One, [
|
||||
Type.Normal,
|
||||
Type.Flying,
|
||||
], SingleEvolution(85, 31)),
|
||||
Dodrio(85, Generation.One, [Type.Normal, Type.Flying], null),
|
||||
Seel(86, Generation.One, [Type.Water], SingleEvolution(87, 34)),
|
||||
Dewgong(87, Generation.One, [Type.Water, Type.Ice], null),
|
||||
Grimer(88, Generation.One, [Type.Poison], SingleEvolution(89, 38)),
|
||||
Muk(89, Generation.One, [Type.Poison], null),
|
||||
Shellder(
|
||||
90,
|
||||
Generation.One,
|
||||
[Type.Water],
|
||||
SingleEvolution(91, -1, condition: [EvolutionCondition.WaterStone]),
|
||||
),
|
||||
Cloyster(91, Generation.One, [Type.Water, Type.Ice], null);
|
||||
|
||||
final int id;
|
||||
final Generation generation;
|
||||
|
@ -248,7 +373,16 @@ enum Pokemon {
|
|||
List<Widget> getEvolutions(int subID) {
|
||||
if (!hasEvolutions) return [];
|
||||
|
||||
Pokemon ev = Pokemon.values.where((x) => x.id == evolution!.to).first;
|
||||
Pokemon ev = Pokemon.Abra;
|
||||
|
||||
if (evolution is SingleEvolution)
|
||||
ev =
|
||||
Pokemon.values
|
||||
.where((x) => x.id == (evolution! as SingleEvolution).to)
|
||||
.first;
|
||||
else {
|
||||
// Handle branched evolutions. Refactor below to accomodate a list of pokemon.
|
||||
}
|
||||
|
||||
List<Widget> sprites = [];
|
||||
|
||||
|
|
31
pubspec.yaml
|
@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
|||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.0.032225+2230
|
||||
version: 1.0.032325+1427
|
||||
|
||||
environment:
|
||||
sdk: ^3.7.0
|
||||
|
@ -126,6 +126,35 @@ flutter:
|
|||
- assets/sprites/poliwag.png
|
||||
- assets/sprites/poliwhirl.png
|
||||
- assets/sprites/poliwrath.png
|
||||
- assets/sprites/abra.png
|
||||
- assets/sprites/kadabra.png
|
||||
- assets/sprites/alakazam.png
|
||||
- assets/sprites/machop.png
|
||||
- assets/sprites/machoke.png
|
||||
- assets/sprites/machamp.png
|
||||
- assets/sprites/bellsprout.png
|
||||
- assets/sprites/weepinbell.png
|
||||
- assets/sprites/victreebel.png
|
||||
- assets/sprites/tentacool.png
|
||||
- assets/sprites/tentacruel.png
|
||||
- assets/sprites/geodude.png
|
||||
- assets/sprites/graveler.png
|
||||
- assets/sprites/golem.png
|
||||
- assets/sprites/ponyta.png
|
||||
- assets/sprites/rapidash.png
|
||||
- assets/sprites/slowpoke.png
|
||||
- assets/sprites/slowbro.png
|
||||
- assets/sprites/magnemite.png
|
||||
- assets/sprites/magneton.png
|
||||
- assets/sprites/farfetchd.png
|
||||
- assets/sprites/doduo.png
|
||||
- assets/sprites/dodrio.png
|
||||
- assets/sprites/seel.png
|
||||
- assets/sprites/dewgong.png
|
||||
- assets/sprites/grimer.png
|
||||
- assets/sprites/muk.png
|
||||
- assets/sprites/shellder.png
|
||||
- assets/sprites/cloyster.png
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/to/resolution-aware-images
|
||||
|
|