AppSwitch constructor

AppSwitch({
  1. Key? key,
  2. required bool isActive,
  3. required void onToggled(
    1. bool active
    ),
  4. SwitchAppearance? appearance,
})

Implementation

AppSwitch({
  Key? key,
  required this.isActive,
  required this.onToggled,
  this.appearance,
})  : assert(() {
        if (appearance == null) return true;
        return appearance.trackSize.width > appearance.trackSize.height;
      }()),
      super(key: key);