instance property
FileSaverPlatform
get
instance
The current platform implementation.
Flutter's generated plugin registrant sets it before main runs, through
each platform's registerWith. Tests, where the registrant doesn't run,
set it themselves.
Throws StateError if it isn't set.
Implementation
static FileSaverPlatform get instance =>
_instance ??
(throw StateError(
'No file_saver_ffi platform is registered. Flutter registers it '
'when the app starts. In a test, set FileSaverPlatform.instance '
'(package:file_saver_ffi/platform_interface.dart) to a fake.',
));
set
instance
(FileSaverPlatform value)
Used by each platform's registerWith to register itself.
Implementation
static set instance(FileSaverPlatform value) {
_instance = value;
}