of static method

The picker of the closest FilePickerViewScope, or FilePickerPlatform.instance when there is none.

Implementation

static FilePickerPlatform of(BuildContext context) {
  return context
          .dependOnInheritedWidgetOfExactType<_FilePickerViewScope>()
          ?.picker ??
      FilePickerPlatform.instance;
}