merge-requests/278/head
hussam al-habibeh 5 years ago
parent e050f87a64
commit 3af37a6a5c

@ -29,7 +29,9 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PharmacyCategoriseViewModel>(
onModelReady: (model) => model.getCategorise(),
builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget child) => AppScaffold(
builder: (BuildContext context, PharmacyCategoriseViewModel model,
Widget child) =>
AppScaffold(
isShowDecPage: false,
baseViewModel: model,
body: Column(
@ -57,7 +59,9 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.0),
child: Texts(
projectViewModel.isArabic ? model.categorise[index].namen : model.categorise[index].name,
projectViewModel.isArabic
? model.categorise[index].namen
: model.categorise[index].name,
fontWeight: FontWeight.w600,
),
),
@ -66,7 +70,8 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => model.categorise[index].id != '12'
builder: (context) =>
model.categorise[index].id != '12'
? ParentCategorisePage(
id: model.categorise[index].id,
titleName: model.categorise[index].name,
@ -86,7 +91,10 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
height: 140,
child: Column(
children: [
Divider(height: 2.0, thickness: 1.0, color: Colors.black12.withOpacity(0.14)),
Divider(
height: 2.0,
thickness: 1.0,
color: Colors.black12.withOpacity(0.14)),
SizedBox(
height: 10.0,
),
@ -102,12 +110,16 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
width: 55.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0),
color: Colors.green.shade300.withOpacity(0.34),
color:
Colors.green.shade300.withOpacity(0.34),
),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.0),
padding:
EdgeInsets.symmetric(horizontal: 10.0),
child: Texts(
projectViewModel.isArabic ? 'الاكثر مبيعا' : 'Best Sellers',
projectViewModel.isArabic
? 'الاكثر مبيعا'
: 'Best Sellers',
fontWeight: FontWeight.w600,
),
),
@ -122,13 +134,16 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
height: 50.0,
width: 55.0,
decoration: BoxDecoration(
color: Colors.orangeAccent.shade200.withOpacity(0.34),
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',
projectViewModel.isArabic
? 'الاكثر مشاهدة'
: 'Most Viewed',
fontWeight: FontWeight.w600,
),
),
@ -152,7 +167,9 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.0),
child: Texts(
projectViewModel.isArabic ? 'منتجات جديدة' : 'New Products',
projectViewModel.isArabic
? 'منتجات جديدة'
: 'New Products',
fontWeight: FontWeight.w600,
),
),
@ -164,19 +181,23 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
padding: EdgeInsets.all(4.0),
child: InkWell(
onTap: () {
_scanQrAndGetPatient(context, model);
// _scanQrAndGetPatient(context, model);
},
child: Container(
height: 50.0,
width: 55.0,
decoration: BoxDecoration(
color: Colors.purple.shade200.withOpacity(0.34),
color:
Colors.purple.shade200.withOpacity(0.34),
borderRadius: BorderRadius.circular(5.0),
),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.0),
padding:
EdgeInsets.symmetric(horizontal: 10.0),
child: Texts(
projectViewModel.isArabic ? 'شوهد مؤخرا' : 'Recently Viewed',
projectViewModel.isArabic
? 'شوهد مؤخرا'
: 'Recently Viewed',
fontWeight: FontWeight.w600,
),
),

Loading…
Cancel
Save