Standings - Conditioning to find sport urls
This commit is contained in:
@@ -5,7 +5,7 @@ class sport_standings_basketball {
|
||||
final String displayName;
|
||||
final String image;
|
||||
|
||||
final String position;
|
||||
/*final String position;
|
||||
|
||||
// -- Conference stats --
|
||||
final String conferenceRecord;
|
||||
@@ -17,7 +17,7 @@ class sport_standings_basketball {
|
||||
final String overallPercentRecord;
|
||||
final String homeRecord;
|
||||
final String awayRecord;
|
||||
final String gameStreak;
|
||||
final String gameStreak;*/
|
||||
|
||||
// -- Polls stats --
|
||||
//final String apRecord;
|
||||
@@ -28,7 +28,7 @@ class sport_standings_basketball {
|
||||
this.displayName,
|
||||
this.image,
|
||||
|
||||
this.position,
|
||||
/*this.position,
|
||||
|
||||
this.conferenceRecord,
|
||||
this.gamesBehind,
|
||||
@@ -38,7 +38,7 @@ class sport_standings_basketball {
|
||||
this.overallPercentRecord,
|
||||
this.homeRecord,
|
||||
this.awayRecord,
|
||||
this.gameStreak,
|
||||
this.gameStreak,*/
|
||||
|
||||
//this.apRecord,
|
||||
//this.usaRecord,
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/*import 'package:flutter/material.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
class Standings extends StatefulWidget {
|
||||
@override
|
||||
_Standings createState() => _Standings();
|
||||
}
|
||||
|
||||
List _selectedTeams;
|
||||
|
||||
class _Standings extends State<Standings> {
|
||||
static final sportUrl = 'https://charlotte49ers.com/services/adaptive_components.ashx?type=scoreboard&start=0&count=80';
|
||||
|
||||
Future<List<sport_standings_basketball>> getEvents() async {
|
||||
var url = '$sportUrl&sport_id=$sportID&name=&extra=%7B%7D';
|
||||
|
||||
print(url.toString());
|
||||
|
||||
http.Response response = await http.get(url);
|
||||
Iterable games = json.decode(response.body);
|
||||
|
||||
return games.map<sport_standings_basketball>((json) => sport_standings_basketball.fromJson(json)).toList();
|
||||
//return games.map((e) => sport_schedule.fromJson(e)).toList();
|
||||
}*/
|
||||
Reference in New Issue
Block a user