Files
lunasea/lib/core/ui/switch.dart
2022-01-02 15:57:46 -05:00

20 lines
474 B
Dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class LunaSwitch extends Switch {
LunaSwitch({
Key? key,
required bool value,
required void Function(bool)? onChanged,
}) : super(
key: key,
value: value,
onChanged: onChanged == null
? null
: (value) {
HapticFeedback.lightImpact();
onChanged(value);
},
);
}