Skip to content

Commit

Permalink
Merge pull request #53 from Onestop-Agrotech/v0.2.0
Browse files Browse the repository at this point in the history
[V0.2.0] Loaders & Orders page
  • Loading branch information
Rahul-Vijay authored Jun 25, 2020
2 parents a3e772d + 9ef8493 commit 14ae03f
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 51 deletions.
8 changes: 6 additions & 2 deletions lib/screens/common/customOrdersCard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ class _CustomOrdersCardState extends State<CustomOrdersCard> {
SizedBox(height: 10.0),
widget.order.otp != '0'
? Text(
"OTP ${widget.order.otp}",
widget.order.orderType != "Delivery"
? "OTP ${widget.order.otp}"
: "No OTP",
style: TextStyle(
fontFamily: "Raleway",
fontSize: 16.5,
Expand Down Expand Up @@ -94,7 +96,9 @@ class _CustomOrdersCardState extends State<CustomOrdersCard> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Text(
"TOKEN ${widget.order.tokenNumber}",
widget.order.orderType != "Delivery"
? "TOKEN ${widget.order.tokenNumber}"
: "No TOKEN",
style: TextStyle(
fontFamily: "Raleway",
fontSize: 13.5,
Expand Down
5 changes: 4 additions & 1 deletion lib/screens/orderDetails.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ class OrderDetailsScreen extends StatelessWidget {
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text("Token No. ${order.tokenNumber}",
Text(
order.orderType != "Delivery"
? "TOKEN ${order.tokenNumber}"
: "",
style: TextStyle(
fontFamily: "Raleway",
fontSize: 16.5,
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/orders.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class _OrdersScreenState extends State<OrdersScreen> {
CustomOrdersCard(
order: ordersArr[index],
),
SizedBox(height: 30.0)
SizedBox(height: 55.0)
],
);
});
Expand Down
96 changes: 49 additions & 47 deletions lib/screens/storesList.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,59 +181,61 @@ class _StoresScreenState extends State<StoresScreen> {
),
),
body: _buildArrayFromFuture(),
floatingActionButton: Container(
height: 60.0,
width: double.infinity,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Delivery Address:",
style: TextStyle(
fontFamily: "Raleway",
fontWeight: FontWeight.w700,
color: ThemeColoursSeva().black,
fontSize: 14.0),
),
SizedBox(height: 10.0),
FutureBuilder(
future: _fetchUserAddress(),
builder: (context, data) {
if (data.hasData) {
return Container(
floatingActionButton: FutureBuilder(
future: _fetchUserAddress(),
builder: (context, data) {
if (data.hasData) {
return Container(
height: 60.0,
width: double.infinity,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Delivery Address:",
style: TextStyle(
fontFamily: "Raleway",
fontWeight: FontWeight.w700,
color: ThemeColoursSeva().black,
fontSize: 14.0),
),
SizedBox(height: 10.0),
Container(
width: MediaQuery.of(context).size.width * 0.6,
child: Text(
data.data,
overflow: TextOverflow.ellipsis,
),
),
],
),
RaisedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => GoogleLocationScreen(
userEmail: _email,
)),
);
} else
return Container();
}),
],
),
RaisedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => GoogleLocationScreen(
userEmail: _email,
)),
);
},
child: Text(
"Change",
style: TextStyle(color: Colors.white),
),
color: ThemeColoursSeva().dkGreen,
)
],
),
),
},
child: Text(
"Change",
style: TextStyle(color: Colors.white),
),
color: ThemeColoursSeva().dkGreen,
)
],
),
);
} else
return Container(
child: Text("Loading Address ...")
);
}),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat);
}
}

0 comments on commit 14ae03f

Please sign in to comment.