UserAccountsDrawerHeader class Null safety

A Material Design Drawer header that identifies the app's user.

Requires one of its ancestors to be a Material widget.

See also:

Inheritance

Constructors

UserAccountsDrawerHeader({Key? key, Decoration? decoration, EdgeInsetsGeometry? margin = const EdgeInsets.only(bottom: 8.0), Widget? currentAccountPicture, List<Widget>? otherAccountsPictures, Size currentAccountPictureSize = const Size.square(72.0), Size otherAccountsPicturesSize = const Size.square(40.0), required Widget? accountName, required Widget? accountEmail, VoidCallback? onDetailsPressed, Color arrowColor = Colors.white})
Creates a Material Design drawer header.
const

Properties

accountEmail Widget?
A widget that represents the email address of the user's current account. It is displayed on the left, below the accountName.
final
accountName Widget?
A widget that represents the user's current account name. It is displayed on the left, below the currentAccountPicture.
final
arrowColor Color
The Color of the arrow icon.
final
currentAccountPicture Widget?
A widget placed in the upper-left corner that represents the current user's account. Normally a CircleAvatar.
final
currentAccountPictureSize Size
The size of the currentAccountPicture.
final
decoration Decoration?
The header's background. If decoration is null then a BoxDecoration with its background color set to the current theme's primaryColor is used.
final
hashCode int
The hash code for this object.
nonVirtual">@nonVirtualread-onlyinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin EdgeInsetsGeometry?
The margin around the drawer header.
final
onDetailsPressed VoidCallback?
A callback that is called when the horizontal area which contains the accountName and accountEmail is tapped.
final
otherAccountsPictures List<Widget>?
A list of widgets that represent the current user's other accounts. Up to three of these widgets will be arranged in a row in the header's upper-right corner. Normally a list of CircleAvatar widgets.
final
otherAccountsPicturesSize Size
The size of each widget in otherAccountsPicturesSize.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<UserAccountsDrawerHeader>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
protected">@protectedinherited
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">@nonVirtualinherited