lab results working(cont.) & improvements

merge-update-with-lab-changes
Sikander Saleem 5 years ago
parent 70614d3555
commit 4db432b351

@ -13,8 +13,8 @@ const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_ORDERS = '/api/orders';
//const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/'; //const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs // Pharmacy UAT URLs
//const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; //const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';

@ -39,7 +39,9 @@ const Map localizedValues = {
'bookAppo': {'en': 'Book Appointment', 'ar': 'حجز موعد'}, 'bookAppo': {'en': 'Book Appointment', 'ar': 'حجز موعد'},
'searchBy': {'en': 'Search By:', 'ar': 'البحث عن طريق:'}, 'searchBy': {'en': 'Search By:', 'ar': 'البحث عن طريق:'},
'clinic': {'en': 'Clinic', 'ar': 'العيادة'}, 'clinic': {'en': 'Clinic', 'ar': 'العيادة'},
'by-clinic': {'en': 'By Clinic', 'ar': 'العيادة'},
'hospital': {'en': 'Hospital', 'ar': 'المستشفى'}, 'hospital': {'en': 'Hospital', 'ar': 'المستشفى'},
'by-hospital': {'en': 'By Hospital', 'ar': 'المستشفى'},
'name': {'en': 'Name', 'ar': 'الإسم'}, 'name': {'en': 'Name', 'ar': 'الإسم'},
'doctor': {'en': 'Doctor', 'ar': 'الطبيب'}, 'doctor': {'en': 'Doctor', 'ar': 'الطبيب'},
'clinicName': {'en': 'Clinic Name', 'ar': 'اسم العيادة'}, 'clinicName': {'en': 'Clinic Name', 'ar': 'اسم العيادة'},
@ -135,6 +137,7 @@ const Map localizedValues = {
"verify-through": {"en": "Verify Through", "ar": " تحقق من خلال"}, "verify-through": {"en": "Verify Through", "ar": " تحقق من خلال"},
"last-login": {"en": "LAST LOGIN AT:", "ar": "آخر تسجيل دخول"}, "last-login": {"en": "LAST LOGIN AT:", "ar": "آخر تسجيل دخول"},
"last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"}, "last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"},
"please-verify": {"en": "Please Verify", "ar": "ارجوك تحقق:"},
"verify-fingerprint": { "verify-fingerprint": {
"en": "To activate the fingerprint login service, please verify data by using one of the following options.", "en": "To activate the fingerprint login service, please verify data by using one of the following options.",
"ar": "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات" "ar": "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات"
@ -823,7 +826,7 @@ const Map localizedValues = {
"send-copy": {"en": "Email the Report", "ar": "أرسل التقرير"}, "send-copy": {"en": "Email the Report", "ar": "أرسل التقرير"},
"appoSurvey": {"en": "Survey", "ar": "إستبيان"}, "appoSurvey": {"en": "Survey", "ar": "إستبيان"},
"appoSurveySubtitle": {"en": "Survey", "ar": "إستبيان"}, "appoSurveySubtitle": {"en": "Survey", "ar": "إستبيان"},
"labResults": {"en": "Lab Result", "ar": "نتيجة المختبر"}, "labResults": {"en": "Lab Results", "ar": "نتيجة المختبر"},
"doctorRating": {"en": "Doctor Rating", "ar": "تقييم الطبيب"}, "doctorRating": {"en": "Doctor Rating", "ar": "تقييم الطبيب"},
"good": {"en": "Good", "ar": "جيد"}, "good": {"en": "Good", "ar": "جيد"},
"v-good": {"en": "Very Good", "ar": "جيد جدا"}, "v-good": {"en": "Very Good", "ar": "جيد جدا"},

@ -66,7 +66,7 @@ class LabsViewModel extends BaseViewModel {
} }
} }
setFilterType(FilterType filterType) { setFilterType(FilterType filterType) {
this.filterType = filterType; this.filterType = filterType;
notifyListeners(); notifyListeners();
} }

@ -497,86 +497,88 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return Scaffold( return Scaffold(
appBar: AppBar( appBar: currentTab == 1
elevation: 0, ? null
textTheme: TextTheme( : AppBar(
headline6: TextStyle(color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold), elevation: 0,
), textTheme: TextTheme(
title: Text( headline6: TextStyle(color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold),
getText(currentTab).toUpperCase(), ),
style: TextStyle(fontWeight: FontWeight.bold, color: Theme.of(context).textTheme.headline1.color, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'), title: Text(
// bold: true, getText(currentTab).toUpperCase(),
// color: Colors.white, style: TextStyle(fontWeight: FontWeight.bold, color: Theme.of(context).textTheme.headline1.color, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
), // bold: true,
leading: Builder( // color: Colors.white,
builder: (BuildContext context) { ),
return new Stack( leading: Builder(
children: <Widget>[ builder: (BuildContext context) {
currentTab == 0 return new Stack(
? IconButton( children: <Widget>[
icon: Icon(Icons.menu), currentTab == 0
color: Theme.of(context).textTheme.headline1.color, ? IconButton(
onPressed: () => Scaffold.of(context).openDrawer(), icon: Icon(Icons.menu),
) color: Theme.of(context).textTheme.headline1.color,
: IconButton( onPressed: () => Scaffold.of(context).openDrawer(),
icon: Icon(Icons.arrow_back), )
color: Theme.of(context).textTheme.headline1.color, : IconButton(
onPressed: () { icon: Icon(Icons.arrow_back),
setState(() { color: Theme.of(context).textTheme.headline1.color,
currentTab = 0; onPressed: () {
}); setState(() {
currentTab = 0;
pageController.jumpToPage(0); });
},
), pageController.jumpToPage(0);
notificationCount != '' },
? new Positioned(
right: projectViewModel.isArabic ? 35 : 0,
top: 5,
child: new Container(
padding: EdgeInsets.all(4),
decoration: new BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
notificationCount,
style: new TextStyle(
color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 9,
), ),
textAlign: TextAlign.center, notificationCount != ''
), ? new Positioned(
), right: projectViewModel.isArabic ? 35 : 0,
) top: 5,
: SizedBox() child: new Container(
padding: EdgeInsets.all(4),
decoration: new BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
notificationCount,
style: new TextStyle(
color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 9,
),
textAlign: TextAlign.center,
),
),
)
: SizedBox()
],
);
},
),
actions: [
IconButton(
//iconSize: 70,
icon: Icon(
projectViewModel.isLogin ? Icons.settings : Icons.login,
color: Theme.of(context).textTheme.headline1.color,
),
onPressed: () {
if (projectViewModel.isLogin)
Navigator.of(context).pushNamed(
SETTINGS,
);
else
login();
}, //do something,
)
], ],
); centerTitle: true,
},
),
actions: [
IconButton(
//iconSize: 70,
icon: Icon(
projectViewModel.isLogin ? Icons.settings : Icons.login,
color: Theme.of(context).textTheme.headline1.color,
), ),
onPressed: () {
if (projectViewModel.isLogin)
Navigator.of(context).pushNamed(
SETTINGS,
);
else
login();
}, //do something,
)
],
centerTitle: true,
),
drawer: SafeArea(child: AppDrawer()), drawer: SafeArea(child: AppDrawer()),
extendBody: true, extendBody: true,
body: PageView( body: PageView(

@ -120,6 +120,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
if (user != null) if (user != null)
Column( Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
TranslationBase.of(context).welcomeBack, TranslationBase.of(context).welcomeBack,
@ -160,9 +161,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
), ),
Text( Text(
user.editedOn != null user.editedOn != null
? formatDateToDate(DateUtil.convertStringToDate(user.editedOn)) ? DateUtil.formatDateToDate(DateUtil.convertStringToDate(user.editedOn))
: user.createdOn != null : user.createdOn != null
? formatDateToDate(DateUtil.convertStringToDate(user.createdOn)) ? DateUtil.formatDateToDate(DateUtil.convertStringToDate(user.createdOn))
: '--', : '--',
style: TextStyle(fontSize: 12, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48), style: TextStyle(fontSize: 12, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
), ),
@ -193,9 +194,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
Expanded(child: SizedBox()), Expanded(child: SizedBox()),
Text( Text(
user.editedOn != null user.editedOn != null
? formatDateToTime(DateUtil.convertStringToDate(user.editedOn)) ? DateUtil.formatDateToTime(DateUtil.convertStringToDate(user.editedOn))
: user.createdOn != null : user.createdOn != null
? formatDateToTime(DateUtil.convertStringToDate(user.createdOn)) ? DateUtil.formatDateToTime(DateUtil.convertStringToDate(user.createdOn))
: '--', : '--',
style: TextStyle(fontSize: 12, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48), style: TextStyle(fontSize: 12, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48),
), ),
@ -927,14 +928,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
return DateFormat('MMM dd, yyy, kk:mm').format(date); return DateFormat('MMM dd, yyy, kk:mm').format(date);
} }
formatDateToDate(date) {
return DateFormat('dd MMM yyy').format(date);
}
formatDateToTime(date) {
return DateFormat('kk:mm a').format(date);
}
showLoader(bool isTrue) { showLoader(bool isTrue) {
setState(() { setState(() {
isLoading = isTrue; isLoading = isTrue;

@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
class WelcomeLogin extends StatefulWidget { class WelcomeLogin extends StatefulWidget {
@override @override
@ -21,78 +22,83 @@ class _WelcomeLogin extends State<WelcomeLogin> {
@override @override
void initState() { void initState() {
isLoading = true; isLoading = true;
// checkUser(context);
super.initState(); super.initState();
} }
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).welcome, appBarTitle: TranslationBase.of(context).welcome,
isShowDecPage: false, isShowDecPage: false,
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: false, backgroundColor: Color(0xffF8F8F8),
body: Padding( showNewAppBarTitle: false,
padding: EdgeInsets.all(20), body: Column(
child: Column( children: <Widget>[
Expanded(
child: ListView(
padding: EdgeInsets.only(left: 21, right: 21),
physics: BouncingScrollPhysics(),
children: [
SizedBox(height: 12),
Align(
alignment: Alignment.centerLeft,
child: SvgPicture.asset(
"assets/images/new/hmg_icon.svg",
height: 35,
width: 35,
),
),
SizedBox(height: 16),
Text(
TranslationBase.of(context).welcome,
style: TextStyle(fontSize: 24, fontFamily: "Poppins", fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 23 / 24),
),
Text(
TranslationBase.of(context).welcomeText,
style: TextStyle(fontSize: 14, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56, height: 21 / 14),
),
Text(
TranslationBase.of(context).welcomeText2,
style: TextStyle(fontSize: 14, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56, height: 21 / 14),
),
SizedBox(
height: 14,
),
],
),
),
Container(
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 6, child: DefaultButton(
child: Column(mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ TranslationBase.of(context).no,
Image.asset('assets/images/DQ/logo.png', height: 90, width: 90), () => {
AppText( Navigator.of(context).push(FadePage(page: Register())),
TranslationBase.of(context).welcome, },
fontSize: 30, color: Color(0xffEAEAEA),
fontWeight: FontWeight.bold, textColor: Color(0xff000000),
), ),
AppText(
TranslationBase.of(context).welcomeText,
fontSize: 24,
textAlign: TextAlign.start,
),
AppText(
TranslationBase.of(context).welcomeText2,
fontSize: 24,
textAlign: TextAlign.start,
),
SizedBox(
height: SizeConfig.realScreenHeight * .15,
)
]),
), ),
SizedBox(width: 8),
Expanded( Expanded(
flex: 2, child: DefaultButton(
child: Column( TranslationBase.of(context).yes,
//mainAxisAlignment: MainAxisAlignment.end, () => {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, Navigator.of(context).push(FadePage(page: LoginType())),
children: <Widget>[ },
Row( color: Color(0xff359846),
children: <Widget>[ ),
Expanded( ),
child: DefaultButton(
TranslationBase.of(context).yes,
() => {
Navigator.of(context).push(FadePage(page: LoginType())),
},
color: Color(0xFFc5272c),
textColor: Colors.white,
))
],
),
Row(
children: <Widget>[
Expanded(
child: DefaultButton(
TranslationBase.of(context).no,
() => {
Navigator.of(context).push(FadePage(page: Register())),
},
))
],
),
],
))
], ],
))); ),
),
],
),
);
} }
} }

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@ -16,96 +17,128 @@ import 'package:provider/provider.dart';
import 'laboratory_result_page.dart'; import 'laboratory_result_page.dart';
class LabsHomePage extends StatelessWidget { class LabsHomePage extends StatelessWidget {
List<ImagesInfo> imagesInfo =List(); List<ImagesInfo> imagesInfo = List();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-lab/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-lab/ar/0.png')); imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-lab/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-lab/ar/0.png'));
return BaseView<LabsViewModel>( return BaseView<LabsViewModel>(
onModelReady: (model) => model.getLabs(), onModelReady: (model) => model.getLabs(),
builder: (context, LabsViewModel model, widget) => AppScaffold( builder: (context, LabsViewModel model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
description: TranslationBase.of(context).infoLab, description: TranslationBase.of(context).infoLab,
appBarTitle: TranslationBase.of(context).labOrders, appBarTitle: TranslationBase.of(context).labResults,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF8F8F8),
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
body: SingleChildScrollView( body: Column(
physics: BouncingScrollPhysics(), children: [
child: FractionallySizedBox( Row(
widthFactor: 1.0, children: <Widget>[
child: Center( MyTabView(TranslationBase.of(context).byClinic, FilterType.Clinic, model.filterType, () {
child: Column( model.setFilterType(FilterType.Clinic);
children: <Widget>[ }),
Row( MyTabView(TranslationBase.of(context).byHospital, FilterType.Hospital, model.filterType, () {
children: <Widget>[ model.setFilterType(FilterType.Hospital);
Expanded( }),
flex: 1, ],
child: InkWell( ),
onTap: () => model.setFilterType(FilterType.Clinic), Expanded(
child: ListTile( child: FractionallySizedBox(
title: Text(TranslationBase.of(context).clinic), widthFactor: 1.0,
leading: Radio( child: ListView.separated(
value: FilterType.Clinic, physics: BouncingScrollPhysics(),
groupValue: model.filterType, separatorBuilder: (context, index) {
onChanged: (FilterType value) { return Container(
model.setFilterType(value); height: 1,
color: Colors.grey,
);
},
itemBuilder: (context, index) {
return AppExpandableNotifier(
title: model.patientLabOrdersList[index].filterName,
bodyWidget: ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(left: 21, right: 21),
itemBuilder: (context, _index) {
PatientLabOrders labOrder = model.patientLabOrdersList[index].patientLabOrdersList[_index];
return DoctorCard(
onTap: () => Navigator.push(
context,
FadePage(
page: LaboratoryResultPage(
patientLabOrders: labOrder,
),
),
),
isInOutPatient: labOrder.isInOutPatient,
name: labOrder.doctorName,
billNo: labOrder.projectName,
profileUrl: labOrder.doctorImageURL,
subName: labOrder.clinicDescription,
isLiveCareAppointment: labOrder.isLiveCareAppointment,
date: labOrder.orderDate
//projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate),
);
}, },
), separatorBuilder: (context, index) => SizedBox(height: 14),
), itemCount: model.patientLabOrdersList[index].patientLabOrdersList.length));
), },
), itemCount: model.patientLabOrdersList.length),
Expanded( ),
flex: 1, ),
child: InkWell( ],
onTap: () => model.setFilterType(FilterType.Hospital), ),
child: ListTile( ),
title: Text(TranslationBase.of(context).hospital), );
leading: Radio( }
value: FilterType.Hospital, }
groupValue: model.filterType,
onChanged: (FilterType value) => // todo 'Sikander' move this widget to separate file, so can find easily
model.setFilterType(value), class MyTabView extends StatelessWidget {
), final String title;
), final FilterType value;
), final FilterType groupValue;
) final VoidCallback onPressed;
], MyTabView(
), this.title,
...List.generate( this.value,
model.patientLabOrdersList.length, this.groupValue,
(index) => AppExpandableNotifier( this.onPressed, {
title: model.patientLabOrdersList[index].filterName, Key key,
bodyWidget: Column( }) : super(key: key);
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, @override
children: model Widget build(BuildContext context) {
.patientLabOrdersList[index].patientLabOrdersList return Expanded(
.map((labOrder) { child: InkWell(
return DoctorCard( onTap: onPressed,
onTap: () => Navigator.push( child: Column(
context, mainAxisSize: MainAxisSize.min,
FadePage( crossAxisAlignment: CrossAxisAlignment.center,
page: LaboratoryResultPage( children: [
patientLabOrders: labOrder, SizedBox(height: 15),
), Text(
), title,
),isInOutPatient: labOrder.isInOutPatient, style: TextStyle(
name: labOrder.doctorName, fontSize: 16,
billNo: ' ${labOrder.invoiceNo}', fontFamily: "Poppins",
profileUrl: labOrder.doctorImageURL, fontWeight: FontWeight.w600,
subName: labOrder.projectName, color: value == groupValue ? Color(0xff2B353E) : Color(0xff575757),
isLiveCareAppointment: labOrder.isLiveCareAppointment, letterSpacing: -0.48,
date: projectViewModel.isArabic?DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate):DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate),
);
}).toList(),
),
),
)
],
), ),
), ),
), Container(
margin: EdgeInsets.only(top: 13),
height: 3,
color: value == groupValue ? Color(0xffD02127) : Colors.transparent,
)
],
), ),
), ),
); );

@ -69,7 +69,9 @@ class _MedicalProfilePageState extends State<MedicalProfilePageNew> {
onModelReady: (model) => model.getAppointmentHistory(), onModelReady: (model) => model.getAppointmentHistory(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowDecPage: false, isShowDecPage: false,
isShowAppBar: false,
baseViewModel: model, baseViewModel: model,
showNewAppBar: false,
isHelp: true, isHelp: true,
body: Container( body: Container(
child: SingleChildScrollView( child: SingleChildScrollView(

@ -21,7 +21,7 @@ class _MyAdmissionsPageState extends State<MyAdmissionsPage> {
children: <Widget>[ children: <Widget>[
DoctorCard( DoctorCard(
name: 'Dr Mohammad Aljammal', name: 'Dr Mohammad Aljammal',
date: 'Feb 14, 2020', date:DateTime.now(),// 'Feb 14, 2020',
profileUrl: profileUrl:
'https://scontent.famm4-1.fna.fbcdn.net/v/t31.0-8/30425660_1862582094040824_7851633779570222226_o.jpg?_nc_cat=101&_nc_sid=09cbfe&_nc_eui2=AeF3TI6D2_tFS5QoQsqyaCKd2zBfzh74hOzbMF_OHviE7PQdLHRwmBoIOiKyWmK9MskOshPjkU73a5EdQMA3dqnV&_nc_ohc=1feou2fDCuIAX_Ra9qB&_nc_ht=scontent.famm4-1.fna&oh=709d34d1c284de1d0aa08ed37b0ac09a&oe=5F3C5ACB', 'https://scontent.famm4-1.fna.fbcdn.net/v/t31.0-8/30425660_1862582094040824_7851633779570222226_o.jpg?_nc_cat=101&_nc_sid=09cbfe&_nc_eui2=AeF3TI6D2_tFS5QoQsqyaCKd2zBfzh74hOzbMF_OHviE7PQdLHRwmBoIOiKyWmK9MskOshPjkU73a5EdQMA3dqnV&_nc_ohc=1feou2fDCuIAX_Ra9qB&_nc_ht=scontent.famm4-1.fna&oh=709d34d1c284de1d0aa08ed37b0ac09a&oe=5F3C5ACB',
rat: 3.8, rat: 3.8,
@ -29,7 +29,7 @@ class _MyAdmissionsPageState extends State<MyAdmissionsPage> {
), ),
DoctorCard( DoctorCard(
name: 'Dr Mohammad Aljammal', name: 'Dr Mohammad Aljammal',
date: 'Feb 14, 2020', date: DateTime.now(),//'Feb 14, 2020',
profileUrl: profileUrl:
'https://scontent.famm4-1.fna.fbcdn.net/v/t31.0-8/30425660_1862582094040824_7851633779570222226_o.jpg?_nc_cat=101&_nc_sid=09cbfe&_nc_eui2=AeF3TI6D2_tFS5QoQsqyaCKd2zBfzh74hOzbMF_OHviE7PQdLHRwmBoIOiKyWmK9MskOshPjkU73a5EdQMA3dqnV&_nc_ohc=1feou2fDCuIAX_Ra9qB&_nc_ht=scontent.famm4-1.fna&oh=709d34d1c284de1d0aa08ed37b0ac09a&oe=5F3C5ACB', 'https://scontent.famm4-1.fna.fbcdn.net/v/t31.0-8/30425660_1862582094040824_7851633779570222226_o.jpg?_nc_cat=101&_nc_sid=09cbfe&_nc_eui2=AeF3TI6D2_tFS5QoQsqyaCKd2zBfzh74hOzbMF_OHviE7PQdLHRwmBoIOiKyWmK9MskOshPjkU73a5EdQMA3dqnV&_nc_ohc=1feou2fDCuIAX_Ra9qB&_nc_ht=scontent.famm4-1.fna&oh=709d34d1c284de1d0aa08ed37b0ac09a&oe=5F3C5ACB',
rat: 3.8, rat: 3.8,
@ -46,7 +46,7 @@ class _MyAdmissionsPageState extends State<MyAdmissionsPage> {
//TODO when we need it //TODO when we need it
}, },
name: 'Dr Mohammad Aljammal', name: 'Dr Mohammad Aljammal',
date: 'Feb 14, 2020', date: DateTime.now(),//'Feb 14, 2020',
profileUrl: profileUrl:
'https://scontent.famm4-1.fna.fbcdn.net/v/t31.0-8/30425660_1862582094040824_7851633779570222226_o.jpg?_nc_cat=101&_nc_sid=09cbfe&_nc_eui2=AeF3TI6D2_tFS5QoQsqyaCKd2zBfzh74hOzbMF_OHviE7PQdLHRwmBoIOiKyWmK9MskOshPjkU73a5EdQMA3dqnV&_nc_ohc=1feou2fDCuIAX_Ra9qB&_nc_ht=scontent.famm4-1.fna&oh=709d34d1c284de1d0aa08ed37b0ac09a&oe=5F3C5ACB', 'https://scontent.famm4-1.fna.fbcdn.net/v/t31.0-8/30425660_1862582094040824_7851633779570222226_o.jpg?_nc_cat=101&_nc_sid=09cbfe&_nc_eui2=AeF3TI6D2_tFS5QoQsqyaCKd2zBfzh74hOzbMF_OHviE7PQdLHRwmBoIOiKyWmK9MskOshPjkU73a5EdQMA3dqnV&_nc_ohc=1feou2fDCuIAX_Ra9qB&_nc_ht=scontent.famm4-1.fna&oh=709d34d1c284de1d0aa08ed37b0ac09a&oe=5F3C5ACB',
rat: 4.8, rat: 4.8,

@ -22,9 +22,8 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
@override @override
void initState() { void initState() {
imagesInfo.add(ImagesInfo( imagesInfo.add(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/en/0.png', ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/ar/0.png'));
imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/ar/0.png'));
super.initState(); super.initState();
} }
@ -47,7 +46,9 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
itemBuilder: (context, index) => DoctorCard( itemBuilder: (context, index) => DoctorCard(
isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment, isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment,
name: model.sickLeaveList[index].doctorName, name: model.sickLeaveList[index].doctorName,
date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.sickLeaveList[index].requestDate):DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].requestDate), date: model.sickLeaveList[index].requestDate,
// projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.sickLeaveList[index].requestDate):DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].requestDate),
profileUrl: model.sickLeaveList[index].doctorImageURL, profileUrl: model.sickLeaveList[index].doctorImageURL,
rat: model.sickLeaveList[index].actualDoctorRate.toDouble(), rat: model.sickLeaveList[index].actualDoctorRate.toDouble(),
subName: model.sickLeaveList[index].projectName, subName: model.sickLeaveList[index].projectName,

@ -91,7 +91,7 @@ class PrescriptionsPage extends StatelessWidget {
subName: prescriptions.name, subName: prescriptions.name,
isInOutPatient: prescriptions.isInOutPatient, isInOutPatient: prescriptions.isInOutPatient,
isLiveCareAppointment: prescriptions.isLiveCareAppointment, isLiveCareAppointment: prescriptions.isLiveCareAppointment,
date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)), date:DateUtil.convertStringToDate(prescriptions.appointmentDate)//projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)),
), ),
); );
}).toList(), }).toList(),

@ -97,7 +97,7 @@ class RadiologyHomePage extends StatelessWidget {
profileUrl: radiology.doctorImageURL, profileUrl: radiology.doctorImageURL,
billNo: '${radiology.invoiceNo}', billNo: '${radiology.invoiceNo}',
subName: '${radiology.projectName}', subName: '${radiology.projectName}',
date: projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(radiology.orderDate):DateUtil.getMonthDayYearDateFormatted(radiology.orderDate), date: radiology.orderDate//projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(radiology.orderDate):DateUtil.getMonthDayYearDateFormatted(radiology.orderDate),
), ),
); );
}).toList(), }).toList(),

@ -52,6 +52,14 @@ class DateUtil {
return start + "$milliseconds" + end; return start + "$milliseconds" + end;
} }
static String formatDateToDate(DateTime date) {
return DateFormat('dd MMM yyy').format(date);
}
static String formatDateToTime(DateTime date) {
return DateFormat('kk:mm a').format(date);
}
static String yearMonthDay(DateTime dateTime) { static String yearMonthDay(DateTime dateTime) {
String dateFormat = '${dateTime.year}-${dateTime.month}-${dateTime.day}'; String dateFormat = '${dateTime.year}-${dateTime.month}-${dateTime.day}';
return dateFormat; return dateFormat;

@ -48,6 +48,10 @@ class TranslationBase {
String get clinic => localizedValues['clinic'][locale.languageCode]; String get clinic => localizedValues['clinic'][locale.languageCode];
String get byClinic => localizedValues['by-clinic'][locale.languageCode];
String get byHospital => localizedValues['by-hospital'][locale.languageCode];
String get name => localizedValues['name'][locale.languageCode]; String get name => localizedValues['name'][locale.languageCode];
String get doctor => localizedValues['doctor'][locale.languageCode]; String get doctor => localizedValues['doctor'][locale.languageCode];

@ -58,19 +58,19 @@ class LargeAvatar extends StatelessWidget {
onTap: disableProfileView ? null : onTap, onTap: disableProfileView ? null : onTap,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( // gradient: LinearGradient(
begin: Alignment(-1, -1), // begin: Alignment(-1, -1),
end: Alignment(1, 1), // end: Alignment(1, 1),
colors: [ // colors: [
Colors.grey[100], // Colors.grey[100],
Colors.grey[800], // Colors.grey[800],
]), // ]),
boxShadow: [ // boxShadow: [
BoxShadow( // BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.08), // color: Color.fromRGBO(0, 0, 0, 0.08),
offset: Offset(0.0, 5.0), // offset: Offset(0.0, 5.0),
blurRadius: 16.0) // blurRadius: 16.0)
], // ],
borderRadius: BorderRadius.all(Radius.circular(radius)), borderRadius: BorderRadius.all(Radius.circular(radius)),
), ),
width: width, width: width,

@ -1,29 +1,31 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/services/permission/permission_service.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class DefaultButton extends StatelessWidget { class DefaultButton extends StatelessWidget {
final String text; final String text;
final Function onPress; final Function onPress;
final Color textColor; final Color textColor;
final Color color; final Color color;
PermissionService permission = new PermissionService(); DefaultButton(this.text, this.onPress, {this.color, this.textColor = Colors.white});
DefaultButton(this.text, this.onPress, {this.color, this.textColor});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return SizedBox(
height: 60, height: 43,
child: RaisedButton( width: double.infinity,
shape: child: FlatButton(
RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), onPressed: () {
color: color != null ? color : Colors.grey[900], onPress();
textColor: color != null ? textColor : Colors.white, },
child: Text( child: Text(
this.text, text,
style: TextStyle(fontSize: SizeConfig.textMultiplier * 2), style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: textColor, letterSpacing: -0.48),
), ),
onPressed: () =>{ this.onPress(), })); // color: Color(0xffD02127),
color: color ?? const Color(0xffD02127),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
),
),
);
} }
} }

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -13,7 +14,7 @@ class DoctorCard extends StatelessWidget {
final String name; final String name;
final String subName; final String subName;
final double rat; final double rat;
final String date; final DateTime date;
final String profileUrl; final String profileUrl;
final String billNo; final String billNo;
final Function onTap; final Function onTap;
@ -21,177 +22,151 @@ class DoctorCard extends StatelessWidget {
final bool isInOutPatient; final bool isInOutPatient;
final bool isLiveCareAppointment; final bool isLiveCareAppointment;
DoctorCard( DoctorCard({this.name, this.subName, this.rat, this.date, this.profileUrl, this.billNo, this.onTap, this.onEmailTap, this.isInOutPatient, this.isLiveCareAppointment = false});
{this.name,
this.subName,
this.rat,
this.date,
this.profileUrl,
this.billNo,
this.onTap,
this.onEmailTap,
this.isInOutPatient,
this.isLiveCareAppointment = false});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
margin: EdgeInsets.all(10), height: 108,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(
width: 0.5,
color: Theme.of(context).primaryColor,
),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(8.0), Radius.circular(10.0),
), ),
boxShadow: [
BoxShadow(
color: Color(0x0000000D),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
],
color: Colors.white), color: Colors.white),
child: InkWell( child: InkWell(
onTap: onTap, onTap: onTap,
child: Column( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Row( Container(
children: <Widget>[ width: 16, // projectViewModel.isArabic ? 27 : 20,
Container( height: double.infinity,
width: projectViewModel.isArabic ? 27 : 20, alignment: Alignment.center,
height: date == null // height: date == null
? projectViewModel.isArabic // ? projectViewModel.isArabic
? 185 // ? 185
: 100 // : 100
: 180, // : 180,
decoration: BoxDecoration( decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545) //Colors.red[900] Color(0xff404545)
color: isLiveCareAppointment color: isLiveCareAppointment
? Color(0xff404545) ? Color(0xff404545)
: !isInOutPatient : !isInOutPatient
? Colors.red[900] ? Colors.red[900]
: Theme.of(context).primaryColor, : Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10),
? Radius.circular(0) bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10),
: Radius.circular(8), topRight: projectViewModel.isArabic ? Radius.circular(10) : Radius.circular(0),
bottomLeft: projectViewModel.isArabic bottomRight: projectViewModel.isArabic ? Radius.circular(10) : Radius.circular(0),
? Radius.circular(0)
: Radius.circular(8),
topRight: projectViewModel.isArabic
? Radius.circular(8)
: Radius.circular(0),
bottomRight: projectViewModel.isArabic
? Radius.circular(8)
: Radius.circular(0),
),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
isLiveCareAppointment
? TranslationBase.of(context)
.liveCare
.toUpperCase()
: !isInOutPatient
? TranslationBase.of(context)
.inPatient
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
), ),
Expanded( ),
child: Column( child: RotatedBox(
crossAxisAlignment: CrossAxisAlignment.start, quarterTurns: 3,
children: <Widget>[ child: Text(
Padding( isLiveCareAppointment
padding: const EdgeInsets.all(10.0), ? TranslationBase.of(context).liveCare.toUpperCase()
child: Row( : !isInOutPatient
children: <Widget>[ ? TranslationBase.of(context).inPatient.toUpperCase()
Expanded( : TranslationBase.of(context).outpatient.toUpperCase(),
flex: 1, style: TextStyle(fontSize: 10, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4, height: 16 / 10),
child: LargeAvatar( ),
name: name, ),
url: profileUrl, ),
), Expanded(
child: Padding(
padding: const EdgeInsets.only(left: 20, right: 12, top: 12, bottom: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Row(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
child: Text(
TranslationBase.of(context).dr + " " + name,
style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
),
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.formatDateToDate(date),
style: TextStyle(fontSize: 12, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
), ),
Expanded( Text(
flex: 4, DateUtil.formatDateToTime(date),
child: Container( style: TextStyle(fontSize: 12, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48, height: 18 / 12),
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
TranslationBase.of(context).dr +
" " +
name,
bold: true,
),
Texts(
subName,
),
if (billNo != null)
Row(
children: <Widget>[
Texts(
'${TranslationBase.of(context).billNo}: ',
),
Texts(
billNo,
)
],
),
if (rat != null)
StarRating(
totalAverage: rat, forceStars: true),
],
),
),
), ),
if (onEmailTap != null && projectViewModel.havePrivilege(17))
InkWell(
onTap: onEmailTap,
child: Icon(
Icons.email,
color: Theme.of(context).primaryColor,
),
),
], ],
)
],
),
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
LargeAvatar(
name: name,
url: profileUrl,
width: 48,
height: 48,
), ),
), SizedBox(width: 11),
if (date != null) Expanded(
Divider( child: Column(
height: 8, crossAxisAlignment: CrossAxisAlignment.start,
color: Colors.grey[400], mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
myRichText(TranslationBase.of(context).clinic + ":", subName),
myRichText(TranslationBase.of(context).billNo, billNo ?? ""),
//if (rat != null) StarRating(totalAverage: rat, forceStars: true),
],
),
), ),
if (date != null) if (onEmailTap != null && projectViewModel.havePrivilege(17))
Row( InkWell(
crossAxisAlignment: CrossAxisAlignment.center, onTap: onEmailTap,
children: <Widget>[ child: Icon(
Image.asset( Icons.email,
'assets/images/Icon-awesome-calendar.png', color: Theme.of(context).primaryColor,
width: 30,
height: 30,
), ),
Expanded( ),
child: Texts( ],
date, ),
variant: 'bodyText', ],
), ),
) ),
], )
)
],
),
)
],
),
], ],
), ),
), ),
); );
} }
Widget myRichText(String title, String value) {
return RichText(
text: TextSpan(
text: title,
style: TextStyle(fontSize: 10, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 18 / 10),
children: <TextSpan>[
TextSpan(
text: " $value",
style: TextStyle(fontSize: 12, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
)
]),
);
}
} }

@ -18,18 +18,12 @@ class AppExpandableNotifier extends StatefulWidget {
final bool isExpand; 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.isExpand = false});
{this.headerWidget,
this.bodyWidget,
this.title,
this.collapsed,
this.isExpand = false});
_AppExpandableNotifier createState() => _AppExpandableNotifier(); _AppExpandableNotifier createState() => _AppExpandableNotifier();
} }
class _AppExpandableNotifier extends State<AppExpandableNotifier> { class _AppExpandableNotifier extends State<AppExpandableNotifier> {
@override @override
void initState() { void initState() {
setState(() { setState(() {
@ -43,84 +37,60 @@ class _AppExpandableNotifier extends State<AppExpandableNotifier> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ExpandableNotifier( return ExpandableNotifier(
child: Padding( child: Column(
padding: const EdgeInsets.only(left: 10, right: 10, top: 4), children: <Widget>[
child: Card( SizedBox(
clipBehavior: Clip.antiAlias, child: widget.headerWidget,
child: Column( ),
children: <Widget>[ ScrollOnExpand(
SizedBox( scrollOnExpand: true,
child: widget.headerWidget, scrollOnCollapse: false,
child: ExpandablePanel(
hasIcon: false,
theme: const ExpandableThemeData(
headerAlignment: ExpandablePanelHeaderAlignment.center,
tapBodyToCollapse: true,
), ),
ScrollOnExpand( header: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
scrollOnExpand: true, Expanded(
scrollOnCollapse: false, child: Padding(
child: ExpandablePanel( padding: EdgeInsets.all(10),
hasIcon: false, child: Text(
theme: const ExpandableThemeData( widget.title ?? TranslationBase.of(context).details,
headerAlignment: ExpandablePanelHeaderAlignment.center, style: TextStyle(
tapBodyToCollapse: true, fontWeight: FontWeight.bold,
), fontSize: SizeConfig.textMultiplier * 2,
header: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Padding(
padding: EdgeInsets.all(10),
child: Text(
widget.title ?? TranslationBase.of(context).details,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2,
),
),
),
),
IconButton(
icon: new Container(
height: 28.0,
width: 30.0,
decoration: new BoxDecoration(
color: secondaryColor,
shape: BoxShape.circle,
),
child: new Center(
child: new Icon(
widget.expandFlag
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.white,
size: 30.0,
),
),
),
onPressed: () {
setState(() {
widget.expandFlag = !widget.expandFlag;
widget.controller.expanded = widget.expandFlag;
});
}),
]),
collapsed: widget.collapsed ?? Container(),
expanded: widget.bodyWidget,
builder: (_, collapsed, expanded) {
return Padding(
padding: EdgeInsets.only(left: 5, right: 5, bottom: 5),
child: Expandable(
controller: widget.controller,
collapsed: collapsed,
expanded: expanded,
theme: const ExpandableThemeData(crossFadePoint: 0),
), ),
); ),
}, ),
), ),
), IconButton(
], icon: Icon(
widget.expandFlag ? Icons.remove : Icons.add,
color: Color(0xff2E303A),
// size: 30.0,
),
onPressed: () {
setState(() {
widget.expandFlag = !widget.expandFlag;
widget.controller.expanded = widget.expandFlag;
});
}),
]),
collapsed: widget.collapsed ?? Container(),
expanded: widget.bodyWidget,
builder: (_, collapsed, expanded) {
return Expandable(
controller: widget.controller,
collapsed: collapsed,
expanded: expanded,
theme: const ExpandableThemeData(crossFadePoint: 0),
);
},
),
), ),
), ],
), ),
); );
} }

@ -161,7 +161,7 @@ class NewAppBarWidget extends StatelessWidget with PreferredSizeWidget {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppBar( return AppBar(
elevation: 0, elevation: 0,
backgroundColor: Colors.transparent, backgroundColor: showTitle ? Colors.white : Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
title: Row( title: Row(
children: [ children: [

Loading…
Cancel
Save