|
1 | 1 | import 'package:bank_cards/generated/i18n.dart';
|
| 2 | +import 'package:bank_cards/src/models/card/card.dart' as model; |
| 3 | +import 'package:bank_cards/src/repository/card/service/card/card_response.dart'; |
2 | 4 | import 'package:bank_cards/src/router.dart';
|
3 |
| -import 'package:bank_cards/src/ui/resources/decorations.dart'; |
4 | 5 | import 'package:bank_cards/src/ui/resources/app_dimen.dart';
|
5 | 6 | import 'package:bank_cards/src/ui/resources/app_styles.dart';
|
| 7 | +import 'package:bank_cards/src/ui/resources/decorations.dart'; |
6 | 8 | import 'package:bank_cards/src/ui/screens/base/base_screen.dart';
|
7 | 9 | import 'package:bank_cards/src/ui/screens/base/base_widget.dart';
|
8 | 10 | import 'package:bank_cards/src/ui/widgets/common/common_widgets.dart';
|
9 | 11 | import 'package:bank_cards/src/ui/widgets/credit_card/credit_card_front.dart';
|
10 |
| -import 'package:flutter/material.dart'; |
11 |
| -import 'package:flutter_swiper/flutter_swiper.dart'; |
12 |
| -import 'package:provider/provider.dart'; |
13 |
| -import 'package:bank_cards/src/models/card/card.dart' as model; |
14 | 12 | import 'package:bank_cards/src/ui/widgets/custom_circular_progress_indicator.dart';
|
| 13 | +import 'package:bank_cards/src/ui/widgets/menu/horizontal_menu_widget.dart'; |
15 | 14 | import 'package:bank_cards/src/utils/formatter.dart';
|
16 | 15 | import 'package:bank_cards/src/viewmodel/base/base_viewmodel.dart';
|
17 | 16 | import 'package:bank_cards/src/viewmodel/card/card_viewmodel.dart';
|
18 |
| -import 'package:bank_cards/src/repository/card/service/card/card_response.dart'; |
| 17 | +import 'package:flutter/material.dart'; |
| 18 | +import 'package:flutter_swiper/flutter_swiper.dart'; |
| 19 | +import 'package:provider/provider.dart'; |
19 | 20 |
|
20 | 21 | class CardPage extends StatefulWidget {
|
21 | 22 | @override
|
@@ -107,7 +108,11 @@ class _CardPageState extends State<CardPage> {
|
107 | 108 | Column(
|
108 | 109 | children: <Widget>[
|
109 | 110 | this.cardDetails(model),
|
110 |
| - this.menu(model), |
| 111 | + //this.menu(model), |
| 112 | + HorizontalMenuWidget( |
| 113 | + screenUtil: BaseScreen.screenUtil, |
| 114 | + menuItems: this._menuItems, |
| 115 | + ), |
111 | 116 | ],
|
112 | 117 | ),
|
113 | 118 | ],
|
@@ -234,22 +239,6 @@ class _CardPageState extends State<CardPage> {
|
234 | 239 | return amount <= 0 ? Colors.red : Colors.green;
|
235 | 240 | }
|
236 | 241 |
|
237 |
| - Widget menu(model) { |
238 |
| - return Container( |
239 |
| - height: BaseScreen.screenUtil.setHeight(AppDimen.menuCardHeight), |
240 |
| - child: GridView.count( |
241 |
| - primary: false, |
242 |
| - padding: EdgeInsets.all( |
243 |
| - BaseScreen.screenUtil.setWidth(20.0), |
244 |
| - ), |
245 |
| - crossAxisSpacing: 10.0, |
246 |
| - mainAxisSpacing: 10.0, |
247 |
| - crossAxisCount: 3, |
248 |
| - children: this._menuItems, |
249 |
| - ), |
250 |
| - ); |
251 |
| - } |
252 |
| - |
253 | 242 | Widget createNewItem(img, text, position) {
|
254 | 243 | return new GestureDetector(
|
255 | 244 | onTap: () {
|
|
0 commit comments