FireworkSDK class
The entry class of Firework Flutter SDK, which supports the sdk initialization, global configuration, etc.
Constructors
- FireworkSDK.getInstance()
-
Get global single instance of FireworkSDK class.
factory
Properties
- adBadgeConfiguration ↔ AdBadgeConfiguration?
-
The configuration for ad badges.
getter/setter pair
- appLanguage → String?
-
Get current app language.
no setter
- dataTrackingLevel ↔ DataTrackingLevel
-
The level of data tracking the SDK is permitted to send.
Default to all.
getter/setter pair
- debugLogsEnabled ↔ bool
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- liveStream → LiveStream
-
LiveStream instance.
no setter
- livestreamPlayerDesignVersion ↔ LivestreamPlayerDesignVersion
-
The livestream player design version.
Default to v1.
getter/setter pair
-
FWNavigator instance.
no setter
- onCustomCTAClick ↔ CustomCTAClickCallback?
-
The callback of clicking custom CTA.
getter/setter pair
-
The callback of custom share url.
getter/setter pair
- onSDKInit ↔ SDKInitCallback?
-
The callback of SDK initialization.
getter/setter pair
- onVideoFeedClick ↔ VideoFeedClickCallback?
-
The callback of clicking video feed.
getter/setter pair
- onVideoPlayback ↔ VideoPlaybackCallback?
-
The callback of video playback.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
The share base URL of videos.
getter/setter pair
- shopping → VideoShopping
-
VideoShopping instance.
no setter
- videoLaunchBehavior → VideoLaunchBehavior?
-
Get video launch behavior.
no setter
Methods
-
changeAppLanguage(
String? language) → Future< bool> - Change App level language. language can be en, ar and pt-BR. If language is null or empty string, SDK will use system language.
-
getWidgetType(
String feedId) → FWWidgetType? -
Get the widget type based on
feedId
, such as FWWidgetType.videoFeed, FWWidgetType.storyBlock. If the feedId isn't attached to a widget(e.g. open the full-screen player using openVideoPlayer), the API will return null. -
init(
{String? userId, VideoLaunchBehavior? videoLaunchBehavior}) → Future< void> - Initializes Firework SDK.
-
markInitCalled(
) → Future< void> - You need to call this method when you call init method in native side.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openVideoPlayer(
{required String url, OpenVideoPlayerConfiguration? config}) → Future< void> -
Opens video
url
with theconfig
. -
toString(
) → String -
A string representation of this object.
inherited
-
trackPurchase(
TrackPurchaseParameters parameters) → Future< void> - Records the user purchase.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited