|
|
|
|
@ -88,10 +88,6 @@ class _MapTrackingPageState extends State<MapTrackingPage> {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void getAssetsOnTheFloor(int id) {
|
|
|
|
|
assetTrackingProvider.getAssetsFromPenguinByFloorId(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void _onFloorMapLoaded(FloorMapModel? loadedFloorMap) {
|
|
|
|
|
floorMapModel = loadedFloorMap;
|
|
|
|
|
|
|
|
|
|
@ -184,25 +180,28 @@ class _MapTrackingPageState extends State<MapTrackingPage> {
|
|
|
|
|
styleDefaults: GeoJsonStyleDefaults.leaflet,
|
|
|
|
|
),
|
|
|
|
|
if (!inAppView) MarkerLayer(markers: markers),
|
|
|
|
|
Selector<AssetTrackingProvider, List<AssetTrackingModel>>(
|
|
|
|
|
selector: (_, myModel) => myModel.assetsOnTheFloorList,
|
|
|
|
|
builder: (_, assetsOnTheFloorList, __) {
|
|
|
|
|
return assetsOnTheFloorList.isEmpty
|
|
|
|
|
? const SizedBox()
|
|
|
|
|
: DraggableScrollableSheet(
|
|
|
|
|
initialChildSize: _sheetPosition,
|
|
|
|
|
builder: (BuildContext context, ScrollController scrollController) {
|
|
|
|
|
return Flexible(
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
if (inAppView)
|
|
|
|
|
Selector<AssetTrackingProvider, List<AssetTrackingModel>>(
|
|
|
|
|
selector: (_, myModel) => myModel.assetsOnTheFloorList,
|
|
|
|
|
builder: (_, assetsOnTheFloorList, __) {
|
|
|
|
|
return assetsOnTheFloorList.isEmpty
|
|
|
|
|
? const SizedBox()
|
|
|
|
|
: DraggableScrollableSheet(
|
|
|
|
|
initialChildSize: _sheetPosition,
|
|
|
|
|
maxChildSize: .8,
|
|
|
|
|
minChildSize: .15,
|
|
|
|
|
builder: (BuildContext context, ScrollController scrollController) {
|
|
|
|
|
return ListView.separated(
|
|
|
|
|
controller: scrollController,
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
itemCount: assetsOnTheFloorList.length,
|
|
|
|
|
separatorBuilder: (BuildContext context, int index) => 12.height,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return AssetTrackingListItemView(assetsOnTheFloorList[index]);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
).bottomSheetContainer(context, padding: const EdgeInsets.all(16));
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
@ -281,7 +280,7 @@ class _MapTrackingPageState extends State<MapTrackingPage> {
|
|
|
|
|
assetProvider.selectedFloor = value;
|
|
|
|
|
expansibleController.collapse();
|
|
|
|
|
getFloorMap(value.id!);
|
|
|
|
|
getAssetsOnTheFloor(value.id!);
|
|
|
|
|
assetTrackingProvider.getAssetsFromPenguinByFloor();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
|