mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
Added scene setting
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import 'package:syncrow_web/pages/routiens/models/icon_model.dart';
|
||||
import 'package:syncrow_web/pages/routiens/models/routine_model.dart';
|
||||
import 'package:syncrow_web/services/api/http_service.dart';
|
||||
import 'package:syncrow_web/utils/constants/api_const.dart';
|
||||
@ -41,6 +42,21 @@ class SceneApi {
|
||||
// }
|
||||
// }
|
||||
|
||||
static Future<List<IconModel>> getIcon() async {
|
||||
final response = await _httpService.get(
|
||||
path: ApiEndpoints.getIconScene,
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
List<IconModel> iconsList = [];
|
||||
json.forEach((element) {
|
||||
iconsList.add(IconModel.fromJson(element));
|
||||
});
|
||||
return iconsList;
|
||||
},
|
||||
);
|
||||
return response;
|
||||
}
|
||||
|
||||
//get scene by unit id
|
||||
|
||||
static Future<List<ScenesModel>> getScenesByUnitId(String unitId) async {
|
||||
|
Reference in New Issue
Block a user