calorimeter/lib/utils/scan_food_floating_button.dart

18 lines
401 B
Dart
Raw Permalink Normal View History

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();
},
);
}
}