Commit Graph

53 Commits

Author SHA1 Message Date
b58af41b88 add all devices fetch 2024-06-23 12:01:06 +03:00
1fe4603cbf connected all devices 2024-06-22 16:44:17 +03:00
a8132c37db push scene devices body with blocs. need to drop the future builder - enhancment 2024-06-13 02:13:44 +03:00
76f5c6d325 bug fixes and read sensors states 2024-06-06 11:14:25 +03:00
4257d69768 Implemented Ac functionality, and bug fixes 2024-05-20 02:40:50 +03:00
0f75c3def1 Fixed logout issue 2024-05-18 23:45:23 +03:00
fbe2f5fe53 !! BIG CHANGE TO ASSETS GEN !!
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.
2024-05-07 12:26:12 +03:00
414a205833 built the interface for the blind curtains. 2024-05-06 14:38:29 +03:00
c04e64b613 Initilized the Blinds View and its animations 2024-05-01 10:33:24 +03:00
f8358a0877 Updated the API Endpoints, API Calls, Data Models and cubits to the lateset changes from the backend 2024-04-29 10:00:58 +03:00
cc6b68e338 Update device interfaces and add new doors list view widget
- 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
2024-04-16 14:53:43 +03:00
df13c66b1a Refactor API error handling and add try-catch blocks
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.
2024-04-15 15:47:13 +03:00
cfc395e210 Refactor HTTPInterceptor and add CustomSnackBar helper
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.
2024-04-15 12:02:34 +03:00
6dfce18703 Refactor UI structure in curtain and light widgets
Simplify UI structure in curtain_view.dart and light_interface.dart by
rearranging the widget tree for better readability and maintainability.
2024-04-07 12:50:12 +03:00
37d2c1b53f apend 2024-04-04 00:01:02 +03:00
6577652702 Refactor AC mode control unit widget
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.
2024-04-03 18:53:54 +03:00
e49627d3e1 Add status model and fetch device statuses
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.
2024-04-03 11:07:55 +03:00
5ff5f65549 Refactor emit calls to use emitSafe method
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.
2024-04-03 02:12:35 +03:00
127d3a0295 Refactor code structure and update dependencies
Clean up code structure, remove unused imports, and update dependencies.
No functional changes made, only code organization improvements.
2024-04-03 01:55:50 +03:00
9cc479ba17 Refactor email and password validation logic in LoginForm widget
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.
2024-04-02 18:09:23 +03:00
ef41940333 Add support for different device types in RoomPageSwitch
-Update the navigation approch to be device type orianted to the corresponding interface when tapped.
-Add three gang switch interface and related components
2024-04-02 15:45:21 +03:00
5dc4f96a71 Add functionality to fetch devices by room ID
Added a new method in DevicesCubit to fetch devices by room ID and updated
related classes and API calls to support this functionality.
2024-04-02 12:12:54 +03:00
d1bc973b38 Refactor HomeCubit class for better instance management
Create a private static instance variable and refactor methods for better instance management in the HomeCubit class.
2024-04-01 12:09:01 +03:00
a20dfa3709 Refactor device status handling and update UI 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
2024-04-01 09:58:51 +03:00
e17c0af144 Add HomeCubit and HomeState classes
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
2024-03-24 14:43:13 +03:00
c0bfd24751 Refactor device-related views and add error handling
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.
2024-03-21 13:58:20 +03:00
a52f2c0b5a Add close method override in DevicesCubit
Add override for close method in DevicesCubit to set _isClosed flag and call super.close(). This prevents further operations after closing.
2024-03-19 15:17:40 +03:00
42051bb977 Fixed the overflow in the login screen, the page is scrollable.
- Fixed Scrolling wasent working in login screen
- Changed Home page to indexed based view instead of PageView
2024-03-19 13:29:12 +03:00
79279180df Refactor code for better readability and maintainability
- 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.
2024-03-19 11:15:45 +03:00
13e80fbad7 fetch groups 2024-03-18 11:46:27 +03:00
65cbf10485 temp 2024-03-17 09:38:26 +03:00
c5f1b8d090 switch functionality initial implantation 2024-03-14 01:14:54 +03:00
00d1ad50f1 built 3 gang switch View 2024-03-14 00:38:00 +03:00
f11b6d8d32 Added page swipe for navigation 2024-03-10 16:57:12 +03:00
f8e8591d13 Implemented room device interface
(AC only)
2024-03-07 14:53:13 +03:00
b3fcca639a Removed location from models
Added the spaces models
Added the rooms models
Added the Spaces cubit
Implemented the home dropdown functionality
2024-03-06 21:34:23 +03:00
5a9c96b0a8 Built Curtains List view
Modified Category Model(default value of devices status is now null)
Added a category getter in each devices cubit ( AcCubit, LightsCubit ...)
2024-03-05 12:36:57 +03:00
33b7149dde fixed padding bug
fixed AC interface routing issue
2024-03-04 17:10:34 +03:00
282739acf7 Added ac bounds in model
implemented bounds in AC Temp controls
2024-03-04 15:55:02 +03:00
49b24e14eb Fixed navigation issue 2024-03-04 15:03:57 +03:00
7ecac02a8a light interface 2024-03-04 14:38:48 +03:00
d9a3f9e2a0 code refactoring 2024-03-03 19:07:24 +03:00
24ccb243d4 fixed Universal AC temperature control 2024-03-03 16:17:00 +03:00
643b206d4c cleaned some warring messages 2024-03-03 13:10:03 +03:00
136987c56a built Lights List 2024-03-03 13:05:34 +03:00
7e98329738 added Null state from the AC universal switch (in case the status for the ACs are different from each other) 2024-03-03 11:37:30 +03:00
bcaed7a4b8 Converted all the devices models to extends from DeviceModel for the purpose of unifying.
Initialized Lights feature.
2024-03-02 21:57:11 +03:00
4ee5426e9c Implemented AC Interface 2024-02-29 12:11:39 +03:00
3fabd41e72 Stabilized UI elements across multiple devices
Synchronized ACs Status functionality
2024-02-28 12:22:45 +03:00
4c27cce519 Switches updated 2024-02-27 10:13:58 +03:00