|
|
|
|
@ -26,8 +26,7 @@ class ParentCategorisePage extends StatefulWidget {
|
|
|
|
|
ParentCategorisePage({this.id, this.titleName});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_ParentCategorisePageState createState() =>
|
|
|
|
|
_ParentCategorisePageState(id: id, titleName: titleName);
|
|
|
|
|
_ParentCategorisePageState createState() => _ParentCategorisePageState(id: id, titleName: titleName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
@ -58,9 +57,7 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
return BaseView<PharmacyCategoriseViewModel>(
|
|
|
|
|
onModelReady: (model) => model.getCategoriseParent(i: id),
|
|
|
|
|
builder: (BuildContext context, PharmacyCategoriseViewModel model,
|
|
|
|
|
Widget child) =>
|
|
|
|
|
PharmacyAppScaffold(
|
|
|
|
|
builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget child) => PharmacyAppScaffold(
|
|
|
|
|
appBarTitle: titleName,
|
|
|
|
|
isBottomBar: false,
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
@ -111,8 +108,7 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
child: InkWell(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Texts(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.viewCategorise,
|
|
|
|
|
TranslationBase.of(context).viewCategorise,
|
|
|
|
|
// 'View All Categories',
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
),
|
|
|
|
|
@ -130,37 +126,22 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
scrollDirection:
|
|
|
|
|
Axis.vertical,
|
|
|
|
|
itemCount: model
|
|
|
|
|
.categoriseParent.length,
|
|
|
|
|
itemBuilder:
|
|
|
|
|
(BuildContext context,
|
|
|
|
|
int index) {
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
itemCount: model.categoriseParent.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return Container(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.all(4.0),
|
|
|
|
|
padding: EdgeInsets.all(4.0),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment
|
|
|
|
|
.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(projectViewModel
|
|
|
|
|
.isArabic
|
|
|
|
|
? model
|
|
|
|
|
.categoriseParent[
|
|
|
|
|
index]
|
|
|
|
|
.namen
|
|
|
|
|
: model
|
|
|
|
|
.categoriseParent[
|
|
|
|
|
index]
|
|
|
|
|
.name),
|
|
|
|
|
Texts(projectViewModel.isArabic
|
|
|
|
|
? model.categoriseParent[index].namen
|
|
|
|
|
: model.categoriseParent[index].name),
|
|
|
|
|
Divider(
|
|
|
|
|
thickness: 0.6,
|
|
|
|
|
color: Colors
|
|
|
|
|
.black12,
|
|
|
|
|
color: Colors.black12,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -168,16 +149,9 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page:
|
|
|
|
|
SubCategorisePage(
|
|
|
|
|
title: model
|
|
|
|
|
.categoriseParent[
|
|
|
|
|
index]
|
|
|
|
|
.name,
|
|
|
|
|
id: model
|
|
|
|
|
.categoriseParent[
|
|
|
|
|
index]
|
|
|
|
|
.id,
|
|
|
|
|
page: SubCategorisePage(
|
|
|
|
|
title: model.categoriseParent[index].name,
|
|
|
|
|
id: model.categoriseParent[index].id,
|
|
|
|
|
parentId: id,
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
@ -211,28 +185,22 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
child: Center(
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
itemCount: model.categoriseParent.length > 8
|
|
|
|
|
? 8
|
|
|
|
|
: model.categoriseParent.length,
|
|
|
|
|
itemCount: model.categoriseParent.length > 8 ? 8 : model.categoriseParent.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.symmetric(horizontal: 8.0),
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 8.0),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
|
horizontal: 13.0),
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 13.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 60.0,
|
|
|
|
|
width: 65.0,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
|
color: Colors.orange.shade200
|
|
|
|
|
.withOpacity(0.45),
|
|
|
|
|
color: Colors.orange.shade200.withOpacity(0.45),
|
|
|
|
|
),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Icon(
|
|
|
|
|
@ -266,10 +234,8 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: SubCategorisePage(
|
|
|
|
|
title: model
|
|
|
|
|
.categoriseParent[index].name,
|
|
|
|
|
id: model
|
|
|
|
|
.categoriseParent[index].id,
|
|
|
|
|
title: model.categoriseParent[index].name,
|
|
|
|
|
id: model.categoriseParent[index].id,
|
|
|
|
|
parentId: id,
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
@ -315,21 +281,16 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
initialChildSize: 0.95,
|
|
|
|
|
maxChildSize: 0.95,
|
|
|
|
|
minChildSize: 0.9,
|
|
|
|
|
builder: (BuildContext context,
|
|
|
|
|
ScrollController scrollController) {
|
|
|
|
|
builder: (BuildContext context, ScrollController scrollController) {
|
|
|
|
|
return SingleChildScrollView(
|
|
|
|
|
controller: scrollController,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
1.95,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 1.95,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.all(8.0),
|
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Icon(
|
|
|
|
|
@ -340,8 +301,7 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
'Refine',
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.w600,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 250.0,
|
|
|
|
|
@ -350,13 +310,11 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
child: Texts(
|
|
|
|
|
'Close',
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.w600,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.pop(
|
|
|
|
|
context);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -369,37 +327,27 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
ExpansionTile(
|
|
|
|
|
title:
|
|
|
|
|
Texts('Categorise'),
|
|
|
|
|
title: Texts('Categorise'),
|
|
|
|
|
children: [
|
|
|
|
|
ProcedureListWidget(
|
|
|
|
|
model: model,
|
|
|
|
|
masterList: model
|
|
|
|
|
.categoriseParent,
|
|
|
|
|
removeHistory:
|
|
|
|
|
(item) {
|
|
|
|
|
masterList: model.categoriseParent,
|
|
|
|
|
removeHistory: (item) {
|
|
|
|
|
setState(() {
|
|
|
|
|
entityList
|
|
|
|
|
.remove(
|
|
|
|
|
item);
|
|
|
|
|
entityList.remove(item);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addHistory:
|
|
|
|
|
(history) {
|
|
|
|
|
addHistory: (history) {
|
|
|
|
|
setState(() {
|
|
|
|
|
entityList.add(
|
|
|
|
|
history);
|
|
|
|
|
entityList.add(history);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addSelectedHistories:
|
|
|
|
|
() {
|
|
|
|
|
addSelectedHistories: () {
|
|
|
|
|
//TODO build your fun herr
|
|
|
|
|
// widget.addSelectedHistories();
|
|
|
|
|
},
|
|
|
|
|
isEntityListSelected:
|
|
|
|
|
(master) =>
|
|
|
|
|
isEntityListSelected(
|
|
|
|
|
master),
|
|
|
|
|
isEntityListSelected: (master) =>
|
|
|
|
|
isEntityListSelected(master),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -412,33 +360,23 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
children: [
|
|
|
|
|
ProcedureListWidget(
|
|
|
|
|
model: model,
|
|
|
|
|
masterList: model
|
|
|
|
|
.brandsList,
|
|
|
|
|
removeHistory:
|
|
|
|
|
(item) {
|
|
|
|
|
masterList: model.brandsList,
|
|
|
|
|
removeHistory: (item) {
|
|
|
|
|
setState(() {
|
|
|
|
|
entityListBrands
|
|
|
|
|
.remove(
|
|
|
|
|
item);
|
|
|
|
|
entityListBrands.remove(item);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addHistory:
|
|
|
|
|
(history) {
|
|
|
|
|
addHistory: (history) {
|
|
|
|
|
setState(() {
|
|
|
|
|
entityListBrands
|
|
|
|
|
.add(
|
|
|
|
|
history);
|
|
|
|
|
entityListBrands.add(history);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addSelectedHistories:
|
|
|
|
|
() {
|
|
|
|
|
addSelectedHistories: () {
|
|
|
|
|
//TODO build your fun herr
|
|
|
|
|
// widget.addSelectedHistories();
|
|
|
|
|
},
|
|
|
|
|
isEntityListSelected:
|
|
|
|
|
(master) =>
|
|
|
|
|
isEntityListSelectedBrands(
|
|
|
|
|
master),
|
|
|
|
|
isEntityListSelected: (master) =>
|
|
|
|
|
isEntityListSelectedBrands(master),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -450,63 +388,40 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
title: Texts('Price'),
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
color: Color(
|
|
|
|
|
0xffEEEEEE),
|
|
|
|
|
color: Color(0xffEEEEEE),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.spaceAround,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
'Min'),
|
|
|
|
|
Texts('Min'),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors
|
|
|
|
|
.white,
|
|
|
|
|
width:
|
|
|
|
|
200,
|
|
|
|
|
height:
|
|
|
|
|
40,
|
|
|
|
|
child:
|
|
|
|
|
TextFormField(
|
|
|
|
|
decoration:
|
|
|
|
|
InputDecoration(
|
|
|
|
|
border:
|
|
|
|
|
OutlineInputBorder(),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
width: 200,
|
|
|
|
|
height: 40,
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
border: OutlineInputBorder(),
|
|
|
|
|
),
|
|
|
|
|
controller:
|
|
|
|
|
minField,
|
|
|
|
|
controller: minField,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
'Max'),
|
|
|
|
|
Texts('Max'),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors
|
|
|
|
|
.white,
|
|
|
|
|
width:
|
|
|
|
|
200,
|
|
|
|
|
height:
|
|
|
|
|
40,
|
|
|
|
|
child:
|
|
|
|
|
TextFormField(
|
|
|
|
|
decoration:
|
|
|
|
|
InputDecoration(
|
|
|
|
|
border:
|
|
|
|
|
OutlineInputBorder(),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
width: 200,
|
|
|
|
|
height: 40,
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
border: OutlineInputBorder(),
|
|
|
|
|
),
|
|
|
|
|
controller:
|
|
|
|
|
maxField,
|
|
|
|
|
controller: maxField,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -521,26 +436,18 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
color: Colors.black12,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: MediaQuery.of(
|
|
|
|
|
context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.4,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.4,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.all(8.0),
|
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.spaceEvenly,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 100,
|
|
|
|
|
child: Button(
|
|
|
|
|
label: 'Reset',
|
|
|
|
|
backgroundColor:
|
|
|
|
|
Colors.red,
|
|
|
|
|
backgroundColor: Colors.red,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
@ -549,65 +456,38 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
Container(
|
|
|
|
|
width: 200,
|
|
|
|
|
child: Button(
|
|
|
|
|
onTap:
|
|
|
|
|
() async {
|
|
|
|
|
String
|
|
|
|
|
categoriesId =
|
|
|
|
|
"";
|
|
|
|
|
for (CategoriseParentModel category
|
|
|
|
|
in entityList) {
|
|
|
|
|
if (categoriesId ==
|
|
|
|
|
"") {
|
|
|
|
|
categoriesId =
|
|
|
|
|
category
|
|
|
|
|
.id;
|
|
|
|
|
onTap: () async {
|
|
|
|
|
String categoriesId = "";
|
|
|
|
|
for (CategoriseParentModel category in entityList) {
|
|
|
|
|
if (categoriesId == "") {
|
|
|
|
|
categoriesId = category.id;
|
|
|
|
|
} else {
|
|
|
|
|
categoriesId =
|
|
|
|
|
"$categoriesId,${category.id}";
|
|
|
|
|
categoriesId = "$categoriesId,${category.id}";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String
|
|
|
|
|
brandIds =
|
|
|
|
|
"";
|
|
|
|
|
String brandIds = "";
|
|
|
|
|
for (CategoriseParentModel brand
|
|
|
|
|
in entityListBrands) {
|
|
|
|
|
if (brandIds ==
|
|
|
|
|
"") {
|
|
|
|
|
brandIds =
|
|
|
|
|
brand
|
|
|
|
|
.id;
|
|
|
|
|
if (brandIds == "") {
|
|
|
|
|
brandIds = brand.id;
|
|
|
|
|
} else {
|
|
|
|
|
brandIds =
|
|
|
|
|
"$brandIds,${brand.id}";
|
|
|
|
|
brandIds = "$brandIds,${brand.id}";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GifLoaderDialogUtils
|
|
|
|
|
.showMyDialog(
|
|
|
|
|
context);
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
|
|
|
|
|
await model.getFilteredProducts(
|
|
|
|
|
min: minField
|
|
|
|
|
.text
|
|
|
|
|
.toString(),
|
|
|
|
|
max: maxField
|
|
|
|
|
.text
|
|
|
|
|
.toString(),
|
|
|
|
|
categoryId:
|
|
|
|
|
categoriesId,
|
|
|
|
|
brandId:
|
|
|
|
|
brandIds);
|
|
|
|
|
GifLoaderDialogUtils
|
|
|
|
|
.hideDialog(
|
|
|
|
|
context);
|
|
|
|
|
min: minField.text.toString(),
|
|
|
|
|
max: maxField.text.toString(),
|
|
|
|
|
categoryId: categoriesId,
|
|
|
|
|
brandId: brandIds);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|
|
|
|
|
Navigator.pop(
|
|
|
|
|
context);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
label: 'Apply',
|
|
|
|
|
backgroundColor:
|
|
|
|
|
Colors
|
|
|
|
|
.green,
|
|
|
|
|
backgroundColor: Colors.green,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -808,13 +688,9 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
projectViewModel
|
|
|
|
|
.isArabic
|
|
|
|
|
? model
|
|
|
|
|
.parentProducts[
|
|
|
|
|
index]
|
|
|
|
|
.namen
|
|
|
|
|
:model.parentProducts[index].name,
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? model.parentProducts[index].namen
|
|
|
|
|
: model.parentProducts[index].name,
|
|
|
|
|
regular: true,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
@ -946,13 +822,8 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.65,
|
|
|
|
|
child: Texts(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? model
|
|
|
|
|
.parentProducts[
|
|
|
|
|
index]
|
|
|
|
|
.namen
|
|
|
|
|
: model
|
|
|
|
|
.parentProducts[
|
|
|
|
|
index].name,
|
|
|
|
|
? model.parentProducts[index].namen
|
|
|
|
|
: model.parentProducts[index].name,
|
|
|
|
|
regular: true,
|
|
|
|
|
fontSize: 13.2,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
@ -973,8 +844,8 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
StarRating(
|
|
|
|
|
totalAverage:model
|
|
|
|
|
.parentProducts[index].approvedRatingSum > 0
|
|
|
|
|
totalAverage:
|
|
|
|
|
model.parentProducts[index].approvedRatingSum > 0
|
|
|
|
|
? (model.parentProducts[index].approvedRatingSum
|
|
|
|
|
.toDouble() /
|
|
|
|
|
model.parentProducts[index]
|
|
|
|
|
@ -1043,8 +914,7 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool isEntityListSelected(CategoriseParentModel masterKey) {
|
|
|
|
|
Iterable<CategoriseParentModel> history =
|
|
|
|
|
entityList.where((element) => masterKey.id == element.id);
|
|
|
|
|
Iterable<CategoriseParentModel> history = entityList.where((element) => masterKey.id == element.id);
|
|
|
|
|
if (history.length > 0) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
@ -1052,8 +922,7 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool isEntityListSelectedBrands(CategoriseParentModel masterKey) {
|
|
|
|
|
Iterable<CategoriseParentModel> history =
|
|
|
|
|
entityListBrands.where((element) => masterKey.id == element.id);
|
|
|
|
|
Iterable<CategoriseParentModel> history = entityListBrands.where((element) => masterKey.id == element.id);
|
|
|
|
|
if (history.length > 0) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|