FControl constructor

const FControl({
  1. Key? key,
  2. String componentId = "componentId",
  3. double? width,
  4. double? height,
  5. FLightOrientation lightOrientation = FLightOrientation.LeftTop,
  6. Color color = FPrimerColor,
  7. FColorForStateCallback? colorForCallback,
  8. Gradient? gradient,
  9. FGradientForStateCallback? gradientForCallback,
  10. FSurface surface = FSurface.Flat,
  11. FSurfaceForStateCallback? surfaceForCallback,
  12. FChildForStateCallback? childForStateCallback,
  13. FShape? shape,
  14. FShapeForStateCallback? shapeForStateCallback,
  15. bool disabled = false,
  16. EdgeInsetsGeometry? margin,
  17. EdgeInsetsGeometry? padding,
  18. Color? maskColor,
  19. bool supportDropShadow = true,
  20. FShadow dropShadow = const FShadow(),
  21. bool supportInnerShadow = true,
  22. FShadow innerShadow = const FShadow(),
  23. FAppearance? appearance,
  24. FType controlType = FType.Button,
  25. bool isSelected = false,
  26. bool userInteractive = true,
  27. FGroupController? controller,
  28. Widget? child,
  29. FOnTapCallback? onTapCallback,
  30. FOnTapDownCallback? onTapDownCallback,
  31. FOnTapUpCallback? onTapUpCallback,
  32. FOnTapCancelCallback? onTapCancelCallback,
  33. ValueChanged<bool>? onHover,
  34. 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);