Skip to content

Commit

Permalink
Allow refresh on no courses
Browse files Browse the repository at this point in the history
  • Loading branch information
Process-ing committed Feb 6, 2025
1 parent 0d1e710 commit c43a725
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/uni_app/lib/view/academic_path/courses_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,17 @@ class CoursesPageState extends State<CoursesPage> {
);
},
hasContent: (profile) => profile.courses.isNotEmpty,
onNullContent: const NoCoursesWidget(),
onNullContent: LayoutBuilder( // Band-aid for allowing refresh on null content
builder: (context, constraints) => SingleChildScrollView(
physics: const AlwaysScrollableScrollPhysics(),
child: SizedBox(
height: constraints.maxHeight,
child: const Center(
child: NoCoursesWidget(),
),
),
),
),
);
}
}

0 comments on commit c43a725

Please sign in to comment.