added args to chat, and game cards can take you there too
This commit is contained in:
@@ -17,7 +17,7 @@ class GameDetailsWidget extends StatelessWidget {
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
GameDetailsHeader(gameCard),
|
||||
EasyAccess(),
|
||||
EasyAccess(gameCard),
|
||||
],
|
||||
)
|
||||
);
|
||||
@@ -131,6 +131,12 @@ class GameDetailsHeader extends StatelessWidget {
|
||||
}
|
||||
|
||||
class EasyAccess extends StatelessWidget {
|
||||
final sport_schedule gameCard;
|
||||
|
||||
const EasyAccess(
|
||||
this.gameCard,
|
||||
);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var size = MediaQuery.of(context).size;
|
||||
@@ -165,7 +171,10 @@ class EasyAccess extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
onTap: () => {
|
||||
print("Tapped $label")
|
||||
print("Tapped $label"),
|
||||
if(label == 'Chat'){
|
||||
Navigator.pushNamed(context, '/Chat', arguments: gameCard.sportTitle)
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class RouteGenerator {
|
||||
case '/Standing':
|
||||
return MaterialPageRoute(builder: (_) => Standing(args));
|
||||
case '/Chat':
|
||||
return MaterialPageRoute(builder: (_) => Chat());
|
||||
return MaterialPageRoute(builder: (_) => Chat(args));
|
||||
case '/Details':
|
||||
return MaterialPageRoute(builder: (_) => GameDetailsWidget(args));
|
||||
case '/Favorites':
|
||||
|
||||
@@ -1,40 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class Chat extends StatelessWidget{
|
||||
String sport;
|
||||
Chat(this.sport);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return StatefulBuilder(
|
||||
builder: (context, StateSetter setState) => Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: false,
|
||||
title: Text("49ers"),
|
||||
title: Text('$sport Chat'),
|
||||
backgroundColor: Colors.green,
|
||||
),
|
||||
body: Text("Chat Goes Here"),
|
||||
drawer: Drawer(
|
||||
child: ListView(
|
||||
children: <Widget>[
|
||||
DrawerHeader(
|
||||
child: Text(
|
||||
'Drawer Header',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
),
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.green,
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: IconButton(
|
||||
icon: Icon(Icons.home),
|
||||
onPressed: () => Navigator.pushNamed(context, '/'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
body: Center(child: Text("Chat Goes Here")),
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -102,6 +102,12 @@ class Sport extends StatelessWidget {
|
||||
onPressed: () => Navigator.pushNamed(context, '/Schedule',arguments: [sport_ID, _curSport.name],),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: IconButton(
|
||||
icon: Icon(Icons.message),
|
||||
onPressed: () => Navigator.pushNamed(context, '/Chat',arguments: _curSport.name),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -147,12 +147,12 @@ class GameCard extends StatelessWidget {
|
||||
|
||||
Widget buildCard(BuildContext ctx, double logoWidth, Map<int, String> _months) {
|
||||
|
||||
return GestureDetector(
|
||||
return InkWell(
|
||||
splashColor: Colors.green,
|
||||
child: Container(
|
||||
color: Colors.black12,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
//mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: _homeAwayImageOrder(
|
||||
|
||||
Reference in New Issue
Block a user