mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 20:34:54 +00:00
AC devices page implemented
AC Cubit Add
New Devices Cubit Arch will be used
Devices Cubit (for devices categories, and devices page)
{
AC cubit,
Lights cubit.
... }
Replaced AssetsManager with Assets Class (auto generated)
This commit is contained in:
19
lib/features/devices/model/ac_model.dart
Normal file
19
lib/features/devices/model/ac_model.dart
Normal file
@ -0,0 +1,19 @@
|
||||
class ACModel {
|
||||
final String name;
|
||||
final String id;
|
||||
late bool status;
|
||||
late double temperature;
|
||||
|
||||
late int fanSpeed;
|
||||
|
||||
late int tempMode;
|
||||
|
||||
ACModel({
|
||||
required this.name,
|
||||
required this.id,
|
||||
required this.status,
|
||||
required this.temperature,
|
||||
required this.fanSpeed,
|
||||
required this.tempMode,
|
||||
});
|
||||
}
|
||||
@ -1,16 +1,23 @@
|
||||
import 'device_model.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
import 'ac_model.dart';
|
||||
|
||||
class DevicesCategoryModel {
|
||||
final String name;
|
||||
final String icon;
|
||||
|
||||
final bool switchValue;
|
||||
final List<DeviceModel> devices;
|
||||
final Widget page;
|
||||
|
||||
bool switchValue;
|
||||
final List<ACModel> devices;
|
||||
|
||||
final DeviceType type;
|
||||
bool isSelected;
|
||||
|
||||
DevicesCategoryModel(
|
||||
{required this.type,
|
||||
{this.isSelected = false,
|
||||
required this.page,
|
||||
required this.type,
|
||||
required this.name,
|
||||
required this.icon,
|
||||
required this.switchValue,
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
class DeviceModel {
|
||||
final String name;
|
||||
final String imageUrl;
|
||||
final String description;
|
||||
final String category;
|
||||
final String id;
|
||||
|
||||
DeviceModel(
|
||||
{required this.name,
|
||||
required this.imageUrl,
|
||||
required this.description,
|
||||
required this.category,
|
||||
required this.id});
|
||||
}
|
||||
Reference in New Issue
Block a user