fixed merging issues

merge-requests/226/merge
enadhilal 5 years ago
parent 9c55571072
commit 727940c5c6

@ -37,7 +37,6 @@ class AppScaffold extends StatelessWidget {
final bool isBottomBar; final bool isBottomBar;
final Widget floatingActionButton; final Widget floatingActionButton;
final bool isPharmacy; final bool isPharmacy;
final bool showCart;
final String title; final String title;
final String description; final String description;
final String image; final String image;
@ -61,7 +60,6 @@ class AppScaffold extends StatelessWidget {
this.baseViewModel, this.baseViewModel,
this.floatingActionButton, this.floatingActionButton,
this.isPharmacy = false, this.isPharmacy = false,
this.showCart = false,
this.title, this.title,
this.description, this.description,
this.isShowDecPage = true, this.isShowDecPage = true,
@ -97,44 +95,15 @@ class AppScaffold extends StatelessWidget {
} }
return Scaffold( return Scaffold(
backgroundColor: backgroundColor ?? Theme.of(context).scaffoldBackgroundColor, backgroundColor:
appBar: isShowAppBar backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
? AppBar( appBar: appBar,
elevation: 0, body: (!Provider.of<ProjectViewModel>(context, listen: false).isLogin &&
backgroundColor: isPharmacy isShowDecPage)
? Colors.green ? NotAutPage(
: Theme.of(context).appBarTheme.color, title: appBarTitle,
textTheme: TextTheme( description: description,
headline6: infoList: infoList,
TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
),
title: Text(authenticatedUserObject.isLogin
? appBarTitle.toUpperCase()
: TranslationBase.of(context).serviceInformationTitle),leading: Builder(
builder: (BuildContext context) {
return ArrowBack();
},
),
centerTitle: true,
actions: <Widget>[
isPharmacy && showCart
? IconButton(
icon: Icon(Icons.shopping_cart),
color: Colors.white,
onPressed: () {
Navigator.of(context)
.popUntil(ModalRoute.withName('/'));
},
)
: isPharmacy && !showCart ? Container() :IconButton(
icon: Icon(FontAwesomeIcons.home),
color: Colors.white,
onPressed: () {
Navigator.of(context)
.popUntil(ModalRoute.withName('/'));
},
),
],
) )
: baseViewModel != null : baseViewModel != null
? NetworkBaseView( ? NetworkBaseView(

@ -6,9 +6,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class productTile extends StatelessWidget { class productTile extends StatelessWidget {
final String productName; final String productName;
final String productPrice; final String productPrice;
@ -20,10 +17,16 @@ class productTile extends StatelessWidget {
final String productImage; final String productImage;
final bool showLine; final bool showLine;
productTile(
productTile({this.productName, this.productPrice, this.productRate, {this.productName,
this.qyt, this.totalPrice, this.productReviews, this.productPrice,
this.isOrderDetails=true, this.productImage ,this.showLine = true}); this.productRate,
this.qyt,
this.totalPrice,
this.productReviews,
this.isOrderDetails = true,
this.productImage,
this.showLine = true});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -63,8 +66,7 @@ class productTile extends StatelessWidget {
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: RichText( child: RichText(
text: TextSpan( text: TextSpan(
text: text: productName,
productName,
style: TextStyle( style: TextStyle(
color: Colors.black54, color: Colors.black54,
fontSize: 15, fontSize: 15,
@ -88,7 +90,8 @@ class productTile extends StatelessWidget {
), ),
), ),
), ),
this.isOrderDetails == false ? Container( this.isOrderDetails == false
? Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: Align(
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
@ -103,23 +106,29 @@ class productTile extends StatelessWidget {
emptyIcon: Icons.star, emptyIcon: Icons.star,
), ),
), ),
): Container(), )
: Container(),
], ],
), ),
), ),
this.isOrderDetails == false ? Expanded( this.isOrderDetails == false
? Expanded(
flex: 1, flex: 1,
child: Column ( child: Column(
children: [ children: [
Icon(FontAwesomeIcons.trashAlt, size: 15), Icon(FontAwesomeIcons.trashAlt, size: 15),
SizedBox(height: 50,), SizedBox(
height: 50,
),
Icon(FontAwesomeIcons.shoppingCart, size: 15), Icon(FontAwesomeIcons.shoppingCart, size: 15),
], ],
), ),
) : Container(), )
: Container(),
], ],
), ),
this.isOrderDetails == true ?Expanded( this.isOrderDetails == true
? Expanded(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
@ -169,10 +178,11 @@ class productTile extends StatelessWidget {
), ),
], ],
), ),
): Container(), )
: Container(),
// this.isOrderDetails == true && model.order[0].orderStatusId == 30? // this.isOrderDetails == true && model.order[0].orderStatusId == 30?
this.isOrderDetails == true? this.isOrderDetails == true
Expanded( ? Expanded(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
@ -209,25 +219,26 @@ class productTile extends StatelessWidget {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(
MaterialPageRoute(builder: (context) => ProductReviewPage())); context,
MaterialPageRoute(
builder: (context) => ProductReviewPage()));
}, },
child: Container( child: Container(
padding: EdgeInsets.only(left: 13.0, right: 13.0, top: 5.0), padding: EdgeInsets.only(
left: 13.0, right: 13.0, top: 5.0),
height: 30.0, height: 30.0,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
color: Colors.orange, color: Colors.orange,
style: BorderStyle.solid, style: BorderStyle.solid,
width: 1.0 width: 1.0),
),
color: Colors.transparent, color: Colors.transparent,
borderRadius: BorderRadius.circular(5.0) borderRadius: BorderRadius.circular(5.0)),
),
child: Text( child: Text(
TranslationBase.of(context).writeReview, TranslationBase.of(context).writeReview,
style: TextStyle( style: TextStyle(
fontSize:12, fontSize: 12,
color: Colors.orange, color: Colors.orange,
), ),
), ),
@ -235,34 +246,37 @@ class productTile extends StatelessWidget {
), ),
], ],
), ),
) : Container(), )
], : Container(
),
):
Container(
child: Padding( child: Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: Row( child: Row(
children: [ children: [
Padding( Padding(
padding: EdgeInsets.only(left:15), padding: EdgeInsets.only(left: 15),
child: Container( child: Container(
width: 160, width: 160,
height: 200, height: 200,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
border: Border( border: Border(
top: BorderSide(width: 0.5, color: Colors.grey), top: BorderSide(
left: BorderSide(width: 0.5, color: Colors.grey), width: 0.5, color: Colors.grey),
right: BorderSide(width: 0.5, color: Colors.grey), left: BorderSide(
bottom: BorderSide(width: 0.5, color: Colors.grey), width: 0.5, color: Colors.grey),
right: BorderSide(
width: 0.5, color: Colors.grey),
bottom: BorderSide(
width: 0.5, color: Colors.grey),
), ),
color: Colors.white), color: Colors.white),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
SizedBox(height: 2,), SizedBox(
height: 2,
),
Container( Container(
child: Image.network( child: Image.network(
productImage.trim(), productImage.trim(),
@ -271,11 +285,13 @@ class productTile extends StatelessWidget {
height: 70, height: 70,
), ),
), ),
SizedBox(height: 10,), SizedBox(
height: 10,
),
// Container(width: 150,height: 20,color: Colors.green,), // Container(width: 150,height: 20,color: Colors.green,),
Container( Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child:Column( child: Column(
children: [ children: [
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
@ -283,8 +299,7 @@ class productTile extends StatelessWidget {
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: RichText( child: RichText(
text: TextSpan( text: TextSpan(
text: text: productName,
productName,
style: TextStyle( style: TextStyle(
color: Colors.black54, color: Colors.black54,
fontSize: 15, fontSize: 15,
@ -334,6 +349,9 @@ class productTile extends StatelessWidget {
], ],
), ),
), ),
),
],
),
); );
} }
} }

Loading…
Cancel
Save