Merge branch 'development_new_design_2.0' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into products_tails

merge-update-with-lab-changes
Elham Rababh 4 years ago
commit b2814d0183

@ -85,6 +85,7 @@ class ProductTileItem extends StatelessWidget {
border: Border.all(color: Colors.grey.shade300, width: 0.2), border: Border.all(color: Colors.grey.shade300, width: 0.2),
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
color: Colors.white, color: Colors.white,
shape: BoxShape.rectangle,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color(0xffF1F1F1), color: Color(0xffF1F1F1),
@ -145,7 +146,7 @@ class ProductTileItem extends StatelessWidget {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
color: Colors.grey.shade300, width: 1.1), color: Color(0xffF0F0F0), width: 1.0),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular( topRight: Radius.circular(
item.rxMessage != null && item.rxMessage != null &&
@ -157,7 +158,7 @@ class ProductTileItem extends StatelessWidget {
topLeft: Radius.circular( topLeft: Radius.circular(
item.rxMessage != null && item.rxMessage != null &&
!projectProvider.isArabic !projectProvider.isArabic
? 25 ? 9
: 8), : 8),
), ),
), ),
@ -192,14 +193,13 @@ class ProductTileItem extends StatelessWidget {
child: Container( child: Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 18, right: 18, top: 6, bottom: 3), left: 18, right: 18, top: 6, bottom: 3),
color: CustomColors.accentColor,
child: Padding( child: Padding(
padding: EdgeInsets.all(2.0), padding: EdgeInsets.all(2.0),
child: Text( child: Text(
"الوصفة\n مطلوبة", "الوصفة\n مطلوبة",
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 7.5, fontSize: 7.0,
height: 0.8, height: 0.8,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing: -0.27, letterSpacing: -0.27,
@ -222,7 +222,7 @@ class ProductTileItem extends StatelessWidget {
"\n E-Prescription \n Is required", "\n E-Prescription \n Is required",
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 7.5, fontSize: 7.0,
//letterSpacing: -0.27, //letterSpacing: -0.27,
height: 1.2, height: 1.2,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -244,7 +244,7 @@ class ProductTileItem extends StatelessWidget {
//regular: true, //regular: true,
fontSize: 10, fontSize: 10,
color: Color(0xff2B353E), color: Color(0xff2B353E),
fontWeight: FontWeight.w500, fontWeight: FontWeight.w600,
), ),
), ),
), ),
@ -266,7 +266,7 @@ class ProductTileItem extends StatelessWidget {
horizontal: 10, vertical: 2), horizontal: 10, vertical: 2),
child: Texts( child: Texts(
"SAR ${item.price}", "SAR ${item.price}",
fontWeight: FontWeight.bold, fontWeight: FontWeight.w700,
fontSize: 11, fontSize: 11,
color: Color(0xff2B353E), color: Color(0xff2B353E),
), ),

@ -31,11 +31,6 @@ class MostViewedWidget extends StatelessWidget {
)), )),
if (model.state != ViewState.BusyLocal) if (model.state != ViewState.BusyLocal)
Container( Container(
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey.shade300, width: 0.1),
borderRadius: BorderRadius.circular(8),
),
height: MediaQuery.of(context).size.height / 3 + 1, height: MediaQuery.of(context).size.height / 3 + 1,
child: ListView.builder( child: ListView.builder(
itemBuilder: (ctx, i) => ProductTileItem( itemBuilder: (ctx, i) => ProductTileItem(

@ -16,48 +16,44 @@ class RecentlyViewedWidget extends StatelessWidget {
onModelReady: (model) => model.getLastVisitedProducts(), onModelReady: (model) => model.getLastVisitedProducts(),
allowAny: true, allowAny: true,
builder: (_, model, wi) => NetworkBaseView( builder: (_, model, wi) => NetworkBaseView(
isLocalLoader: true, isLocalLoader: true,
baseViewModel: model, baseViewModel: model,
child: model.lastVisitedProducts.isNotEmpty child: Container(
? Container( child: Column(
child: Column( children: [
children: [ ViewAllHomeWidget(
ViewAllHomeWidget( TranslationBase.of(context).recentlyViewed,
TranslationBase.of(context).recentlyViewed, FinalProductsPage(
FinalProductsPage( id: "",
id: "", productType: 3,
productType: 3, )),
)), if (model.state != ViewState.BusyLocal)
if (model.state != ViewState.BusyLocal) Container(
Container( height: model.lastVisitedProducts.length > 0
height: model.lastVisitedProducts.length > 0 ? MediaQuery.of(context).size.height / 3 + 1
? MediaQuery.of(context).size.height / 3 + 1 : 0,
: 0, child: ListView.builder(
child: ListView.builder( itemBuilder: (ctx, i) => ProductTileItem(
itemBuilder: (ctx, i) => ProductTileItem( model.lastVisitedProducts[i],
model.lastVisitedProducts[i], MediaQuery.of(context).size.height / 4 + 20),
MediaQuery.of(context).size.height / 4 + scrollDirection: Axis.horizontal,
20), itemCount: model.lastVisitedProducts.length,
scrollDirection: Axis.horizontal,
itemCount: model.lastVisitedProducts.length,
),
)
else
Container(
height: 80,
child: Center(
child: CircularProgressIndicator(
backgroundColor: Colors.white,
valueColor: AlwaysStoppedAnimation<Color>(
Colors.grey[500],
),
),
),
),
],
), ),
) )
: Container(), else
)); Container(
height: 80,
child: Center(
child: CircularProgressIndicator(
backgroundColor: Colors.white,
valueColor: AlwaysStoppedAnimation<Color>(
Colors.grey[500],
),
),
),
),
],
),
)));
} }
} }

@ -19,7 +19,7 @@ class ViewAllHomeWidget extends StatelessWidget {
Texts( Texts(
title, title,
color: Color(0xff2E303A), color: Color(0xff2E303A),
bold: true, fontWeight: FontWeight.w700,
fontSize: 19, fontSize: 19,
), ),
InkWell( InkWell(

Loading…
Cancel
Save