Pueprint class Null safety

This is the parent widget that descendant PuePages will modify. It renders the appBar and footer, so that on page changes, these elements will not transition.

To add an appBar of footer, use the appBarBuilder and footerBuilder args. For example:

footerBuilder: (context, data) {
  return PueFooter(
    child: Container(
      width: double.infinity,
      child: ElevatedButton(
        child: data.buttonChild,
         onPressed: data.onTap,
      ),
    ),
  );
}

By using a builder, we are able to change the child and onPressed fields declaratively, directly from our descendant PuePages

To set the background of this Pueprint, see the theme parameter and corresponding PueTheme class.

It also allows you to pass in a theme so that all descendant PuePages and other Pue widgets can inherit this theme. For example, the gutters attribute ensures that PueHeaders, PueBodys and PueFooters all have the same amount of horizontal padding so they line up nicely.

Inheritance

Constructors

Pueprint({required Widget body, PueTheme? theme, PreferredSizeWidget appBarBuilder(BuildContext context, AppBarData state)?, PueFooter footerBuilder(BuildContext context, FooterData state)?})

Properties

appBarBuilder → (PreferredSizeWidget Function?(BuildContext context, AppBarData state)?)
Use this to build the footer of all descendant pages. Example usage: [...]
final
body Widget
The main body for all children to be rendered in. Similar to a Scaffold body
final
footerBuilder → (PueFooter Function?(BuildContext context, FooterData state)?)
Use this to build the footer of all descendant pages. Example usage: [...]
final
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
key Key?
Controls how one widget replaces another widget in the tree. [...]
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
theme PueTheme?
Defines the theme for all descendant Pue widgets, for example gutters (horizontalPadding) and the current background
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget. [...]
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree. [...]
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep. [...]
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object. [...]
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants. [...]
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object. [...]
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
@nonVirtual, inherited