Pueprint class
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
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- Pueprint
Constructors
- Pueprint({required Widget body, PueTheme? theme, PreferredSizeWidget appBarBuilder(BuildContext context, AppBarData 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 -
Use this to build the footer of all descendant pages. Example usage:
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- theme → PueTheme?
-
Defines the theme for all descendant
Pue
widgets, for examplegutters
(horizontalPadding) and the currentbackground
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.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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.
inherited