calorimeter/lib/utils/scan_food_floating_button.dart
2024-12-07 13:39:11 +01:00

20 lines
507 B
Dart

/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Copyright (C) 2024 Marco Groß <mgross@sw-gross.de> */
import 'package:flutter/material.dart';
class ScanFoodFAB extends StatelessWidget {
final Function() onPressed;
const ScanFoodFAB({super.key, required this.onPressed});
@override
Widget build(BuildContext context) {
return FloatingActionButton(
heroTag: "scanFoodFAB",
child: const Icon(Icons.barcode_reader),
onPressed: () {
onPressed();
},
);
}
}