first step from patient list

merge-requests/9/head
Elham Rababah 6 years ago
parent 7564e1b496
commit 709d75a310

@ -1,8 +1,9 @@
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:flutter/material.dart';
import '../config/size_config.dart';
import '../widgets/shared/app_scaffold_widget.dart';
import '../widgets/shared/card_with_bg_widget.dart';
class MyScheduleScreen extends StatelessWidget { class MyScheduleScreen extends StatelessWidget {
List<String> litems = [ List<String> litems = [
"1", "1",
@ -55,8 +56,7 @@ class MyScheduleScreen extends StatelessWidget {
Container( Container(
child: Column( child: Column(
children: litems.map((item) { children: litems.map((item) {
return ScheduleItemWidget('ER new development ideas meeting', return CardWithBgWidget(line1Text: 'ER new development ideas meeting',line2Text:'09:00 AM - 10:50 AM',line3Text: 'Cloud Solution',icon: Icons.add_location, heightPercentage: 0.20, widthPercentage: 0.80,);
'09:00 AM - 10:50 AM ', 'Cloud Solution');
}).toList(), }).toList(),
), ),
), ),

@ -1,12 +1,15 @@
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:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import '../../config/size_config.dart';
import '../../widgets/shared/app_scaffold_widget.dart';
import '../../widgets/shared/card_with_bg_widget.dart';
class PatientsScreen extends StatelessWidget { class PatientsScreen extends StatelessWidget {
List<String> litems = [ List<String> litems = [
"1", "1",
"1",
"1",
]; ];
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -14,7 +17,6 @@ class PatientsScreen extends StatelessWidget {
// pageOnly: false, // pageOnly: false,
appBarTitle: 'Patients', appBarTitle: 'Patients',
body: Stack( body: Stack(
children: <Widget>[ children: <Widget>[
ClipPath( ClipPath(
clipper: CustomShapeClipper(), clipper: CustomShapeClipper(),
@ -23,13 +25,19 @@ class PatientsScreen extends StatelessWidget {
decoration: BoxDecoration(color: Hexcolor('#FFDDD9')))), decoration: BoxDecoration(color: Hexcolor('#FFDDD9')))),
Positioned( Positioned(
// key: , // key: ,
top: SizeConfig.realScreenHeight * 0.10, // top: SizeConfig.realScreenHeight * 0.10,
child: Container( child: Container(
// decoration: BoxDecoration(color: Colors.red), // decoration: BoxDecoration(color: Colors.red),
// margin: EdgeInsets.symmetric(vertical: 500), // margin: EdgeInsets.symmetric(vertical: 500),
child: Column( child: Column(
children: litems.map((item) { children: litems.map((item) {
return Text(''); return CardWithBgWidget(
line1Text: 'Fahad AlSlehm - 324599',
line2Text: '12/04/2020 - 02:00 PM',
// line3Text: '',
heightPercentage: 0.15,
widthPercentage: 0.80);
}).toList(), }).toList(),
), ),
), ),

@ -2,11 +2,21 @@ import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
class ScheduleItemWidget extends StatelessWidget {
String title; class CardWithBgWidget extends StatelessWidget {
String date; String line1Text;
String location; String line2Text;
ScheduleItemWidget(this.title, this.date, this.location); String line3Text;
IconData icon;
double heightPercentage;
double widthPercentage;
CardWithBgWidget(
{this.line1Text = '',
this.line2Text = '',
this.line3Text = '',
this.icon,
this.heightPercentage,
this.widthPercentage});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -14,8 +24,8 @@ class ScheduleItemWidget extends StatelessWidget {
children: <Widget>[ children: <Widget>[
RoundedContainer( RoundedContainer(
Container( Container(
height: SizeConfig.screenHeight * 0.20, height: SizeConfig.screenHeight * heightPercentage,
width: SizeConfig.screenWidth * 0.80, width: SizeConfig.screenWidth * widthPercentage,
), ),
raduis: 10, raduis: 10,
backgroundColor: Hexcolor('#58434F'), backgroundColor: Hexcolor('#58434F'),
@ -28,23 +38,23 @@ class ScheduleItemWidget extends StatelessWidget {
child: RoundedContainer( child: RoundedContainer(
Container( Container(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
height: SizeConfig.screenHeight * 0.20, height: SizeConfig.screenHeight * heightPercentage,
width: SizeConfig.screenWidth * 0.80, width: SizeConfig.screenWidth * widthPercentage,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text(title, style: textStyle(2.5)), Text(line1Text, style: textStyle(2.5)),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Text(date, style: textStyle(2.5)), Text(line2Text, style: textStyle(2.5)),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Row( Row(
children: <Widget>[ children: <Widget>[
Icon(Icons.add_location), Icon(icon),
Text(location, style: textStyle(2.5)) Text(line3Text, style: textStyle(2.5))
], ],
) )
], ],
Loading…
Cancel
Save