pick<T> static method
拍照
Implementation
static Future<T?> pick<T>({Map<String, dynamic>? params}) async {
if (instance._delegate == null) {
throw StateError('Camera delegate not set. Call setup() first.');
}
// 检查权限
final isGranted = await instance._delegate!.checkAuth();
if (isGranted) {
throw StateError('Camera permission not granted');
}
try {
final result = await instance._delegate!.pickPhoto(params);
return result is T ? result : null;
} catch (e) {
rethrow;
}
}