Padding class

Insets its child by the given padding.

For example, Padding(padding: EdgeInsets.all(2), child: Text('hi')) adds 2 cells of padding on all sides of the text.

Inheritance

Constructors

Padding({Key? key, required EdgeInsets padding, required Widget? child})
Creates a Padding widget with the given padding and child.
const

Properties

child Widget?
The optional child widget.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another in the tree.
finalinherited
padding EdgeInsets
The amount of space to inset the child.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() SingleChildRenderObjectElement
Creates the Element for this widget.
inherited
createRenderObject(BuildContext context) RenderPadding
Creates the RenderObject for this widget.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateRenderObject(BuildContext context, RenderObject renderObject) → void
Updates the renderObject to reflect the current widget configuration.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited