Daily commit
This commit is contained in:
@ -1,23 +1,55 @@
|
||||
import 'package:app_gaslieferung/bloc/authentication/auth_bloc.dart';
|
||||
import 'package:app_gaslieferung/bloc/tour/tour_bloc.dart';
|
||||
import 'package:app_gaslieferung/bloc/tour_select/bloc.dart';
|
||||
import 'package:app_gaslieferung/repository/tour_repository.dart';
|
||||
import 'package:app_gaslieferung/service/tour_service.dart';
|
||||
import 'package:app_gaslieferung/ui/page/login.dart';
|
||||
import 'package:app_gaslieferung/ui/theme/theme.dart';
|
||||
import 'package:app_gaslieferung/ui/widgets/message_wrapper/message_wrapper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
import 'bloc/message_wrapper/message_bloc.dart';
|
||||
|
||||
void main() {
|
||||
runApp(const MyApp());
|
||||
runApp(GasDeliveryApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
class GasDeliveryApp extends StatefulWidget {
|
||||
const GasDeliveryApp({super.key});
|
||||
|
||||
// This widget is the root of your application.
|
||||
@override
|
||||
State<StatefulWidget> createState() => _GasDeliveryAppState();
|
||||
}
|
||||
|
||||
class _GasDeliveryAppState extends State<GasDeliveryApp> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: 'Flutter Demo',
|
||||
theme: AppTheme.light(),
|
||||
darkTheme: AppTheme.dark(),
|
||||
themeMode: ThemeMode.light, // oder ThemeMode.dark / light
|
||||
home: const LoginPage(),
|
||||
return MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider(create: (context) => MessageBloc()),
|
||||
BlocProvider(
|
||||
create: (context) => AuthBloc(
|
||||
url: "http://127.0.0.1:3000/login",
|
||||
msgBloc: context.read<MessageBloc>(),
|
||||
),
|
||||
),
|
||||
BlocProvider(
|
||||
create: (context) => TourBloc(
|
||||
tour: TourRepository(
|
||||
service: TourService(baseUrl: "http://127.0.0.1:3000"),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: MaterialApp(
|
||||
builder: (context, child) => MessageWrapperWidget(child: child!),
|
||||
theme: AppTheme.light(),
|
||||
darkTheme: AppTheme.dark(),
|
||||
themeMode: ThemeMode.light,
|
||||
// oder ThemeMode.dark / light
|
||||
home: LoginPage(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user