|
|
|
|
@ -37,54 +37,56 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
body: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 400,
|
|
|
|
|
margin: EdgeInsets.only(bottom: 22),
|
|
|
|
|
child: GridView.builder(
|
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
|
crossAxisCount: 2,
|
|
|
|
|
crossAxisSpacing: 0.5,
|
|
|
|
|
mainAxisSpacing: 1.0,
|
|
|
|
|
childAspectRatio: 3.2,
|
|
|
|
|
),
|
|
|
|
|
itemCount: model.categorise.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: EdgeInsets.all(4.0),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(5),
|
|
|
|
|
color: Colors.grey.withOpacity(0.24),
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
|
child: Texts(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? model.categorise[index].namen
|
|
|
|
|
: model.categorise[index].name,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 400,
|
|
|
|
|
margin: EdgeInsets.only(bottom: 22),
|
|
|
|
|
child: GridView.builder(
|
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
|
crossAxisCount: 2,
|
|
|
|
|
crossAxisSpacing: 0.5,
|
|
|
|
|
mainAxisSpacing: 1.0,
|
|
|
|
|
childAspectRatio: 3.2,
|
|
|
|
|
),
|
|
|
|
|
itemCount: model.categorise.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: EdgeInsets.all(4.0),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(5),
|
|
|
|
|
color: Colors.grey.withOpacity(0.24),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
onTap: () => {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: model.categorise[index].id != '12'
|
|
|
|
|
? ParentCategorisePage(
|
|
|
|
|
id: model.categorise[index].id,
|
|
|
|
|
titleName: model.categorise[index].name,
|
|
|
|
|
)
|
|
|
|
|
: FinalProductsPage(
|
|
|
|
|
id: model.categorise[index].id,
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
|
child: Texts(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? model.categorise[index].namen
|
|
|
|
|
: model.categorise[index].name,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
onTap: () => {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: model.categorise[index].id != '12'
|
|
|
|
|
? ParentCategorisePage(
|
|
|
|
|
id: model.categorise[index].id,
|
|
|
|
|
titleName: model.categorise[index].name,
|
|
|
|
|
)
|
|
|
|
|
: FinalProductsPage(
|
|
|
|
|
id: model.categorise[index].id,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
@ -110,7 +112,7 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
|
|
|
|
|
FadePage(
|
|
|
|
|
page: FinalProductsPage(
|
|
|
|
|
id: "",
|
|
|
|
|
productType: 4,
|
|
|
|
|
productType: 6,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
@ -140,21 +142,34 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(4.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 50.0,
|
|
|
|
|
width: 55.0,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.orangeAccent.shade200
|
|
|
|
|
.withOpacity(0.34),
|
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
|
child: Texts(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? 'الاكثر مشاهدة'
|
|
|
|
|
: 'Most Viewed',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: FinalProductsPage(
|
|
|
|
|
id: "",
|
|
|
|
|
productType: 4,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 50.0,
|
|
|
|
|
width: 55.0,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.orangeAccent.shade200
|
|
|
|
|
.withOpacity(0.34),
|
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
|
child: Texts(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? 'الاكثر مشاهدة'
|
|
|
|
|
: 'Most Viewed',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -167,20 +182,33 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(4.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 50.0,
|
|
|
|
|
width: 55.0,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.blue.shade200.withOpacity(0.34),
|
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
|
child: Texts(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? 'منتجات جديدة'
|
|
|
|
|
: 'New Products',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: FinalProductsPage(
|
|
|
|
|
id: "",
|
|
|
|
|
productType: 5,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 50.0,
|
|
|
|
|
width: 55.0,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.blue.shade200.withOpacity(0.34),
|
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
|
child: Texts(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? 'منتجات جديدة'
|
|
|
|
|
: 'New Products',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|