diff --git a/lib/services/udid.native.dart b/lib/services/udid.native.dart index 12ef61af..1faa2731 100644 --- a/lib/services/udid.native.dart +++ b/lib/services/udid.native.dart @@ -1,5 +1,11 @@ import 'package:flutter_udid/flutter_udid.dart'; +String? _cachedUdid; + Future getUdid() async { - return await FlutterUdid.consistentUdid; + if (_cachedUdid != null) { + return _cachedUdid!; + } + _cachedUdid = await FlutterUdid.consistentUdid; + return _cachedUdid!; }