1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
thesis_shop/lib/screens/product_list/cart_button.dart

18 lines
548 B

2 years ago
import 'package:flutter/material.dart';
2 years ago
import 'package:thesis_shop/benchmark_counter.dart';
2 years ago
import 'package:thesis_shop/route_key.dart';
class CartButton extends StatelessWidget {
2 years ago
const CartButton() : super(key: const Key('cart_button'));
2 years ago
@override
Widget build(BuildContext context) {
2 years ago
BenchmarkCounters.cartButton++;
2 years ago
return ElevatedButton.icon(
onPressed: () => Navigator.of(context).pushRouteKey(RouteKey.cart),
icon: const Icon(Icons.shopping_basket),
2 years ago
label: const Text('Warenkorb (3 Produkte)'),
2 years ago
);
}
}