FormLabel class
Displays the label for each item on the form.
A widget for displaying form field labels.
Common design can be applied with FormStyle. It provides features such as required marks, help text, and error message display.
フォームフィールドのラベルを表示するためのウィジェット。
FormStyleで共通したデザインを適用可能。必須マーク、ヘルプテキスト、エラーメッセージなどの表示機能を備えています。
Basic Usage 基本的な使い方
Pass the text to be displayed to label.
labelに表示するテキストを渡します。
Icon Display アイコンの表示
By specifying icon, an icon is displayed before label.
iconを指定することでlabelの前にアイコンが表示されます。
Color Change 色の変更
You can change the color of label and icon by specifying color.
colorを指定するとlabelとiconの色を変えることができます。
Prefix and Suffix プレフィックス・サフィックス
If prefix and suffix are specified, widgets can be placed before and after the dividing line.
prefixとsuffixを指定すると分断線の前後にWidgetを配置することができます。
Basic Usage Example 基本的な使用例
FormLabel(
"ユーザー名",
);
Usage Example with Icon アイコン付きの使用例
FormLabel(
"ユーザー名",
icon: Icons.person,
);
Usage Example with Help Text ヘルプテキスト付きの使用例
FormLabel(
"ユーザー名",
icon: Icons.person,
notice: Text("8文字以上の英数字を入力してください"),
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- FormLabel
Constructors
Properties
- color → Color?
-
Change the color of label and icon.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData?
-
Display the icon in front of label.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String
-
Form labels.
final
- notice → Widget?
-
Widget for annotations. It appears after the label.
final
- prefix → Widget?
-
Widget displayed before the dividing line.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showDivider → bool
-
trueif you want to display the separator line.final - style → FormStyle?
-
Form style.
final
- suffix → Widget?
-
Widget displayed after the dividing line.
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