26 lines
570 B
Dart
26 lines
570 B
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:robo_advisory/models/user.dart';
|
|
|
|
class UserProvider with ChangeNotifier {
|
|
User _user = new User();
|
|
int _selectedTabIndex = 0;
|
|
|
|
List<String> _categories = ["All", "Workplace", "Equipment", "Home", "Other"];
|
|
|
|
List<String> get categories => _categories;
|
|
|
|
User get user => _user;
|
|
|
|
int get selectedTabIndex => _selectedTabIndex;
|
|
|
|
void setSelectedTabIndex(int index) {
|
|
_selectedTabIndex = index;
|
|
notifyListeners();
|
|
}
|
|
|
|
void setUser(User user) {
|
|
_user = user;
|
|
notifyListeners();
|
|
}
|
|
}
|