|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
import '../widgets/shared/app_texts_widget.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:percent_indicator/circular_percent_indicator.dart';
|
|
|
|
|
|
|
|
import '../presentation/doctor_app_icons.dart';
|
|
|
|
import '../widgets/dashboard/dashboard_item_icons_texts.dart';
|
|
|
|
import '../widgets/dashboard/dashboard_item_texts_widget.dart';
|
|
|
|
import '../widgets/shared/rounded_container_widget.dart';
|
|
|
|
|
|
|
|
class DashboardScreen extends StatefulWidget {
|
|
|
|
DashboardScreen({Key key, this.title}) : super(key: key);
|
|
|
|
|
|
|
|
final String title;
|
|
|
|
|
|
|
|
@override
|
|
|
|
_DashboardScreenState createState() => _DashboardScreenState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return AppScaffold(
|
|
|
|
appBarTitle:'Home',
|
|
|
|
body: Container(
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
child: AppText(
|
|
|
|
"Today's Statistics",
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
),
|
|
|
|
alignment: Alignment.centerLeft,
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
flex: 3,
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: RoundedContainer(child:CircularPercentIndicator(
|
|
|
|
radius: 90.0,
|
|
|
|
animation: true,
|
|
|
|
animationDuration: 1200,
|
|
|
|
lineWidth: 7.0,
|
|
|
|
percent: .75,
|
|
|
|
center: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
AppText(
|
|
|
|
"38",
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: SizeConfig.textMultiplier * 4
|
|
|
|
),
|
|
|
|
AppText(
|
|
|
|
"Out-Patients",
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.5,
|
|
|
|
color: Colors.grey[800]
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
circularStrokeCap: CircularStrokeCap.butt,
|
|
|
|
backgroundColor: Colors.blueGrey[100],
|
|
|
|
progressColor: Colors.red,
|
|
|
|
))),
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: Row(
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.stretch,
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
child: DashboardItemTexts(
|
|
|
|
"Arrived",
|
|
|
|
"23",
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
child: DashboardItemTexts(
|
|
|
|
"Not Arrived",
|
|
|
|
"23",
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.stretch,
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
child: DashboardItemTexts(
|
|
|
|
"ER",
|
|
|
|
"23",
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
child: DashboardItemTexts(
|
|
|
|
"Walk-in",
|
|
|
|
"23",
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
])),
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: new DashboardItemIconText(
|
|
|
|
DoctorApp.home_icon,
|
|
|
|
"08",
|
|
|
|
"Lab Result",
|
|
|
|
backgroundColor: Colors.red,
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: new DashboardItemIconText(
|
|
|
|
DoctorApp.home_icon,
|
|
|
|
"10",
|
|
|
|
"Radiology",
|
|
|
|
backgroundColor: Colors.red,
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: new DashboardItemIconText(
|
|
|
|
DoctorApp.home_icon,
|
|
|
|
"05",
|
|
|
|
"Referral",
|
|
|
|
backgroundColor: Colors.red,
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: new DashboardItemIconText(
|
|
|
|
DoctorApp.home_icon,
|
|
|
|
"23",
|
|
|
|
"In-Patient",
|
|
|
|
showBorder: true,
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: new DashboardItemIconText(
|
|
|
|
DoctorApp.home_icon,
|
|
|
|
"23",
|
|
|
|
"Operations",
|
|
|
|
showBorder: true,
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
child: AppText(
|
|
|
|
"Patient Services",
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
),
|
|
|
|
alignment: Alignment.centerLeft,
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: new DashboardItemIconText(
|
|
|
|
DoctorApp.home_icon,
|
|
|
|
"",
|
|
|
|
"Search Patient",
|
|
|
|
showBorder: false,
|
|
|
|
backgroundColor: Colors.green[200],
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: new DashboardItemIconText(
|
|
|
|
DoctorApp.home_icon,
|
|
|
|
"",
|
|
|
|
"Out Patient",
|
|
|
|
showBorder: false,
|
|
|
|
backgroundColor: Colors.deepPurple[300],
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: new DashboardItemIconText(
|
|
|
|
DoctorApp.home_icon,
|
|
|
|
"",
|
|
|
|
"In Patient",
|
|
|
|
showBorder: false,
|
|
|
|
backgroundColor: Colors.blueGrey[900],
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: new DashboardItemIconText(
|
|
|
|
DoctorApp.home_icon,
|
|
|
|
"",
|
|
|
|
"Discharge Patient",
|
|
|
|
showBorder: false,
|
|
|
|
backgroundColor: Colors.brown[400],
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
}
|