import 'package:path_provider/path_provider.dart';

class StorageUtils {
  static late String dir;

  StorageUtils._internal() {
  }

  factory StorageUtils() {
    return StorageUtils._internal();
  }

  static Future<void> init() async {
    ///获取本地存储路径
    await getExternalStorageDirectories().then((value) {
      if (value != null && value[0] != null) {
        dir = value![0].path;
      }
    });
  }

  static String getPath(String unid) {
    String fullPath = '$dir/anchorCiq$unid.jpg';
    return fullPath;
  }
}
