forked from trufi-association/trufi-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.dart
51 lines (50 loc) · 1.87 KB
/
main.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import 'package:flutter/material.dart';
import 'package:trufi_core/base/blocs/map_configuration/map_configuration_cubit.dart';
import 'package:trufi_core/base/models/trufi_latlng.dart';
import 'package:trufi_core/base/utils/graphql_client/hive_init.dart';
import 'package:trufi_core/base/widgets/base_maps/i_trufi_map_controller.dart';
import 'package:trufi_core/base/widgets/drawer/menu/social_media_item.dart';
import 'package:trufi_core/default_values.dart';
import 'package:trufi_core/trufi_core.dart';
import 'package:trufi_core/trufi_router.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await initHiveForFlutter();
runApp(
TrufiApp(
appNameTitle: 'ExampleApp',
blocProviders: [
...DefaultValues.blocProviders(
otpEndpoint: "https://cbba.trufi.app/otp",
otpGraphqlEndpoint: "https://cbba.trufi.app/otp/index/graphql",
mapConfiguration: MapConfiguration(
center: const TrufiLatLng(-17.392600, -66.158787),
),
searchAssetPath: "assets/data/search.json",
photonUrl: "https://cbba.trufi.app/photon",
typeProviderMap: TypepProviderMap.lealetMap,
),
],
trufiRouter: TrufiRouter(
routerDelegate: DefaultValues.routerDelegate(
appName: 'ExampleApp',
cityName: 'City',
countryName: 'Country',
backgroundImageBuilder: (_) {
return Image.asset(
'assets/images/drawer-bg.jpg',
fit: BoxFit.cover,
);
},
urlFeedback: 'https://example/feedback',
emailContact: '[email protected]',
urlShareApp: 'https://example/share',
urlSocialMedia: const UrlSocialMedia(
urlFacebook: 'https://www.facebook.com/Example',
),
typeProviderMap: TypepProviderMap.lealetMap,
),
),
),
);
}