Merge branch 'master' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into sultan
# Conflicts: # pubspec.yamlmerge-requests/125/head
commit
50e9dc0980
@ -0,0 +1,86 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../../../config/size_config.dart';
|
||||||
|
import '../../../../widgets/shared/rounded_container_widget.dart';
|
||||||
|
/*
|
||||||
|
*@author: Elham Rababah
|
||||||
|
*@Date:03/6/2020
|
||||||
|
*@param:
|
||||||
|
*@return:
|
||||||
|
*@desc: VitalSignItem
|
||||||
|
*/
|
||||||
|
class VitalSignItem extends StatelessWidget {
|
||||||
|
const VitalSignItem(
|
||||||
|
{Key key,
|
||||||
|
@required this.url,
|
||||||
|
@required this.des,
|
||||||
|
this.lastVal = 'N/A',
|
||||||
|
this.unit = '',
|
||||||
|
this.height,
|
||||||
|
this.width})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
final String url;
|
||||||
|
final String des;
|
||||||
|
final String lastVal;
|
||||||
|
final String unit;
|
||||||
|
|
||||||
|
final double height;
|
||||||
|
final double width;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return RoundedContainer(
|
||||||
|
margin: 0.025 * SizeConfig.realScreenWidth,
|
||||||
|
height: 0.14 * SizeConfig.realScreenHeight,
|
||||||
|
width: 0.45 * SizeConfig.realScreenWidth,
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(5),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
flex: 2,
|
||||||
|
child: Text(
|
||||||
|
des,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: Column(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Image.asset(
|
||||||
|
url,
|
||||||
|
height: SizeConfig.heightMultiplier * 7,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: RichText(
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(color: Colors.black),
|
||||||
|
children: [
|
||||||
|
new TextSpan(text: lastVal),
|
||||||
|
new TextSpan(
|
||||||
|
text: ' ${unit}',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Theme.of(context).primaryColor)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
import 'package:expandable/expandable.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class AppExpandableNotifier extends StatelessWidget {
|
||||||
|
final Widget headerWid;
|
||||||
|
final Widget bodyWid;
|
||||||
|
|
||||||
|
AppExpandableNotifier({this.headerWid, this.bodyWid});
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return ExpandableNotifier(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: Card(
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
SizedBox(
|
||||||
|
child: headerWid,
|
||||||
|
),
|
||||||
|
ScrollOnExpand(
|
||||||
|
scrollOnExpand: true,
|
||||||
|
scrollOnCollapse: false,
|
||||||
|
child: ExpandablePanel(
|
||||||
|
theme: const ExpandableThemeData(
|
||||||
|
headerAlignment: ExpandablePanelHeaderAlignment.center,
|
||||||
|
tapBodyToCollapse: true,
|
||||||
|
),
|
||||||
|
header: Padding(
|
||||||
|
padding: EdgeInsets.all(10),
|
||||||
|
child: Text(
|
||||||
|
"See Graph Details",
|
||||||
|
)),
|
||||||
|
collapsed: Text(''),
|
||||||
|
expanded: bodyWid,
|
||||||
|
builder: (_, collapsed, expanded) {
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
|
||||||
|
child: Expandable(
|
||||||
|
collapsed: collapsed,
|
||||||
|
expanded: expanded,
|
||||||
|
theme: const ExpandableThemeData(crossFadePoint: 0),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue