mirror of
https://github.com/linagora/tmail-flutter.git
synced 2026-12-05 08:05:07 +00:00
19 lines
444 B
Dart
19 lines
444 B
Dart
import 'dart:core';
|
|
|
|
import 'package:device_info_plus/device_info_plus.dart';
|
|
|
|
|
|
class DeviceManager {
|
|
final DeviceInfoPlugin _deviceInfoPlugin;
|
|
|
|
DeviceManager(this._deviceInfoPlugin);
|
|
|
|
Future<bool> isNeedRequestStoragePermissionOnAndroid() async {
|
|
final androidInfo = await _deviceInfoPlugin.androidInfo;
|
|
final sdkInt = androidInfo.version.sdkInt;
|
|
if (sdkInt != null) {
|
|
return sdkInt <= 28;
|
|
}
|
|
return false;
|
|
}
|
|
} |