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 '../config/size_config.dart';
import '../widgets/shared/app_scaffold_widget.dart';
import '../widgets/shared/card_with_bg_widget.dart';
class MyScheduleScreen extends StatelessWidget {
List<String> litems = [
"1",
@ -55,8 +56,7 @@ class MyScheduleScreen extends StatelessWidget {
Container(
child: Column(
children: litems.map((item) {
return ScheduleItemWidget('ER new development ideas meeting',
'09:00 AM - 10:50 AM ', 'Cloud Solution');
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,);
}).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: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 {
List<String> litems = [
"1",
"1",
"1",
];
@override
Widget build(BuildContext context) {
@ -14,7 +17,6 @@ class PatientsScreen extends StatelessWidget {
// pageOnly: false,
appBarTitle: 'Patients',
body: Stack(
children: <Widget>[
ClipPath(
clipper: CustomShapeClipper(),
@ -23,13 +25,19 @@ class PatientsScreen extends StatelessWidget {
decoration: BoxDecoration(color: Hexcolor('#FFDDD9')))),
Positioned(
// key: ,
top: SizeConfig.realScreenHeight * 0.10,
// 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('');
return CardWithBgWidget(
line1Text: 'Fahad AlSlehm - 324599',
line2Text: '12/04/2020 - 02:00 PM',
// line3Text: '',
heightPercentage: 0.15,
widthPercentage: 0.80);
}).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:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class ScheduleItemWidget extends StatelessWidget {
String title;
String date;
String location;
ScheduleItemWidget(this.title, this.date, this.location);
class CardWithBgWidget extends StatelessWidget {
String line1Text;
String line2Text;
String line3Text;
IconData icon;
double heightPercentage;
double widthPercentage;
CardWithBgWidget(
{this.line1Text = '',
this.line2Text = '',
this.line3Text = '',
this.icon,
this.heightPercentage,
this.widthPercentage});
@override
Widget build(BuildContext context) {
@ -14,8 +24,8 @@ class ScheduleItemWidget extends StatelessWidget {
children: <Widget>[
RoundedContainer(
Container(
height: SizeConfig.screenHeight * 0.20,
width: SizeConfig.screenWidth * 0.80,
height: SizeConfig.screenHeight * heightPercentage,
width: SizeConfig.screenWidth * widthPercentage,
),
raduis: 10,
backgroundColor: Hexcolor('#58434F'),
@ -28,23 +38,23 @@ class ScheduleItemWidget extends StatelessWidget {
child: RoundedContainer(
Container(
padding: const EdgeInsets.all(15.0),
height: SizeConfig.screenHeight * 0.20,
width: SizeConfig.screenWidth * 0.80,
height: SizeConfig.screenHeight * heightPercentage,
width: SizeConfig.screenWidth * widthPercentage,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(title, style: textStyle(2.5)),
Text(line1Text, style: textStyle(2.5)),
SizedBox(
height: 8,
),
Text(date, style: textStyle(2.5)),
Text(line2Text, style: textStyle(2.5)),
SizedBox(
height: 8,
),
Row(
children: <Widget>[
Icon(Icons.add_location),
Text(location, style: textStyle(2.5))
Icon(icon),
Text(line3Text, style: textStyle(2.5))
],
)
],
Loading…
Cancel
Save