import 'package:flutter/material.dart';
import 'package:goschool/constants.dart';
import 'package:goschool/widgets/header.dart';
import 'package:goschool/widgets/recent_alerts.dart';
import 'package:goschool/widgets/recents_homeworks.dart';
class HomeScreen extends StatefulWidget {
@override
State<HomeScreen> createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
@override
Widget build(BuildContext context) {
return ListView(
children: <Widget> [
Header(),
Padding(
padding: EdgeInsets.symmetric(horizontal: 30),
child: TextField(
style: TextStyle(color: kTextColor),
cursorColor: kTextColor,
decoration: InputDecoration(
border: InputBorder.none,
fillColor: Theme.of(context).primaryColor,
filled: true,
hintText: "Search",
hintStyle: TextStyle(color: kTextColor),
prefixIcon: Icon(
Icons.search, color: kTextColor,
size: 26),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(30),
),
),
),
),
SizedBox(height: 30), Container( padding: EdgeInsets.all(35), decoration: BoxDecoration( color: Theme.of(context).primaryColor, borderRadius: BorderRadius.only( topLeft: Radius.circular(30), topRight: Radius.circular(50), ), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "Recent Alerts", style: TextStyle( color: Colors.white, fontSize: 20, fontWeight:FontWeight.bold, ), ), SizedBox(height: 30), RecentsAlerts(), Center( child: Text( "view all", style: TextStyle( color: Theme.of(context).primaryColor, fontSize: 15, ), ), ),
SizedBox(height: 20),
Text("Recent HomeWork",
style: TextStyle(
color:Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold
),
),
SizedBox(height: 30),
RecentsHomeworks(),
Center(
child: Text(
"view all",
style: TextStyle(
color: Theme.of(context).primaryColor,
fontSize: 15,
),
),
),
SizedBox(height: 20),
],),
)
],
);
}
}