Merge pull request #5220 from pangeachat/5219-no-padding-around-vocab-practice-on-small-screens

fix: always add padding around practice page content
This commit is contained in:
ggurdin 2026-01-16 10:32:44 -05:00 committed by GitHub
commit 1bfc3cf808
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,26 +67,28 @@ class VocabPracticeView extends StatelessWidget {
],
),
),
body: MaxWidthBody(
withScrolling: false,
body: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16.0,
vertical: 24.0,
),
showBorder: false,
child: ValueListenableBuilder(
valueListenable: controller.sessionState,
builder: (context, state, __) {
return switch (state) {
AsyncError<VocabPracticeSessionModel>(:final error) =>
ErrorIndicator(message: error.toString()),
AsyncLoaded<VocabPracticeSessionModel>(:final value) =>
value.isComplete
? CompletedActivitySessionView(state.value, controller)
: _VocabActivityView(controller),
_ => loading,
};
},
child: MaxWidthBody(
withScrolling: false,
showBorder: false,
child: ValueListenableBuilder(
valueListenable: controller.sessionState,
builder: (context, state, __) {
return switch (state) {
AsyncError<VocabPracticeSessionModel>(:final error) =>
ErrorIndicator(message: error.toString()),
AsyncLoaded<VocabPracticeSessionModel>(:final value) =>
value.isComplete
? CompletedActivitySessionView(state.value, controller)
: _VocabActivityView(controller),
_ => loading,
};
},
),
),
),
);