Настройки, авторизация
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import '../../features/auth/presentation/bloc/auth_bloc.dart';
|
||||
import '../../features/auth/presentation/bloc/auth_state.dart';
|
||||
import '../../features/auth/presentation/pages/login_page.dart';
|
||||
import '../../features/settings/presentation/pages/settings_page.dart';
|
||||
import '../router/chats_placeholder.dart';
|
||||
|
||||
@@ -89,16 +85,6 @@ class SettingsTab extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocBuilder<AuthBloc, AuthState>(
|
||||
builder: (context, authState) {
|
||||
return authState.when(
|
||||
initial: () => const Center(child: CircularProgressIndicator()),
|
||||
loading: () => const Center(child: CircularProgressIndicator()),
|
||||
authenticated: (_) => const SettingsPage(),
|
||||
unauthenticated: () => const LoginPage(),
|
||||
error: (_) => const LoginPage(),
|
||||
);
|
||||
},
|
||||
);
|
||||
return const SettingsPage();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user