I am having an issue of building ios application with flutter.
I run the following command
flutter build ios --flavor development --debug --target=lib/main_development.dart
But the error shows
Error: Error when reading 'lib/main.dart': No such file or directory
package:my_app/main.dart: Error: No 'main' method found.
Try adding a method named 'main' to your program.
There is no main.dart in my application. Not sure if anyone know where in ios can override this value?
Thank you
==========================================================
Update 1:
My main() function in lib/main_development.dart looks like
Future<void> main() async {
await DotEnv.load(fileName: "development.env");
await _configureAmplify();
runApp(
MultiProvider(
providers: [
ChangeNotifierProvider(create: (_) => CognitoServiceChangeNotifier()),
ChangeNotifierProvider(create: (_) => UserProfileChangeNotifier()),
ChangeNotifierProvider(create: (_) => BottomNavigationBarCurrentIndexChangeNotifier()),
],
child: MyApp(),
),
);
}