main function
Main entry point for the BookOfLife application.
Implementation
void main() async {
// We require [async] because we asynchronously [await] the window manager
// below. Often, `main()` will include just the call [runApp].
// Optionally we can globally remove [debugPrint] messages.
//
// debugPrint = (String? message, {int? wrapWidth}) {
// null;
// };
// Ensure Flutter bindings are initialized for async operations, in particular
// to set the Linux desktop window [title].
WidgetsFlutterBinding.ensureInitialized();
if (isDesktop) {
const windowOptions = WindowOptions(title: appTitle);
await windowManager.waitUntilReadyToShow(windowOptions, () async {});
}
// The runApp() function takes the given Widget and makes it the root of the
// widget tree.
runApp(const App());
}