mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-29 12:22:52 +03:00
18 lines
394 B
Dart
18 lines
394 B
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:logging/logging.dart';
|
|
|
|
import '../app/logging.dart';
|
|
|
|
final _log = Logger('FocusUtils');
|
|
|
|
class FocusUtils {
|
|
static void unfocus(BuildContext context) {
|
|
FocusScopeNode currentFocus = FocusScope.of(context);
|
|
|
|
if (!currentFocus.hasPrimaryFocus) {
|
|
_log.debug('Removing focus...');
|
|
currentFocus.unfocus();
|
|
}
|
|
}
|
|
}
|