changed the method of generating assets to be more declrative when it comes to names of the assets.
it now include the file path name e.g (asset in the path "assets/images/home-images/home.png" will be generated as this "String assetsImagesHomeImageshome = "path" ".
this will be very helpful in the future when we want to orgnize the assets dir.
- Add a new widget 'DoorsListView' for displaying a list of smart doors
- Update the navigation method to devices interfaces in 'RoomPageSwitch' widget
- Add battery and doorlock icons to auto generated assets
Added try-catch blocks for error handling in API's files to rethrow the errors to the cubit so cubits can update the UI based on them.
Refactored error handling in HTTPInterceptor and HTTPService classes.
Refactor HTTPInterceptor to handle error responses and add a CustomSnackBar
helper to display snack bars. This will improve error handling and user
feedback in the application.
Move fan speed and temperature mode logic to the DevicesCubit for better
separation of concerns and improved code readability. Update widget to use
BlocBuilder for state management and simplify control logic.
Added a new StatusModel class to represent device statuses and implemented
functionality to fetch and update device statuses in the DevicesCubit and
DeviceModel classes. Also updated UI components to display device status
information.
Replace direct calls to emit with emitSafe method to ensure emitting
states only when the cubit is not closed. This helps prevent errors
when emitting states after the cubit is closed.
Update email and password validation logic in the LoginForm widget to only
perform validation when the state is not AuthTokenError. This ensures that
validation is skipped when there is an authentication token error.
-Update the navigation approch to be device type orianted to the corresponding interface when tapped.
-Add three gang switch interface and related components
- Update device status handling from 'status' to 'isOnline' for consistency
- Remove unused imports and redundant code related to light switches
- Refactor UI components to use 'isOnline' instead of 'status' for device status
This commit adds the HomeCubit class along with its corresponding HomeState
class. It also includes necessary imports and updates references to the
previously used SpacesCubit to the new HomeCubit in various files.
handled the multible onCreate -- HomeCubit
Refactor device-related views to improve code structure and readability.
Add error handling for authentication token in the splash view.
Remove unnecessary NavCubit from the app initialization.
- Add method to get token and validate in AuthCubit
- Update AuthState with loading, success, and error states for token
- Use BlocBuilder in SplashView for token validation and navigation
This commit refactors the code in AuthCubit to include a method to get the token and validate it. It also updates the AuthState with loading, success, and error states for token handling. In SplashView, BlocBuilder is now used to handle token validation and navigation based on the token status.