|
1 |
| -import 'dart:math'; |
2 |
| - |
3 | 1 | import 'package:flutter/material.dart';
|
4 |
| -import 'package:swiggy_ui/models/spotlight_best_top_food.dart'; |
5 |
| -import 'package:swiggy_ui/utils/app_colors.dart'; |
6 |
| -import 'package:swiggy_ui/utils/ui_helper.dart'; |
7 |
| -import 'package:swiggy_ui/widgets/spotlight_best_top_food_item.dart'; |
| 2 | + |
| 3 | +import '../../models/spotlight_best_top_food.dart'; |
| 4 | +import '../../utils/app_colors.dart'; |
| 5 | +import '../../utils/ui_helper.dart'; |
| 6 | +import '../../widgets/spotlight_best_top_food_item.dart'; |
8 | 7 |
|
9 | 8 | class BestInSafetyViews extends StatelessWidget {
|
10 | 9 | final restaurants = SpotlightBestTopFood.getBestRestaurants();
|
11 | 10 |
|
12 | 11 | @override
|
13 | 12 | Widget build(BuildContext context) {
|
14 | 13 | return Container(
|
15 |
| - margin: const EdgeInsets.all(10.0), |
| 14 | + margin: const EdgeInsets.symmetric(vertical: 10.0), |
16 | 15 | height: 330.0,
|
17 | 16 | child: Column(
|
18 | 17 | crossAxisAlignment: CrossAxisAlignment.start,
|
19 | 18 | children: <Widget>[
|
20 |
| - Row( |
21 |
| - children: <Widget>[ |
22 |
| - Icon(Icons.security), |
23 |
| - UIHelper.horizontalSpaceExtraSmall(), |
24 |
| - Text( |
25 |
| - 'Best in Safety', |
26 |
| - style: Theme.of(context) |
27 |
| - .textTheme |
28 |
| - .headline4 |
29 |
| - .copyWith(fontSize: 20.0), |
30 |
| - ), |
31 |
| - Spacer(), |
32 |
| - Row( |
33 |
| - children: <Widget>[ |
34 |
| - Text( |
35 |
| - 'SEE ALL', |
36 |
| - style: Theme.of(context) |
37 |
| - .textTheme |
38 |
| - .bodyText1 |
39 |
| - .copyWith(fontWeight: FontWeight.bold), |
40 |
| - ), |
41 |
| - UIHelper.horizontalSpaceExtraSmall(), |
42 |
| - ClipOval( |
43 |
| - child: Container( |
44 |
| - alignment: Alignment.center, |
45 |
| - color: swiggyOrange, |
46 |
| - height: 25.0, |
47 |
| - width: 25.0, |
48 |
| - child: Icon( |
49 |
| - Icons.arrow_forward_ios, |
50 |
| - size: 12.0, |
51 |
| - color: Colors.white, |
52 |
| - ), |
| 19 | + Padding( |
| 20 | + padding: const EdgeInsets.symmetric(horizontal: 10.0), |
| 21 | + child: Column( |
| 22 | + crossAxisAlignment: CrossAxisAlignment.start, |
| 23 | + children: <Widget>[ |
| 24 | + Row( |
| 25 | + children: <Widget>[ |
| 26 | + Icon(Icons.security), |
| 27 | + UIHelper.horizontalSpaceExtraSmall(), |
| 28 | + Text( |
| 29 | + 'Best in Safety', |
| 30 | + style: Theme.of(context) |
| 31 | + .textTheme |
| 32 | + .headline4 |
| 33 | + .copyWith(fontSize: 20.0), |
53 | 34 | ),
|
54 |
| - ) |
55 |
| - ], |
56 |
| - ) |
57 |
| - ], |
58 |
| - ), |
59 |
| - UIHelper.verticalSpaceExtraSmall(), |
60 |
| - Text( |
61 |
| - 'Restaurants with best safety standards', |
62 |
| - style: Theme.of(context) |
63 |
| - .textTheme |
64 |
| - .bodyText1 |
65 |
| - .copyWith(color: Colors.grey), |
| 35 | + Spacer(), |
| 36 | + Row( |
| 37 | + children: <Widget>[ |
| 38 | + Text( |
| 39 | + 'SEE ALL', |
| 40 | + style: Theme.of(context) |
| 41 | + .textTheme |
| 42 | + .bodyText1 |
| 43 | + .copyWith(fontWeight: FontWeight.bold), |
| 44 | + ), |
| 45 | + UIHelper.horizontalSpaceExtraSmall(), |
| 46 | + ClipOval( |
| 47 | + child: Container( |
| 48 | + alignment: Alignment.center, |
| 49 | + color: swiggyOrange, |
| 50 | + height: 25.0, |
| 51 | + width: 25.0, |
| 52 | + child: Icon( |
| 53 | + Icons.arrow_forward_ios, |
| 54 | + size: 12.0, |
| 55 | + color: Colors.white, |
| 56 | + ), |
| 57 | + ), |
| 58 | + ) |
| 59 | + ], |
| 60 | + ) |
| 61 | + ], |
| 62 | + ), |
| 63 | + UIHelper.verticalSpaceExtraSmall(), |
| 64 | + Text( |
| 65 | + 'Restaurants with best safety standards', |
| 66 | + style: Theme.of(context) |
| 67 | + .textTheme |
| 68 | + .bodyText1 |
| 69 | + .copyWith(color: Colors.grey), |
| 70 | + ), |
| 71 | + ], |
| 72 | + ), |
66 | 73 | ),
|
67 | 74 | UIHelper.verticalSpaceMedium(),
|
68 | 75 | Flexible(
|
|
0 commit comments