DiamondFab class
A material design diamond shaped floating action button.
Unlike the basic floating action button, this button is diamond shaped by default.
It is commonly used in the Scaffold.floatingActionButton
field.
Use a single floating action button per screen. Floating action buttons are used for primary and positive actions.
if onPressed is null, then button will be disabled and will not react to touch.
As with the normal FloatingActionButton
the DiamondFab also will include
a notch inn the BottomAppBar
if there is one and the FloatingActionButtonLocation
is docked. In this case, the edges of the notch are a triangle or Rhombus
rather then a circle.
See also:
Scaffold
FloatingActionButton
FloatingActionButtonLocation
Constructors
- DiamondFab({Key key, Widget child, double notchMargin: 8.0, Color backgroundcolor, @required VoidCallback onPressed, Color foregroundColor, String tooltip, Object heroTag: const _DefaultHeroTag(), double highlightElevation: 12.0, bool mini: false, double elevation: 6.0 })
- Created the diamond shaped floating action button. [...]
Properties
- backgroundcolor → Color
-
The color to use when filling the button. [...]
final
- child → Widget
-
The widget that is below this widget on the tree. [...]
final
- elevation → double
-
The z-coordinate at which to place this button. This controls the size of
the shadow below the floating action button. [...]
final
- foregroundColor → Color
-
The default icon and text color. [...]
final
- heroTag → Object
-
A tag for the button's
Hero
widget. [...]final - highlightElevation → double
-
The z-coordinate at which to place this button when the user is touching
the button. This controls the size of the shadow below the floating action
button. [...]
final
- mini → bool
-
Controls the size of this button. [...]
final
- notchMargin → double
-
The margin of the notch around the floating action button [...]
final
- onPressed → VoidCallback
-
The callback function that is called when the button is tapped. [...]
final
- tooltip → String
-
Text that will describe the action that happens
onPressed
[...]final - hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- key → Key
-
Controls how one widget replaces another widget in the tree. [...]
final, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
createState(
) → DiamondFabState - Creates the mutable state for this widget at a given location in the tree. [...]
-
createElement(
) → StatefulElement -
Creates a
StatefulElement
to manage this widget's location in the tree. [...]inherited -
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children. [...]@protected, inherited -
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 toStringDeep. [...]
inherited
-
toString(
{DiagnosticLevel minLevel: DiagnosticLevel.debug }) → String -
Returns 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 ==(
dynamic other) → bool -
The equality operator. [...]
inherited