初始化
This commit is contained in:
14
lib/data/stores/user_provider.dart
Normal file
14
lib/data/stores/user_provider.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
import 'package:flutter_riverpod/legacy.dart';
|
||||
|
||||
final userProvider = StateNotifierProvider<UserNotifier, UserState>((ref) => UserNotifier());
|
||||
|
||||
class UserNotifier extends StateNotifier<UserState> {
|
||||
UserNotifier() : super(UserState());
|
||||
}
|
||||
|
||||
/// 用户数据
|
||||
class UserState {
|
||||
String token;
|
||||
|
||||
UserState({this.token = ""});
|
||||
}
|
||||
Reference in New Issue
Block a user