File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import 'package:wger/models/workouts/weight_unit.dart';
30
30
import 'package:wger/models/workouts/workout_plan.dart' ;
31
31
import 'package:wger/providers/exercises.dart' ;
32
32
import 'package:wger/providers/workout_plans.dart' ;
33
+ import 'package:wger/screens/add_exercise_screen.dart' ;
33
34
import 'package:wger/screens/workout_plan_screen.dart' ;
34
35
import 'package:wger/widgets/exercises/images.dart' ;
35
36
@@ -423,7 +424,25 @@ class _SetFormWidgetState extends State<SetFormWidget> {
423
424
),
424
425
);
425
426
},
427
+ noItemsFoundBuilder: (context) {
428
+ return Padding (
429
+ padding: const EdgeInsets .symmetric (vertical: 8.0 ),
430
+ child: Column (
431
+ mainAxisSize: MainAxisSize .min,
432
+ children: [
433
+ Text (AppLocalizations .of (context).noMatchingExerciseFound),
434
+ TextButton (
435
+ onPressed: () {
436
+ Navigator .of (context).pushNamed (AddExerciseScreen .routeName);
437
+ },
438
+ child: Text (AppLocalizations .of (context).contributeExercise),
439
+ ),
440
+ ],
441
+ ),
442
+ );
443
+ },
426
444
transitionBuilder: (context, suggestionsBox, controller) {
445
+ // TODO: Return suggestion box w/ button
427
446
return suggestionsBox;
428
447
},
429
448
onSuggestionSelected: (ExerciseBase exerciseSuggestion) {
You can’t perform that action at this time.
0 commit comments