FControl constructor
const
FControl({
- Key? key,
- String componentId = "componentId",
- double? width,
- double? height,
- FLightOrientation lightOrientation = FLightOrientation.LeftTop,
- Color color = FPrimerColor,
- FColorForStateCallback? colorForCallback,
- Gradient? gradient,
- FGradientForStateCallback? gradientForCallback,
- FSurface surface = FSurface.Flat,
- FSurfaceForStateCallback? surfaceForCallback,
- FChildForStateCallback? childForStateCallback,
- FShape? shape,
- FShapeForStateCallback? shapeForStateCallback,
- bool disabled = false,
- EdgeInsetsGeometry? margin,
- EdgeInsetsGeometry? padding,
- Color? maskColor,
- bool supportDropShadow = true,
- FShadow dropShadow = const FShadow(),
- bool supportInnerShadow = true,
- FShadow innerShadow = const FShadow(),
- FAppearance? appearance,
- FType controlType = FType.Button,
- bool isSelected = false,
- bool userInteractive = true,
- FGroupController? controller,
- Widget? child,
- FOnTapCallback? onTapCallback,
- FOnTapDownCallback? onTapDownCallback,
- FOnTapUpCallback? onTapUpCallback,
- FOnTapCancelCallback? onTapCancelCallback,
- ValueChanged<
bool> ? onHover, - Color? hoverColor,
Implementation
const FControl({
Key? key,
this.componentId = "componentId", //默认的componentId
this.width,
this.height,
this.lightOrientation = FLightOrientation.LeftTop, //默认光源为左上角
this.color = FPrimerColor,
this.colorForCallback,
this.gradient,
this.gradientForCallback,
this.surface = FSurface.Flat, //默认表面形状为“凸面”
this.surfaceForCallback,
this.childForStateCallback,
this.shape,
this.shapeForStateCallback,
this.disabled = false, //默认为不禁用
this.margin,
this.padding,
this.maskColor,
this.supportDropShadow = true,
this.dropShadow = const FShadow(),
this.supportInnerShadow = true,
this.innerShadow = const FShadow(),
this.appearance,
this.controlType = FType.Button, //默认类型为button
this.isSelected = false, //默认为非选中
this.userInteractive = true,
this.controller,
this.child,
this.onTapCallback,
this.onTapDownCallback,
this.onTapUpCallback,
this.onTapCancelCallback,
this.onHover,
this.hoverColor,
}) : super(key: key);