Implemented settings, new scan, enhanced UI/UX
This commit is contained in:
@ -3,6 +3,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:hl_lieferservice/bloc/app_bloc.dart';
|
||||
import 'package:hl_lieferservice/feature/authentication/bloc/auth_bloc.dart';
|
||||
import 'package:hl_lieferservice/feature/authentication/presentation/login_enforcer.dart';
|
||||
import 'package:hl_lieferservice/feature/authentication/service/userinfo.dart';
|
||||
import 'package:hl_lieferservice/feature/cars/presentation/car_management_page.dart';
|
||||
import 'package:hl_lieferservice/feature/delivery/detail/bloc/delivery_bloc.dart';
|
||||
import 'package:hl_lieferservice/feature/delivery/detail/bloc/note_bloc.dart';
|
||||
@ -11,14 +12,13 @@ import 'package:hl_lieferservice/feature/delivery/detail/repository/note_reposit
|
||||
import 'package:hl_lieferservice/feature/delivery/detail/service/notes_service.dart';
|
||||
import 'package:hl_lieferservice/feature/delivery/overview/bloc/tour_bloc.dart';
|
||||
import 'package:hl_lieferservice/feature/delivery/overview/repository/tour_repository.dart';
|
||||
import 'package:hl_lieferservice/repository/user_repository.dart';
|
||||
import 'package:hl_lieferservice/feature/settings/bloc/settings_bloc.dart';
|
||||
import 'package:hl_lieferservice/widget/home/bloc/navigation_bloc.dart';
|
||||
import 'package:hl_lieferservice/widget/operations/bloc/operation_bloc.dart';
|
||||
import 'package:hl_lieferservice/widget/operations/presentation/operation_view_enforcer.dart';
|
||||
|
||||
import 'package:hl_lieferservice/bloc/app_states.dart';
|
||||
import '../feature/delivery/overview/service/delivery_info_service.dart';
|
||||
import 'home/bloc/navigation_state.dart';
|
||||
import 'home/presentation/home.dart';
|
||||
|
||||
class DeliveryApp extends StatefulWidget {
|
||||
@ -42,7 +42,9 @@ class _DeliveryAppState extends State<DeliveryApp> {
|
||||
BlocProvider(
|
||||
create:
|
||||
(context) => AuthBloc(
|
||||
repository: UserRepository(),
|
||||
service: UserInfoService(
|
||||
url: currentAppState.config.backendUrl,
|
||||
),
|
||||
operationBloc: context.read<OperationBloc>(),
|
||||
),
|
||||
),
|
||||
@ -50,7 +52,7 @@ class _DeliveryAppState extends State<DeliveryApp> {
|
||||
create:
|
||||
(context) => TourBloc(
|
||||
opBloc: context.read<OperationBloc>(),
|
||||
deliveryRepository: TourRepository(
|
||||
tourRepository: TourRepository(
|
||||
service: DeliveryInfoService(
|
||||
config: currentAppState.config,
|
||||
),
|
||||
@ -70,6 +72,9 @@ class _DeliveryAppState extends State<DeliveryApp> {
|
||||
create:
|
||||
(context) => DeliveryBloc(
|
||||
opBloc: context.read<OperationBloc>(),
|
||||
noteRepository: NoteRepository(
|
||||
service: NoteService(config: currentAppState.config),
|
||||
),
|
||||
repository: DeliveryRepository(
|
||||
service: DeliveryInfoService(
|
||||
config: currentAppState.config,
|
||||
@ -93,20 +98,7 @@ class _DeliveryAppState extends State<DeliveryApp> {
|
||||
}
|
||||
|
||||
if (state is AppConfigLoaded) {
|
||||
return BlocConsumer<NavigationBloc, NavigationState>(
|
||||
listener: (context, state) {
|
||||
if (state is NavigateToRoute) {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
state.routeName,
|
||||
arguments: state.arguments,
|
||||
);
|
||||
}
|
||||
},
|
||||
builder: (BuildContext context, NavigationState state) {
|
||||
return LoginEnforcer(child: Home());
|
||||
},
|
||||
);
|
||||
return LoginEnforcer(child: Home());
|
||||
}
|
||||
|
||||
return Container();
|
||||
|
||||
Reference in New Issue
Block a user