finish my schedule

merge-requests/9/head
Elham Rababah 6 years ago
parent 711f39a151
commit d3e27eab6f

@ -1,6 +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';
@ -34,7 +35,7 @@ class MyScheduleScreen extends StatelessWidget {
SizedBox(
height: 20,
),
Text('My Schedule', style: textStyle(3, FontWeight.w700)),
Text('My Schedule', style: textStyle(2.5, FontWeight.w700)),
scheduleListByDate('Today, 7 April '),
scheduleListByDate('Wednesday, 8 April '),
],
@ -52,11 +53,12 @@ class MyScheduleScreen extends StatelessWidget {
SizedBox(
height: 10,
),
Text(date, style: textStyle(3)),
Text(date, style: textStyle(2.5)),
Container(
child: Column(
children: litems.map((item) {
return ScheduleItemWidget();
return ScheduleItemWidget('ER new development ideas meeting',
'09:00 AM - 10:50 AM ', 'Cloud Solution');
}).toList(),
),
),
@ -70,66 +72,3 @@ class MyScheduleScreen extends StatelessWidget {
}
}
class ScheduleItemWidget extends StatelessWidget {
const ScheduleItemWidget({
Key key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Stack(
children: <Widget>[
RoundedContainer(
Container(
height: SizeConfig.screenHeight * 0.22,
width: SizeConfig.screenWidth * 0.95,
decoration: BoxDecoration(border: ),
// decoration: DoxD,
),
backgroundColor: Colors.red,
showBorder: true,
borderColor: Hexcolor('#707070'),
),
Positioned(
left: 10,
child: RoundedContainer(
Container(
padding: const EdgeInsets.all(15.0),
height: SizeConfig.screenHeight * 0.22,
width: SizeConfig.screenWidth * 0.92,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text('ER new development ideas meeting ',
style: textStyle(3)),
SizedBox(
height: 8,
),
Text('09:00 AM - 10:50 AM ', style: textStyle(3)),
SizedBox(
height: 8,
),
Row(
children: <Widget>[
Icon(Icons.add_location),
Text('Cloud Solution ', style: textStyle(3))
],
)
],
),
),
elevation: 20,
raduis: 0,
showBorder: true,
borderColor: Hexcolor('#707070'),
),
),
],
);
}
TextStyle textStyle(size, [FontWeight weight]) {
return TextStyle(
fontSize: size * SizeConfig.textMultiplier, fontWeight: weight);
}
}

@ -17,6 +17,7 @@ class RoundedContainer extends StatefulWidget {
final double topRight;
final double bottomLeft;
final Widget widget;
final double borderWidth;
RoundedContainer(
this.widget,
@ -31,6 +32,7 @@ class RoundedContainer extends StatefulWidget {
this.topRight = 0,
this.bottomRight = 0,
this.bottomLeft = 0,
this.borderWidth =1
});
@override
@ -41,11 +43,13 @@ class _RoundedContainerState extends State<RoundedContainer> {
@override
Widget build(BuildContext context) {
return Container(
height: null,
width: null,
margin: EdgeInsets.all(widget.margin),
decoration: widget.showBorder == true
? BoxDecoration(
color: Theme.of(context).primaryColor,
border: Border.all(color: Colors.red, width: 1),
border: Border.all(color: widget.borderColor, width: widget.borderWidth),
borderRadius: widget.customCornerRaduis
? BorderRadius.only(
topLeft: Radius.circular(widget.topLeft),

@ -0,0 +1,72 @@
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);
@override
Widget build(BuildContext context) {
return Stack(
children: <Widget>[
RoundedContainer(
Container(
height: SizeConfig.screenHeight * 0.20,
width: SizeConfig.screenWidth * 0.80,
),
raduis: 10,
backgroundColor: Hexcolor('#58434F'),
showBorder: true,
borderColor: Hexcolor('#707070'),
borderWidth: 0.5,
),
Positioned(
left: 10,
child: RoundedContainer(
Container(
padding: const EdgeInsets.all(15.0),
height: SizeConfig.screenHeight * 0.20,
width: SizeConfig.screenWidth * 0.80,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(title, style: textStyle(2.5)),
SizedBox(
height: 8,
),
Text(date, style: textStyle(2.5)),
SizedBox(
height: 8,
),
Row(
children: <Widget>[
Icon(Icons.add_location),
Text(location, style: textStyle(2.5))
],
)
],
),
),
elevation: 20,
// raduis: 0,
showBorder: true,
borderColor: Hexcolor('#707070'),
customCornerRaduis: true,
bottomLeft: 0,
topLeft: 0,
bottomRight: 10,
topRight: 10,
borderWidth: 0.5),
),
],
);
}
TextStyle textStyle(size, [FontWeight weight]) {
return TextStyle(
fontSize: size * SizeConfig.textMultiplier, fontWeight: weight);
}
}
Loading…
Cancel
Save