Advertisement
Guest User

Untitled

a guest
Aug 24th, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.36 KB | None | 0 0
  1. class Game {
  2.   String awayTeam;
  3.   String hostTeam;
  4.   String result;
  5.  
  6.   Game({this.hostTeam,
  7.       this.awayTeam,
  8.       this.result});
  9. }
  10. var data = ["Real Madrid","Barcelona","0-0","FCPorto","A.C. Milan","3-3"]; // this could be any size, but the data offset is the same
  11. var games = <Game>[];
  12.  
  13. // how do I create a List of Game objects this games with this data?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement