ShareTarget class

This class defines share targets. Only one of the image properties will be used, even if multiple are given. The other ones are ignored. The order in which they are used:

  1. imageByAssetName
  2. imageByFilename
  3. imageBytes
Annotations
  • @JsonSerializable()

Constructors

ShareTarget({required String id, required List<String> categories, String? shortLabel, String? longLabel, List<int>? imageBytes, String? imageByAssetName, String? imageByFilename})
ShareTarget.fromJson(Map<String, dynamic> json)
factory

Properties

categories List<String>
The categories have to correspond to the categories defined in your shortcuts.xml file on Android.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String
A uniwue identifier. If you want to update an existing share target, re-add it with the same id.
getter/setter pair
imageByAssetName String?
image for the share sheet defined as a flutter asset.
getter/setter pair
imageByFilename String?
image for the share sheet as filename on disk.
getter/setter pair
imageBytes List<int>?
image used in the share sheet, this is usually loaded from a file or web resource, e.g. the unprocessed content of a .jpg file.
getter/setter pair
longLabel String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shortLabel String?
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited