mirror of
https://github.com/immich-app/immich.git
synced 2025-06-03 13:44:16 -04:00
feat(mobile): Made Map Bottom Sheet extendable higher (#16056)
Made Map Bottom Sheet extendable higher
This commit is contained in:
parent
703361da1a
commit
7c821dd205
@ -59,9 +59,10 @@ class MapBottomSheet extends HookConsumerWidget {
|
|||||||
child: DraggableScrollableSheet(
|
child: DraggableScrollableSheet(
|
||||||
controller: sheetController,
|
controller: sheetController,
|
||||||
minChildSize: sheetMinExtent,
|
minChildSize: sheetMinExtent,
|
||||||
maxChildSize: 0.5,
|
maxChildSize: 0.8,
|
||||||
initialChildSize: sheetMinExtent,
|
initialChildSize: sheetMinExtent,
|
||||||
snap: true,
|
snap: true,
|
||||||
|
snapSizes: [sheetMinExtent, 0.5, 0.8],
|
||||||
shouldCloseOnMinExtent: false,
|
shouldCloseOnMinExtent: false,
|
||||||
builder: (ctx, scrollController) => MapAssetGrid(
|
builder: (ctx, scrollController) => MapAssetGrid(
|
||||||
controller: scrollController,
|
controller: scrollController,
|
||||||
@ -78,18 +79,23 @@ class MapBottomSheet extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
ValueListenableBuilder(
|
ValueListenableBuilder(
|
||||||
valueListenable: bottomSheetOffset,
|
valueListenable: bottomSheetOffset,
|
||||||
builder: (ctx, value, child) => Positioned(
|
builder: (context, value, child) {
|
||||||
right: 0,
|
return Positioned(
|
||||||
bottom: context.height * (value + 0.02),
|
right: 0,
|
||||||
child: child!,
|
bottom: context.height * (value + 0.02),
|
||||||
),
|
child: AnimatedOpacity(
|
||||||
child: ElevatedButton(
|
opacity: value < 0.8 ? 1 : 0,
|
||||||
onPressed: onZoomToLocation,
|
duration: const Duration(milliseconds: 150),
|
||||||
style: ElevatedButton.styleFrom(
|
child: ElevatedButton(
|
||||||
shape: const CircleBorder(),
|
onPressed: onZoomToLocation,
|
||||||
),
|
style: ElevatedButton.styleFrom(
|
||||||
child: const Icon(Icons.my_location),
|
shape: const CircleBorder(),
|
||||||
),
|
),
|
||||||
|
child: const Icon(Icons.my_location),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user