voice command

merge-update-with-lab-changes
Sultan Khan 5 years ago
parent da317431ba
commit 3ad928902b

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 5.0 KiB

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 97 KiB

@ -32,7 +32,9 @@ class BaseAppClient {
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) { if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null ? body['SetupID'] : SETUP_ID ? body['SetupID'] != null
? body['SetupID']
: SETUP_ID
: SETUP_ID; : SETUP_ID;
} }
body['VersionID'] = VERSION_ID; body['VersionID'] = VERSION_ID;
@ -41,7 +43,9 @@ class BaseAppClient {
body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID; body['generalid'] = GENERAL_ID;
body['PatientOutSA'] = body.containsKey('PatientOutSA') body['PatientOutSA'] = body.containsKey('PatientOutSA')
? body['PatientOutSA'] != null ? body['PatientOutSA'] : PATIENT_OUT_SA ? body['PatientOutSA'] != null
? body['PatientOutSA']
: PATIENT_OUT_SA
: PATIENT_OUT_SA; : PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) { if (body.containsKey('isDentalAllowedBackend')) {
@ -55,9 +59,11 @@ class BaseAppClient {
body['DeviceTypeID'] = DeviceTypeID; body['DeviceTypeID'] = DeviceTypeID;
if(!body.containsKey('IsPublicRequest')) { if (!body.containsKey('IsPublicRequest')) {
body['PatientType'] = body.containsKey('PatientType') body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null ? body['PatientType'] : PATIENT_TYPE ? body['PatientType'] != null
? body['PatientType']
: PATIENT_TYPE
: PATIENT_TYPE; : PATIENT_TYPE;
body['PatientTypeID'] = body.containsKey('PatientTypeID') body['PatientTypeID'] = body.containsKey('PatientTypeID')
@ -71,14 +77,14 @@ class BaseAppClient {
body['PatientID'] = body['PatientID'] =
body['PatientID'] != null ? body['PatientID'] : user['PatientID']; body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA']; body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = getSessionId(token); body['SessionID'] = SESSION_ID;//getSessionId(token);
} }
} }
print("URL : $url"); print("URL : $url");
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
var asd=""; var asd = "";
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.post(url.trim(), final response = await http.post(url.trim(),
body: json.encode(body), body: json.encode(body),
@ -139,6 +145,7 @@ class BaseAppClient {
} }
String getSessionId(String id) { String getSessionId(String id) {
return id.replaceAll(RegExp('/[^a-zA-Z ]'), ''); ///return id.replaceAll(RegExp('/[^\w\s]/'), '');
// return id.replaceAll(RegExp('/[^a-zA-Z ]'), '');
} }
} }

@ -66,7 +66,8 @@ class MyApp extends StatelessWidget {
hintColor: Colors.grey[400], hintColor: Colors.grey[400],
disabledColor: Colors.grey[300], disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0), errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor:Hexcolor('#E9E9E9'),// Colors.grey[100], scaffoldBackgroundColor:
HexColor('#E9E9E9'), // Colors.grey[100],
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
textSelectionHandleColor: Colors.grey, textSelectionHandleColor: Colors.grey,
canvasColor: Colors.white, canvasColor: Colors.white,
@ -74,9 +75,8 @@ class MyApp extends StatelessWidget {
highlightColor: Colors.grey[100].withOpacity(0.4), highlightColor: Colors.grey[100].withOpacity(0.4),
splashColor: Colors.transparent, splashColor: Colors.transparent,
primaryColor: Colors.grey, primaryColor: Colors.grey,
bottomSheetTheme:BottomSheetThemeData( bottomSheetTheme: BottomSheetThemeData(
backgroundColor: Hexcolor('#E0E0E0') backgroundColor: HexColor('#E0E0E0')),
) ,
cursorColor: Colors.grey, cursorColor: Colors.grey,
iconTheme: IconThemeData(), iconTheme: IconThemeData(),
appBarTheme: AppBarTheme( appBarTheme: AppBarTheme(

@ -22,15 +22,14 @@ class EReferralIndexPage extends StatelessWidget {
appBarTitle: "Service Information", appBarTitle: "Service Information",
body: SingleChildScrollView( body: SingleChildScrollView(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: child: Column(
Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts( Texts(
"E-Referral: ", "E-Referral: ",
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 25, fontSize: 25,
color: Hexcolor("#60686b"), color: HexColor("#60686b"),
), ),
SizedBox( SizedBox(
height: 12, height: 12,
@ -59,9 +58,7 @@ class EReferralIndexPage extends StatelessWidget {
height: 77, height: 77,
), ),
], ],
) )),
),
bottomSheet: Container( bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10, height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity, width: double.infinity,
@ -70,13 +67,13 @@ class EReferralIndexPage extends StatelessWidget {
Container( Container(
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton( child: SecondaryButton(
onTap: ()=> Navigator.push(context, FadePage(page: EReferralPage())), onTap: () => Navigator.push(
context, FadePage(page: EReferralPage())),
label: "E-Referral", label: "E-Referral",
textColor: Theme.of(context).backgroundColor), textColor: Theme.of(context).backgroundColor),
), ),
], ],
), ),
)); ));
} }
} }

@ -23,7 +23,7 @@ class H2OPageIndexPage extends StatelessWidget {
"Water Tracker:", "Water Tracker:",
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 25, fontSize: 25,
color: Hexcolor("#60686b"), color: HexColor("#60686b"),
), ),
SizedBox( SizedBox(
height: 12, height: 12,

@ -6,6 +6,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:percent_indicator/circular_percent_indicator.dart';
class TodayPage extends StatelessWidget { class TodayPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -27,11 +28,11 @@ class TodayPage extends StatelessWidget {
animation: true, animation: true,
animationDuration: 1200, animationDuration: 1200,
lineWidth: 15.0, lineWidth: 15.0,
percent:model.userProgressData ==null ?0.0: percent: model.userProgressData == null
(model.userProgressData.percentageConsumed / ? 0.0
100) >= 1 ? 1 : (model.userProgressData : (model.userProgressData.percentageConsumed / 100) >= 1
.percentageConsumed / ? 1
100), : (model.userProgressData.percentageConsumed / 100),
//, //,
center: Center( center: Center(
child: Column( child: Column(
@ -46,13 +47,16 @@ class TodayPage extends StatelessWidget {
SizedBox( SizedBox(
height: 4, height: 4,
), ),
Text(model.userProgressData ==null ?"0.0": Text(
model.userProgressData.quantityConsumed model.userProgressData == null
.toString() + 'ml', ? "0.0"
: model.userProgressData.quantityConsumed
.toString() +
'ml',
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 20.0, fontSize: 20.0,
color: Hexcolor("#60BCF9")), color: HexColor("#60BCF9")),
), ),
SizedBox( SizedBox(
height: 4, height: 4,
@ -60,9 +64,7 @@ class TodayPage extends StatelessWidget {
SizedBox( SizedBox(
height: 5, height: 5,
width: 50, width: 50,
child: Container( child: Container(),
),
), ),
SizedBox( SizedBox(
height: 4, height: 4,
@ -74,23 +76,28 @@ class TodayPage extends StatelessWidget {
SizedBox( SizedBox(
height: 4, height: 4,
), ),
Text(model.userProgressData ==null ?"0.0": Text(
(model.userProgressData.quantityLimit - model.userProgressData == null
? "0.0"
: (model.userProgressData.quantityLimit -
model.userProgressData model.userProgressData
.quantityConsumed) < 0 ? "0 ml" : .quantityConsumed) <
(model.userProgressData.quantityLimit - 0
? "0 ml"
: (model.userProgressData.quantityLimit -
model.userProgressData model.userProgressData
.quantityConsumed).toString() + ' ml', .quantityConsumed)
.toString() +
' ml',
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold, fontSize: 18.0),
fontSize: 18.0),
), ),
], ],
), ),
), ),
circularStrokeCap: CircularStrokeCap.butt, circularStrokeCap: CircularStrokeCap.butt,
backgroundColor: Hexcolor("#D1E3F6"), backgroundColor: HexColor("#D1E3F6"),
progressColor: Hexcolor("#60BCF9"), progressColor: HexColor("#60BCF9"),
), ),
), ),
Row( Row(
@ -105,9 +112,9 @@ class TodayPage extends StatelessWidget {
height: 30, height: 30,
width: 70, width: 70,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor("#D1E3F6"), color: HexColor("#D1E3F6"),
borderRadius: BorderRadius.all( borderRadius:
Radius.circular(30))), BorderRadius.all(Radius.circular(30))),
), ),
), ),
Text( Text(
@ -125,9 +132,9 @@ class TodayPage extends StatelessWidget {
height: 30, height: 30,
width: 70, width: 70,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor("#60BCF9"), color: HexColor("#60BCF9"),
borderRadius: BorderRadius.all( borderRadius:
Radius.circular(30))), BorderRadius.all(Radius.circular(30))),
), ),
), ),
Text( Text(
@ -143,10 +150,7 @@ class TodayPage extends StatelessWidget {
), ),
SizedBox( SizedBox(
height: 0.5, height: 0.5,
width: MediaQuery width: MediaQuery.of(context).size.width,
.of(context)
.size
.width,
child: Container( child: Container(
color: Colors.grey, color: Colors.grey,
), ),
@ -163,4 +167,3 @@ class TodayPage extends StatelessWidget {
); );
} }
} }

@ -39,7 +39,7 @@ class MyBalancePage extends StatelessWidget {
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#B61422'), color: HexColor('#B61422'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(7),
), ),
@ -97,7 +97,8 @@ class MyBalancePage extends StatelessWidget {
textColor: Colors.white, textColor: Colors.white,
label: TranslationBase.of(context).createAdvancedPayment, label: TranslationBase.of(context).createAdvancedPayment,
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(
context,
//FadePage(page: AdvancePaymentPage())); //FadePage(page: AdvancePaymentPage()));
FadePage(page: BloodDonationPage())); FadePage(page: BloodDonationPage()));
}, },

@ -21,12 +21,6 @@ class _SearchResultsState extends State<SearchResults> {
// var event = RobotProvider(); // var event = RobotProvider();
List<DoctorList> tempList = []; List<DoctorList> tempList = [];
@override
void initState() {
// event.controller.stream.listen((p) {});
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
@ -41,6 +35,7 @@ class _SearchResultsState extends State<SearchResults> {
...List.generate( ...List.generate(
widget.patientDoctorAppointmentListHospital.length, widget.patientDoctorAppointmentListHospital.length,
(index) => AppExpandableNotifier( (index) => AppExpandableNotifier(
isExpand: index == 1 ? true : false,
title: widget.patientDoctorAppointmentListHospital[index] title: widget.patientDoctorAppointmentListHospital[index]
.filterName + .filterName +
" - " + " - " +

@ -31,6 +31,7 @@ class _BranchViewState extends State<BranchView> {
body: new ListView.builder( body: new ListView.builder(
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return new ExpandableListView( return new ExpandableListView(
isExpanded: index == 0 ? true : false,
result2: widget.result, result2: widget.result,
resultDistance: widget.resultDistance, resultDistance: widget.resultDistance,
val: index, val: index,
@ -48,8 +49,14 @@ class ExpandableListView extends StatefulWidget {
final List<DoctorList> doctorsList2; final List<DoctorList> doctorsList2;
final val; final val;
static int doctorListheight = 0; static int doctorListheight = 0;
final bool isExpanded;
const ExpandableListView( const ExpandableListView(
{Key key, this.result2, this.resultDistance, this.val, this.doctorsList2}) {Key key,
this.result2,
this.resultDistance,
this.val,
this.doctorsList2,
this.isExpanded})
: super(key: key); : super(key: key);
@override @override
@ -58,9 +65,17 @@ class ExpandableListView extends StatefulWidget {
class _ExpandableListViewState extends State<ExpandableListView> { class _ExpandableListViewState extends State<ExpandableListView> {
bool expandFlag = false; bool expandFlag = false;
@override
void initState() {
setState(() {
expandFlag = widget.isExpanded;
setDoctorViewHeight(widget.result2[widget.val].toString());
});
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Container( return new Container(
width: MediaQuery.of(context).size.width * 0.6, width: MediaQuery.of(context).size.width * 0.6,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 0.0), margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 0.0),

@ -123,7 +123,7 @@ class _HomePageState extends State<HomePage> {
width: double.infinity, width: double.infinity,
height: 125, height: 125,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#A59E9E'), color: HexColor('#A59E9E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, width: 0.5), color: Colors.transparent, width: 0.5),
@ -169,7 +169,7 @@ class _HomePageState extends State<HomePage> {
width: 90, width: 90,
height: 30, height: 30,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#D81A2E'), color: HexColor('#D81A2E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, color: Colors.transparent,
@ -196,7 +196,7 @@ class _HomePageState extends State<HomePage> {
width: double.infinity, width: double.infinity,
height: 130, height: 130,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#A59E9E'), color: HexColor('#A59E9E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, width: 0.5), color: Colors.transparent, width: 0.5),
@ -256,7 +256,7 @@ class _HomePageState extends State<HomePage> {
width: 90, width: 90,
height: 30, height: 30,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#D81A2E'), color: HexColor('#D81A2E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, color: Colors.transparent,
@ -364,7 +364,7 @@ class _HomePageState extends State<HomePage> {
height: 50, height: 50,
), ),
SizedBox( SizedBox(
height: 5, height: 3,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context)
@ -401,7 +401,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
bold: true, bold: true,
fontSize: SizeConfig.textMultiplier * 2.0, fontSize: SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
@ -422,21 +422,21 @@ class _HomePageState extends State<HomePage> {
height: 50, height: 50,
), ),
SizedBox( SizedBox(
height: 5, height: 3,
), ),
Texts( Texts(
TranslationBase.of(context).emergencyService, TranslationBase.of(context).emergencyService,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
bold: true, bold: true,
fontSize: SizeConfig.textMultiplier * 2.0, fontSize: SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
), ),
), ),
height: MediaQuery.of(context).size.width * 0.4, height: MediaQuery.of(context).size.width * 0.4,
color: Hexcolor("#747C80"), color: HexColor("#747C80"),
imageName: 'emergency_service_image.png', imageName: 'emergency_service_image.png',
), ),
], ],
@ -473,7 +473,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
fontSize: SizeConfig.textMultiplier * 1.9, fontSize: SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
@ -497,7 +497,7 @@ class _HomePageState extends State<HomePage> {
height: 55, height: 55,
), ),
SizedBox( SizedBox(
height: 15, height: 10,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context)
@ -505,7 +505,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
fontSize: SizeConfig.textMultiplier * 2, fontSize: SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
@ -537,7 +537,7 @@ class _HomePageState extends State<HomePage> {
height: 50, height: 50,
), ),
SizedBox( SizedBox(
height: 15, height: 10,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context)
@ -545,7 +545,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
fontSize: SizeConfig.textMultiplier * 2.0, fontSize: SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
@ -563,7 +563,7 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
SizedBox( SizedBox(
height: 8, height: 5,
), ),
Container( Container(
margin: EdgeInsets.only(left: 15, right: 15), margin: EdgeInsets.only(left: 15, right: 15),
@ -698,7 +698,9 @@ class DashboardItem extends StatelessWidget {
: MediaQuery.of(context).size.height * 0.35, : MediaQuery.of(context).size.height * 0.35,
decoration: BoxDecoration( decoration: BoxDecoration(
color: !hasBorder color: !hasBorder
? color != null ? color : Hexcolor('#050705').withOpacity(opacity) ? color != null
? color
: HexColor('#050705').withOpacity(opacity)
: Colors.white, : Colors.white,
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
border: hasBorder border: hasBorder
@ -706,7 +708,7 @@ class DashboardItem extends StatelessWidget {
: Border.all(width: 0.0, color: Colors.transparent), : Border.all(width: 0.0, color: Colors.transparent),
image: imageName != null image: imageName != null
? DecorationImage( ? DecorationImage(
image: AssetImage('assets/images/$imageName'), image: ExactAssetImage('assets/images/$imageName'),
fit: BoxFit.cover, fit: BoxFit.cover,
colorFilter: new ColorFilter.mode( colorFilter: new ColorFilter.mode(
Colors.black.withOpacity(0.2), BlendMode.dstIn), Colors.black.withOpacity(0.2), BlendMode.dstIn),

@ -348,7 +348,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
actions: [ actions: [
IconButton( IconButton(
iconSize: 70, iconSize: 70,
icon: SvgPicture.asset('assets/images/robort_svg.svg', icon: SvgPicture.asset('assets/images/svg/robort_svg.svg',
height: 100, width: 100, fit: BoxFit.cover), height: 100, width: 100, fit: BoxFit.cover),
onPressed: () { onPressed: () {
triggerRobot(); triggerRobot();

@ -38,7 +38,7 @@ class MyBalancePage extends StatelessWidget {
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#B61422'), color: HexColor('#B61422'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(7),
), ),
@ -96,8 +96,7 @@ class MyBalancePage extends StatelessWidget {
textColor: Colors.white, textColor: Colors.white,
label: TranslationBase.of(context).createAdvancedPayment, label: TranslationBase.of(context).createAdvancedPayment,
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(context, FadePage(page: AdvancePaymentPage()));
FadePage(page: AdvancePaymentPage()));
}, },
), ),
), ),

@ -135,7 +135,7 @@ class _WeightHomePageState extends State<WeightHomePage>
width: 55, width: 55,
height: 55, height: 55,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, color: Hexcolor('515B5D')), shape: BoxShape.circle, color: HexColor('515B5D')),
child: Center( child: Center(
child: Icon( child: Icon(
Icons.add, Icons.add,

@ -15,8 +15,7 @@ class WeightMonthlyPage extends StatelessWidget {
final List<charts.Series<YearMonthlyChartDate, int>> data; final List<charts.Series<YearMonthlyChartDate, int>> data;
final List<WeightMeasurementResult> diabtecPatientResult; final List<WeightMeasurementResult> diabtecPatientResult;
const WeightMonthlyPage( const WeightMonthlyPage({Key key, this.data, this.diabtecPatientResult})
{Key key, this.data, this.diabtecPatientResult})
: super(key: key); : super(key: key);
@override @override
@ -67,7 +66,7 @@ class WeightMonthlyPage extends StatelessWidget {
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -83,18 +82,26 @@ class WeightMonthlyPage extends StatelessWidget {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Time', color: Colors.white,fontSize: 15,), child: Texts(
'Time',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white,fontSize: 15,), child: Texts(
'Value',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
], ],

@ -29,8 +29,9 @@ class WeightWeeklyPage extends StatelessWidget {
dateTimeFactory: const charts.LocalDateTimeFactory(), dateTimeFactory: const charts.LocalDateTimeFactory(),
), ),
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts('Details'), child: Texts('Details'),
@ -62,7 +63,7 @@ class WeightWeeklyPage extends StatelessWidget {
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -78,37 +79,50 @@ class WeightWeeklyPage extends StatelessWidget {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Time', color: Colors.white,fontSize: 15,), child: Texts(
'Time',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white,fontSize: 15,), child: Texts(
'Value',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(
child: Texts('Edit', color: Colors.white,fontSize: 15,), child: Texts(
'Edit',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
], ],
), ),
); );
diabtecPatientResult.forEach((diabtec) { diabtecPatientResult.forEach(
(diabtec) {
tableRow.add( tableRow.add(
TableRow( TableRow(
children: [ children: [

@ -65,7 +65,7 @@ class WeightYearPage extends StatelessWidget {
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -81,18 +81,26 @@ class WeightYearPage extends StatelessWidget {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Time', color: Colors.white,fontSize: 15,), child: Texts(
'Time',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white,fontSize: 15,), child: Texts(
'Value',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
], ],

@ -138,7 +138,7 @@ class _BloodPressureHomePageState extends State<BloodPressureHomePage>
width: 55, width: 55,
height: 55, height: 55,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, color: Hexcolor('515B5D')), shape: BoxShape.circle, color: HexColor('515B5D')),
child: Center( child: Center(
child: Icon( child: Icon(
Icons.add, Icons.add,

@ -67,7 +67,7 @@ class BloodPressureMonthlyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -85,7 +85,7 @@ class BloodPressureMonthlyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
@ -99,7 +99,7 @@ class BloodPressureMonthlyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
@ -113,7 +113,7 @@ class BloodPressureMonthlyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),
@ -149,7 +149,8 @@ class BloodPressureMonthlyPage extends StatelessWidget {
), ),
), ),
), ),
Container(child: Container( Container(
child: Container(
height: 70, height: 70,
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
color: Colors.white, color: Colors.white,
@ -160,7 +161,8 @@ class BloodPressureMonthlyPage extends StatelessWidget {
fontSize: 12, fontSize: 12,
), ),
), ),
),), ),
),
Container( Container(
child: Container( child: Container(
height: 70, height: 70,

@ -65,7 +65,7 @@ class BloodPressureYearPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -83,7 +83,7 @@ class BloodPressureYearPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
@ -97,7 +97,7 @@ class BloodPressureYearPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
@ -108,11 +108,10 @@ class BloodPressureYearPage extends StatelessWidget {
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),

@ -30,8 +30,9 @@ class BloodPressureWeeklyPage extends StatelessWidget {
dateTimeFactory: const charts.LocalDateTimeFactory(), dateTimeFactory: const charts.LocalDateTimeFactory(),
), ),
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts('Details'), child: Texts('Details'),
@ -64,7 +65,7 @@ class BloodPressureWeeklyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -82,50 +83,67 @@ class BloodPressureWeeklyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Time', color: Colors.white,fontSize: 15,), child: Texts(
'Time',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Measured', color: Colors.white,fontSize: 15,), child: Texts(
'Measured',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white,fontSize: 15,), child: Texts(
'Value',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(
child: Texts('Edit', color: Colors.white,fontSize: 15,), child: Texts(
'Edit',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
], ],
), ),
); );
diabtecPatientResult.forEach((diabtec) { diabtecPatientResult.forEach(
(diabtec) {
tableRow.add( tableRow.add(
TableRow( TableRow(
children: [ children: [

@ -1,4 +1,3 @@
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/YearMonthlyChartDate.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/YearMonthlyChartDate.dart';
@ -14,7 +13,8 @@ class BloodMonthlyPage extends StatelessWidget {
final List<charts.Series<YearMonthlyChartDate, int>> data; final List<charts.Series<YearMonthlyChartDate, int>> data;
final List<DiabtecPatientResult> diabtecPatientResult; final List<DiabtecPatientResult> diabtecPatientResult;
const BloodMonthlyPage({Key key, this.data,this.diabtecPatientResult}) : super(key: key); const BloodMonthlyPage({Key key, this.data, this.diabtecPatientResult})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
@ -24,14 +24,14 @@ class BloodMonthlyPage extends StatelessWidget {
width: double.maxFinite, width: double.maxFinite,
height: 180, height: 180,
color: Colors.white, color: Colors.white,
child: charts.LineChart( child: charts.LineChart(data,
data,
//animate: animate, //animate: animate,
defaultRenderer: new charts.LineRendererConfig(includePoints: true) defaultRenderer:
new charts.LineRendererConfig(includePoints: true)),
), ),
SizedBox(
height: 12,
), ),
SizedBox(height: 12,),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts('Details'), child: Texts('Details'),
@ -51,7 +51,6 @@ class BloodMonthlyPage extends StatelessWidget {
], ],
), ),
) )
], ],
), ),
); );
@ -65,7 +64,7 @@ class BloodMonthlyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -83,41 +82,53 @@ class BloodMonthlyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Time', color: Colors.white,fontSize: 15,), child: Texts(
'Time',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Measured', color: Colors.white,fontSize: 15,), child: Texts(
'Measured',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white,fontSize: 15,), child: Texts(
'Value',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
], ],
), ),
); );
diabtecPatientResult.forEach((diabtec) { diabtecPatientResult.forEach(
(diabtec) {
tableRow.add( tableRow.add(
TableRow( TableRow(
children: [ children: [
@ -177,7 +188,6 @@ class BloodMonthlyPage extends StatelessWidget {
), ),
), ),
), ),
], ],
), ),
); );

@ -64,7 +64,7 @@ class BloodYearPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -82,7 +82,7 @@ class BloodYearPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
@ -96,7 +96,7 @@ class BloodYearPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
@ -107,11 +107,10 @@ class BloodYearPage extends StatelessWidget {
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),

@ -37,7 +37,6 @@ class _BloodSugarHomePageState extends State<BloodSugarHomePage>
_tabController.dispose(); _tabController.dispose();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<BloodSugarViewMode>( return BaseView<BloodSugarViewMode>(
@ -78,7 +77,8 @@ class _BloodSugarHomePageState extends State<BloodSugarHomePage>
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
indicatorColor: Colors.red[800], indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0), labelPadding:
EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0),
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Container( Container(
@ -114,27 +114,37 @@ class _BloodSugarHomePageState extends State<BloodSugarHomePage>
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
BloodSugarWeeklyPage(data: model.getBloodWeeklySeries(),diabtecPatientResult: model.weekDiabtecPatientResult,), BloodSugarWeeklyPage(
BloodMonthlyPage(data: model.getBloodMonthlyTimeSeriesSales(),diabtecPatientResult: model.monthDiabtecPatientResult,), data: model.getBloodWeeklySeries(),
BloodYearPage(data: model.getBloodYearTimeSeriesSales(),diabtecPatientResult: model.yearDiabtecPatientResult,) diabtecPatientResult: model.weekDiabtecPatientResult,
),
BloodMonthlyPage(
data: model.getBloodMonthlyTimeSeriesSales(),
diabtecPatientResult: model.monthDiabtecPatientResult,
),
BloodYearPage(
data: model.getBloodYearTimeSeriesSales(),
diabtecPatientResult: model.yearDiabtecPatientResult,
)
], ],
), ),
) )
], ],
), ),
floatingActionButton: InkWell( floatingActionButton: InkWell(
onTap: (){ onTap: () {
Navigator.push(context, FadePage(page: AddBloodSugarPage())); Navigator.push(context, FadePage(page: AddBloodSugarPage()));
}, },
child: Container( child: Container(
width: 55, width: 55,
height: 55, height: 55,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle, color: HexColor('515B5D')),
color: Hexcolor('515B5D')
),
child: Center( child: Center(
child: Icon(Icons.add,color: Colors.white,), child: Icon(
Icons.add,
color: Colors.white,
),
), ),
), ),
), ),

@ -29,8 +29,9 @@ class BloodSugarWeeklyPage extends StatelessWidget {
dateTimeFactory: const charts.LocalDateTimeFactory(), dateTimeFactory: const charts.LocalDateTimeFactory(),
), ),
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts('Details'), child: Texts('Details'),
@ -63,7 +64,7 @@ class BloodSugarWeeklyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -81,50 +82,67 @@ class BloodSugarWeeklyPage extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Time', color: Colors.white,fontSize: 15,), child: Texts(
'Time',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Measured', color: Colors.white,fontSize: 15,), child: Texts(
'Measured',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white,fontSize: 15,), child: Texts(
'Value',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(
child: Texts('Edit', color: Colors.white,fontSize: 15,), child: Texts(
'Edit',
color: Colors.white,
fontSize: 15,
),
), ),
height: 40), height: 40),
), ),
], ],
), ),
); );
diabtecPatientResult.forEach((diabtec) { diabtecPatientResult.forEach(
(diabtec) {
tableRow.add( tableRow.add(
TableRow( TableRow(
children: [ children: [

@ -52,7 +52,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
), ),
@ -69,7 +69,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: Radius.circular(10.0),
), ),

@ -46,15 +46,21 @@ class VitalSignItem extends StatelessWidget {
des, des,
style: TextStyle( style: TextStyle(
fontSize: 1.7 * SizeConfig.textMultiplier, fontSize: 1.7 * SizeConfig.textMultiplier,
color: Hexcolor('#B8382C'), color: HexColor('#B8382C'),
fontWeight: FontWeight.bold,), fontWeight: FontWeight.bold,
),
), ),
), ),
), ),
), ),
Expanded( Expanded(
flex: 1, flex: 1,
child: Container(child: Icon(icon,size: 40,),), child: Container(
child: Icon(
icon,
size: 40,
),
),
) )
], ],
), ),
@ -65,7 +71,7 @@ class VitalSignItem extends StatelessWidget {
child: Align( child: Align(
alignment: Alignment.topRight, alignment: Alignment.topRight,
child: Container( child: Container(
margin: EdgeInsets.only(left: 5,right: 5), margin: EdgeInsets.only(left: 5, right: 5),
child: RichText( child: RichText(
text: TextSpan( text: TextSpan(
style: TextStyle(color: Colors.black), style: TextStyle(color: Colors.black),
@ -74,7 +80,7 @@ class VitalSignItem extends StatelessWidget {
TextSpan( TextSpan(
text: unit, text: unit,
style: TextStyle( style: TextStyle(
color: Hexcolor('#B8382C'), color: HexColor('#B8382C'),
), ),
), ),
]), ]),

@ -41,7 +41,7 @@ class PaymentService extends StatelessWidget {
children: [ children: [
Texts( Texts(
TranslationBase.of(context).payment, TranslationBase.of(context).payment,
color: Hexcolor('#B61422'), color: HexColor('#B61422'),
bold: true, bold: true,
), ),
Texts( Texts(
@ -73,7 +73,7 @@ class PaymentService extends StatelessWidget {
children: [ children: [
Texts( Texts(
TranslationBase.of(context).onlineCheckIn, TranslationBase.of(context).onlineCheckIn,
color: Hexcolor('#B61422'), color: HexColor('#B61422'),
bold: true, bold: true,
), ),
Texts( Texts(
@ -115,7 +115,7 @@ class PaymentService extends StatelessWidget {
children: [ children: [
Texts( Texts(
'My Balances', 'My Balances',
color: Hexcolor('#B61422'), color: HexColor('#B61422'),
bold: true, bold: true,
), ),
Texts( Texts(

@ -226,7 +226,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
child: Texts( child: Texts(
'Later', 'Later',
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
color: Hexcolor('#151DFE'), color: HexColor('#151DFE'),
fontSize: 18, fontSize: 18,
), ),
) )

@ -177,7 +177,9 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
}, },
), ),
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
Container( Container(
width: double.infinity, width: double.infinity,
child: Column( child: Column(
@ -222,7 +224,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
child: Texts( child: Texts(
'Later', 'Later',
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
color: Hexcolor('#151DFE'), color: HexColor('#151DFE'),
fontSize: 18, fontSize: 18,
), ),
) )

@ -14,7 +14,7 @@ class SearchProvider with ChangeNotifier {
static var sessionID = new DateTime.now().millisecondsSinceEpoch; static var sessionID = new DateTime.now().millisecondsSinceEpoch;
Future<dynamic> getBotPages(request) async { Future<dynamic> getBotPages(request) async {
try { try {
request['SessionID'] = sessionID; request['SessionID'] = '123';
await BaseAppClient().post(SEARCH_BOT, await BaseAppClient().post(SEARCH_BOT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
pageData = response; pageData = response;

@ -105,7 +105,7 @@ class _ButtonState extends State<Button> with TickerProviderStateMixin {
: 19), : 19),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.0)), borderRadius: BorderRadius.all(Radius.circular(10.0)),
color: widget.backgroundColor ?? Hexcolor('#515b5d'), color: widget.backgroundColor ?? HexColor('#515b5d'),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color.fromRGBO( color: Color.fromRGBO(

@ -155,7 +155,9 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
width: double.infinity, width: double.infinity,
child: Text(widget.details ?? 'No Data')), child: Text(widget.details ?? 'No Data')),
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
BaseView<LabsViewModel>( BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabResult( onModelReady: (model) => model.getPatientLabResult(
patientLabOrder: widget.patientLabOrder), patientLabOrder: widget.patientLabOrder),
@ -166,7 +168,8 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(
() {
_isShowMoreGeneral = !_isShowMoreGeneral; _isShowMoreGeneral = !_isShowMoreGeneral;
}, },
); );
@ -269,10 +272,14 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0.0): Radius.circular(10.0), topLeft: projectViewModel.isArabic
topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0), ? Radius.circular(0.0)
: Radius.circular(10.0),
topRight: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
), ),
), ),
child: Center( child: Center(
@ -287,8 +294,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white), child: Texts('Value', color: Colors.white),
@ -298,10 +304,14 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#515B5D'), color: HexColor('#515B5D'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(10.0):Radius.circular(0.0), topLeft: projectViewModel.isArabic
topRight: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0), ? Radius.circular(10.0)
: Radius.circular(0.0),
topRight: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(

@ -27,7 +27,7 @@ class MedicalProfileItem extends StatelessWidget {
title, title,
style: TextStyle( style: TextStyle(
fontSize: 1.5 * SizeConfig.textMultiplier, fontSize: 1.5 * SizeConfig.textMultiplier,
color: Hexcolor('#B8382C'), color: HexColor('#B8382C'),
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
RichText( RichText(

@ -12,16 +12,28 @@ class AppExpandableNotifier extends StatefulWidget {
final Widget bodyWidget; final Widget bodyWidget;
final String title; final String title;
final Widget collapsed; final Widget collapsed;
final bool isExpand;
bool expandFlag = false; bool expandFlag = false;
var controller = new ExpandableController(); var controller = new ExpandableController();
AppExpandableNotifier( AppExpandableNotifier(
{this.headerWidget, this.bodyWidget, this.title, this.collapsed}); {this.headerWidget,
this.bodyWidget,
this.title,
this.collapsed,
this.isExpand});
_AppExpandableNotifier createState() => _AppExpandableNotifier(); _AppExpandableNotifier createState() => _AppExpandableNotifier();
} }
class _AppExpandableNotifier extends State<AppExpandableNotifier> { class _AppExpandableNotifier extends State<AppExpandableNotifier> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
setState(() {
if (widget.isExpand == true) {
widget.expandFlag = widget.isExpand;
widget.controller.expanded = true;
}
});
return ExpandableNotifier( return ExpandableNotifier(
child: Padding( child: Padding(
padding: const EdgeInsets.only(left: 10, right: 10, top: 4), padding: const EdgeInsets.only(left: 10, right: 10, top: 4),

@ -66,7 +66,7 @@ class AppScaffold extends StatelessWidget {
icon: Icon(FontAwesomeIcons.home), icon: Icon(FontAwesomeIcons.home),
color: Colors.white, color: Colors.white,
onPressed: () { onPressed: () {
Navigator.of(context).popUntil(ModalRoute.withName('/')); Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
}, },
), ),
], ],

@ -92,23 +92,31 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
var sharedPref = new AppSharedPreferences(); var sharedPref = new AppSharedPreferences();
bool _hasSpeech = false; bool _hasSpeech = false;
ProjectViewModel projectProvider; ProjectViewModel projectProvider;
@override @override
void initState() { void initState() {
super.initState();
event.controller.stream.listen((p) { event.controller.stream.listen((p) {
if (p['isRobot'] == 'true') { if (p['isRobot'] == 'true') {
if (this.mounted) {
setState(() { setState(() {
position = Offset(250, 400); position = Offset(250, 400);
activeAnimation = false; activeAnimation = false;
}); });
} }
}
}); });
Future.delayed(const Duration(seconds: 2), () {
// _currentLocaleId =
// TranslationBase.of(AppGlobal.context).locale.languageCode == 'en'
// ? 'en-US'
// : 'ar-SA';
requestPermissions(); requestPermissions();
// Future.delayed(const Duration(seconds: 10), () {
initSpeechState().then((value) => {});
getUserData(); getUserData();
// }); });
super.initState();
} }
@override @override
@ -168,11 +176,15 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
// children: <Widget>[ // children: <Widget>[
GestureDetector( GestureDetector(
child: Container( child: Container(
child: SvgPicture.asset('assets/images/robort_svg.svg'), child: SvgPicture.asset('assets/images/svg/robort_svg.svg'),
), ),
onTap: () { onTap: () {
new RoboSearch(context: context).showAlertDialog(context); showDialog(
startVoiceSearch(); context: context,
builder: (_) {
return RoboSearch();
});
initSpeechState().then((value) => {startVoiceSearch()});
}, },
), ),
// ], // ],
@ -203,13 +215,11 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
startVoiceSearch() async { startVoiceSearch() async {
_currentLocaleId = _currentLocaleId =
TranslationBase.of(AppGlobal.context).locale.languageCode == 'en' TranslationBase.of(AppGlobal.context).locale.languageCode;
? 'en-US'
: 'ar-SA';
speech.listen( speech.listen(
onResult: resultListener, onResult: resultListener,
listenFor: Duration(seconds: 10), listenFor: Duration(seconds: 10),
localeId: _currentLocaleId, localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA',
onSoundLevelChange: soundLevelListener, onSoundLevelChange: soundLevelListener,
cancelOnError: true, cancelOnError: true,
partialResults: true, partialResults: true,
@ -219,12 +229,12 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
void resultListener(SpeechRecognitionResult result) { void resultListener(SpeechRecognitionResult result) {
// lastWords = "${result.recognizedWords} - ${result.finalResult}"; // lastWords = "${result.recognizedWords} - ${result.finalResult}";
print(result);
reconizedWord = result.recognizedWords;
event.setValue({"searchText": reconizedWord});
if (result.finalResult == true) { if (result.finalResult == true) {
// setState(() { // setState(() {
reconizedWord = result.recognizedWords;
event.setValue({"searchText": reconizedWord});
// setState(() { // setState(() {
// searchText = reconizedWord; // searchText = reconizedWord;
// }); // });
@ -236,8 +246,9 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
} }
Future _speak(reconizedWord) async { Future _speak(reconizedWord) async {
Navigator.of(AppGlobal.context).pop();
//await flutterTts.speak(reconizedWord); //await flutterTts.speak(reconizedWord);
RoboSearch.closeAlertDialog(context); //RoboSearch.closeAlertDialog(context);
getPages(reconizedWord); getPages(reconizedWord);
} }
@ -259,13 +270,13 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
Future<void> initSpeechState() async { Future<void> initSpeechState() async {
bool hasSpeech = await speech.initialize( bool hasSpeech = await speech.initialize(
onError: errorListener, onStatus: statusListener); onError: errorListener, onStatus: statusListener);
if (hasSpeech) { //if (hasSpeech) {
_currentLocaleId = // _currentLocaleId =
TranslationBase.of(AppGlobal.context).locale.languageCode == 'en' // _currentLocaleId == 'en'
? 'en-US' // ? 'en-US'
: 'ar-SA'; // systemLocale.localeId; // : 'ar-SA'; // systemLocale.localeId;
} // }
if (!mounted) return; if (!mounted) return;
// setState(() { // setState(() {
@ -274,6 +285,8 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
} }
void errorListener(SpeechRecognitionError error) { void errorListener(SpeechRecognitionError error) {
print(error);
event.setValue({"searchText": 'null'});
//setState(() { //setState(() {
// reconizedWord = "${error.errorMsg} - ${error.permanent}"; // reconizedWord = "${error.errorMsg} - ${error.permanent}";
//}); //});
@ -289,9 +302,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
getPages(text) { getPages(text) {
var request = { var request = {
'VoiceMessage': text, 'VoiceMessage': text,
'Lang': TranslationBase.of(AppGlobal.context).locale.languageCode == 'en' 'Lang': _currentLocaleId == 'en' ? 'En' : 'Ar'
? 'En'
: 'Ar'
}; };
searchProvider searchProvider
@ -306,62 +317,70 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
switch (result["CommandNumber"]) { switch (result["CommandNumber"]) {
case '100': case '100':
{ {
List clnicID = unique(result['ClinicId']);
if (result['ProjectId'] != 0 &&
clnicID.length > 0 &&
result['DoctorId'].length > 0) {
if (clnicID.length == 1) {
getDoctorsList(
result['ProjectId'],
clnicID[0],
context,
doctorId: result['DoctorId'],
doctorName: null,
);
} else {
goToClinic(clnicID);
}
} else if (result['ProjectId'] != 0 &&
clnicID.length > 0 &&
result['DoctorId'].length == 0) {
if (clnicID.length == 1) {
getDoctorsList(
result['ProjectId'],
clnicID[0],
context,
);
} else {
goToClinic(clnicID);
}
} else if (result['ProjectId'] == 0 &&
clnicID.length > 0 &&
result['DoctorId'].length == 0) {
if (clnicID.length == 1) {
getDoctorsList( getDoctorsList(
result['ProjectId'], result['ProjectId'],
clnicID[0], result['ClinicId'].length > 0 ? result['ClinicId'][0] : 0,
context,
);
} else {
goToClinic(clnicID);
}
} else if (result['ProjectId'] == 0 &&
clnicID.length > 0 &&
result['DoctorId'].length > 0) {
if (clnicID.length == 1) {
getDoctorsList(
result['ProjectId'],
clnicID[0],
context, context,
doctorId: result['DoctorId'], doctorId: result['DoctorId'],
doctorName: null, doctorName: null,
); );
} else {
goToClinic(clnicID); // List clnicID = unique(result['ClinicId']);
} // if (result['ProjectId'] != 0 &&
} else { // clnicID.length > 0 &&
goToClinic(clnicID); // result['DoctorId'].length > 0) {
} // if (clnicID.length == 1) {
// getDoctorsList(
// result['ProjectId'],
// clnicID[0],
// context,
// doctorId: result['DoctorId'],
// doctorName: null,
// );
// } else {
// goToClinic(clnicID);
// }
// } else if (result['ProjectId'] != 0 &&
// clnicID.length > 0 &&
// result['DoctorId'].length == 0) {
// if (clnicID.length == 1) {
// getDoctorsList(
// result['ProjectId'],
// clnicID[0],
// context,
// );
// } else {
// goToClinic(clnicID);
// }
// } else if (result['ProjectId'] == 0 &&
// clnicID.length > 0 &&
// result['DoctorId'].length == 0) {
// if (clnicID.length == 1) {
// getDoctorsList(
// result['ProjectId'],
// clnicID[0],
// context,
// );
// } else {
// goToClinic(clnicID);
// }
// } else if (result['ProjectId'] == 0 &&
// clnicID.length > 0 &&
// result['DoctorId'].length > 0) {
// if (clnicID.length == 1) {
// getDoctorsList(
// result['ProjectId'],
// clnicID[0],
// context,
// doctorId: result['DoctorId'],
// doctorName: null,
// );
// } else {
// goToClinic(clnicID);
// }
// } else {
// goToClinic(clnicID);
// }
// speak(); // speak();
} }
break; break;
@ -680,7 +699,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
break; break;
default: default:
Navigator.of(context).pushNamed(HOME); Navigator.of(AppGlobal.context).pushNamed(HOME);
speak(); speak();
break; break;
} }
@ -803,12 +822,12 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
} }
speak() async { speak() async {
if (_currentLocaleId == 'en-US' && results['ReturnMessage'] != null) { if (_currentLocaleId == 'en' && results['ReturnMessage'] != null) {
await flutterTts.setVoice("en-us-x-sfg#male_2-local"); await flutterTts.setVoice("en-us-x-sfg#male_2-local");
await flutterTts.setLanguage(_currentLocaleId); await flutterTts.setLanguage("en-US");
await flutterTts.speak(results['ReturnMessage']); await flutterTts.speak(results['ReturnMessage']);
} else if (results['ReturnMessage_Ar'] != null) { } else if (results['ReturnMessage_Ar'] != null) {
await flutterTts.setLanguage(_currentLocaleId); await flutterTts.setLanguage("ar-SA");
await flutterTts.setVoice("ar-sa-x-sfg#male_1-local"); await flutterTts.setVoice("ar-sa-x-sfg#male_1-local");
await flutterTts.speak(results['ReturnMessage_Ar']); await flutterTts.speak(results['ReturnMessage_Ar']);
@ -834,11 +853,14 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
} }
getUserData() async { getUserData() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
setState(() async { //setState(() async {
user = AuthenticatedUser.fromJson( user = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
}); // });
} }
print(_currentLocaleId);
} }
} }

@ -1,80 +1,249 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/others/floating_button_search.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/search.dart'; import 'package:diplomaticquarterapp/widgets/robo-search/search.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class RoboSearch { class RoboSearch extends StatefulWidget {
final BuildContext context; @override
var event = RobotProvider(); _RoboSearch createState() => new _RoboSearch();
var searchText = null; }
RoboSearch({
@required this.context,
});
showAlertDialog(BuildContext context) { class _RoboSearch extends State<RoboSearch> {
// set up the buttons var event = RobotProvider();
var searchText = '';
bool isRetry = false;
var tween = Tween(begin: 0.0, end: 1.0).chain(CurveTween(curve: Curves.ease));
// set up the AlertDialog @override
AlertDialog alert = AlertDialog( void initState() {
content: StatefulBuilder(
builder: (BuildContext context, StateSetter setState) {
setState((){
event.controller.stream.listen((p) { event.controller.stream.listen((p) {
if (p['searchText']!=null) { if (p['searchText'] != null) {
if (p['searchText'] == 'null') {
//Future.delayed(const Duration(seconds: 1), () {
if (mounted) {
setState(() { setState(() {
searchText = p['searchText']; isRetry = true;
searchText = '';
}); });
} }
//});
} else {
if (mounted) {
setState(() {
searchText = p['searchText'];
}); });
}
}
}
}); });
return Container( super.initState();
}
@override
Widget build(BuildContext context) {
return AlertDialog(
content: Container(
color: Colors.white, color: Colors.white,
height: SizeConfig.realScreenHeight * 0.5, height: SizeConfig.realScreenHeight * 0.5,
width: SizeConfig.realScreenWidth * 0.8, width: SizeConfig.realScreenWidth * 0.8,
child: Container( child: Container(
child: Column(children: [ child: Column(
Expanded( mainAxisAlignment: MainAxisAlignment.center,
flex: 1, children: [
child: Center( isRetry == true
child: Image.asset( ? Column(
'assets/images/habib-logo.png', mainAxisAlignment: MainAxisAlignment.center,
height: 75, children: [
width: 75, Container(
))),
Expanded(
flex: 3,
child: Center(
child: Container(
margin: EdgeInsets.all(20), margin: EdgeInsets.all(20),
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100), borderRadius:
border: Border.all(width: 2, color: Colors.red)), BorderRadius.circular(100),
border: Border.all(
width: 5, color: Colors.red)),
child: Icon( child: Icon(
Icons.mic, Icons.mic,
color: Colors.blue, color: Colors.blue,
size: 48, size: 48,
), )),
))), Center(
Expanded( child: AppText(
flex: 1, child: Center(child: Text( searchText != null ? searchText : 'Try saying something' ))) "Didn't catch that, Try speaking again",
]), fontSize: 14,
)); )),
}), RaisedButton(
); color: Colors.transparent,
onPressed: () {
// show the dialog setState(() {
showDialog( isRetry = false;
context: context, });
builder: (BuildContext context) { FloatingSearchButton()
return alert; .createState()
.startVoiceSearch();
}, },
); child: AppText(
} 'Try again',
color: Colors.blue,
static closeAlertDialog(BuildContext context) { ))
Navigator.of(context).pop(); ])
: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.all(20),
padding: EdgeInsets.all(20),
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(100)),
child: Icon(
Icons.mic,
color: Colors.white,
size: 48,
)),
SizedBox(height: 20),
Center(
child: Text(searchText == ''
? 'Try saying something'
: searchText))
],
)
]),
)));
} }
} }
// class RoboSearch {
// final BuildContext context;
// var event = RobotProvider();
// var searchText = '';
// bool isRetry = false;
// var tween = Tween(begin: 0.0, end: 1.0).chain(CurveTween(curve: Curves.ease));
// RoboSearch({
// @required this.context,
// });
// showAlertDialog(BuildContext context) {
// // set up the buttons
// // set up the AlertDialog
// AlertDialog alert = AlertDialog(
// content: StatefulBuilder(
// builder: (BuildContext context, StateSetter setState) {
// event.controller.stream.listen((p) {
// if (p['searchText'] != null) {
// if (p['searchText'] == 'null') {
// Future.delayed(const Duration(seconds: 1), ()
// {
// setState(() {
// isRetry = true;
// searchText = '';
// });
// });
// } else {
// Future.delayed(const Duration(seconds: 1), ()
// {
// setState(() {
// searchText = p['searchText'];
// });
// });
// }
// }
// });
// return Container(
// color: Colors.white,
// height: SizeConfig.realScreenHeight * 0.5,
// width: SizeConfig.realScreenWidth * 0.8,
// child: Container(
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// isRetry == true
// ? Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Container(
// margin: EdgeInsets.all(20),
// padding: EdgeInsets.all(10),
// decoration: BoxDecoration(
// borderRadius:
// BorderRadius.circular(100),
// border: Border.all(
// width: 5, color: Colors.red)),
// child: Icon(
// Icons.mic,
// color: Colors.blue,
// size: 48,
// )),
// Center(
// child: AppText(
// "Didn't catch that, Try speaking again",
// fontSize: 14,
// )),
// RaisedButton(
// color: Colors.transparent,
// onPressed: () {
// setState(() {
// isRetry = false;
// });
// startVoiceSearch();
// },
// child: AppText(
// 'Try again',
// color: Colors.blue,
// ))
// ])
// : Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Container(
// margin: EdgeInsets.all(20),
// padding: EdgeInsets.all(20),
// decoration: BoxDecoration(
// color: Colors.blue,
// borderRadius: BorderRadius.circular(100)),
// child: Icon(
// Icons.mic,
// color: Colors.white,
// size: 48,
// )),
// SizedBox(height: 20),
// Center(
// child: Text(searchText == ''
// ? 'Try saying something'
// : searchText))
// ],
// )
// ]),
// ));
// }),
// );
// // show the dialog
// showDialog(
// context: context,
// builder: (BuildContext context) {
// return alert;
// },
// );
// }
// static closeAlertDialog(BuildContext context) {
// Navigator.of(context).pop();
// }
// startVoiceSearch() {
// // Navigator.of(context).pop();
// //this.showAlertDialog(context);
// // new RoboSearch(context: context).showAlertDialog(context);
// FloatingSearchButton().createState().startVoiceSearch();
// }
// }

@ -20,7 +20,7 @@ dependencies:
webview_flutter: ^0.3.24 webview_flutter: ^0.3.24
# http client # http client
http: ^0.12.1 http: ^0.12.1
connectivity: ^0.4.9 connectivity: ^0.4.9+3
# State Management # State Management
provider: ^4.3.2+2 provider: ^4.3.2+2
@ -161,9 +161,7 @@ flutter:
- assets/images/login/ - assets/images/login/
- assets/json/ - assets/json/
- assets/sounds/ - assets/sounds/
- assets/images/symptom.svg - assets/images/svg/
- assets/images/robort_svg.svg
- assets/tracker/ - assets/tracker/

Loading…
Cancel
Save