A complete Flutter application for managing solar panel systems with user authentication, real-time monitoring, panel control, and maintenance scheduling.
- Login and Registration system
- Demo account:
demo@solar.com/password123 - User profile management
- Real-time solar generation monitoring
- Power consumption tracking
- Net power calculation
- Efficiency metrics
- Daily and hourly data visualization
- Interactive power generation chart
- Auto/Manual mode switching
- Azimuth angle adjustment (0-360°)
- Tilt angle adjustment (0-90°)
- Visual compass orientation display
- Real-time panel direction visualization
- Task scheduling with reminders
- Priority levels (High, Medium, Low)
- Task completion tracking
- Overdue task alerts
- Add custom maintenance tasks
- View system information
- Panel count and location
- Settings and preferences
- Logout functionality
lib/
├── main.dart # App entry point
├── models/
│ ├── user.dart # User model
│ ├── solar_data.dart # Solar data model
│ ├── panel_settings.dart # Panel settings model
│ └── maintenance_task.dart # Maintenance task model
├── providers/
│ ├── auth_provider.dart # Authentication state management
│ ├── solar_provider.dart # Solar data state management
│ └── maintenance_provider.dart # Maintenance state management
└── screens/
├── login_screen.dart # Login/Registration UI
├── home_screen.dart # Main navigation
├── dashboard_screen.dart # Dashboard with charts
├── panel_control_screen.dart # Panel angle controls
├── maintenance_screen.dart # Maintenance tasks
└── profile_screen.dart # User profile
- Flutter SDK (3.0.0 or higher)
- Dart SDK
- Android Studio / VS Code
- Android/iOS device or emulator
- Clone or create the project:
flutter create solar_panel_app
cd solar_panel_app-
Replace the files:
- Copy all the provided Dart files into their respective directories
- Replace
pubspec.yamlwith the provided configuration
-
Install dependencies:
flutter pub get- Run the app:
flutter rundependencies:
flutter:
sdk: flutter
provider: ^6.0.5 # State management
cupertino_icons: ^1.0.2 # iOS style iconsThe app uses static/mock data for demonstration:
- 7 days of hourly data
- Simulated solar generation pattern (peak at noon)
- Realistic consumption patterns (morning and evening peaks)
- Efficiency calculations
- Email:
demo@solar.com, Password:password123 - Email:
john@example.com, Password:john123
- Panel Cleaning (High priority)
- Inverter Check (Medium priority)
- Wire Inspection (Medium priority)
- Performance Analysis (Low priority)
- Launch the app
- Use demo credentials or register a new account
- Access the dashboard
- Navigate to Dashboard
- View current generation, consumption, and efficiency
- Check today's summary statistics
- Analyze hourly power chart
- Go to Panel Control screen
- Switch between Auto/Manual mode
- Adjust azimuth angle (direction)
- Adjust tilt angle
- View visual orientation indicator
- Open Maintenance screen
- View upcoming and completed tasks
- Check/uncheck tasks to mark completion
- Add new custom tasks with priority and date
- Delete tasks if needed
Replace the static data providers with API calls:
// In solar_provider.dart
Future<void> fetchRealTimeData() async {
final response = await http.get('your-api-endpoint');
// Parse and update state
}Use flutter_local_notifications package:
dependencies:
flutter_local_notifications: ^16.0.0Replace in-memory storage with SQLite:
dependencies:
sqflite: ^2.3.0
path_provider: ^2.1.0- Real-time IoT integration
- Cloud data synchronization
- Advanced analytics and reporting
- Weather integration
- Cost savings calculator
- Energy storage (battery) monitoring
- Multi-location support
- Push notifications
- Historical data export
- Dark mode support