|
|
|
|
@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/pages/pharmacies/search_brands_page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
@ -34,117 +35,121 @@ class _ProductBrandsPageState extends State<ProductBrandsPage> {
|
|
|
|
|
isPharmacy: true,
|
|
|
|
|
isShowDecPage: false,
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
alignment: languageID == 'ar'
|
|
|
|
|
? Alignment.topRight
|
|
|
|
|
: Alignment.topLeft,
|
|
|
|
|
padding: languageID == 'ar'
|
|
|
|
|
? EdgeInsets.only(right: 10.0, top: 10.0)
|
|
|
|
|
: EdgeInsets.only(left: 10.0, top: 10.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).topBrands,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
child: NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
isLocalLoader:true,
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
alignment: languageID == 'ar'
|
|
|
|
|
? Alignment.topRight
|
|
|
|
|
: Alignment.topLeft,
|
|
|
|
|
padding: languageID == 'ar'
|
|
|
|
|
? EdgeInsets.only(right: 10.0, top: 10.0)
|
|
|
|
|
: EdgeInsets.only(left: 10.0, top: 10.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).topBrands,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: 220,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: topBrand(context),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.076,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
|
Container(
|
|
|
|
|
height: 220,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: topBrand(context),
|
|
|
|
|
),
|
|
|
|
|
child: topBrand(context),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.056,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
//crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Icon(Icons.search, size: 25.0),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 15.0,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).searchProductHere,
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.076,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(page: SearchBrandsPage()),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: topBrand(context),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: 250,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
itemCount: model.brandsListList.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 50, left: 10),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
languageID == 'ar'
|
|
|
|
|
? Text(model.brandsListList[index].namen)
|
|
|
|
|
: Text(model.brandsListList[index].name),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 3,
|
|
|
|
|
),
|
|
|
|
|
Divider(height: 1, color: Colors.grey)
|
|
|
|
|
],
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.066,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
//crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Icon(Icons.search, size: 25.0),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 15.0,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => FinalProductsPage(
|
|
|
|
|
id: model.brandsListList[index].id
|
|
|
|
|
.toString(),
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).searchProductHere,
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(page: SearchBrandsPage()),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: 250,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
itemCount: model.brandsListList.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 50, left: 10),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
languageID == 'ar'
|
|
|
|
|
? Text(model.brandsListList[index].namen)
|
|
|
|
|
: Text(model.brandsListList[index].name),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 3,
|
|
|
|
|
),
|
|
|
|
|
Divider(height: 1, color: Colors.grey)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => FinalProductsPage(
|
|
|
|
|
id: model.brandsListList[index].id
|
|
|
|
|
.toString(),
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|