MethodChannelExternalPathIosMac class
A class that provides methods to access directory paths and platform version information on iOS and macOS platforms.
This class acts as a facade for accessing the platform-specific implementation through the ExternalPathIosMacPlatform interface. It provides methods to retrieve the paths of specific directories and the platform version by delegating these calls to the current platform implementation instance.
Example usage:
final externalPath = ExternalPathIosMac();
final documentsPath = await externalPath.getDirectoryPath(directory: ExternalPathIosMac.DIRECTORY_DOWNLOADS);
final macOsLibraryPath = await externalPath.getDirectoryPathMacOs(directory: ExternalPathIosMac.DIRECTORY_DOWNLOADS_MAC);
final platformVersion = await externalPath.getPlatformVersion();
--
- Inheritance
-
- Object
- PlatformInterface
- ExternalPathIosMacPlatform
- MethodChannelExternalPathIosMac
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- methodChannel → MethodChannel
-
The method channel used to communicate with the native platform.
This is marked with
@visibleForTesting
to make it accessible for testing.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getDirectoryPath(
{required String directory}) → Future< String?> -
Retrieves the path for a specified directory on the iOS platform.
override
-
getDirectoryPathMacOs(
{required String directory}) → Future< String?> -
Retrieves the path for a specified directory on the macOS platform.
override
-
getPlatformVersion(
) → Future< String?> -
Retrieves the platform version from the native side.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited