mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-09-30 13:09:35 +02:00
Fix UI overlap with OS nav bar/buttons
This commit is contained in:
1 parent
9ef06cdec2
commit
079448eeeb
6 files changed
+75
-60
No files matched your search
@@ -23,7 +23,7 @@
|
|||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
android:theme="@style/LaunchTheme"
|
android:theme="@style/LaunchTheme"
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
android:windowSoftInputMode="adjustResize">
|
android:windowSoftInputMode="adjustNothing">
|
||||||
|
|
||||||
<!-- The theme behind the splash while Flutter initializes -->
|
<!-- The theme behind the splash while Flutter initializes -->
|
||||||
<meta-data
|
<meta-data
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@ const String kClientName = 'DeFlock';
|
|||||||
// Note: Version is now dynamically retrieved from VersionService
|
// Note: Version is now dynamically retrieved from VersionService
|
||||||
|
|
||||||
// Development/testing features - set to false for production builds
|
// Development/testing features - set to false for production builds
|
||||||
const bool kEnableDevelopmentModes = false; // Set to false to hide sandbox/simulate modes and force production mode
|
const bool kEnableDevelopmentModes = true; // Set to false to hide sandbox/simulate modes and force production mode
|
||||||
|
|
||||||
// Navigation features - set to false to hide navigation UI elements while in development
|
// Navigation features - set to false to hide navigation UI elements while in development
|
||||||
const bool kEnableNavigationFeatures = kEnableDevelopmentModes; // Hide navigation until fully implemented
|
const bool kEnableNavigationFeatures = kEnableDevelopmentModes; // Hide navigation until fully implemented
|
||||||
|
|||||||
@@ -102,13 +102,18 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||||||
final session = appState.session!; // guaranteed non‑null now
|
final session = appState.session!; // guaranteed non‑null now
|
||||||
|
|
||||||
final controller = _scaffoldKey.currentState!.showBottomSheet(
|
final controller = _scaffoldKey.currentState!.showBottomSheet(
|
||||||
(ctx) => MeasuredSheet(
|
(ctx) => Padding(
|
||||||
onHeightChanged: (height) {
|
padding: EdgeInsets.only(
|
||||||
setState(() {
|
bottom: MediaQuery.of(context).padding.bottom, // Only safe area, no keyboard
|
||||||
_addSheetHeight = height;
|
),
|
||||||
});
|
child: MeasuredSheet(
|
||||||
},
|
onHeightChanged: (height) {
|
||||||
child: AddNodeSheet(session: session),
|
setState(() {
|
||||||
|
_addSheetHeight = height + MediaQuery.of(context).padding.bottom;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: AddNodeSheet(session: session),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -140,19 +145,24 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
|
|
||||||
final controller = _scaffoldKey.currentState!.showBottomSheet(
|
final controller = _scaffoldKey.currentState!.showBottomSheet(
|
||||||
(ctx) => MeasuredSheet(
|
(ctx) => Padding(
|
||||||
onHeightChanged: (height) {
|
padding: EdgeInsets.only(
|
||||||
setState(() {
|
bottom: MediaQuery.of(context).padding.bottom, // Only safe area, no keyboard
|
||||||
_editSheetHeight = height;
|
),
|
||||||
// Clear transition flag and reset tag sheet height once edit sheet starts sizing
|
child: MeasuredSheet(
|
||||||
if (height > 0 && _transitioningToEdit) {
|
onHeightChanged: (height) {
|
||||||
_transitioningToEdit = false;
|
setState(() {
|
||||||
_tagSheetHeight = 0.0; // Now safe to reset
|
_editSheetHeight = height + MediaQuery.of(context).padding.bottom;
|
||||||
_selectedNodeId = null; // Clear selection when moving to edit
|
// Clear transition flag and reset tag sheet height once edit sheet starts sizing
|
||||||
}
|
if (height > 0 && _transitioningToEdit) {
|
||||||
});
|
_transitioningToEdit = false;
|
||||||
},
|
_tagSheetHeight = 0.0; // Now safe to reset
|
||||||
child: EditNodeSheet(session: session),
|
_selectedNodeId = null; // Clear selection when moving to edit
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: EditNodeSheet(session: session),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -168,15 +178,20 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||||||
|
|
||||||
void _openNavigationSheet() {
|
void _openNavigationSheet() {
|
||||||
final controller = _scaffoldKey.currentState!.showBottomSheet(
|
final controller = _scaffoldKey.currentState!.showBottomSheet(
|
||||||
(ctx) => MeasuredSheet(
|
(ctx) => Padding(
|
||||||
onHeightChanged: (height) {
|
padding: EdgeInsets.only(
|
||||||
setState(() {
|
bottom: MediaQuery.of(context).padding.bottom, // Only safe area, no keyboard
|
||||||
_navigationSheetHeight = height;
|
),
|
||||||
});
|
child: MeasuredSheet(
|
||||||
},
|
onHeightChanged: (height) {
|
||||||
child: NavigationSheet(
|
setState(() {
|
||||||
onStartRoute: _onStartRoute,
|
_navigationSheetHeight = height + MediaQuery.of(context).padding.bottom;
|
||||||
onResumeRoute: _onResumeRoute,
|
});
|
||||||
|
},
|
||||||
|
child: NavigationSheet(
|
||||||
|
onStartRoute: _onStartRoute,
|
||||||
|
onResumeRoute: _onResumeRoute,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -392,19 +407,24 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final controller = _scaffoldKey.currentState!.showBottomSheet(
|
final controller = _scaffoldKey.currentState!.showBottomSheet(
|
||||||
(ctx) => MeasuredSheet(
|
(ctx) => Padding(
|
||||||
onHeightChanged: (height) {
|
padding: EdgeInsets.only(
|
||||||
setState(() {
|
bottom: MediaQuery.of(context).padding.bottom, // Only safe area, no keyboard
|
||||||
_tagSheetHeight = height;
|
),
|
||||||
});
|
child: MeasuredSheet(
|
||||||
},
|
onHeightChanged: (height) {
|
||||||
child: NodeTagSheet(
|
setState(() {
|
||||||
node: node,
|
_tagSheetHeight = height + MediaQuery.of(context).padding.bottom;
|
||||||
onEditPressed: () {
|
});
|
||||||
final appState = context.read<AppState>();
|
|
||||||
appState.startEditSession(node);
|
|
||||||
// This will trigger _openEditNodeSheet via the existing auto-show logic
|
|
||||||
},
|
},
|
||||||
|
child: NodeTagSheet(
|
||||||
|
node: node,
|
||||||
|
onEditPressed: () {
|
||||||
|
final appState = context.read<AppState>();
|
||||||
|
appState.startEditSession(node);
|
||||||
|
// This will trigger _openEditNodeSheet via the existing auto-show logic
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -51,10 +51,7 @@ class AddNodeSheet extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Padding(
|
return Column(
|
||||||
padding:
|
|
||||||
EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
@@ -192,7 +189,6 @@ class AddNodeSheet extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -53,10 +53,7 @@ class EditNodeSheet extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Padding(
|
return Column(
|
||||||
padding:
|
|
||||||
EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
@@ -199,7 +196,6 @@ class EditNodeSheet extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -525,13 +525,16 @@ class MapViewState extends State<MapView> {
|
|||||||
),
|
),
|
||||||
|
|
||||||
// All map overlays (mode indicator, zoom, attribution, add pin)
|
// All map overlays (mode indicator, zoom, attribution, add pin)
|
||||||
MapOverlays(
|
MediaQuery(
|
||||||
mapController: _controller.mapController,
|
data: MediaQuery.of(context).copyWith(viewInsets: EdgeInsets.zero),
|
||||||
uploadMode: appState.uploadMode,
|
child: MapOverlays(
|
||||||
session: session,
|
mapController: _controller.mapController,
|
||||||
editSession: editSession,
|
uploadMode: appState.uploadMode,
|
||||||
attribution: appState.selectedTileType?.attribution,
|
session: session,
|
||||||
onSearchPressed: widget.onSearchPressed,
|
editSession: editSession,
|
||||||
|
attribution: appState.selectedTileType?.attribution,
|
||||||
|
onSearchPressed: widget.onSearchPressed,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
// Network status indicator (top-left) - conditionally shown
|
// Network status indicator (top-left) - conditionally shown
|
||||||
|
|||||||
Reference in new issue
Block a user