Compiler message: lib/main.dart:10:12: Error: The method 'MainPage' isn't defined for the class 'MyApp'. - 'MyApp' is from 'package:demo1/main.dart' ('lib/main.dart'). Try correcting the name to the name of an existing method, or defining a method named 'MainPage'. home: MainPage( ^^^^^^^^ Target kernel_snapshot failed: Exception: Errors during snapshot creation: null build failed.
FAILURE: Build failed with an exception.