Guest User

Untitled

a guest
Dec 15th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. Widget _itemBuilder(BuildContext context, int index) {
  2. Menu myMenu = Menu(menu[index]);
  3. return new ListTile(
  4. leading: new Text("-"),
  5. title: new Text("Comando ${myMenu.name}"),
  6. onTap: <myMneu.command>,
  7. );
  8. }
  9.  
  10. {
  11. "menu": [
  12. {
  13. "id": 1,
  14. "name": "Start",
  15. "command": "StartScreen()"
  16. },
  17. {
  18. "id": 2,
  19. "name": "Pause",
  20. "command": "PauseScreen()"
  21. },
  22. {
  23. "id": 3,
  24. "name": "Finish",
  25. "command": "FinishScreen()"
  26. }
  27. ]
  28. }
Add Comment
Please, Sign In to add comment