mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Fix some tests
Flutter 3.7 seems to need an explicit Scrollable widget
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:wger/theme/theme.dart';
|
||||
|
||||
/// Arguments passed to the form screen
|
||||
@@ -59,9 +60,11 @@ class FormScreen extends StatelessWidget {
|
||||
backgroundColor: args.backgroundColor,
|
||||
appBar: AppBar(title: Text(args.title)),
|
||||
body: args.hasListView
|
||||
? Padding(
|
||||
padding: args.padding,
|
||||
child: args.widget,
|
||||
? Scrollable(
|
||||
viewportBuilder: (BuildContext context, ViewportOffset position) => Padding(
|
||||
padding: args.padding,
|
||||
child: args.widget,
|
||||
),
|
||||
)
|
||||
: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter_typeahead/flutter_typeahead.dart';
|
||||
@@ -84,7 +85,10 @@ void main() {
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
navigatorKey: key,
|
||||
home: Scaffold(
|
||||
body: MealItemForm(meal, const [], null, code, test),
|
||||
body: Scrollable(
|
||||
viewportBuilder: (BuildContext context, ViewportOffset position) =>
|
||||
MealItemForm(meal, const [], null, code, test),
|
||||
),
|
||||
),
|
||||
routes: {
|
||||
NutritionalPlanScreen.routeName: (ctx) => NutritionalPlanScreen(),
|
||||
|
||||
Reference in New Issue
Block a user