Initial draft
This commit is contained in:
30
lib/main.dart
Normal file
30
lib/main.dart
Normal file
@ -0,0 +1,30 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:hl_lieferservice/bloc/app_bloc.dart';
|
||||
import 'package:hl_lieferservice/bloc/app_events.dart';
|
||||
import 'package:hl_lieferservice/widget/app.dart';
|
||||
|
||||
void main() {
|
||||
runApp(BlocProvider(create: (context) => AppBloc(), child: App()));
|
||||
}
|
||||
|
||||
class App extends StatefulWidget {
|
||||
const App({super.key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _AppState();
|
||||
}
|
||||
|
||||
class _AppState extends State<App> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
context.read<AppBloc>().add(AppLoadConfig(path: "hl_server_config.json"));
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DeliveryApp();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user