Skip to content

Instantly share code, notes, and snippets.

@AakashPandey
Last active January 2, 2020 11:30
Show Gist options
  • Save AakashPandey/3d350ab509b40e0972851fb76f228a28 to your computer and use it in GitHub Desktop.
Save AakashPandey/3d350ab509b40e0972851fb76f228a28 to your computer and use it in GitHub Desktop.
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