This project is a Flutter application that demonstrates a simple Smart Home UI. It allows users to control various home appliances through a mobile interface.
The project consists of the following main components:
HomePage
: The main screen of the application.HomeApplianceTile
: A widget representing each smart home device.HomeAppliance
: A model class for smart home devices.
The HomePage
is the main screen of the application. It displays a list of smart home devices in a grid layout. Key features include:
- AppBar with a title and icons
- Welcome message
- Grid of smart home devices
The HomeApplianceTile
is a custom widget that represents each smart home device. It displays:
- An emoji representing the device
- The name of the device
- A switch to toggle the device on/off
The appearance of the tile changes based on whether the device is on or off.
The HomeAppliance
class is a model representing a smart home device. It contains:
imageAsset
: An emoji representing the devicename
: The name of the deviceisOnOrOff
: A boolean indicating whether the device is on or offkillSwitch
: A switch to turn off all appliances at once. (named it AZ-5 button because you know...)
To use this application:
- Ensure you have Flutter installed on your machine.
- Clone this repository.
- Run
flutter pub get
to install dependencies. - Run the app using
flutter run
.
You can easily customize the list of smart home devices by modifying the listOfHomeAppliance
in the HomePage
class. Add or remove HomeAppliance
objects as needed.
This project currently does not persist the state of the devices when the app is closed. If you want to implement state persistence, consider using a state management solution or local storage option like Hive or SharedPreferences.
- Implement state persistence for device status
- Add more customization options for devices
- Implement actual functionality for controlling real smart home devices
Feel free to contribute to this project by submitting pull requests or opening issues for any bugs or feature requests.