mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 12:42:34 +00:00
20 lines
474 B
Dart
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);
|
|
},
|
|
);
|
|
}
|