Merge branch 'elham' into 'master'

Elham

See merge request Cloud_Solution/doctor_app_flutter!54
merge-requests/55/merge
Elham 5 years ago
commit a5c74b3f9e

@ -1,3 +1,5 @@
import './screens/patients/profile/vital_sign/body_measurements_screen.dart';
import './screens/QR_reader_screen.dart'; import './screens/QR_reader_screen.dart';
import './screens/auth/change_password_screen.dart'; import './screens/auth/change_password_screen.dart';
import './screens/auth/login_screen.dart'; import './screens/auth/login_screen.dart';
@ -46,8 +48,7 @@ const String LAB_ORDERS = 'patients/lab_orders';
const String PRESCRIPTIONS = 'patients/prescription'; const String PRESCRIPTIONS = 'patients/prescription';
const String RADIOLOGY = 'patients/radiology'; const String RADIOLOGY = 'patients/radiology';
const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details'; const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details';
const String BODY_MEASUREMENTS = 'patients/body-measurements';
var routes = { var routes = {
HOME: (_) => DashboardScreen(), HOME: (_) => DashboardScreen(),
@ -65,7 +66,9 @@ var routes = {
VERIFY_ACCOUNT: (_) => VerifyAccountScreen(), VERIFY_ACCOUNT: (_) => VerifyAccountScreen(),
VERIFICATION_METHODS: (_) => VerificationMethodsScreen(), VERIFICATION_METHODS: (_) => VerificationMethodsScreen(),
PATIENTS_PROFILE: (_) => PatientProfileScreen(), PATIENTS_PROFILE: (_) => PatientProfileScreen(),
PHARMACIES_LIST: (_) => PharmaciesListScreen(itemID: null,), PHARMACIES_LIST: (_) => PharmaciesListScreen(
itemID: null,
),
VITAL_SIGN: (_) => VitalSignScreen(), VITAL_SIGN: (_) => VitalSignScreen(),
MESSAGES: (_) => MessagesScreen(), MESSAGES: (_) => MessagesScreen(),
SERVICES: (_) => ServicesScreen(), SERVICES: (_) => ServicesScreen(),
@ -73,5 +76,5 @@ var routes = {
PRESCRIPTIONS: (_) => PrescriptionScreen(), PRESCRIPTIONS: (_) => PrescriptionScreen(),
RADIOLOGY: (_) => RadiologyScreen(), RADIOLOGY: (_) => RadiologyScreen(),
VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(), VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(),
BODY_MEASUREMENTS: (_) => BodyMeasurementsScreen()
}; };

@ -72,7 +72,7 @@ class _LoginsreenState extends State<Loginsreen> {
return Text('Error: ${snapshot.error}'); return Text('Error: ${snapshot.error}');
} else { } else {
return Container( return Container(
margin: EdgeInsetsDirectional.fromSTEB(30, 0, 0, 30), margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 30),
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

@ -0,0 +1,143 @@
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign_res_model.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:flutter/material.dart';
class BodyMeasurementsScreen extends StatelessWidget {
BodyMeasurementsScreen();
List<VitalSignResModel> vitalList;
@override
Widget build(BuildContext context) {
_seriesData = List<charts.Series<Pollution, String>>();
_seriesPieData = List<charts.Series<Task, String>>();
_seriesLineData = List<charts.Series<Sales, int>>();
_generateData();
return AppScaffold(
appBarTitle: 'Body Measurements',
body: RoundedContainer(
height: SizeConfig.realScreenHeight*0.4,
child: Padding(
padding: EdgeInsets.all(8.0),
child: Container(
child: Center(
child: Column(
children: <Widget>[
Text(
'Body Mass Index',
style: TextStyle(
fontSize: 24.0, fontWeight: FontWeight.bold),
),
Expanded(
child: charts.BarChart(
_seriesData,
animate: true,
barGroupingType: charts.BarGroupingType.grouped,
// behaviors: [new charts.SeriesLegend()],
// primaryMeasureAxis: ,
animationDuration: Duration(seconds: 5),
),
),
],
),
),
),
),
),
);
}
List<charts.Series<Pollution, String>> _seriesData;
List<charts.Series<Task, String>> _seriesPieData;
List<charts.Series<Sales, int>> _seriesLineData;
_generateData() {
var data1 = [
new Pollution(1980, 'USA', 40),
];
_seriesData.add(
charts.Series(
domainFn: (Pollution pollution, _) => '',
measureFn: (Pollution pollution, _) => pollution.quantity,
id: '2017',
data: data1,
fillPatternFn: (_, __) => charts.FillPatternType.solid,
fillColorFn: (Pollution pollution, _) =>
charts.ColorUtil.fromDartColor(Color(0xff990099)),
),
);
_seriesData.add(
charts.Series(
domainFn: (Pollution pollution, _) => '',
measureFn: (Pollution pollution, _) => pollution.quantity,
id: '2017',
data: data1,
fillPatternFn: (_, __) => charts.FillPatternType.solid,
fillColorFn: (Pollution pollution, _) =>
charts.ColorUtil.fromDartColor(Color(0xff990099)),
),
);
_seriesData.add(
charts.Series(
domainFn: (Pollution pollution, _) => '',
measureFn: (Pollution pollution, _) => pollution.quantity,
id: '2017',
data: data1,
fillPatternFn: (_, __) => charts.FillPatternType.solid,
fillColorFn: (Pollution pollution, _) =>
charts.ColorUtil.fromDartColor(Color(0xff990099)),
),
);
_seriesData.add(
charts.Series(
domainFn: (Pollution pollution, _) => '',
measureFn: (Pollution pollution, _) => pollution.quantity,
id: '2017',
data: data1,
fillPatternFn: (_, __) => charts.FillPatternType.solid,
fillColorFn: (Pollution pollution, _) =>
charts.ColorUtil.fromDartColor(Color(0xff990099)),
),
);
_seriesData.add(
charts.Series(
domainFn: (Pollution pollution, _) => '',
measureFn: (Pollution pollution, _) => pollution.quantity,
id: '2017',
data: data1,
fillPatternFn: (_, __) => charts.FillPatternType.solid,
fillColorFn: (Pollution pollution, _) =>
charts.ColorUtil.fromDartColor(Color(0xff990099)),
),
);
}
}
class Pollution {
String place;
int year;
int quantity;
Pollution(this.year, this.place, this.quantity);
}
class Task {
String task;
double taskvalue;
Color colorval;
Task(this.task, this.taskvalue, this.colorval);
}
class Sales {
int yearval;
int salesval;
Sales(this.yearval, this.salesval);
}

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/routes.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../../../config/size_config.dart'; import '../../../../config/size_config.dart';
@ -31,18 +32,22 @@ class VitalSignDetailsScreen extends StatelessWidget {
mainAxisSpacing: 0, mainAxisSpacing: 0,
crossAxisCount: 3, crossAxisCount: 3,
children: <Widget>[ children: <Widget>[
CircleAvatarWidget( InkWell(
onTap: (){
Navigator.of(context).pushNamed(BODY_MEASUREMENTS);
},
child: CircleAvatarWidget(
des: 'Body Measurements', des: 'Body Measurements',
url: url + 'heartbeat.png', url: url + 'heartbeat.png',
),
), CircleAvatarWidget( ),
CircleAvatarWidget(
des: 'Temperature', des: 'Temperature',
url: url + 'heartbeat.png', url: url + 'heartbeat.png',
), ),
CircleAvatarWidget( CircleAvatarWidget(
des: 'Pulse', des: 'Pulse',
url: url + 'heartbeat.png', url: url + 'heartbeat.png',
), ),
CircleAvatarWidget( CircleAvatarWidget(
des: 'Respiration', des: 'Respiration',
@ -55,7 +60,8 @@ class VitalSignDetailsScreen extends StatelessWidget {
CircleAvatarWidget( CircleAvatarWidget(
des: 'Oxygenation', des: 'Oxygenation',
url: url + 'heartbeat.png', url: url + 'heartbeat.png',
), CircleAvatarWidget( ),
CircleAvatarWidget(
des: 'Pain Scale', des: 'Pain Scale',
url: url + 'heartbeat.png', url: url + 'heartbeat.png',
), ),

@ -35,6 +35,7 @@ dependencies:
connectivity: ^0.4.8+2 connectivity: ^0.4.8+2
maps_launcher: ^1.2.0 maps_launcher: ^1.2.0
url_launcher: ^5.4.5 url_launcher: ^5.4.5
charts_flutter: ^0.9.0

Loading…
Cancel
Save