This repository has been archived on 2026-05-22. You can view files and clone it, but cannot push or open issues or pull requests.
Files
ITCS-4155/lib/screens/sport_standings_football.dart
2020-04-29 22:32:14 -04:00

64 lines
1.8 KiB
Dart

import 'package:flutter/material.dart';
class sport_standings_football {
final int id; //id for each game
final DateTime date; //date: 2020-09-05T00:00:00
final String location_indicator; //location_indicator: H-Home / A-Away
final String location; //location: Knoxville, Tenn., Charlotte, NC
// -- sport json --
final int idSport; //id: Each sport different number
final String sportTitle; //title: Football, Men's Soccer
final String gender; //gender: M - F
// -- opponent json --
final String opponentTitle; //title: Tennessee, Norfolk State
final String image;
// -- result json --
final String status; //status: W - T - L
final String team_score; //team_score:
final String opponent_score; //opponent_score:
final String postscore;
sport_standings_football(
this.id, {
this.date,
this.location_indicator,
this.location,
this.idSport,
this.sportTitle,
this.gender,
this.opponentTitle,
this.image,
this.status,
this.team_score,
this.opponent_score,
this.postscore,
});
factory sport_standings_football.fromJson(Map<String, dynamic> json) {
return sport_standings_football(
json['id'],
date: DateTime.parse(json['date']),
location_indicator: json['location_indicator'],
location: json['location'],
idSport: json['sport']['id'],
sportTitle: json['sport']['title'],
gender: json['sport']['gender'],
opponentTitle: json['opponent']['title'],
image: json['opponent']['image'],
status: json['result']['status'],
team_score: json['result']['team_score'],
opponent_score: json['result']['opponent_score'],
postscore: json['result']['postscore'],
);
}
}