Implemented settings, new scan, enhanced UI/UX
This commit is contained in:
@ -1,11 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:hl_lieferservice/bloc/app_bloc.dart';
|
||||
import 'package:hl_lieferservice/bloc/app_events.dart';
|
||||
import 'package:hl_lieferservice/feature/settings/bloc/settings_bloc.dart';
|
||||
import 'package:hl_lieferservice/feature/settings/bloc/settings_event.dart';
|
||||
import 'package:hl_lieferservice/widget/app.dart';
|
||||
|
||||
final locator = GetIt.instance;
|
||||
|
||||
void main() {
|
||||
runApp(BlocProvider(create: (context) => AppBloc(), child: App()));
|
||||
runApp(MultiBlocProvider(providers: [
|
||||
BlocProvider(create: (context) => AppBloc(),),
|
||||
BlocProvider(create: (context) => SettingsBloc())
|
||||
], child: App()));
|
||||
}
|
||||
|
||||
class App extends StatefulWidget {
|
||||
@ -20,11 +28,11 @@ class _AppState extends State<App> {
|
||||
void initState() {
|
||||
super.initState();
|
||||
context.read<AppBloc>().add(AppLoadConfig(path: "hl_server_config.json"));
|
||||
context.read<SettingsBloc>().add(LoadSettings());
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DeliveryApp();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user