FPopupItem<T> constructor

FPopupItem<T>({
  1. Key? key,
  2. Widget? child,
  3. T? value,
  4. String? text,
  5. double? fontSize,
  6. Color? fontColor,
  7. FontWeight? fontWeight,
  8. String? icon,
  9. double? iconSize,
  10. double? height,
})

Implementation

FPopupItem({
  super.key,
  Widget? child,
  super.value,
  String? text,
  double? fontSize,
  Color? fontColor,
  FontWeight? fontWeight,
  String? icon,
  double? iconSize,
  double? height,
})  : assert(
        !(child == null && text == null),
        'child 或 text 必须传入一项',
      ),
      super(
        child: child ??
            _FPopupChild(
              text: text!,
              fontSize: fontSize,
              fontWeight: fontWeight,
              fontColor: fontColor,
              icon: icon,
              iconSize: iconSize,
            ),
        height: height ?? 20,
      );