mainTemplate top-level constant
String
const mainTemplate
mainTemplate
this will be used to create or override main.dart content
Implementation
const String mainTemplate = """import 'package:projectName/core.dart';\n
void main() async {
// flutter binding
WidgetsFlutterBinding.ensureInitialized();
/// easy localization
await EasyLocalization.ensureInitialized();
/// shared preference
await ApplicationService.ensureInitialized();
final authenticationController = AuthenticationController();
runApp(EasyLocalization(
path: translationsPath,
supportedLocales: supportedLocales,
fallbackLocale: fallbackLocale,
startLocale: startLocale,
saveLocale: true,
child: MyApp(authenticationController: authenticationController)));
}
""";