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
|
@ -1,7 +1,7 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
class Constants {
|
class Constants {
|
||||||
static const VERSION = "1.0.032525+2026";
|
static const VERSION = "1.0.032525+2222";
|
||||||
|
|
||||||
static bool get isMobile => Platform.isAndroid || Platform.isIOS;
|
//static bool get isMobile => Platform.isAndroid || Platform.isIOS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,22 +111,16 @@ class _HomeState extends State<Home> {
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
Pokemon.values[index].toDexPath(),
|
Pokemon.values[index].toDexPath(),
|
||||||
width: Constants.isMobile ? 64 : 198,
|
width: 64,
|
||||||
height: Constants.isMobile ? 64 : 198,
|
height: 64,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
Pokemon.values[index].printName(proper: true),
|
Pokemon.values[index].printName(proper: true),
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 16, color: Colors.black),
|
||||||
fontSize: Constants.isMobile ? 16 : 32,
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"#${Pokemon.values[index].id}",
|
"#${Pokemon.values[index].id}",
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 16, color: Colors.black),
|
||||||
fontSize: Constants.isMobile ? 16 : 32,
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -136,7 +130,7 @@ class _HomeState extends State<Home> {
|
||||||
},
|
},
|
||||||
itemCount: SessionData.highestGenID(),
|
itemCount: SessionData.highestGenID(),
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: Constants.isMobile ? 3 : 4,
|
crossAxisCount: 3,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -205,19 +199,23 @@ class _DexEntryState extends State<DexEntry> {
|
||||||
if (_pkmn.extraVariants.isNotEmpty) _pkmn.getVariations(),
|
if (_pkmn.extraVariants.isNotEmpty) _pkmn.getVariations(),
|
||||||
|
|
||||||
SizedBox(height: 32),
|
SizedBox(height: 32),
|
||||||
if (Constants.isMobile)
|
SingleChildScrollView(
|
||||||
SingleChildScrollView(
|
scrollDirection: Axis.horizontal,
|
||||||
scrollDirection: Axis.horizontal,
|
child: Column(
|
||||||
child: Column(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: _pkmn.getEvolutions(0),
|
||||||
children: _pkmn.getEvolutions(0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (!Constants.isMobile)
|
|
||||||
SingleChildScrollView(
|
|
||||||
scrollDirection: Axis.horizontal,
|
|
||||||
child: Row(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(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -6,6 +6,7 @@ import 'package:pokedex/filters.dart';
|
||||||
import 'package:pokedex/pokemon.dart';
|
import 'package:pokedex/pokemon.dart';
|
||||||
|
|
||||||
class SessionData {
|
class SessionData {
|
||||||
|
static bool enableDescription = true;
|
||||||
static bool darkMode = false;
|
static bool darkMode = false;
|
||||||
static int highest = 9;
|
static int highest = 9;
|
||||||
static int _cachedHighest = -1;
|
static int _cachedHighest = -1;
|
||||||
|
@ -65,7 +66,7 @@ class SessionData {
|
||||||
List<Widget> tmpWidgets = [];
|
List<Widget> tmpWidgets = [];
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int end = Constants.isMobile ? 3 : 4;
|
int end = 3;
|
||||||
for (var digit in ALPHABET) {
|
for (var digit in ALPHABET) {
|
||||||
tmpWidgets.add(
|
tmpWidgets.add(
|
||||||
Image.asset("assets/sprites/unown-${digit.toLowerCase()}.png"),
|
Image.asset("assets/sprites/unown-${digit.toLowerCase()}.png"),
|
||||||
|
|
140
lib/dexMisc.dart
Normal file
140
lib/dexMisc.dart
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
import 'package:pokedex/pokemon.dart';
|
||||||
|
|
||||||
|
/// The route number.
|
||||||
|
enum GameRoute {
|
||||||
|
RT1,
|
||||||
|
RT2,
|
||||||
|
RT5,
|
||||||
|
RT24,
|
||||||
|
RT25,
|
||||||
|
RT26,
|
||||||
|
RT27,
|
||||||
|
RT30,
|
||||||
|
RT31,
|
||||||
|
RT34,
|
||||||
|
RT35,
|
||||||
|
RT36,
|
||||||
|
RT37,
|
||||||
|
RT38,
|
||||||
|
RT39,
|
||||||
|
RT204,
|
||||||
|
ViridianForest(commonName: "Viridian Forest"),
|
||||||
|
AzaleaTown(commonName: "Azalea Town"),
|
||||||
|
HexForest(commonName: "Hex Forest"),
|
||||||
|
LakeOfRage(commonName: "Lake of Rage"),
|
||||||
|
NationalPark(commonName: "National Park"),
|
||||||
|
IlexForest(commonName: "Ilex Forest"),
|
||||||
|
PatternBush(commonName: "Pattern Bush"),
|
||||||
|
EternaForest(commonName: "Eterna Forest"),
|
||||||
|
SantaluneForest(commonName: "Santalune Forest"),
|
||||||
|
MeleMeleMeadow(commonName: "Mele Mele Meadow"),
|
||||||
|
LushJungle(commonName: "Lush Jungle"),
|
||||||
|
SpaciousCave(commonName: "Spacious Cave"),
|
||||||
|
GrasslandCave(commonName: "Grassland Cave"),
|
||||||
|
SwampyCave(commonName: "Swampy Cave"),
|
||||||
|
RiverbankCave(commonName: "Riverbank Cave"),
|
||||||
|
StillWaterCavern(commonName: "Still Water Cavern"),
|
||||||
|
SunlitCavern(commonName: "Sunlit Cavern"),
|
||||||
|
BogsunkCavern(commonName: "Bogsunk Cavern"),
|
||||||
|
PalletTown(commonName: "Pallet Town"),
|
||||||
|
CeruleanCity(commonName: "Cerulean City"),
|
||||||
|
|
||||||
|
// The following mark the pokemon as not usually obtainable
|
||||||
|
TradeOrMigrate(commonName: "Trade or Migrate from another game"),
|
||||||
|
BreedOnly(commonName: "Only obtainable via breeding"),
|
||||||
|
Evolve(commonName: "Evolve another pokemon");
|
||||||
|
|
||||||
|
final String commonName;
|
||||||
|
const GameRoute({this.commonName = ""});
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
if (commonName == "")
|
||||||
|
return name;
|
||||||
|
else
|
||||||
|
return commonName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The game's name.
|
||||||
|
enum Game {
|
||||||
|
Red,
|
||||||
|
Blue,
|
||||||
|
Yellow,
|
||||||
|
Gold,
|
||||||
|
Silver,
|
||||||
|
Crystal,
|
||||||
|
Ruby,
|
||||||
|
Sapphire,
|
||||||
|
FireRed(commonName: "Fire Red"),
|
||||||
|
LeafGreen(commonName: "Leaf Green"),
|
||||||
|
Emerald,
|
||||||
|
Diamond,
|
||||||
|
Pearl,
|
||||||
|
Platinum,
|
||||||
|
HeartGold(commonName: "Heart Gold"),
|
||||||
|
SoulSilver(commonName: "Soul Silver"),
|
||||||
|
Black,
|
||||||
|
White,
|
||||||
|
Black2(commonName: "Black 2"),
|
||||||
|
White2(commonName: "White 2"),
|
||||||
|
X,
|
||||||
|
Y,
|
||||||
|
OmegaRuby(commonName: "Omega Ruby"),
|
||||||
|
OmegaSapphire(commonName: "Omega Sapphire"),
|
||||||
|
Sun,
|
||||||
|
Moon,
|
||||||
|
UltraSun(commonName: "Ultra Sun"),
|
||||||
|
UltraMoon(commonName: "Ultra Moon"),
|
||||||
|
LetsGoPikachu(commonName: "Let's Go Pikachu"),
|
||||||
|
LetsGoEevee(commonName: "Let's Go Eevee"),
|
||||||
|
Sword,
|
||||||
|
Shield,
|
||||||
|
BrilliantDiamond(commonName: "Brilliant Diamond"),
|
||||||
|
ShiningPearl(commonName: "Shining Pearl");
|
||||||
|
|
||||||
|
final String commonName;
|
||||||
|
const Game({this.commonName = ""});
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
if (commonName != "")
|
||||||
|
return commonName;
|
||||||
|
else
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// This represents the location of where to find the Pokemon.
|
||||||
|
///
|
||||||
|
/// This location is going to use a Route Enumerable.
|
||||||
|
///
|
||||||
|
/// Another object this includes is the game. Not generation, but game.
|
||||||
|
class Location {
|
||||||
|
final List<GameRoute> routes;
|
||||||
|
final Game game;
|
||||||
|
final Generation gameGen;
|
||||||
|
final List<Game> additionalGames;
|
||||||
|
|
||||||
|
const Location(
|
||||||
|
this.game,
|
||||||
|
this.routes,
|
||||||
|
this.gameGen, {
|
||||||
|
this.additionalGames = const [],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The PokeDex Entry describing the pokemon
|
||||||
|
class DexEntry {
|
||||||
|
final Game game;
|
||||||
|
final String desc;
|
||||||
|
final Generation gameGen;
|
||||||
|
final List<Game> additionalGames;
|
||||||
|
|
||||||
|
const DexEntry(
|
||||||
|
this.game,
|
||||||
|
this.desc,
|
||||||
|
this.gameGen, {
|
||||||
|
this.additionalGames = const [],
|
||||||
|
});
|
||||||
|
}
|
|
@ -30,6 +30,19 @@ class _filterPage extends State<FilterPage> {
|
||||||
"The PokeDex's filters will allow you to customize what Generations are shown in the app.\n\n** WARNING **\nThis will prevent evolutions from showing up if the Pokemon resides in a future generation.\n\nThe dex entries will also not show the evolution conditions, or catch conditions for disabled generations.",
|
"The PokeDex's filters will allow you to customize what Generations are shown in the app.\n\n** WARNING **\nThis will prevent evolutions from showing up if the Pokemon resides in a future generation.\n\nThe dex entries will also not show the evolution conditions, or catch conditions for disabled generations.",
|
||||||
style: TextStyle(fontSize: 24),
|
style: TextStyle(fontSize: 24),
|
||||||
),
|
),
|
||||||
|
SwitchListTile(
|
||||||
|
value: SessionData.enableDescription,
|
||||||
|
onChanged: (X) {
|
||||||
|
SessionData.enableDescription =
|
||||||
|
!SessionData.enableDescription;
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: Text("Enable Dex Descriptions"),
|
||||||
|
subtitle: Text(
|
||||||
|
"Enables or disables the pokedex descriptions for the pokemon",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 50),
|
||||||
SwitchListTile(
|
SwitchListTile(
|
||||||
value: (SessionData.highest >= 1),
|
value: (SessionData.highest >= 1),
|
||||||
title: Text("Generation 1"),
|
title: Text("Generation 1"),
|
||||||
|
|
458
lib/pokemon.dart
458
lib/pokemon.dart
|
@ -3,6 +3,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:pokedex/Consts.dart';
|
import 'package:pokedex/Consts.dart';
|
||||||
import 'package:pokedex/Session.dart';
|
import 'package:pokedex/Session.dart';
|
||||||
|
import 'package:pokedex/dexMisc.dart';
|
||||||
|
|
||||||
enum Generation {
|
enum Generation {
|
||||||
One(1, 151),
|
One(1, 151),
|
||||||
|
@ -150,10 +151,7 @@ class SingleEvolution extends Evolution {
|
||||||
Column(
|
Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(Icons.arrow_downward, size: 48),
|
||||||
Constants.isMobile ? Icons.arrow_downward : Icons.arrow_forward,
|
|
||||||
size: 48,
|
|
||||||
),
|
|
||||||
Card(
|
Card(
|
||||||
elevation: 50,
|
elevation: 50,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
|
@ -165,11 +163,7 @@ class SingleEvolution extends Evolution {
|
||||||
children: [
|
children: [
|
||||||
Text(printEvolution(), style: TextStyle(fontSize: 16)),
|
Text(printEvolution(), style: TextStyle(fontSize: 16)),
|
||||||
|
|
||||||
Image.asset(
|
Image.asset(pkmn.toDexPath(), width: 64, height: 64),
|
||||||
pkmn.toDexPath(),
|
|
||||||
width: Constants.isMobile ? 64 : 128,
|
|
||||||
height: Constants.isMobile ? 64 : 128,
|
|
||||||
),
|
|
||||||
Text(pkmn.pokemonName, style: TextStyle(fontSize: 24)),
|
Text(pkmn.pokemonName, style: TextStyle(fontSize: 24)),
|
||||||
pkmn.getTypeWidgets(),
|
pkmn.getTypeWidgets(),
|
||||||
],
|
],
|
||||||
|
@ -232,10 +226,7 @@ class BranchedEvolution extends Evolution {
|
||||||
Column(
|
Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(Icons.arrow_downward, size: 48),
|
||||||
Constants.isMobile ? Icons.arrow_downward : Icons.arrow_forward,
|
|
||||||
size: 48,
|
|
||||||
),
|
|
||||||
Card(
|
Card(
|
||||||
elevation: 50,
|
elevation: 50,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
|
@ -250,11 +241,7 @@ class BranchedEvolution extends Evolution {
|
||||||
style: TextStyle(fontSize: 16),
|
style: TextStyle(fontSize: 16),
|
||||||
),
|
),
|
||||||
|
|
||||||
Image.asset(
|
Image.asset(_pkmn.toDexPath(), width: 64, height: 64),
|
||||||
_pkmn.toDexPath(),
|
|
||||||
width: Constants.isMobile ? 64 : 128,
|
|
||||||
height: Constants.isMobile ? 64 : 128,
|
|
||||||
),
|
|
||||||
Text(_pkmn.pokemonName, style: TextStyle(fontSize: 24)),
|
Text(_pkmn.pokemonName, style: TextStyle(fontSize: 24)),
|
||||||
_pkmn.getTypeWidgets(),
|
_pkmn.getTypeWidgets(),
|
||||||
],
|
],
|
||||||
|
@ -309,16 +296,167 @@ enum Move {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Pokemon {
|
enum Pokemon {
|
||||||
Bulbasaur(1, Generation.One, [
|
Bulbasaur(
|
||||||
Type.Grass,
|
1,
|
||||||
Type.Poison,
|
Generation.One,
|
||||||
], SingleEvolution(2, 16)),
|
[Type.Grass, Type.Poison],
|
||||||
|
SingleEvolution(2, 16),
|
||||||
|
locations: [
|
||||||
|
Location(
|
||||||
|
Game.Red,
|
||||||
|
[GameRoute.PalletTown],
|
||||||
|
Generation.One,
|
||||||
|
additionalGames: [Game.Blue],
|
||||||
|
),
|
||||||
|
Location(Game.Yellow, [GameRoute.CeruleanCity], Generation.One),
|
||||||
|
Location(
|
||||||
|
Game.Gold,
|
||||||
|
[GameRoute.TradeOrMigrate],
|
||||||
|
Generation.Two,
|
||||||
|
additionalGames: [Game.Silver, Game.Crystal],
|
||||||
|
),
|
||||||
|
Location(
|
||||||
|
Game.Ruby,
|
||||||
|
[GameRoute.TradeOrMigrate],
|
||||||
|
Generation.Three,
|
||||||
|
additionalGames: [Game.Sapphire, Game.Emerald],
|
||||||
|
),
|
||||||
|
Location(
|
||||||
|
Game.FireRed,
|
||||||
|
[GameRoute.PalletTown],
|
||||||
|
Generation.Three,
|
||||||
|
additionalGames: [Game.LeafGreen],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
|
||||||
|
dexEntries: [
|
||||||
|
DexEntry(
|
||||||
|
Game.Red,
|
||||||
|
"A strange seed was planted on its back at birth. The plant sprouts and grows with this POKéMON.",
|
||||||
|
Generation.One,
|
||||||
|
additionalGames: [Game.Blue],
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Yellow,
|
||||||
|
"It can go for days without eating a single morsel. In the bulb on its back, it stores energy.",
|
||||||
|
Generation.One,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Gold,
|
||||||
|
"The seed on its back is filled with nutrients. The seed grows steadily larger as its body grows.",
|
||||||
|
Generation.Two,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Silver,
|
||||||
|
"It carries a seed on its back right from birth. As it grows older, the seed also grows larger.",
|
||||||
|
Generation.Two,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Crystal,
|
||||||
|
"While it is young, it uses the nutrients that are stored in the seeds on its back in order to grow.",
|
||||||
|
Generation.Two,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Ruby,
|
||||||
|
"BULBASAUR can be seen napping in bright sunlight. There is a seed on its back. By soaking up the sun’s rays, the seed grows progressively larger.",
|
||||||
|
Generation.Three,
|
||||||
|
additionalGames: [Game.Sapphire, Game.Emerald],
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.FireRed,
|
||||||
|
"There is a plant seed on its back right from the day this POKéMON is born. The seed slowly grows larger.",
|
||||||
|
Generation.Three,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.LeafGreen,
|
||||||
|
"A strange seed was planted on its back at birth. The plant sprouts and grows with this POKéMON.",
|
||||||
|
Generation.Three,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
Ivysaur(
|
Ivysaur(
|
||||||
2,
|
2,
|
||||||
Generation.One,
|
Generation.One,
|
||||||
[Type.Grass, Type.Poison],
|
[Type.Grass, Type.Poison],
|
||||||
SingleEvolution(3, 32),
|
SingleEvolution(3, 32),
|
||||||
previousPokemon: 1,
|
previousPokemon: 1,
|
||||||
|
|
||||||
|
locations: [
|
||||||
|
Location(
|
||||||
|
Game.Red,
|
||||||
|
[GameRoute.Evolve],
|
||||||
|
Generation.One,
|
||||||
|
additionalGames: [Game.Blue, Game.Yellow],
|
||||||
|
),
|
||||||
|
Location(
|
||||||
|
Game.Gold,
|
||||||
|
[GameRoute.TradeOrMigrate],
|
||||||
|
Generation.Two,
|
||||||
|
additionalGames: [Game.Silver, Game.Crystal],
|
||||||
|
),
|
||||||
|
Location(
|
||||||
|
Game.Ruby,
|
||||||
|
[GameRoute.TradeOrMigrate],
|
||||||
|
Generation.Three,
|
||||||
|
additionalGames: [Game.Sapphire],
|
||||||
|
),
|
||||||
|
Location(
|
||||||
|
Game.FireRed,
|
||||||
|
[GameRoute.Evolve],
|
||||||
|
Generation.Three,
|
||||||
|
additionalGames: [Game.LeafGreen],
|
||||||
|
),
|
||||||
|
Location(Game.Emerald, [GameRoute.TradeOrMigrate], Generation.Three),
|
||||||
|
],
|
||||||
|
dexEntries: [
|
||||||
|
DexEntry(
|
||||||
|
Game.Red,
|
||||||
|
"When the bulb on its back grows large, it appears to lose the ability to stand on its hind legs.",
|
||||||
|
Generation.One,
|
||||||
|
additionalGames: [Game.Blue],
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Yellow,
|
||||||
|
"The bulb on its back grows by drawing energy. It gives off an aroma when it is ready to bloom.",
|
||||||
|
Generation.One,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Gold,
|
||||||
|
"Exposure to sunlight adds to its strength. Sunlight also makes the bud on its back grow larger",
|
||||||
|
Generation.Two,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Silver,
|
||||||
|
"If the bud on its back starts to smell sweet, it is evidence that the large flower will soon bloom.",
|
||||||
|
Generation.Two,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Crystal,
|
||||||
|
"The bulb on its back grows as it absorbs nutrients. The bulb gives off a pleasant aroma when it blooms.",
|
||||||
|
Generation.Two,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Ruby,
|
||||||
|
"There is a bud on this POKéMON’s back. To support its weight, IVYSAUR’s legs and trunk grow thick and strong. If it starts spending more time lying in the sunlight, it’s a sign that the bud will bloom into a large flower soon.",
|
||||||
|
Generation.Three,
|
||||||
|
additionalGames: [Game.Sapphire],
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.FireRed,
|
||||||
|
"There is a plant bulb on its back. When it absorbs nutrients, the bulb is said to blossom into a large flower.",
|
||||||
|
Generation.Three,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.LeafGreen,
|
||||||
|
"When the bulb on its back grows large, it appears to lose the ability to stand on its hind legs.",
|
||||||
|
Generation.Three,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Emerald,
|
||||||
|
"To support its bulb, IVYSAUR’s legs grow sturdy. If it spends more time lying in the sunlight, the bud will soon bloom into a large flower.",
|
||||||
|
Generation.Three,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Venusaur(
|
Venusaur(
|
||||||
3,
|
3,
|
||||||
|
@ -326,6 +464,81 @@ enum Pokemon {
|
||||||
[Type.Grass, Type.Poison],
|
[Type.Grass, Type.Poison],
|
||||||
null,
|
null,
|
||||||
previousPokemon: 2,
|
previousPokemon: 2,
|
||||||
|
locations: [
|
||||||
|
Location(
|
||||||
|
Game.Red,
|
||||||
|
[GameRoute.Evolve],
|
||||||
|
Generation.One,
|
||||||
|
additionalGames: [Game.Blue, Game.Yellow],
|
||||||
|
),
|
||||||
|
Location(
|
||||||
|
Game.Gold,
|
||||||
|
[GameRoute.TradeOrMigrate],
|
||||||
|
Generation.Two,
|
||||||
|
additionalGames: [Game.Silver, Game.Crystal],
|
||||||
|
),
|
||||||
|
Location(
|
||||||
|
Game.Ruby,
|
||||||
|
[GameRoute.TradeOrMigrate],
|
||||||
|
Generation.Three,
|
||||||
|
additionalGames: [Game.Sapphire, Game.Emerald],
|
||||||
|
),
|
||||||
|
Location(
|
||||||
|
Game.FireRed,
|
||||||
|
[GameRoute.Evolve],
|
||||||
|
Generation.Three,
|
||||||
|
additionalGames: [Game.LeafGreen],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
dexEntries: [
|
||||||
|
DexEntry(
|
||||||
|
Game.Red,
|
||||||
|
"The plant blooms when it is absorbing solar energy. It stays on the move to seek sunlight.",
|
||||||
|
Generation.One,
|
||||||
|
additionalGames: [Game.Blue],
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Yellow,
|
||||||
|
"The flower on its back catches the sun’s rays. The sunlight is then absorbed and used for energy.",
|
||||||
|
Generation.One,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Gold,
|
||||||
|
"By spreading the broad petals of its flower and catching the sun’s rays, it fills its body with power.",
|
||||||
|
Generation.Two,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Silver,
|
||||||
|
"It is able to convert sunlight into energy. As a result, it is more powerful in the summertime.",
|
||||||
|
Generation.Two,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Crystal,
|
||||||
|
"As it warms itself and absorbs the sunlight, its flower petals release a pleasant fragrance.",
|
||||||
|
Generation.Two,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Ruby,
|
||||||
|
"There is a large flower on VENUSAUR’s back. The flower is said to take on vivid colors if it gets plenty of nutrition and sunlight. The flower’s aroma soothes the emotions of people.",
|
||||||
|
Generation.Three,
|
||||||
|
additionalGames: [Game.Sapphire],
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.FireRed,
|
||||||
|
"A bewitching aroma wafts from its flower. The fragrance becalms those engaged in a battle.",
|
||||||
|
Generation.Three,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.LeafGreen,
|
||||||
|
"Its plant blooms when it is absorbing solar energy. It stays on the move to seek sunlight.",
|
||||||
|
Generation.Three,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Emerald,
|
||||||
|
"VENUSAUR’s flower is said to take on vivid colors if it gets plenty of nutrition and sunlight. The flower’s aroma soothes the emotions of people.",
|
||||||
|
Generation.Three,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Charmander(4, Generation.One, [Type.Fire], SingleEvolution(5, 16)),
|
Charmander(4, Generation.One, [Type.Fire], SingleEvolution(5, 16)),
|
||||||
Charmeleon(
|
Charmeleon(
|
||||||
|
@ -351,7 +564,114 @@ enum Pokemon {
|
||||||
previousPokemon: 7,
|
previousPokemon: 7,
|
||||||
),
|
),
|
||||||
Blastoise(9, Generation.One, [Type.Water], null, previousPokemon: 8),
|
Blastoise(9, Generation.One, [Type.Water], null, previousPokemon: 8),
|
||||||
Caterpie(10, Generation.One, [Type.Bug], SingleEvolution(11, 7)),
|
Caterpie(
|
||||||
|
10,
|
||||||
|
Generation.One,
|
||||||
|
[Type.Bug],
|
||||||
|
SingleEvolution(11, 7),
|
||||||
|
locations: [
|
||||||
|
Location(Game.Red, [
|
||||||
|
GameRoute.RT25,
|
||||||
|
GameRoute.ViridianForest,
|
||||||
|
], Generation.One),
|
||||||
|
Location(Game.Blue, [
|
||||||
|
GameRoute.RT2,
|
||||||
|
GameRoute.RT24,
|
||||||
|
GameRoute.RT25,
|
||||||
|
GameRoute.ViridianForest,
|
||||||
|
], Generation.One),
|
||||||
|
Location(Game.Yellow, [GameRoute.ViridianForest], Generation.One),
|
||||||
|
Location(Game.Gold, [
|
||||||
|
GameRoute.RT2,
|
||||||
|
GameRoute.RT26,
|
||||||
|
GameRoute.RT27,
|
||||||
|
GameRoute.RT30,
|
||||||
|
GameRoute.RT31,
|
||||||
|
GameRoute.RT34,
|
||||||
|
GameRoute.RT35,
|
||||||
|
GameRoute.RT36,
|
||||||
|
GameRoute.RT37,
|
||||||
|
GameRoute.RT38,
|
||||||
|
GameRoute.RT39,
|
||||||
|
GameRoute.AzaleaTown,
|
||||||
|
GameRoute.IlexForest,
|
||||||
|
GameRoute.LakeOfRage,
|
||||||
|
GameRoute.NationalPark,
|
||||||
|
], Generation.Two),
|
||||||
|
Location(Game.Silver, [GameRoute.NationalPark], Generation.Two),
|
||||||
|
Location(Game.Crystal, [
|
||||||
|
GameRoute.RT2,
|
||||||
|
GameRoute.RT24,
|
||||||
|
GameRoute.RT25,
|
||||||
|
GameRoute.RT30,
|
||||||
|
GameRoute.RT31,
|
||||||
|
GameRoute.IlexForest,
|
||||||
|
GameRoute.NationalPark,
|
||||||
|
], Generation.Two),
|
||||||
|
Location(
|
||||||
|
Game.Ruby,
|
||||||
|
[GameRoute.TradeOrMigrate],
|
||||||
|
Generation.Three,
|
||||||
|
additionalGames: [Game.Sapphire, Game.Emerald],
|
||||||
|
),
|
||||||
|
Location(Game.FireRed, [
|
||||||
|
GameRoute.RT2,
|
||||||
|
GameRoute.RT24,
|
||||||
|
GameRoute.RT25,
|
||||||
|
GameRoute.PatternBush,
|
||||||
|
GameRoute.ViridianForest,
|
||||||
|
], Generation.Three),
|
||||||
|
],
|
||||||
|
dexEntries: [
|
||||||
|
DexEntry(
|
||||||
|
Game.Red,
|
||||||
|
"Its short feet are tipped with suction pads that enable it to tirelessly climb slopes and walls.",
|
||||||
|
Generation.One,
|
||||||
|
additionalGames: [Game.Blue],
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Yellow,
|
||||||
|
"If you touch the feeler on top of its head, it will release a horrible stink to protect itself.",
|
||||||
|
Generation.One,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Gold,
|
||||||
|
"For protection, it releases a horrible stench from the antenna on its head to drive away enemies.",
|
||||||
|
Generation.Two,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Silver,
|
||||||
|
"Its feet have suction cups designed to stick to any surface. It tenaciously climbs trees to forage.",
|
||||||
|
Generation.Two,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Crystal,
|
||||||
|
"It crawls into foliage where it camouflages itself among leaves that are the same color as its body.",
|
||||||
|
Generation.Two,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Ruby,
|
||||||
|
"CATERPIE has a voracious appetite. It can devour leaves bigger than its body right before your eyes. From its antenna, this POKéMON releases a terrifically strong odor.",
|
||||||
|
Generation.Three,
|
||||||
|
additionalGames: [Game.Sapphire],
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.FireRed,
|
||||||
|
"It is covered with a green skin. When it grows, it sheds the skin, covers itself with silk, and becomes a cocoon.",
|
||||||
|
Generation.Three,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.LeafGreen,
|
||||||
|
"Its short feet are tipped with suction pads that enable it to tirelessly climb slopes and walls.",
|
||||||
|
Generation.Three,
|
||||||
|
),
|
||||||
|
DexEntry(
|
||||||
|
Game.Emerald,
|
||||||
|
"Its voracious appetite compels it to devour leaves bigger than itself without hesitation. It releases a terribly strong odor from its antennae.",
|
||||||
|
Generation.Three,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
Metapod(
|
Metapod(
|
||||||
11,
|
11,
|
||||||
Generation.One,
|
Generation.One,
|
||||||
|
@ -1778,6 +2098,8 @@ enum Pokemon {
|
||||||
final int dexID;
|
final int dexID;
|
||||||
final int previousPokemon;
|
final int previousPokemon;
|
||||||
final List<String> extraVariants;
|
final List<String> extraVariants;
|
||||||
|
final List<Location> locations;
|
||||||
|
final List<DexEntry> dexEntries;
|
||||||
bool get hasEvolutions => evolution != null;
|
bool get hasEvolutions => evolution != null;
|
||||||
const Pokemon(
|
const Pokemon(
|
||||||
this.id,
|
this.id,
|
||||||
|
@ -1788,6 +2110,8 @@ enum Pokemon {
|
||||||
this.properName = "",
|
this.properName = "",
|
||||||
this.previousPokemon = -1,
|
this.previousPokemon = -1,
|
||||||
this.extraVariants = const [],
|
this.extraVariants = const [],
|
||||||
|
this.locations = const [],
|
||||||
|
this.dexEntries = const [],
|
||||||
});
|
});
|
||||||
|
|
||||||
String get pokemonName => properName == "" ? name : properName;
|
String get pokemonName => properName == "" ? name : properName;
|
||||||
|
@ -1809,10 +2133,7 @@ enum Pokemon {
|
||||||
foregroundColor: WidgetStatePropertyAll(type.textColor),
|
foregroundColor: WidgetStatePropertyAll(type.textColor),
|
||||||
),
|
),
|
||||||
|
|
||||||
child: Text(
|
child: Text(type.name, style: TextStyle(fontSize: 16)),
|
||||||
type.name,
|
|
||||||
style: TextStyle(fontSize: Constants.isMobile ? 16 : 32),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1841,7 +2162,7 @@ enum Pokemon {
|
||||||
else {
|
else {
|
||||||
List<Widget> tmpRow = [];
|
List<Widget> tmpRow = [];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int row = Constants.isMobile ? 3 : 4;
|
int row = 3;
|
||||||
for (var variant in extraVariants) {
|
for (var variant in extraVariants) {
|
||||||
tmpRow.add(Image.asset("assets/sprites/${variant}.png"));
|
tmpRow.add(Image.asset("assets/sprites/${variant}.png"));
|
||||||
|
|
||||||
|
@ -1909,11 +2230,7 @@ enum Pokemon {
|
||||||
height: 256,
|
height: 256,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Image.asset(toDexPath(), width: 64, height: 64),
|
||||||
toDexPath(),
|
|
||||||
width: Constants.isMobile ? 64 : 128,
|
|
||||||
height: Constants.isMobile ? 64 : 128,
|
|
||||||
),
|
|
||||||
Text(pokemonName, style: TextStyle(fontSize: 24)),
|
Text(pokemonName, style: TextStyle(fontSize: 24)),
|
||||||
getTypeWidgets(),
|
getTypeWidgets(),
|
||||||
],
|
],
|
||||||
|
@ -1939,4 +2256,79 @@ enum Pokemon {
|
||||||
|
|
||||||
return sprites;
|
return sprites;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget printDescription() {
|
||||||
|
List<Widget> widgets = [];
|
||||||
|
|
||||||
|
for (var descs in dexEntries) {
|
||||||
|
if (descs.gameGen.idStart > SessionData.highestGenID()) continue;
|
||||||
|
|
||||||
|
List<String> gameNames = [descs.game.toString()];
|
||||||
|
|
||||||
|
for (var extra in descs.additionalGames) {
|
||||||
|
gameNames.add(extra.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
widgets.add(
|
||||||
|
Card.filled(
|
||||||
|
elevation: 50,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Game: ${gameNames.join(", ")}\nDescription: ${descs.desc}",
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: widgets,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget printLocations() {
|
||||||
|
List<Widget> widgets = [];
|
||||||
|
|
||||||
|
for (var locs in locations) {
|
||||||
|
if (locs.gameGen.idStart > SessionData.highestGenID()) continue;
|
||||||
|
|
||||||
|
List<String> routes = [];
|
||||||
|
for (var rt in locs.routes) {
|
||||||
|
routes.add(rt.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> gameNames = [locs.game.toString()];
|
||||||
|
|
||||||
|
for (var extra in locs.additionalGames) {
|
||||||
|
gameNames.add(extra.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
widgets.add(
|
||||||
|
Card.outlined(
|
||||||
|
elevation: 50,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Game: ${gameNames.join(", ")}\n\nRoutes/Method: ${routes.join(", ")}",
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: widgets,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
# 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
|
# 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.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.0.032525+2026
|
version: 1.0.032525+2222
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.7.0
|
sdk: ^3.7.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue