calorimeter/lib/utils/scan_food_floating_button.dart

20 lines
507 B
Dart
Raw Permalink Normal View History

2024-12-07 12:29:34 +00:00
/* SPDX-License-Identifier: GPL-3.0-or-later */
2024-12-07 12:39:11 +00:00
/* Copyright (C) 2024 Marco Groß <mgross@sw-gross.de> */
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();
},
);
}
}