diff --git a/lib/components/basket_item_card.dart b/lib/components/basket_item_card.dart index ef8a93a..5340543 100644 --- a/lib/components/basket_item_card.dart +++ b/lib/components/basket_item_card.dart @@ -32,52 +32,59 @@ class BasketItemCard extends StatelessWidget { minWidth: 400, maxWidth: 600, ), - child: Card( - elevation: 4, - color: Theme.of(context).scaffoldBackgroundColor, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(30), - ), - child: Padding( - padding: const EdgeInsetsDirectional.symmetric(horizontal: 20), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - image, - const SizedBox(width: 20), - Column( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - name, - style: Theme.of(context).textTheme.bodyLarge, - ), - Text('\$$price'), - ], - ) - ], - ), - Row( - mainAxisSize: MainAxisSize.min, - children: [ - IconButton( - icon: const Icon(Icons.remove), - onPressed: onTapMinus, - ), - const SizedBox(width: 10), - Text(quantity), - const SizedBox(width: 10), - IconButton( - icon: const Icon(Icons.add), - onPressed: onTapPlus, - ), - ], - ) - ], + child: GestureDetector( + onTap: () { + debugPrint('name: $name'); + //TODO: сделать переход по клику + // Navigator.of(context).pushReplacement(CustomPageRoute(builder: (context)=>const DetailPage(name: this.name, description: description, price: price, id: id, image: image))) + }, + child: Card( + elevation: 4, + color: Theme.of(context).scaffoldBackgroundColor, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(30), + ), + child: Padding( + padding: const EdgeInsetsDirectional.symmetric(horizontal: 20), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + image, + const SizedBox(width: 20), + Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + name, + style: Theme.of(context).textTheme.bodyLarge, + ), + Text('$price руб.'), + ], + ) + ], + ), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + IconButton( + icon: const Icon(Icons.remove), + onPressed: onTapMinus, + ), + const SizedBox(width: 10), + Text(quantity), + const SizedBox(width: 10), + IconButton( + icon: const Icon(Icons.add), + onPressed: onTapPlus, + ), + ], + ) + ], + ), ), ), ), diff --git a/lib/components/history_item_card.dart b/lib/components/history_item_card.dart index 766d72d..fadf338 100644 --- a/lib/components/history_item_card.dart +++ b/lib/components/history_item_card.dart @@ -64,7 +64,7 @@ class HistoryItemCard extends StatelessWidget { ), MarkdownBody( data: 'Статус: **${orderStatusMap[status]}**'), - MarkdownBody(data: 'Сумма: **\$$cost**'), + MarkdownBody(data: 'Сумма: **$cost руб.**'), ], ) ], diff --git a/lib/components/item_card.dart b/lib/components/item_card.dart index 74287ac..a44a963 100644 --- a/lib/components/item_card.dart +++ b/lib/components/item_card.dart @@ -46,7 +46,7 @@ class ProductCard extends StatelessWidget { ), const SizedBox(height: 8), Text( - '\$$price', + '$price руб.', style: Theme.of(context).textTheme.titleSmall, ), ], diff --git a/lib/components/order_confirm_item_card.dart b/lib/components/order_confirm_item_card.dart index edffaa7..494fab5 100644 --- a/lib/components/order_confirm_item_card.dart +++ b/lib/components/order_confirm_item_card.dart @@ -46,7 +46,7 @@ class OrderConfirmItemCard extends StatelessWidget { name, style: Theme.of(context).textTheme.bodyLarge, ), - Text('\$$price x $count = \$${price * count}'), + Text('$price руб. x $count = ${price * count} руб.'), ], ) ],