miguelpruivo/flutter_file_picker

Unable to pick files with custom or any file type on Android 14

Closed this issue · 3 comments

Duplicate of #1404.

Because its getting flagged as stale

This issue is stale because it has been open for 7 days with no activity.

This issue was closed because it has been inactive for 14 days since being marked as stale.

   var showTypeSelector = true;

 
    customTypeViewerBuilder: (types) {
      return types[0];
    },
    typeSelectors: [
      TypeSelector(
        type: FileType.media,
        selector: Visibility(
          visible: showTypeSelector,
          child: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Icon(
                  Icons.cloud_upload_outlined,
                  size: 100,
                  color: Colors.grey.shade400,
                ),
                const Text(
                  "Upload media",
                ),
              ],
            ),
          ),
        ),
      ),
    ],
    onChanged: (value) {
      setState(() {
        showTypeSelector = value!.isEmpty;
      });
    },
    
    This is my current solution.
    I hope it helps.