calorimeter/lib/utils/scan_food_floating_button.dart

19 lines
449 B
Dart
Raw Normal View History

2024-12-07 12:29:34 +00:00
/* SPDX-License-Identifier: GPL-3.0-or-later */
import 'package:flutter/material.dart';
2024-10-06 23:44:19 +00:00
class ScanFoodFAB extends StatelessWidget {
final Function() onPressed;
2024-10-06 23:44:19 +00:00
const ScanFoodFAB({super.key, required this.onPressed});
@override
Widget build(BuildContext context) {
return FloatingActionButton(
heroTag: "scanFoodFAB",
child: const Icon(Icons.barcode_reader),
onPressed: () {
onPressed();
},
);
}
}