Home Page
Home Page
dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
void main() {
runApp(SwaasApp());
}
Widget _buildHeader() {
return Container(
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.teal[700],
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(30),
bottomRight: Radius.circular(30),
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Good Morning,',
style: GoogleFonts.roboto(
color: Colors.white,
fontSize: 18,
),
),
Text(
'Dhiraj!',
style: GoogleFonts.roboto(
color: Colors.white,
fontSize: 32,
fontWeight: FontWeight.bold,
),
),
],
),
);
}
Widget _buildHealthTip() {
return Container(
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.teal[50],
borderRadius: BorderRadius.circular(12),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Health Tip',
style: GoogleFonts.roboto(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Colors.teal[700],
),
),
SizedBox(height: 8),
AnimatedTextKit(
animatedTexts: [
FadeAnimatedText(
'"Breathe. Let go. And remind yourself that this very moment is the
only one you know you have for sure."',
textStyle: GoogleFonts.roboto(
fontSize: 16,
color: Colors.teal[700],
fontStyle: FontStyle.italic,
),
duration: Duration(seconds: 5),
),
FadeAnimatedText(
'"Calmness is the cradle of power."',
textStyle: GoogleFonts.roboto(
fontSize: 16,
color: Colors.teal[700],
fontStyle: FontStyle.italic,
),
duration: Duration(seconds: 5),
),
],
repeatForever: true,
),
],
),
);
}
Widget _buildNextReminder() {
return Container(
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.orange[50],
borderRadius: BorderRadius.circular(12),
),
child: Row(
children: [
Icon(Icons.alarm, color: Colors.orange[700]),
SizedBox(width: 16),
Text(
'Next reminder at 10:15 AM',
style: GoogleFonts.roboto(
color: Colors.orange[700],
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
],
),
);
}
Widget _buildBottomNavigationBar() {
return BottomNavigationBar(
type: BottomNavigationBarType.fixed,
selectedItemColor: Colors.teal[700],
unselectedItemColor: Colors.grey,
currentIndex: 0, // Highlight Home
items: [
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'Home',
),
BottomNavigationBarItem(
icon: Icon(Icons.alarm),
label: 'Reminders',
),
BottomNavigationBarItem(
icon: Icon(Icons.notifications),
label: 'Notifications',
),
BottomNavigationBarItem(
icon: Icon(Icons.settings),
label: 'Settings',
),
],
);
}
}