PlatformSupport class
Capability gates for features whose underlying plugins do not cover every
target platform. Derived from kIsWeb + defaultTargetPlatform (never
dart:io) so it resolves correctly on every platform the SDK builds for,
web included. The UI uses these to hide options the platform cannot honour
instead of surfacing a control that silently fails.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Static Properties
- opensFilesNatively → bool
-
open_filexships android / ios only. On desktop the SDK opens the downloaded file throughurl_launcher(afile://URI handed to the OS default handler) instead.no setter - supportsBackgroundIsolates → bool
-
computemoves a callback to a background isolate on every target the SDK builds for except web, where the implementation awaits a single frame and then runs the callback on the same thread — there is no isolate to move it to.ImageMetadataScrubberconsults this to decide whether the hop is worth its two buffer copies. Where it isfalsethe re-encode still happens; it just competes with the UI while it runs, so a very large picture can drop frames on web.no setter - supportsCameraCapture → bool
-
image_pickerimplements camera capture on mobile (and on web via<input capture>). Its desktop federated plugins delegate gallery picks to a file dialog and throwStateErroronImageSource.camera, so camera capture is unavailable on macOS / Windows / Linux.no setter - supportsFilePicker → bool
-
file_pickerandshared_preferencesboth ship first-party implementations for every target the SDK builds for (android / ios / macos / windows / linux / web), so file picking and local key-value storage are supported everywhere. Exposed as explicit gates (rather than leaving callers to assume support) so a future plugin swap that narrows platform coverage only requires a change here.no setter - supportsImageCrop → bool
-
Crop is offered on mobile only. There is no native cropper for
macOS / Windows / Linux, and the SDK's crop path stages the image through
a
dart:iotemp file, which is unavailable on web — so on every non-mobile target the crop step is skipped and the picked image is used as-is. (image_cropper's web delegate could be wired later for web crop.)no setter - supportsInAppCameraCapture → bool
-
The SDK's own full-screen capture screen (
CameraCapturePage, tap for a still / hold for a clip) is offered on mobile only.cameraships android / ios / web andpermission_handlerandroid / ios / web / windows, so web is the only non-mobile target where both plugins resolve at all — and there the screen still would not work: the hold-to-record path drivesstartVideoRecordingand per-lenssetZoomLevel, whichcamera_webbacks withMediaRecorderandMediaStreamTrackcapabilities that vary per browser, and there is no Settings app for the "permanently denied" CTA to open. Everywhere else the composer keeps supportsCameraCapture'simage_pickerroute, which is stills-only but honest about where it runs.no setter - supportsLocalStorage → bool
-
no setter
- supportsVideoThumbnails → bool
-
Video poster frames are generated on mobile only.
get_thumbnail_video— the plugin behindNativeVideoThumbnailer— ships android / ios / web, but its web implementation is unusable here: it generates from a file path or a URL, and on web there is no path, while every attachment URL the SDK holds needs a Bearer token no<video>element sends. On desktop the plugin has no implementation at all. Everywhere this isfalse,sendAttachmentskips generation and the video message is sent without a preview — the bubble keeps the placeholder + play button it has always shown.no setter - supportsVoiceRecording → bool
-
recordships a federated implementation for every target the SDK builds for (android / ios / macos / windows / linux via native platform channels, web viarecord_web'sMediaRecorderwrapper). Voice recording in this SDK release, however, is gated off on web regardless ofrecord's own support: VoiceRecordingController stages the finished recording through adart:iotemp file before reading it back as bytes, and that staging path has no web implementation yet.startRecordingconsults this getter and returnsStartRecordingResult.unsupportedon web instead of attempting (and failing) a permission check.no setter