Merge branch 'soap_new_design' into 'development'

Soap new design

See merge request Cloud_Solution/doctor_app_flutter!444
merge-requests/445/merge
Mohammad Aljammal 5 years ago
commit 4af6e45c97

@ -517,7 +517,7 @@ const Map<String, Map<String, String>> localizedValues = {
'addHistory': {'en': "Add History", 'ar': "اضافه تاريخ مرضي"}, 'addHistory': {'en': "Add History", 'ar': "اضافه تاريخ مرضي"},
'searchHistory': {'en': "Search History", 'ar': " البحث"}, 'searchHistory': {'en': "Search History", 'ar': " البحث"},
'addSelectedHistories': { 'addSelectedHistories': {
'en': "add selected histories", 'en': "Add Selected Histories",
'ar': " اضافه تاريخ مرضي" 'ar': " اضافه تاريخ مرضي"
}, },
'addAllergies': {'en': "Add Allergies", 'ar': "أضف الحساسية"}, 'addAllergies': {'en': "Add Allergies", 'ar': "أضف الحساسية"},
@ -829,6 +829,8 @@ const Map<String, Map<String, String>> localizedValues = {
"typeHereToReply": { "typeHereToReply": {
"en": "Type here to reply", "en": "Type here to reply",
"ar": "اكتب هنا للرد" "ar": "اكتب هنا للرد"
},"remove": {
"en": "Remove",
"ar": "حذف"
}, },
"remove": {"en": "Remove", "ar": " حذف"},
}; };

@ -11,9 +11,10 @@ class ExpandableSOAPWidget extends StatelessWidget {
final Widget child; final Widget child;
final Function onTap; final Function onTap;
final headerTitle; final headerTitle;
final bool isRequired;
const ExpandableSOAPWidget( const ExpandableSOAPWidget(
{Key key, this.isExpanded, this.child, this.onTap, this.headerTitle}) {Key key, this.isExpanded, this.child, this.onTap, this.headerTitle, this.isRequired= true})
: super(key: key); : super(key: key);
@override @override
@ -37,9 +38,10 @@ class ExpandableSOAPWidget extends StatelessWidget {
children: [ children: [
Texts(headerTitle, Texts(headerTitle,
variant: isExpanded ? "bodyText" : '', variant: isExpanded ? "bodyText" : '',
bold: isExpanded ? true : false, // bold: isExpanded ? true : false,
fontSize: 15, fontSize: 15,
color: Colors.black), color: Colors.black),
if(isRequired)
Icon( Icon(
FontAwesomeIcons.asterisk, FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor, color: AppGlobal.appPrimaryColor,

@ -0,0 +1,93 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class PriorityBar extends StatefulWidget {
final Function onTap;
const PriorityBar({Key key, this.onTap}) : super(key: key);
@override
_PriorityBarState createState() => _PriorityBarState();
}
class _PriorityBarState extends State<PriorityBar> {
int _activePriority = 0;
int index = -1;
List<String> _priorities = [
"Family",
"Surgical/Sports",
"Medical",
];
List<String> _prioritiesAr = [
"أسرة",
"جراحي / رياضي",
"طبي",
];
BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor) {
return BoxDecoration();
}
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
height: screenSize.height * 0.080,
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _priorities.map((
item,
) {
bool _isActive = _priorities[_activePriority] == item ? true : false;
if (index < 2) {
index++;
}
return Expanded(
child: InkWell(
child: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
height: screenSize.height * 0.070,
decoration: containerBorderDecoration(
_isActive ? HexColor("#B8382B") : Colors.white,
_isActive ? HexColor("#B8382B") : Colors.white),
child: Center(
child: Text(
(projectViewModel.isArabic)
? _prioritiesAr[index]
: item,
style: TextStyle(
fontSize: 15,
color: Colors.black, //Colors.black,
fontWeight: FontWeight.bold,
),
),
),
),
if(_isActive)
Container(width: 120,height: 4,color: AppGlobal.appPrimaryColor,)
],
),
),
onTap: () {
widget.onTap(_priorities.indexOf(item));
setState(() {
_activePriority = _priorities.indexOf(item);
});
}),
);
}).toList(),
),
);
}
}

@ -1,5 +1,4 @@
import 'package:autocomplete_textfield/autocomplete_textfield.dart'; import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -17,6 +16,7 @@ import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dar
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../custom_validation_error.dart'; import '../custom_validation_error.dart';
@ -41,21 +41,21 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
margin: EdgeInsets.only(left: 10, right: 10, top: 15), margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields( child: TextFields(
hintText: TranslationBase.of(context).addAllergies, hintText: TranslationBase.of(context).addAllergies,
borderColor: HexColor('#707070'),
borderWidth: 0.30,
fontSize: 13.5, fontSize: 13.5,
borderRadius: 12,
onTapTextFields: () { onTapTextFields: () {
openAllergiesList(context); openAllergiesList(context);
}, },
readOnly: true, readOnly: true,
// hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline, suffixIcon: EvaIcons.plusCircleOutline,
suffixIconColor: AppGlobal.appPrimaryColor, suffixIconColor: Color(0xFF2B353E),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
// controller: messageController, // controller: messageController,
validator: (value) { validator: (value) {
if (value == null) if (value == null)
return TranslationBase return TranslationBase.of(context).emptyMessage;
.of(context)
.emptyMessage;
else else
return null; return null;
}), }),
@ -80,37 +80,60 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
child: Texts( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
projectViewModel.isArabic projectViewModel.isArabic
? selectedAllergy.selectedAllergy.nameAr ? selectedAllergy.selectedAllergy.nameAr
: selectedAllergy.selectedAllergy.nameEn : selectedAllergy.selectedAllergy.nameEn
.toUpperCase(), .toUpperCase(),
variant: "bodyText", // variant: "bodyText",
textDecoration: selectedAllergy.isChecked textDecoration: selectedAllergy.isChecked
? null ? null
: TextDecoration.lineThrough, : TextDecoration.lineThrough,
bold: true, bold: true,
color: Colors.black), color: Color(0xFF2B353E)),
width: MediaQuery.of(context).size.width * 0.5,
),
Texts( Texts(
projectViewModel.isArabic projectViewModel.isArabic
? selectedAllergy.selectedAllergySeverity.nameAr ? selectedAllergy.selectedAllergySeverity
: selectedAllergy.selectedAllergySeverity.nameEn .nameAr
: selectedAllergy.selectedAllergySeverity
.nameEn
.toUpperCase(), .toUpperCase(),
variant: "bodyText", // variant: "bodyText",
textDecoration: selectedAllergy.isChecked textDecoration: selectedAllergy.isChecked
? null ? null
: TextDecoration.lineThrough, : TextDecoration.lineThrough,
bold: true, // bold: true,
color: AppGlobal.appPrimaryColor), color: Color(0xFFCC9B14)),
],
),
width: MediaQuery
.of(context)
.size
.width * 0.5,
),
if (selectedAllergy.isChecked) if (selectedAllergy.isChecked)
InkWell( InkWell(
child: Icon( child: Row(
FontAwesomeIcons.trash, children: [Container(
color: Colors.grey, child: Texts(
TranslationBase
.of(context)
.remove,
fontSize: 15,
variant: "bodyText",
color: HexColor("#B8382C"),),
),
Icon(
FontAwesomeIcons.times,
color: HexColor("#B8382C"),
size: 20, size: 20,
), ),
],
),
onTap: () => removeAllergy(selectedAllergy), onTap: () => removeAllergy(selectedAllergy),
) )
], ],
@ -119,14 +142,6 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
padding: const EdgeInsets.symmetric(vertical: 8), padding: const EdgeInsets.symmetric(vertical: 8),
child: Row( child: Row(
children: [ children: [
AppText(
selectedAllergy.remark != null &&
selectedAllergy.remark != ''
? TranslationBase.of(context).remarks + " : "
: '',
fontWeight: FontWeight.bold,
fontSize: 13,
),
Container( Container(
width: MediaQuery.of(context).size.width * 0.55, width: MediaQuery.of(context).size.width * 0.55,
child: AppText( child: AppText(

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -17,6 +17,8 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'PriorityBar.dart';
class UpdateHistoryWidget extends StatefulWidget { class UpdateHistoryWidget extends StatefulWidget {
final List<MySelectedHistory> myHistoryList; final List<MySelectedHistory> myHistoryList;
@ -51,20 +53,21 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
margin: EdgeInsets.only(left: 10, right: 10, top: 15), margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields( child: TextFields(
hintText: TranslationBase.of(context).addHistory, hintText: TranslationBase.of(context).addHistory,
borderColor: HexColor('#707070'),
borderWidth: 0.30,
fontSize: 13.5, fontSize: 13.5,
borderRadius: 12,
onTapTextFields: () { onTapTextFields: () {
openHistoryList(context); openHistoryList(context);
}, },
readOnly: true,
// hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline, suffixIcon: EvaIcons.plusCircleOutline,
suffixIconColor: AppGlobal.appPrimaryColor, suffixIconColor: Color(0xFF2B353E),
readOnly: true,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
// controller: messageController, // controller: messageController,
validator: (value) { validator: (value) {
if (value == null) if (value == null)
return TranslationBase.of(context) return TranslationBase.of(context).emptyMessage;
.emptyMessage;
else else
return null; return null;
}), }),
@ -87,20 +90,41 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
projectViewModel.isArabic projectViewModel.isArabic
? myHistory.selectedHistory.nameAr ? myHistory.selectedHistory.nameAr
: myHistory.selectedHistory.nameEn, : myHistory.selectedHistory.nameEn,
variant: "bodyText", fontSize: 15,
textDecoration: myHistory.isChecked textDecoration: myHistory.isChecked
? null ? null
: TextDecoration.lineThrough, : TextDecoration.lineThrough,
bold: true, // bold: true,
color: Colors.black), color: Colors.black),
width: MediaQuery.of(context).size.width * 0.7, width: MediaQuery
.of(context)
.size
.width * 0.5,
), ),
if (myHistory.isChecked) if (myHistory.isChecked)
InkWell( InkWell(
child: Icon( child: Row(
FontAwesomeIcons.trash, children: [
color: Colors.grey, Container(
size: 20, child: Texts(
TranslationBase
.of(context)
.remove,
fontSize: 15,
variant: "bodyText",
textDecoration: myHistory.isChecked
? null
: TextDecoration.lineThrough,
// bold: true,
color: HexColor("#B8382C"),),
// width: MediaQuery.of(context).size.width * 0.3,
),
Icon(
FontAwesomeIcons.times,
color: HexColor("#B8382C"),
size: 17,
),
],
), ),
onTap: () => removeHistory(myHistory.selectedHistory), onTap: () => removeHistory(myHistory.selectedHistory),
) )
@ -142,10 +166,13 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
openHistoryList(BuildContext context) { openHistoryList(BuildContext context) {
showModalBottomSheet( showModalBottomSheet(
backgroundColor: Colors.white, backgroundColor: Colors.white,
isDismissible: false,
isScrollControlled: true, isScrollControlled: true,
context: context, context: context,
builder: (context) { builder: (context) {
return AddHistoryDialog( return FractionallySizedBox(
heightFactor: 1,
child: AddHistoryDialog(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
controller: _controller, controller: _controller,
myHistoryList: widget.myHistoryList, myHistoryList: widget.myHistoryList,
@ -155,98 +182,13 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
}); });
}, },
removeHistory: (masterKey) => removeHistory(masterKey), removeHistory: (masterKey) => removeHistory(masterKey),
),
); );
}); });
} }
} }
class PriorityBar extends StatefulWidget {
final Function onTap;
const PriorityBar({Key key, this.onTap}) : super(key: key);
@override
_PriorityBarState createState() => _PriorityBarState();
}
class _PriorityBarState extends State<PriorityBar> {
int _activePriority = 0;
int index =-1;
List<String> _priorities = [
"Family",
"Surgical/Sports",
"Medical",
];
List<String> _prioritiesAr = [
"أسرة",
"جراحي / رياضي" ,
"طبي",
];
BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor) {
return BoxDecoration(
color: containerColor,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(6)),
border: Border.fromBorderSide(BorderSide(
color: borderColor,
width: 2.0,
)),
);
}
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
height: screenSize.height * 0.070,
decoration:
containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _priorities.map((item,) {
bool _isActive = _priorities[_activePriority] == item ? true : false;
if(index <2){
index++;
}
return Expanded(
child: InkWell(
child: Center(
child: Container(
height: screenSize.height * 0.070,
decoration: containerBorderDecoration(
_isActive ? HexColor("#B8382B") : Colors.white,
_isActive ? HexColor("#B8382B") : Colors.white),
child: Center(
child: Text(
(projectViewModel.isArabic)?_prioritiesAr[index]: item,
style: TextStyle(
fontSize: 12,
color: _isActive
? Colors.white
: Colors.black, //Colors.black,
fontWeight: FontWeight.bold,
),
),
)),
),
onTap: () {
widget.onTap(_priorities.indexOf(item));
setState(() {
_activePriority = _priorities.indexOf(item);
});
}),
);
}).toList(),
),
);
}
}
class AddHistoryDialog extends StatefulWidget { class AddHistoryDialog extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
@ -267,7 +209,7 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FractionallySizedBox( return FractionallySizedBox(
heightFactor: 0.7, heightFactor: 1,
child: BaseView<SOAPViewModel>( child: BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
if (model.historyFamilyList.length == 0) { if (model.historyFamilyList.length == 0) {
@ -288,10 +230,54 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
isShowAppBar: false, isShowAppBar: false,
body: Center( body: Center(
child: Container( child: Container(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column( child: Column(
children: [ children: [
Container(
padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration(
color: Colors.white,
),
height: 115,
child: Container(
padding: EdgeInsets.only(
left: 10, right: 10),
margin: EdgeInsets.only(top: 40),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
RichText(
text: TextSpan(
style: TextStyle(
fontSize:20,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).addHistory,
style: TextStyle(
color: Color(0xFF2B353E),
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 20)),
],
),
),
InkWell(
onTap: () {
Navigator.pop(context);
},
child: Icon(FontAwesomeIcons.times,
size: 30,
color: Color(0xFF2B353E)))
],
),
],
),
),
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
@ -302,6 +288,8 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
height: 20, height: 20,
), ),
Expanded( Expanded(
child: FractionallySizedBox(
widthFactor: 0.9,
child: PageView( child: PageView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: widget.controller, controller: widget.controller,
@ -381,8 +369,8 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
], ],
), ),
), ),
],
), ),
],
)), )),
), ),
), ),

@ -263,6 +263,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
headerTitle: TranslationBase headerTitle: TranslationBase
.of(context) .of(context)
.histories, .histories,
isRequired: false,
onTap: () { onTap: () {
setState(() { setState(() {
isHistoryExpand = !isHistoryExpand; isHistoryExpand = !isHistoryExpand;
@ -285,6 +286,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
.of(context) .of(context)
.allergiesSoap .allergiesSoap
, ,
isRequired: false,
onTap: () { onTap: () {
setState(() { setState(() {
isAllergiesExpand = !isAllergiesExpand; isAllergiesExpand = !isAllergiesExpand;
@ -337,6 +339,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
title: TranslationBase title: TranslationBase
.of(context) .of(context)
.next, .next,
fontWeight: FontWeight.bold,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onPressed: () async { onPressed: () async {
addSubjectiveInfo( addSubjectiveInfo(

@ -9,13 +9,13 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart';
import 'file:///C:/Users/admin/AndroidStudioProjects/doctor_app_flutter/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_plan_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_plan_page.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../patient-profile-header-new-design.dart'; import '../patient-profile-header-new-design.dart';
import 'objective/update_objective_page.dart';
class UpdateSoapIndex extends StatefulWidget { class UpdateSoapIndex extends StatefulWidget {
final bool isUpdate; final bool isUpdate;

@ -75,7 +75,7 @@ class _AppButtonState extends State<AppButton> {
), ),
) )
: AppText( : AppText(
widget.title.toUpperCase(), widget.title,
color: widget.fontColor, color: widget.fontColor,
fontSize: SizeConfig.textMultiplier * widget.fontSize, fontSize: SizeConfig.textMultiplier * widget.fontSize,
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,

@ -13,6 +13,8 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'app_texts_widget.dart';
class MasterKeyCheckboxSearchWidget extends StatefulWidget { class MasterKeyCheckboxSearchWidget extends StatefulWidget {
final SOAPViewModel model; final SOAPViewModel model;
final Function addSelectedHistories; final Function addSelectedHistories;
@ -49,15 +51,14 @@ class _MasterKeyCheckboxSearchWidgetState extends State<MasterKeyCheckboxSearchW
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
child: Column( child: Column(
children: [ children: [
Container( Expanded(
height: MediaQuery.of(context).size.height * 0.5, child: Container(
height: MediaQuery.of(context).size.height * 0.62,
child: Center( child: Center(
child: Container( child: Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
color: Colors.white), color: Colors.white),
@ -67,17 +68,36 @@ class _MasterKeyCheckboxSearchWidgetState extends State<MasterKeyCheckboxSearchW
hintText: widget.hintSearchText ?? TranslationBase hintText: widget.hintSearchText ?? TranslationBase
.of(context) .of(context)
.searchHistory, .searchHistory,
borderWidth: 0.0,
padding: EdgeInsets.all(20),
borderRadius: 0,
suffixIcon: EvaIcons.search, suffixIcon: EvaIcons.search,
onChanged: (value) { onChanged: (value) {
filterSearchResults(value); filterSearchResults(value);
}, },
), ),
SizedBox(height: 15,), // SizedBox(height: 15,),
Column( DividerWithSpacesAround(),
Container(
// padding:EdgeInsets.all(20),
child: Column(
children: items.map((historyInfo) { children: items.map((historyInfo) {
return Column( return Column(
children: [ children: [
Row( InkWell(
onTap:(){
setState(() {
if (widget
.isServiceSelected(historyInfo)) {
widget.removeHistory(historyInfo);
} else {
widget.addHistory(historyInfo);
}
});
},
child: Row(
children: [ children: [
Checkbox( Checkbox(
value: value:
@ -97,32 +117,37 @@ class _MasterKeyCheckboxSearchWidgetState extends State<MasterKeyCheckboxSearchW
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 10, vertical: 0), horizontal: 10, vertical: 0),
child: Texts(projectViewModel.isArabic child: AppText(projectViewModel.isArabic
? historyInfo.nameAr!=""?historyInfo.nameAr:historyInfo.nameEn ? historyInfo.nameAr!=""?historyInfo.nameAr:historyInfo.nameEn
: historyInfo.nameEn, : historyInfo.nameEn,
variant: "bodyText", color: Color(0xFF575757),
bold: true, fontSize: 16,
color: Colors.black), fontWeight:FontWeight.w600,
),
), ),
), ),
], ],
), ),
DividerWithSpacesAround(), ),
// DividerWithSpacesAround(),
], ],
); );
}).toList(), }).toList(),
), ),
),
], ],
), ),
)), )),
), ),
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
if (widget.model.state == ViewState.Idle) if (widget.model.state == ViewState.Idle)
AppButton( AppButton(
title: widget.buttonName?? TranslationBase.of(context).addSelectedHistories.toUpperCase(), title: widget.buttonName?? TranslationBase.of(context).addSelectedHistories,
padding: 10, padding: 10,
color: Color(0xFF359846),
onPressed: () { onPressed: () {
widget.addSelectedHistories(); widget.addSelectedHistories();
}, },

Loading…
Cancel
Save