NestedPuncher class
NestedPuncher is widget take car for common use like nested avatars ans so on
you can achieve the same result by using Puncher widget but this widget is
for easy use and common use cases, also take care of the overlap between the shapes
the most common use case is to use CircleShape
with CircleAvatar
NestedPuncher(
radius: 50,
overlap: 0.5,
child: CircleAvatar(
radius: 50,
backgroundImage: NetworkImage(
'https://avatars.githubusercontent.com/u/19484515?v=4'),
),
);
Warning: NestedPuncher is highly experimental and may change in future
versions, keep in mind that this widget is not optimized for performance
and may cause performance issues if used in a large list, but it's ok to
use it in a small list or a single widget, or inside a ListView with a
builder
or somthing like that.
later we will improve the performance of this widget, and make the api more
stable.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- NestedPuncher
Constructors
Properties
- child → Widget
-
child is the child widget to be punched
final
- enabled → bool
-
enabled is the enable state of the puncher for easy control
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inner → bool
-
inner is the enable state of the inner shape
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → double
-
margin is the margin between the outer and inner shape
final
- outer → bool
-
outer is the enable state of the outer shape
final
- overlap → double
-
overlap is the overlap between the outer and inner shape value between 0 and 1
final
-
punchers
→ List<
PuncherClip> -
punchers is the list of punchers to be used
final
- radius → double
-
radius is the radius of the outer circle or the shape
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shape → Shaper?
-
shape is the shape of the puncher
for example
CircleShape
orRectangleShape
...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, int wrapWidth = 65}) → 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