BadSwitchAsync constructor

const BadSwitchAsync({
  1. Key? key,
  2. required bool active,
  3. required Widget loadingWidget,
  4. required FutureOr<bool> onTap(
    1. bool to
    ),
  5. double width = 40,
  6. double height = 24,
  7. EdgeInsets padding = const EdgeInsets.all(2),
  8. Color handleColor = Colors.white,
  9. Color activeHandleColor = Colors.white,
  10. Color trackColor = Colors.grey,
  11. Color activeTrackColor = Colors.blue,
})

Implementation

const BadSwitchAsync({
  super.key,
  required this.active,
  required this.loadingWidget,
  required this.onTap,
  this.width = 40,
  this.height = 24,
  this.padding = const EdgeInsets.all(2),
  this.handleColor = Colors.white,
  this.activeHandleColor = Colors.white,
  this.trackColor = Colors.grey,
  this.activeTrackColor = Colors.blue,
}) : assert(width > height);