fix(ui): Fix some ui bugs
This commit is contained in:
@@ -106,7 +106,7 @@ class _MapScreenState extends State<MapScreen> with WidgetsBindingObserver {
|
||||
onMapCreated: onMapCreated,
|
||||
markers: markerSnapshot.data ?? markersAll
|
||||
..addAll(markers),
|
||||
zoomControlsEnabled: false,
|
||||
zoomControlsEnabled: true,
|
||||
myLocationEnabled: true,
|
||||
mapToolbarEnabled: false,
|
||||
onCameraMove: (position) {
|
||||
@@ -138,10 +138,10 @@ class _MapScreenState extends State<MapScreen> with WidgetsBindingObserver {
|
||||
|
||||
void checkTheme() async {
|
||||
String theme = await apiServices.checkTheme();
|
||||
if (theme == AppThemes.LIGHT.name) {
|
||||
themeMode = '';
|
||||
} else {
|
||||
if (theme == AppThemes.DARK.name) {
|
||||
themeMode = await _getFileData('assets/map_themes/maps_dark_theme.json');
|
||||
} else {
|
||||
themeMode = '';
|
||||
}
|
||||
mapBloc.sinkMapTheme.add(themeMode);
|
||||
}
|
||||
@@ -274,10 +274,16 @@ class _MapScreenState extends State<MapScreen> with WidgetsBindingObserver {
|
||||
if (response != "") {
|
||||
final data = jsonDecode(response);
|
||||
List<dynamic> result = data['items'];
|
||||
final devicesList = Device.fromJsonDynamicList(result);
|
||||
for (var device in devicesList) {
|
||||
devices.add(device);
|
||||
if(result.isNotEmpty){
|
||||
devices.clear();
|
||||
final devicesList = Device.fromJsonDynamicList(result);
|
||||
for (var device in devicesList) {
|
||||
devices.add(device);
|
||||
}
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -188,8 +188,7 @@ showNearPlacesSideSheet(
|
||||
longitude,
|
||||
);
|
||||
},
|
||||
icon: IconConstants.instance
|
||||
.getMaterialIcon(Icons.turn_right),
|
||||
icon: const Icon(Icons.turn_right,color: Colors.white),
|
||||
label: Text(appLocalization(listViewContext)
|
||||
.map_show_direction),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user