DFJoyStick constructor

DFJoyStick({
  1. String? handleImage,
  2. String? backgroundImage,
  3. Color handleColor = const Color(0x60FFFFFF),
  4. Color backgroundColor = const Color(0x40FFFFFF),
  5. String direction = DFDirection.NONE,
  6. required void onChange(
    1. String,
    2. double
    ),
  7. required void onCancel(
    1. String
    ),
  8. Size size = const Size(100, 100),
  9. Size areaSize = const Size(240, 240),
})

创建遥杆

Implementation

DFJoyStick({
  this.handleImage,
  this.backgroundImage,
  this.handleColor = const Color(0x60FFFFFF),
  this.backgroundColor = const Color(0x40FFFFFF),
  this.direction = DFDirection.NONE,
  required this.onChange,
  required this.onCancel,
  this.size = const Size(100, 100),
  this.areaSize = const Size(240, 240),
});