refactor(apps): 主题系统迁移至 ColorScheme + 扩展架构并支持 Dark Mode
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:social_app/core/auth/session_controller.dart';
|
||||
import 'package:social_app/features/auth/presentation/bloc/auth_bloc.dart';
|
||||
import 'package:social_app/features/auth/presentation/bloc/auth_event.dart';
|
||||
import 'package:social_app/features/auth/presentation/bloc/auth_state.dart';
|
||||
|
||||
class AuthSessionController implements SessionController {
|
||||
final AuthBloc _authBloc;
|
||||
|
||||
AuthSessionController(this._authBloc);
|
||||
|
||||
@override
|
||||
Future<void> logoutAndWaitUnauthenticated() async {
|
||||
_authBloc.add(AuthLoggedOut());
|
||||
await _authBloc.stream
|
||||
.firstWhere((state) => state is AuthUnauthenticated)
|
||||
.timeout(const Duration(seconds: 5));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user