PlatformWidgetBuilder class
A builder for platform-specific widgets used throughout the Vyuh application.
This class provides a centralized way to customize the appearance and behavior of common UI components in a Vyuh application. It includes builders for:
- App root widget (appBuilder)
- Loading indicators (appLoader, contentLoader, routeLoader)
- Error views (errorView, routeErrorView)
- Image placeholders (imagePlaceholder)
Use copyWith to create a modified version of an existing builder:
final customBuilder = defaultPlatformWidgetBuilder.copyWith(
appLoader: (context) => MyCustomLoader(),
errorView: (context, {title, error}) => MyCustomErrorView(title: title),
);
Constructors
- PlatformWidgetBuilder.new({required AppBuilder appBuilder, required Loader appLoader, required Loader contentLoader, required RouteLoader routeLoader, required ErrorViewBuilder errorView, required RouteErrorViewBuilder routeErrorView, required ImagePlaceholderBuilder imagePlaceholder})
- Creates a new PlatformWidgetBuilder instance.
Properties
- appBuilder → AppBuilder
-
A builder for the app widget. This becomes the root of the widget tree.
Typically this would return a MaterialApp or CupertinoApp.
final
- appLoader → Loader
-
A loader widget that is shown when the app is loading.
final
- contentLoader → Loader
-
A loader widget that is shown when the content is loading.
final
- errorView → ErrorViewBuilder
-
A builder for the error view widget.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- imagePlaceholder → ImagePlaceholderBuilder
-
A builder for the image placeholder widget.
final
- routeErrorView → RouteErrorViewBuilder
-
A builder for the route error view widget.
final
- routeLoader → RouteLoader
-
A loader widget that is shown when a route is loading.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{AppBuilder? appBuilder, Loader? appLoader, Loader? contentLoader, RouteLoader? routeLoader, ImagePlaceholderBuilder? imagePlaceholder, RouteErrorViewBuilder? routeErrorView, ErrorViewBuilder? errorView}) → PlatformWidgetBuilder - Creates a copy of this PlatformWidgetBuilder but with the given fields
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- system → PlatformWidgetBuilder
-
final