Last active
January 2, 2020 11:30
-
-
Save AakashPandey/3d350ab509b40e0972851fb76f228a28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:states_rebuilder/states_rebuilder.dart'; | |
class HeroList extends StatesRebuilder { | |
List<HeroModel> allHeroes = []; | |
int count = 6; | |
HeroList() { | |
this.allHeroes.add(HeroModel(1, "Narco")); | |
this.allHeroes.add(HeroModel(2, "Bombasto")); | |
this.allHeroes.add(HeroModel(3, "Celeritas")); | |
this.allHeroes.add(HeroModel(4, "Magenta")); | |
this.allHeroes.add(HeroModel(5, "Dr IQ")); | |
} | |
} | |
class HeroModel { | |
int id; | |
String name; | |
HeroModel(this.id, this.name); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment