WidgetsApp Widget – Flutter Widget Guide By Flutter Agency

· 3 min read
WidgetApp
WidgetApp

Earlier, we have been through Chip Widget so now in this article we will discuss a WidgetsApp Widget is a class that wraps a number of widgets that are commonly required for an application.

What is WidgetsApp Widget?

WidgetsApp Widget provides is binding the system back button to pop the Navigator or quitting the application.

The constructor of WidgetsApp will look like below :

  WidgetAppWidget({
    Key key,
    GlobalKey<NavigatorState> navigatorKey,
    RouteFactory onGenerateRoute,
    RouteFactory onUnknownRoute,
    List<NavigatorObserver> navigatorObservers: const [],
    String initialRoute,
    PageRouteFactory<T> pageRouteBuilder,
    Widget home,
    Map<String, WidgetBuilder> routes: const {},
    TransitionBuilder builder,
    String title: '',
    GenerateAppTitle onGenerateTitle,
    TextStyle textStyle,
    @required Color color,
    Locale locale,
    Iterable<LocalizationsDelegate> localizationsDelegates,
    LocaleListResolutionCallback localeListResolutionCallback,
    LocaleResolutionCallback localeResolutionCallback,
    Iterable<Locale> supportedLocales: const [Locale('en', 'US')],
    bool showPerformanceOverlay: false,
    bool checkerboardRasterCacheImages: false,
    bool checkerboardOffscreenLayers: false,
    bool showSemanticsDebugger: false,
    bool debugShowWidgetInspector: false,
    bool debugShowCheckedModeBanner: true,
    InspectorSelectButtonBuilder inspectorSelectButtonBuilder,
  });

Properties :

  • builder: A builder for inserting widgets above the Navigator but below the other widgets created by the WidgetsApp Widget, or for replacing the Navigator entirely.
  • checkerboardOffscreenLayers: Checkerboards layers rendered to offscreen bitmaps.
  • checkerboardRasterCacheImages: Checkerboards raster cache images.
  • color: The primary color to use for the application in the operating system interface.
  • debugShowCheckedModeBanner: Turns on a little “DEBUG” banner in checked mode to indicate that the app is in checked mode. This is on by default (in checked mode), to turn it off, set the constructor argument to false. In release mode this has no effect.
  • initialRoute: initialRoute name of the first route to show, if a Navigator is built.
  • showPerformanceOverlay: Turns on a performance overlay.
  • showSemanticsDebugger: Turns on an overlay that shows the accessibility information reported by the framework.
  • supportedLocales: The list of locales that this app has been localized for.
  • home: The widget for the default route of the app.
  • title: A one-line description used by the device to identify the app for the user.
  • textStyle: The default text style for Text in the application.

Conclusion:

In this article, we have been through What is WidgetsApp Widget in Flutter along with list of all available property.

Thanks for reading !!!

Need more assistance with Flutter?

FlutterAgency.com is our portal Platform dedicated to Flutter Technology and Flutter Developers. The portal is full of cool resources from Flutter like Flutter Widget Guide, Flutter Projects, Code libs and etc.

FlutterAgency.com is one of the most popular online portal dedicated to Flutter Technology and daily thousands of unique visitors come to this portal to enhance their knowledge on Flutter.

Leave a Reply