Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit

Permalink
Results page, better Maps page if no map
Browse files Browse the repository at this point in the history
  • Loading branch information
SheaBelsky committed Mar 16, 2019
1 parent 58b87f9 commit 3468b52
Show file tree
Hide file tree
Showing 6 changed files with 312 additions and 30 deletions.
4 changes: 2 additions & 2 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.1</string>
<string>1.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2</string>
<string>1</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion lib/views/app/TournamentList.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import "package:ezra_companion/views/tournament/TournamentView.dart";
/// Make a request to Ezra and get a list of tournaments
/// TODO: Store the results of this locally, check for new tournaments every so often (every week?)
Future<List<TournamentListItem>> fetchTournaments(http.Client client) async {
final response = await client.get('https://www.ezratech.us/api/tournaments/search?appOptIn=true');
final response = await client.get('https://www.ezratech.us/api/tournaments/search');

if (response.statusCode == 200) {
// Use the compute function to run parseTournaments
Expand Down
16 changes: 14 additions & 2 deletions lib/views/tournament/TournamentView.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class _TournamentViewState extends State<TournamentView> {
updateSubscriptionStatus: _updatePublicSubscriptionStatus
);
_tournamentResults = new TournamentResults(
fileStorage: _fileStorage,
tournamentInfo: widget.tournamentInfo
);
_tournamentSchedule = new TournamentSchedule(
Expand Down Expand Up @@ -179,8 +180,19 @@ class _TournamentViewState extends State<TournamentView> {
// Build the widget
@override
Widget build(BuildContext context) {
final double padding = _selectedIndex != 1 ? 15.0 : 0.0;
final TextTheme textTheme = Theme.of(context).textTheme;
// Ignore the maps and results page for padding
double padding;
switch(_selectedIndex) {
case 1:
padding = 0.0;
break;
case 4:
padding = 5.0;
break;
default:
padding = 15.0;
}
final TextTheme textTheme = Theme.of(context).textTheme;

return FutureBuilder(
future: initializeTournament(),
Expand Down
25 changes: 20 additions & 5 deletions lib/views/tournament/tabs/TournamentMap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,26 @@ class TournamentMap extends StatelessWidget {
}
}
else {
return Column(
children: <Widget>[
Text('No map!'),
Text('View more ${tournamentInfo.name}'),
],
TextStyle pageTextStyle = new TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w600,
color: Colors.black87,
);
return Padding(
padding: new EdgeInsets.all(25.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
new Icon(Icons.map),
SizedBox(height: 30),
new Text(
"No map has been provided for this tournament; ask your organizers to upload one, then you'll see it here!",
style: pageTextStyle,
textAlign: TextAlign.center
),
]
)
);
}
}
Expand Down
Loading

0 comments on commit 3468b52

Please sign in to comment.