selectAssets static method

Future<List<AssetEntity>?> selectAssets(
  1. BuildContext context, {
  2. RequestType type = RequestType.all,
  3. int maxAssets = 9,
  4. Color themeColor = Colors.blue,
})

Implementation

static Future<List<AssetEntity>?> selectAssets(BuildContext context,{RequestType type = RequestType.all,int maxAssets = 9,Color themeColor = Colors.blue}) async{
  var picker = await AssetPicker.pickAssets(
     context,
     pickerTheme: ThemeData.light().copyWith(
       primaryColor: Colors.white,//**
       primaryColorBrightness: Brightness.light,
       canvasColor: Colors.white, //**
       highlightColor: Colors.transparent,
       toggleableActiveColor: themeColor,
       colorScheme: ColorScheme(
         primary: Colors.grey[900]!,//**
         primaryVariant: Colors.grey[900]!,
         secondary: themeColor,
         secondaryVariant: themeColor,
         background: Colors.white, //**
         surface: Colors.grey[900]!,
         brightness: Brightness.dark,
         error: const Color(0xffcf6679),
         onPrimary: Colors.black,
         onSecondary: Colors.black,
         onSurface: Colors.white,
         onBackground: Colors.white,
         onError: Colors.black,
       ),
     ),
     requestType:type,
     maxAssets: maxAssets
  );
  return picker;
}