Skip to content

Commit

Permalink
Merge branch 'ui/map-page' of github.com:NIAEFEUP/project-schrodinger…
Browse files Browse the repository at this point in the history
… into ui/map-page
  • Loading branch information
thePeras committed Feb 6, 2025
2 parents 27cccb4 + 19c8a9b commit d596ceb
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:uni/model/entities/location.dart';
import 'package:uni_ui/icons.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,20 @@ abstract class GeneralPageViewState<T extends StatefulWidget> extends State<T> {
}

Widget getScaffold(BuildContext context, Widget body) {
return Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: Theme.of(context).colorScheme.surface,
appBar: getTopNavbar(context),
extendBody: true,
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: const AppBottomNavbar(),
floatingActionButtonAnimator: FloatingActionButtonAnimator.noAnimation,
body: RefreshState(
onRefresh: onRefresh,
header: getHeader(context),
body: 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
16 changes: 12 additions & 4 deletions packages/uni_app/lib/view/map/widgets/marker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,19 @@ class MarkerIcon extends StatelessWidget {

final fontColor = _getFontColor(context);
if (location?.icon is IconData) {
return UniIcon(location?.icon as IconData,
color: fontColor, size: 12, solid: true);
return UniIcon(
location?.icon as IconData,
color: fontColor,
size: 12,
solid: true,
);
} else {
return UniIcon(Icons.device_unknown,
color: fontColor, size: 12, solid: true);
return UniIcon(
Icons.device_unknown,
color: fontColor,
size: 12,
solid: true,
);
}
}

Expand Down
1 change: 1 addition & 0 deletions packages/uni_ui/lib/navbar/bottom_navbar_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class BottomNavbarItem {
: null,
child: UniIcon(
icon,
size: 32,
color: Theme.of(context).colorScheme.secondary,
),
),
Expand Down

0 comments on commit d596ceb

Please sign in to comment.