ShareAction class final
Opens the device's share panel with a text, a url and a title
(each an expression; at least a text or a URL). ${result} is
{"shared", "copied"}: shared when the panel took it; where the
platform has no share panel (or the app gives none) the URL, or with no
URL the text, is copied to the clipboard instead and copied is true;
both false when the person closed the panel. ${screen.url} is the
address of the page it runs on. JSON: {"type": "share", "title": "${story.title}", "url": "${screen.url}"}; written share title={story.title} url={screen.url}; result.copied ? toast "Link copied".
- Inheritance
-
- Object
- ActionDef
- MediaAction
- ShareAction
Constructors
-
const
Properties
- enabled → bool
-
False skips the action.
finalinherited
- fieldsJson → Json
-
Its own fields, as JSON (sparse): what toJson writes besides
typeand the common fields. An action class outside this library overrides this.no setteroverride - hashCode → int
-
The hash code for this object.
no setterinherited
-
nested
→ List<
ActionDef> -
The actions it runs itself (branches, follow-ups), in order.
no setterinherited
- nonBlocking → bool
-
The chain doesn't wait for it, and its failure doesn't stop the chain.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selfAndNested
→ Iterable<
ActionDef> -
This action, then every action nested in it, depth first.
no setterinherited
- text → String
-
final
- title → String
-
final
- type → String
-
The JSON
type.no setteroverride - url → String
-
final
- when → Predicate?
-
Runs only when it holds; null: always.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Json -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited