VButton class
- Inheritance
Constructors
- VButton.new({Key? key, VoidCallback? onTap, Widget? child, VbuttonType type = VbuttonType.primary, Text? text, bool block = false, bool plain = false, bool disabled = false, bool hairline = false, bool loading = false, VButtonShape shape = VButtonShape.little, VButtonSize size = VButtonSize.normal, Icon? icon, Color? color})
-
const
Properties
- block → bool
-
按钮在默认情况下为行内块级元素,通过 block 属性可以将按钮的元素类型设置为块级元素。
final
- child → Widget?
-
final
- color → Color?
-
color
final
- disabled → bool
-
禁用状态
final
- hairline → bool
-
设置 hairline 属性可以展示 0.5 的细边框。 前置条件为 plain=true 否则无明显效果
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Icon?
-
icon
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loading → bool
-
final
- onTap → VoidCallback?
-
点击事件
final
- plain → bool
-
通过 plain 属性将按钮设置为朴素按钮,朴素按钮的文字为按钮颜色,背景为白色。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shape → VButtonShape
-
final
- size → VButtonSize
-
final
- text → Text?
-
文本
final
- type → VbuttonType
-
按钮支持 primary、success、info,warning、danger 五种类型,默认为 primary
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