Merge branch 'master' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into develop
commit
ac4fb8d508
@ -1,9 +1,65 @@
|
|||||||
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 = [
|
||||||
|
"1",
|
||||||
|
"2",
|
||||||
|
];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return AppScaffold(
|
||||||
appBar: AppBar(title: Text("My Schedule"),),
|
// pageOnly: false,
|
||||||
|
appBarTitle: 'My Schdule',
|
||||||
|
body: Container(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0),
|
||||||
|
child: ListView(children: <Widget>[
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Text('My Schedule', style: textStyle(2.5, FontWeight.w700)),
|
||||||
|
scheduleListByDate('Today, 7 April '),
|
||||||
|
scheduleListByDate('Wednesday, 8 April '),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
Column scheduleListByDate(date) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Text(date, style: textStyle(2.5)),
|
||||||
|
Container(
|
||||||
|
child: Column(
|
||||||
|
children: litems.map((item) {
|
||||||
|
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(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
TextStyle textStyle(size, [FontWeight weight]) {
|
||||||
|
return TextStyle(
|
||||||
|
fontSize: size * SizeConfig.textMultiplier, fontWeight: weight);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,56 @@
|
|||||||
|
import 'package:flutter/material.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) {
|
||||||
|
return AppScaffold(
|
||||||
|
appBarTitle: 'Patients',
|
||||||
|
body: Container(
|
||||||
|
child: Column(
|
||||||
|
children: litems.map((item) {
|
||||||
|
return CardWithBgWidget(
|
||||||
|
line1Text: 'Fahad AlSlehm - 324599',
|
||||||
|
line2Text: '12/04/2020 - 02:00 PM',
|
||||||
|
// line3Text: '',
|
||||||
|
|
||||||
|
heightPercentage: 0.15,
|
||||||
|
widthPercentage: 0.80);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CustomShapeClipper extends CustomClipper<Path> {
|
||||||
|
@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;
|
||||||
|
}
|
||||||
@ -1,70 +1,104 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/patients/patients_screen.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
import '../../presentation/doctor_app_icons.dart';
|
import '../../presentation/doctor_app_icons.dart';
|
||||||
import '../../widgets/shared/app_drawer_widget.dart';
|
import '../../widgets/shared/app_drawer_widget.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class AppScaffold extends StatelessWidget {
|
class AppScaffold extends StatelessWidget {
|
||||||
AppScaffold(
|
|
||||||
{this.pageOnly,
|
|
||||||
this.appBarTitle,
|
|
||||||
this.showAppBar,
|
|
||||||
this.showBottomBar,
|
|
||||||
this.showAppDrawer,
|
|
||||||
this.body});
|
|
||||||
bool pageOnly = false;
|
bool pageOnly = false;
|
||||||
// bool showAll =
|
// bool showAll =
|
||||||
bool showAppBar = true;
|
bool showAppBar = true;
|
||||||
bool showAppDrawer = true;
|
bool showAppDrawer = true;
|
||||||
bool showBottomBar = true;
|
bool showBottomBar = true;
|
||||||
String appBarTitle;
|
bool showbg = true;
|
||||||
|
bool showCurve = true;
|
||||||
|
String appBarTitle = '';
|
||||||
Widget body;
|
Widget body;
|
||||||
|
|
||||||
|
AppScaffold(
|
||||||
|
{this.pageOnly,
|
||||||
|
this.appBarTitle,
|
||||||
|
this.showAppBar,
|
||||||
|
this.showBottomBar,
|
||||||
|
this.showAppDrawer,
|
||||||
|
this.body,
|
||||||
|
this.showbg,
|
||||||
|
this.showCurve});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: (pageOnly == true || showAppBar == false)?null:AppBar(
|
backgroundColor:
|
||||||
|
(pageOnly == true || showbg == false) ? null : Hexcolor('#FCF7F7'),
|
||||||
elevation: 0,
|
appBar: (pageOnly == true || showAppBar == false)
|
||||||
backgroundColor: Colors.red[100],
|
? null
|
||||||
textTheme: TextTheme(
|
: AppBar(
|
||||||
title: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
|
elevation: 0,
|
||||||
title: Text(appBarTitle),
|
backgroundColor: Hexcolor('#FFDDD9'),
|
||||||
leading: Builder(builder: (BuildContext context) {
|
textTheme: TextTheme(
|
||||||
return new GestureDetector(
|
title: TextStyle(
|
||||||
onTap: () {
|
color: Colors.black, fontWeight: FontWeight.bold)),
|
||||||
Scaffold.of(context).openDrawer();
|
title: Text(appBarTitle),
|
||||||
},
|
leading: Builder(builder: (BuildContext context) {
|
||||||
child: IconButton(
|
return new GestureDetector(
|
||||||
icon: Icon(Icons.menu),
|
onTap: () {
|
||||||
color: Colors.black,
|
Scaffold.of(context).openDrawer();
|
||||||
onPressed: () => Scaffold.of(context).openDrawer(),
|
},
|
||||||
),
|
child: IconButton(
|
||||||
);
|
icon: Icon(Icons.menu),
|
||||||
}),
|
color: Colors.black,
|
||||||
centerTitle: true,
|
onPressed: () => Scaffold.of(context).openDrawer(),
|
||||||
actions: <Widget>[
|
),
|
||||||
IconButton(icon: Icon(Icons.person), onPressed: null)
|
);
|
||||||
],
|
}),
|
||||||
),
|
centerTitle: true,
|
||||||
drawer: (pageOnly == true || showAppDrawer == false)?null:Theme(
|
actions: <Widget>[
|
||||||
data: Theme.of(context).copyWith(
|
IconButton(icon: Icon(Icons.person), onPressed: null)
|
||||||
canvasColor: Colors.transparent,
|
],
|
||||||
),
|
),
|
||||||
child: SafeArea(child: AppDrawer()),
|
drawer: (pageOnly == true || showAppDrawer == false)
|
||||||
),
|
? null
|
||||||
// ,
|
: Theme(
|
||||||
bottomNavigationBar: (pageOnly == true || showBottomBar == false)?null: BottomNavigationBar(items: [
|
data: Theme.of(context).copyWith(
|
||||||
BottomNavigationBarItem(
|
canvasColor: Colors.transparent,
|
||||||
icon: Icon(DoctorApp.home_icon),
|
),
|
||||||
title: Text('Home'),
|
child: SafeArea(child: AppDrawer()),
|
||||||
backgroundColor: Colors.red,
|
),
|
||||||
activeIcon: Icon(Icons.home)),
|
// ,
|
||||||
BottomNavigationBarItem(
|
bottomNavigationBar: (pageOnly == true || showBottomBar == false)
|
||||||
icon: new Icon(Icons.mail),
|
? null
|
||||||
title: new Text('Messages'),
|
: BottomNavigationBar(items: [
|
||||||
),
|
BottomNavigationBarItem(
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.apps), title: Text('Menu'))
|
icon: Icon(DoctorApp.home_icon),
|
||||||
]),
|
title: Text('Home'),
|
||||||
body: body,
|
backgroundColor: Colors.red,
|
||||||
);
|
activeIcon: Icon(Icons.home)),
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: new Icon(Icons.mail),
|
||||||
|
title: new Text('Messages'),
|
||||||
|
),
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.apps), title: Text('Menu'))
|
||||||
|
]),
|
||||||
|
body: (pageOnly == true || showCurve == false)
|
||||||
|
? body
|
||||||
|
: Stack(
|
||||||
|
children: <Widget>[
|
||||||
|
ClipPath(
|
||||||
|
clipper: CustomShapeClipper(),
|
||||||
|
child: Container(
|
||||||
|
height: SizeConfig.realScreenHeight * 0.40,
|
||||||
|
decoration:
|
||||||
|
BoxDecoration(color: Hexcolor('#FFDDD9')))),
|
||||||
|
Positioned(
|
||||||
|
// key: ,
|
||||||
|
// top: SizeConfig.realScreenHeight * 0.10,
|
||||||
|
child: body)
|
||||||
|
],
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,82 @@
|
|||||||
|
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 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) {
|
||||||
|
return Stack(
|
||||||
|
children: <Widget>[
|
||||||
|
RoundedContainer(
|
||||||
|
Container(
|
||||||
|
height: SizeConfig.screenHeight * heightPercentage,
|
||||||
|
width: SizeConfig.screenWidth * widthPercentage,
|
||||||
|
),
|
||||||
|
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 * heightPercentage,
|
||||||
|
width: SizeConfig.screenWidth * widthPercentage,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(line1Text, style: textStyle(2.5)),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
Text(line2Text, style: textStyle(2.5)),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Icon(icon),
|
||||||
|
Text(line3Text, style: textStyle(2.5))
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
elevation: 0,
|
||||||
|
// 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class CustomShapeClipper extends CustomClipper<Path> {
|
||||||
|
@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;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue