Skip to content

Commit

Permalink
UI/fix secondary navbar (#1455)
Browse files Browse the repository at this point in the history
  • Loading branch information
thePeras authored Feb 6, 2025
2 parents ac2a4a8 + 1ba3dfa commit 757d648
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/uni_app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();

await SystemChrome.setEnabledSystemUIMode(
SystemUiMode.edgeToEdge,
SystemUiMode.immersiveSticky,
overlays: [
SystemUiOverlay.top,
SystemUiOverlay.bottom,
Expand Down
2 changes: 2 additions & 0 deletions packages/uni_app/lib/view/academic_path/exam_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class _ExamsPageState extends State<ExamsPage> {
rooms: ['B315', 'B224', 'B207'],
type: 'MT',
startTime: '12:00',
tooltip: '',
),
),
itemBuilder: (context, index) {
Expand All @@ -81,6 +82,7 @@ class _ExamsPageState extends State<ExamsPage> {
isActive: _nextExam(exams) == exam,
card: ExamCard(
name: exam.subject,
tooltip: exam.subject,
acronym: exam.subjectAcronym,
rooms: exam.rooms,
type: exam.examType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@ import 'package:uni/view/common_widgets/pages_layouts/general/widgets/top_naviga
abstract class SecondaryPageViewState<T extends StatefulWidget>
extends GeneralPageViewState<T> {
@override
Scaffold getScaffold(BuildContext context, Widget body) {
return Scaffold(
backgroundColor: Theme.of(context).colorScheme.surface,
appBar: getTopNavbar(context),
bottomNavigationBar: const AppBottomNavbar(),
body: RefreshState(
onRefresh: onRefresh,
header: getHeader(context),
body: body,
Widget getScaffold(BuildContext context, Widget body) {
return MediaQuery.removePadding(
// Prevent misalignment of navbar icons
context: context,
removeBottom: true,
child: Scaffold(
backgroundColor: Theme.of(context).colorScheme.surface,
appBar: getTopNavbar(context),
extendBody: true, // Allow body to appear behind the bottom navbar
bottomNavigationBar: const AppBottomNavbar(),
body: RefreshState(
onRefresh: onRefresh,
header: getHeader(context),
body: body,
),
),
);
}
Expand Down

0 comments on commit 757d648

Please sign in to comment.