Skip to content

Commit

Permalink
Fix indian delight, restaurant detail screen layout issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothvino42 committed Feb 12, 2021
1 parent 6aa470f commit fdbf433
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 231 deletions.
6 changes: 3 additions & 3 deletions lib/views/swiggy/all_restaurants/all_restaurants_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ class AllRestaurantsScreen extends StatelessWidget {
height: 60.0,
child: Row(
children: <Widget>[
InkWell(
child: Icon(Icons.arrow_back, size: 18.0),
onTap: () {
IconButton(
icon: Icon(Icons.arrow_back),
onPressed: () {
Navigator.pop(context);
},
),
Expand Down
111 changes: 48 additions & 63 deletions lib/views/swiggy/indian_food/indian_delight_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,74 +7,59 @@ class IndianDelightScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
_IndianDelightHeaderView(),
UIHelper.verticalSpaceMedium(),
Container(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'SOUTH INDIAN DELIGHTS',
style: Theme.of(context)
.textTheme
.subtitle2
.copyWith(fontSize: 19.0),
body: Stack(
children: [
Positioned.fill(
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Image.asset(
'assets/images/banner3.jpg',
height: MediaQuery.of(context).size.height / 5.0,
width: double.infinity,
fit: BoxFit.cover,
),
UIHelper.verticalSpaceMedium(),
Container(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'SOUTH INDIAN DELIGHTS',
style: Theme.of(context).textTheme.subtitle2.copyWith(fontSize: 19.0),
),
UIHelper.verticalSpaceSmall(),
Text('Feast on authentic South Indian fare from top restaurants near you'),
UIHelper.verticalSpaceSmall(),
Divider(),
],
),
UIHelper.verticalSpaceSmall(),
Text(
'Feast on authentic South Indian fare from top restaurants near you'),
UIHelper.verticalSpaceSmall(),
Divider(),
],
),
),
GroceryListView(
title: 'SEE ALL RESTAURANTS',
),
],
),
GroceryListView(
title: 'SEE ALL RESTAURANTS',
),
],
),
),
),
),
);
}
}

class _IndianDelightHeaderView extends StatelessWidget {
const _IndianDelightHeaderView({
Key key,
}) : super(key: key);

@override
Widget build(BuildContext context) {
return Stack(
children: <Widget>[
Image.asset(
'assets/images/banner3.jpg',
height: MediaQuery.of(context).size.height / 5.0,
width: double.infinity,
fit: BoxFit.cover,
),
Positioned(
top: 40.0,
left: 0.4,
child: IconButton(
icon: Icon(
Icons.arrow_back,
size: 28.0,
color: Colors.white,
Positioned(
top: 10.0,
left: 2.4,
child: IconButton(
icon: Icon(
Icons.arrow_back,
size: 28.0,
color: Colors.white,
),
onPressed: () {
Navigator.pop(context);
},
),
onPressed: () {
Navigator.pop(context);
},
),
)
],
],
),
);
}
}
Loading

0 comments on commit fdbf433

Please sign in to comment.