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,
  11. AlignmentGeometry? alignment,
})

Implementation

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