From 7564e1b49663a86aaa39fcb41d1a97d0f95512b1 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 13 Apr 2020 23:59:14 +0300 Subject: [PATCH] first step form curve and patients page --- lib/routes.dart | 6 +- lib/screens/my_schedule_screen.dart | 2 - lib/screens/patients/patients_screen.dart | 65 ++++++++++++++++++++ lib/widgets/shared/app_scaffold_widget.dart | 5 +- lib/widgets/shared/schedule_item_widget.dart | 2 +- 5 files changed, 73 insertions(+), 7 deletions(-) create mode 100644 lib/screens/patients/patients_screen.dart diff --git a/lib/routes.dart b/lib/routes.dart index 71ad519a..5e5c57c0 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -9,10 +9,10 @@ import './screens/dashboard_screen.dart'; import './screens/medicine/medicine_search_screen.dart'; import './screens/my_schedule_screen.dart'; import './screens/patients/patient_search_screen.dart'; -import './screens/patients/patients_list_screen.dart'; +import './screens/patients/patients_screen.dart'; import './screens/settings/settings_screen.dart'; -const String INIT_ROUTE = MY_SCHEDULE; +const String INIT_ROUTE = PATIENTS; const String HOME = '/'; const String LOGIN = 'login'; const String CHANGE_PASSWORD = 'change-password'; @@ -32,7 +32,7 @@ var routes = { INIT_ROUTE: (_) => Loginsreen(), MY_SCHEDULE: (_) => MyScheduleScreen(), PATIENT_SEARCH: (_) => PatientSearchScreen(), - PATIENTS: (_) => PatientsListScreen(), + PATIENTS: (_) => PatientsScreen(), QR_READER: (_) => QrReaderScreen(), BLOOD_BANK: (_) => BloodBankScreen(), DOCTOR_REPLY: (_) => DoctorReplyScreen(), diff --git a/lib/screens/my_schedule_screen.dart b/lib/screens/my_schedule_screen.dart index 4e430d69..7c9bcd66 100644 --- a/lib/screens/my_schedule_screen.dart +++ b/lib/screens/my_schedule_screen.dart @@ -1,9 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/schedule_item_widget.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; class MyScheduleScreen extends StatelessWidget { List litems = [ diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart new file mode 100644 index 00000000..c1bb6c53 --- /dev/null +++ b/lib/screens/patients/patients_screen.dart @@ -0,0 +1,65 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/schedule_item_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +class PatientsScreen extends StatelessWidget { + List litems = [ + "1", + ]; + @override + Widget build(BuildContext context) { + return AppScaffold( + // pageOnly: false, + appBarTitle: 'Patients', + body: Stack( + + children: [ + ClipPath( + clipper: CustomShapeClipper(), + child: Container( + height: SizeConfig.realScreenHeight * 0.40, + decoration: BoxDecoration(color: Hexcolor('#FFDDD9')))), + Positioned( + // key: , + top: SizeConfig.realScreenHeight * 0.10, + child: Container( + // decoration: BoxDecoration(color: Colors.red), + // margin: EdgeInsets.symmetric(vertical: 500), + child: Column( + children: litems.map((item) { + return Text(''); + }).toList(), + ), + ), + ) + ], + )); + } +} + +class CustomShapeClipper extends CustomClipper { + @override + Path getClip(Size size) { + final Path path = Path(); + path.lineTo(0.0, size.height); + + var firstEndPoint = Offset(size.width * .5, size.height / 2); + var firstControlpoint = Offset(size.width * 0.25, size.height * 0.95 + 30); + path.quadraticBezierTo(firstControlpoint.dx, firstControlpoint.dy, + firstEndPoint.dx, firstEndPoint.dy); + + var secondEndPoint = Offset(size.width, size.height * 0.10); + var secondControlPoint = Offset(size.width * .75, size.height * .10 - 20); + path.quadraticBezierTo(secondControlPoint.dx, secondControlPoint.dy, + secondEndPoint.dx, secondEndPoint.dy); + + path.lineTo(size.width, 0.0); + path.close(); + return path; + } + + @override + bool shouldReclip(CustomClipper oldClipper) => true; +} diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index 218c9e84..1e0bff65 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -1,3 +1,5 @@ +import 'package:hexcolor/hexcolor.dart'; + import '../../presentation/doctor_app_icons.dart'; import '../../widgets/shared/app_drawer_widget.dart'; import 'package:flutter/material.dart'; @@ -21,10 +23,11 @@ class AppScaffold extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( + backgroundColor: Hexcolor('#FCF7F7'), appBar: (pageOnly == true || showAppBar == false)?null:AppBar( elevation: 0, - backgroundColor: Colors.red[100], + backgroundColor: Hexcolor('#FFDDD9'), textTheme: TextTheme( title: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)), title: Text(appBarTitle), diff --git a/lib/widgets/shared/schedule_item_widget.dart b/lib/widgets/shared/schedule_item_widget.dart index d74c84e3..ad8113b3 100644 --- a/lib/widgets/shared/schedule_item_widget.dart +++ b/lib/widgets/shared/schedule_item_widget.dart @@ -50,7 +50,7 @@ class ScheduleItemWidget extends StatelessWidget { ], ), ), - elevation: 20, + elevation: 0, // raduis: 0, showBorder: true, borderColor: Hexcolor('#707070'),