[go: up one dir, main page]

0% found this document useful (0 votes)
2 views4 pages

Message

hee

Uploaded by

Hlyn Hlyn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Message

hee

Uploaded by

Hlyn Hlyn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

import 'package:fitlife_fitness/screens/session_details.

dart';
import 'package:flutter/material.dart';
import 'package:fitlife_fitness/models/session.dart';
import 'package:fitlife_fitness/widgets/sessioncard_widget.dart';
import 'package:fitlife_fitness/screens/add_session_page.dart';
import 'package:fitlife_fitness/screens/session_details.dart'as details;

void main() {
runApp(const MyApp());
}

class MyApp extends StatelessWidget {


const MyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: const DashboardPage(),
);
}
}

class DashboardPage extends StatelessWidget {


const DashboardPage({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text(
'Dashboard',
style: TextStyle(color: Colors.white),
),
backgroundColor: Colors.black,
elevation: 0,
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
children: [
// Header Box
Container(
width: double.infinity,
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 16),
decoration: BoxDecoration(
color: Colors.lightBlue[100],
borderRadius: BorderRadius.circular(20),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'Hi, May Thu',
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
fontFamily: 'Comic Sans MS',
color: Colors.black,
),
),
const SizedBox(height: 10),
Row(
children: [
Expanded(
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 12),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: const TextField(
decoration: InputDecoration(
hintText: 'Search sessions...',
border: InputBorder.none,
prefixIcon:
Icon(Icons.search, color: Colors.black54),
),
),
),
),
const SizedBox(width: 10),
Ink(
decoration: ShapeDecoration(
color: Colors.blue[700],
shape: const CircleBorder(),
),
child: IconButton(
icon: const Icon(Icons.add, color: Colors.white),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddSessionPage(),
),
);
},
),
),

],
),
],
),
),
const SizedBox(height: 20),
Expanded(
child: ListView(
children: [
SessionCard(
clientName: 'Evelynn',
dateTime: '12 January | 9 AM',
onEdit: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SessionDetailsPage(
session: Session(
clientName: 'Evelynn',
date: '12 January',
time: '9:00 AM',
workoutType: 'Yoga',
duration: '1 hour',
notes: 'Focus on flexibility and breathing',
sessionLocation: 'Gym A', // Ensure this is passed
),
),
),
);
},
),
],
),
),
],
),
),
);
}
}
// SessionCard(
// clientName: 'Evelynn',
// dateTime: '12 January | 9 AM',
// onEdit: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => SessionDetailsPage(
// session: Session(
// clientName: 'Evelynn',
// date: '12 January',
// time: '9:00 AM',
// workoutType: 'Yoga',
// duration: '1 hour',
// notes: 'Focus on flexibility and breathing', sessionLocation: '',
// ),
// ),
// ),
// );
// },
// ),
// SessionCardWidget(
// clientName: 'Johnny',
// date: '13 January',
// time: '2 PM',
//
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => SessionDetailsPage(
// session: Session(
// clientName: 'Johnny',
// date: '13 January',
// time: '10:00 AM',
// workoutType: 'Strength Training',
// duration: '1.5 hours',
// notes: 'Focus on upper body strength', sessionLocation: '',
// ),
// ),
// ),
// );
// },
// ),
// SessionCard(
// clientName: 'Minzie',
// dateTime: '21 January | 8 AM',
// onEdit: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => SessionDetailsPage(
// session: Session(
// clientName: 'Minzie',
// date: '21 January',
// time: '8:00 AM',
// workoutType: 'Cardio',
// duration: '45 minutes',
// notes: 'Interval training',
// ),
// ),
// ),
// );
// },
// ),

You might also like