⚡ Cache udid
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
import 'package:flutter_udid/flutter_udid.dart';
|
||||
|
||||
String? _cachedUdid;
|
||||
|
||||
Future<String> getUdid() async {
|
||||
return await FlutterUdid.consistentUdid;
|
||||
if (_cachedUdid != null) {
|
||||
return _cachedUdid!;
|
||||
}
|
||||
_cachedUdid = await FlutterUdid.consistentUdid;
|
||||
return _cachedUdid!;
|
||||
}
|
||||
|
Reference in New Issue
Block a user