|
|
|
@ -54,77 +54,86 @@ class _MasterKeyCheckboxSearchWidgetState extends State<MasterKeyCheckboxSearchW
|
|
|
|
|
return Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.62,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding:EdgeInsets.all(20),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: ListView(
|
|
|
|
|
children: [
|
|
|
|
|
TextFields(
|
|
|
|
|
hintText: widget.hintSearchText ?? TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.searchHistory,
|
|
|
|
|
suffixIcon: EvaIcons.search,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
filterSearchResults(value);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 15,),
|
|
|
|
|
Column(
|
|
|
|
|
children: items.map((historyInfo) {
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.62,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: ListView(
|
|
|
|
|
children: [
|
|
|
|
|
TextFields(
|
|
|
|
|
hintText: widget.hintSearchText ?? TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.searchHistory,
|
|
|
|
|
borderWidth: 0.0,
|
|
|
|
|
padding: EdgeInsets.all(20),
|
|
|
|
|
borderRadius: 0,
|
|
|
|
|
suffixIcon: EvaIcons.search,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
filterSearchResults(value);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
// SizedBox(height: 15,),
|
|
|
|
|
DividerWithSpacesAround(),
|
|
|
|
|
Container(
|
|
|
|
|
// padding:EdgeInsets.all(20),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: items.map((historyInfo) {
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value:
|
|
|
|
|
widget.isServiceSelected(historyInfo),
|
|
|
|
|
activeColor: Colors.red[800],
|
|
|
|
|
onChanged: (bool newValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (widget
|
|
|
|
|
.isServiceSelected(historyInfo)) {
|
|
|
|
|
widget.removeHistory(historyInfo);
|
|
|
|
|
} else {
|
|
|
|
|
widget.addHistory(historyInfo);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(
|
|
|
|
|
horizontal: 10, vertical: 0),
|
|
|
|
|
child: AppText(projectViewModel.isArabic
|
|
|
|
|
? historyInfo.nameAr!=""?historyInfo.nameAr:historyInfo.nameEn
|
|
|
|
|
: historyInfo.nameEn,
|
|
|
|
|
color: Color(0xFF575757),
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
fontWeight:FontWeight.w600,
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value:
|
|
|
|
|
widget.isServiceSelected(historyInfo),
|
|
|
|
|
activeColor: Colors.red[800],
|
|
|
|
|
onChanged: (bool newValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (widget
|
|
|
|
|
.isServiceSelected(historyInfo)) {
|
|
|
|
|
widget.removeHistory(historyInfo);
|
|
|
|
|
} else {
|
|
|
|
|
widget.addHistory(historyInfo);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(
|
|
|
|
|
horizontal: 10, vertical: 0),
|
|
|
|
|
child: AppText(projectViewModel.isArabic
|
|
|
|
|
? historyInfo.nameAr!=""?historyInfo.nameAr:historyInfo.nameEn
|
|
|
|
|
: historyInfo.nameEn,
|
|
|
|
|
color: Color(0xFF575757),
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
fontWeight:FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
// DividerWithSpacesAround(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
// DividerWithSpacesAround(),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
if (widget.model.state == ViewState.Idle)
|
|
|
|
|
AppButton(
|
|
|
|
|
title: widget.buttonName?? TranslationBase.of(context).addSelectedHistories.toUpperCase(),
|
|
|
|
|
title: widget.buttonName?? TranslationBase.of(context).addSelectedHistories,
|
|
|
|
|
padding: 10,
|
|
|
|
|
color: Color(0xFF359846),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
widget.addSelectedHistories();
|
|
|
|
|
},
|
|
|
|
|