Last active
April 18, 2019 19:31
-
-
Save shubie/5e2fab24542a7bb4ce48f5a2db4afb77 to your computer and use it in GitHub Desktop.
This file contains hidden or 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_lga/state_model.dart'; | |
| class Repository { | |
| List<Map> getAll() => _nigeria; | |
| getLocalByState(String state) => _nigeria | |
| .map((map) => StateModel.fromJson(map)) | |
| .where((item) => item.state == state) | |
| .map((item) => item.lgas) | |
| .expand((i) => i) | |
| .toList(); | |
| List<String> getStates() => _nigeria | |
| .map((map) => StateModel.fromJson(map)) | |
| .map((item) => item.state) | |
| .toList(); | |
| List _nigeria = [ | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment