26 lines
702 B
Dart
26 lines
702 B
Dart
import 'package:agrilink_vocpro/features/control/view/control_screen.dart';
|
|
import 'package:agrilink_vocpro/features/home/view/home_screen.dart';
|
|
import 'package:agrilink_vocpro/features/plants/view/plants_screen.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class DashboardProvider extends ChangeNotifier {
|
|
int _currentIndex = 0;
|
|
int get currentIndex => _currentIndex;
|
|
|
|
final date = DateTime.now();
|
|
|
|
void setCurrentIndex(int index) {
|
|
_currentIndex = index;
|
|
notifyListeners();
|
|
}
|
|
|
|
final List<Widget> _screens = [
|
|
const HomeScreen(),
|
|
const ControlScreen(),
|
|
const PlantsScreen(),
|
|
const Center(child: Text('Settings')),
|
|
];
|
|
|
|
List<Widget> get screens => _screens;
|
|
}
|