mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-28 17:08:29 +01:00
apply dart format
This commit is contained in:
@@ -198,13 +198,13 @@ class IngredientScanResultDialog extends StatelessWidget {
|
||||
AppLocalizations.of(context).productNotFoundDescription(barcode),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8.0),
|
||||
child: Text(
|
||||
AppLocalizations.of(context).productNotFoundOpenFoodFacts,
|
||||
style: TextStyle(fontSize: 14, color: Colors.grey[700]),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8.0),
|
||||
child: Text(
|
||||
AppLocalizations.of(context).productNotFoundOpenFoodFacts,
|
||||
style: TextStyle(fontSize: 14, color: Colors.grey[700]),
|
||||
),
|
||||
),
|
||||
|
||||
if (ingredient != null)
|
||||
Padding(
|
||||
|
||||
@@ -23,10 +23,10 @@ import 'package:wger/models/nutrition/ingredient.dart';
|
||||
import 'package:wger/widgets/nutrition/ingredient_dialogs.dart';
|
||||
|
||||
Future<void> pumpIngredientScanDialog(
|
||||
WidgetTester tester, {
|
||||
required AsyncSnapshot<Ingredient?> snapshot,
|
||||
required String barcode,
|
||||
}) async {
|
||||
WidgetTester tester, {
|
||||
required AsyncSnapshot<Ingredient?> snapshot,
|
||||
required String barcode,
|
||||
}) async {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
locale: const Locale('en'),
|
||||
@@ -41,7 +41,7 @@ Future<void> pumpIngredientScanDialog(
|
||||
builder: (_) => IngredientScanResultDialog(
|
||||
snapshot,
|
||||
barcode,
|
||||
(int id, String name, num? amount) {}, // Mock callback
|
||||
(int id, String name, num? amount) {}, // Mock callback
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -59,7 +59,7 @@ void main() {
|
||||
|
||||
testWidgets(
|
||||
'shows Open Food Facts button when product not found',
|
||||
(WidgetTester tester) async {
|
||||
(WidgetTester tester) async {
|
||||
// Arrange
|
||||
const snapshot = AsyncSnapshot<Ingredient?>.withData(
|
||||
ConnectionState.done,
|
||||
@@ -102,7 +102,7 @@ void main() {
|
||||
|
||||
testWidgets(
|
||||
'tapping Open Food Facts button closes the dialog',
|
||||
(WidgetTester tester) async {
|
||||
(WidgetTester tester) async {
|
||||
// Arrange
|
||||
const snapshot = AsyncSnapshot<Ingredient?>.withData(
|
||||
ConnectionState.done,
|
||||
@@ -133,4 +133,4 @@ void main() {
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user