smartfarming-mobile/agrilink_vocpro/lib/features/dashboard/provider/dashboard_provider.dart

24 lines
582 B
Dart
Raw Normal View History

2024-09-17 04:17:03 +00:00
import 'package:agrilink_vocpro/features/home/view/home_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 Center(child: Text('Control')),
const Center(child: Text('Plants')),
const Center(child: Text('Settings')),
];
List<Widget> get screens => _screens;
}