Label constructor

const Label(
  1. String text, {
  2. Key? key,
  3. Widget? leading,
  4. Color? backgroundColor,
  5. Color? color,
  6. EdgeInsetsGeometry? padding,
  7. Decoration? decoration,
  8. TextStyle? textStyle,
  9. double? iconSize,
  10. double? leadingSpace,
  11. Alignment? alignment,
  12. TextAlign textAlign = TextAlign.start,
  13. List<Widget> actions = const [],
})

Widget for displaying labels used for item titles, etc.

Icons can be displayed in text and leading to give easy-to-understand labels.

Labels can also be decorated by adding backgroundColor and decoration.

項目のタイトルなどで使うラベルを表示するためのウィジェット。

textleadingにアイコンを表示することでわかりやすいラベルを付与することができます。

また、backgroundColordecorationを追加することでラベルを装飾することが可能です。

Implementation

const Label(
  this.text, {
  super.key,
  this.leading,
  this.backgroundColor,
  this.color,
  this.padding,
  this.decoration,
  this.textStyle,
  this.iconSize,
  this.leadingSpace,
  this.alignment,
  this.textAlign = TextAlign.start,
  this.actions = const [],
});