haptic method
Triggers a native haptic pattern.
Supported type values: 'impact', 'success', 'warning', 'error'.
Implementation
Future<void> haptic(String type) {
const supportedTypes = {'impact', 'success', 'warning', 'error'};
if (!supportedTypes.contains(type)) {
throw ArgumentError.value(
type,
'type',
'Use one of: impact, success, warning, error.',
);
}
return NexoraSdkPlatform.instance.hapticFeedback(type);
}