init
This commit is contained in:
11
lib/services/auth_service.dart
Normal file
11
lib/services/auth_service.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class AuthService extends GetxService {
|
||||
static AuthService get to => Get.find<AuthService>();
|
||||
|
||||
/// 供外部使用的,判断是否登录的状态
|
||||
get isUserLogin => isLogin.value;
|
||||
|
||||
/// 登录状态记录,可监听的,这样ever才能监听到
|
||||
final RxBool isLogin = false.obs;
|
||||
}
|
||||
11
lib/services/tabbar_service.dart
Normal file
11
lib/services/tabbar_service.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class TabbarService extends GetxService {
|
||||
static TabbarService get to => Get.find<TabbarService>();
|
||||
|
||||
final RxInt _index = 0.obs;
|
||||
|
||||
set index(int value) => _index.value = value;
|
||||
|
||||
int get index => _index.value;
|
||||
}
|
||||
7
lib/services/tim_service.dart
Normal file
7
lib/services/tim_service.dart
Normal file
@@ -0,0 +1,7 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class TimService extends GetxService {
|
||||
Future<TimService> init() async {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user