Skip to content

Commit 53ecb8e

Browse files
Copilotmikebarkmin
andauthored
fix: add FAB clearance bottom padding in lesson mode screen
Agent-Logs-Url: https://github.com/openpatch/classi/sessions/4f2fe42d-5562-426b-ac21-a7f226348c03 Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
1 parent c2b80c5 commit 53ecb8e

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

lib/features/lessons/lesson_mode_screen.dart

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,22 @@ class _LessonModeScreenState extends ConsumerState<LessonModeScreen> {
183183
}
184184
}
185185

186+
// Add extra bottom padding when the FAB is visible so the last
187+
// list item is not obscured by it.
188+
// 56dp is the standard Material extended FAB height.
189+
const kExtendedFabHeight = 56.0;
190+
final hasFab = gradeCategories.length > 1;
191+
final listPadding = hasFab
192+
? appScreenPadding.copyWith(
193+
bottom: appScreenPadding.bottom +
194+
kFloatingActionButtonMargin +
195+
kExtendedFabHeight,
196+
)
197+
: appScreenPadding;
198+
186199
return ContentConstraints(
187200
child: ListView(
188-
padding: appScreenPadding,
201+
padding: listPadding,
189202
children: [
190203
LessonContextCard(
191204
sessionController: _sessionController,

0 commit comments

Comments
 (0)