import 'dart:typed_data';
import 'package:get/get.dart';
import 'package:wechat_assets_picker/wechat_assets_picker.dart';

class ImagePickAssets {
  static Future<List<AssetEntity>?> pick() async {
    return AssetPicker.pickAssets(
      Get.context!,
      pickerConfig: AssetPickerConfig(
        textDelegate: CustomAssetPickerTextDelegate(),
        requestType: RequestType.image,
      ),
    );
  }
}

class CustomAssetPickerTextDelegate extends AssetPickerTextDelegate {
  @override
  String get confirm => 'upload';
}