TabModifier constructor

const TabModifier({
  1. Key? key,
  2. Key? modifierKey,
  3. Widget? child,
  4. String? text,
  5. Widget? icon,
  6. EdgeInsetsGeometry iconMargin = const EdgeInsets.only(bottom: 10.0),
  7. double? height,
})

Creates a Material Design TabBar tab.

At least one of text, icon, and child must be non-null. The text and child arguments must not be used at the same time. The iconMargin is only useful when icon and either one of text or child is non-null.

Implementation

const TabModifier({
  super.key,
  super.modifierKey,
  super.child,
  this.text,
  this.icon,
  this.iconMargin = const EdgeInsets.only(bottom: 10.0),
  this.height,
})  : assert(text != null || child != null || icon != null),
      assert(text == null || child == null);