```dart
Future forgetCurrentDevice() async {
try {
await Amplify.Auth.forgetDevice();
safePrint('Forget device succeeded');
} on AuthException catch (e) {
safePrint('Forget device failed with error: $e');
}
}
```
```dart
// A device that was fetched via Amplify.Auth.fetchDevices()
Future forgetSpecificDevice(AuthDevice myDevice) async {
try {
await Amplify.Auth.forgetDevice(myDevice);
safePrint('Forget device succeeded');
} on AuthException catch (e) {
safePrint('Forget device failed with error: $e');
}
}
```