Center class

A widget that centers its child within itself.

Inheritance

Constructors

Center({double? widthFactor, double? heightFactor, required Widget child})
Creates a widget that centers its child.
const

Properties

alignment → Alignment
How to align the child.
finalinherited
child → Widget
The child widget.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
heightFactor → double?
If non-null, sets its height to the child's height multiplied by this factor.
finalinherited
key → Key?
The optional key for this widget.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
widthFactor → double?
If non-null, sets its width to the child's width multiplied by this factor.
finalinherited

Methods

createElement() → Element
Creates an Element to manage this widget's location in the tree.
inherited
getIntrinsicHeight(int width) → int
Computes the intrinsic height of this widget under the given width constraint.
inherited
getIntrinsicWidth(int height) → int
Computes the intrinsic width of this widget under the given height constraint.
inherited
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