idcard_handler.dart 530 B

123456789101112131415
  1. import 'package:vitalapp/js_platform/handlers/base.dart';
  2. import 'package:vitalapp/js_platform/methods.dart';
  3. import 'package:vnote_device_plugin/events/event_type.dart';
  4. class OpenIDCardPageHandler extends MethodHandlerBase {
  5. static FEventHandler<String> onIDCardRead = FEventHandler<String>();
  6. OpenIDCardPageHandler() : super(TargetMethodName.OnIDCardRead);
  7. @override
  8. Future<void> execute(List<String> args) async {
  9. args.forEach((element) {
  10. print(element);
  11. });
  12. onIDCardRead.emit(this, args[0]);
  13. }
  14. }