53 lines
1.7 KiB
Dart
53 lines
1.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../widgets/session_card.dart';
|
|
|
|
class SessionsScreen extends StatelessWidget {
|
|
const SessionsScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
List<Widget> previousSessions =
|
|
List.generate(10, (i) => const SessionCard(state: 1, type: 1));
|
|
Widget upcomingSession = const SessionCard(state: 2);
|
|
Widget currentSession = const SessionCard();
|
|
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
const Padding(
|
|
padding: EdgeInsets.fromLTRB(15, 5, 0, 0),
|
|
child: Text(
|
|
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
|
|
'Current:')),
|
|
currentSession,
|
|
const Padding(
|
|
padding: EdgeInsets.fromLTRB(15, 30, 0, 0),
|
|
child: Text(
|
|
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
|
|
'Upcoming:')),
|
|
upcomingSession,
|
|
const Padding(
|
|
padding: EdgeInsets.fromLTRB(15, 30, 0, 0),
|
|
child: Text(
|
|
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
|
|
'Previous:')),
|
|
SizedBox(
|
|
width: double.infinity,
|
|
height: 160,
|
|
child: GridView.count(
|
|
padding: const EdgeInsets.fromLTRB(15, 10, 0, 0),
|
|
scrollDirection: Axis.horizontal,
|
|
crossAxisSpacing: 5,
|
|
mainAxisSpacing: 5,
|
|
crossAxisCount: 1,
|
|
children: previousSessions))
|
|
// Flexible(
|
|
// child: ListView(
|
|
// scrollDirection: Axis.vertical,
|
|
// children: previousSessions,
|
|
// )),
|
|
],
|
|
);
|
|
}
|
|
}
|