AdTextView constructor

AdTextView({
  1. String viewType = 'text_view',
  2. EdgeInsets? padding,
  3. EdgeInsets? margin,
  4. AdDecoration? decoration,
  5. double? width,
  6. double? height,
  7. double? elevation,
  8. Color? elevationColor,
  9. TextStyle? style,
  10. int? minLines,
  11. int? maxLines,
  12. String? text,
})

Implementation

AdTextView({
  String viewType = 'text_view',
  EdgeInsets? padding,
  EdgeInsets? margin,
  AdDecoration? decoration,
  double? width,
  double? height,
  double? elevation,
  Color? elevationColor,
  // text
  this.style,
  this.minLines,
  this.maxLines,
  this.text,
})  : assert(
        ['text_view', 'button_view'].contains(viewType),
        'This view must be a text view or a button view',
      ),
      super(
        viewType: viewType,
        padding: padding,
        margin: margin,
        decoration: decoration,
        width: width ?? MATCH_PARENT,
        height: height ?? WRAP_CONTENT,
        elevation: elevation,
        elevationColor: elevationColor,
      );