-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathapp_setup.dart
28 lines (24 loc) · 931 Bytes
/
app_setup.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
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:flutter_template/app.dart';
import 'package:flutter_template/flavors/flavor_config.dart';
import 'package:flutter_template/presentation/intl/translations/translation_loader.dart';
import 'package:flutter_template/presentation/template_app.dart';
import 'package:patrol/patrol.dart';
Future setupApp(PatrolIntegrationTester patrol) async {
await dotenv.load(
fileName: ".env.qa",
);
FlavorConfig.initialize(flavorString: "qa");
await initialiseApp();
await patrol.pumpWidgetAndSettle(
EasyLocalization(
supportedLocales: const [Locale("en", "US"), Locale("hi", "IN")],
path: "assets/translations",
fallbackLocale: const Locale("en", "US"),
assetLoader: const CodegenLoader(),
child: TemplateApp(),
),
);
}