Skip to content
Snippets Groups Projects
Commit 8ac201e2 authored by vjrj's avatar vjrj
Browse files

Remove not available method in flutter web

parent 52fd23ae
No related branches found
No related tags found
No related merge requests found
......@@ -7,20 +7,10 @@ import 'package:durt/durt.dart';
Random createRandom() {
if (Platform.isIOS || Platform.isAndroid) {
final String osVersion = Platform.operatingSystemVersion;
final int currentYear = DateTime.now().year;
final int osYear = int.parse(osVersion.split('.')[0]);
final bool isOldDevice = currentYear - osYear >= 5;
if (isOldDevice) {
try {
return Random.secure();
} catch (e) {
return Random();
} else {
try {
return Random.secure();
} catch (e) {
return Random();
}
}
} else {
return Random.secure();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment