calorimeter/lib/utils/scan_food_floating_button.dart

18 lines
423 B
Dart
Raw Permalink Normal View History

import 'package:flutter/material.dart';
class ScanFoodFloatingButton extends StatelessWidget {
final Function() onPressed;
const ScanFoodFloatingButton({super.key, required this.onPressed});
@override
Widget build(BuildContext context) {
return FloatingActionButton(
heroTag: "scanFoodFAB",
child: const Icon(Icons.barcode_reader),
onPressed: () {
onPressed();
},
);
}
}