MethodChannelAdspostxFlutter class

An implementation of AdspostxFlutterPlatform that uses method channels.

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
The method channel used to interact with the native platform.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

enableDebugLog(bool isEnabled) Future<bool>
It makes debug logs enable/disable. By default debug logs are disabled. We don't recommand to enable logs in live environment. 'isEnabled' must be either true/false. true - enable debug log. false - disable debug log. Returns a bool indicating that if enableDebugLog call is successful or not. In case of error it can also throw exceptions. ///
override
init(String sdkId) Future<bool>
Initialize adspostx with sdkId, sdkId should be non-empty valid String. Returns a bool indicating that if init call is successful or not. In case of error it can also throw exceptions.
override
loadOffers(Map attributes) Future<bool>
LoadOffers with specified attributes, attributes should be of Map type. attribute key-value should be from specific values which you can get from adspostx documentation website https://docs.adspostx.com/. Returns a bool indicating that if loadOffers call is successful or not. In case of error it can also throw exceptions.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setEnvironment(int environment) Future<bool>
setEnvironment sets environment for serving offers. 'environment' must be either 0 or 1. 0 - live environment. Default is set to 'live environment'. 1 - test environment. Returns a bool indicating that if setEnvironment call is successful or not. In case of error it can also throw exceptions. ///
override
setTimeout(double seconds) Future<bool>
setTimeOut sets timeout value in seconds. Used it rarely only when there some problem with offers after loading them. Returns a bool indicating that if setTimeout call is successful or not. In case of error it can also throw exceptions. ///
override
showOffers(int presentationStyle, bool isTransparent, int topMargin, int rightMargin, int bottomMargin, int leftMargin, dynamic callback(bool)) Future<bool>
ShowOffers with specified configurations. presentationStyle must be either '0' or '1'. 0 - pop up style, 1 - full screen size. isTransparent must be either 'true' or 'false' indicates if offer background should be transparent or not. topMagin must be of int type and value from 0 to 15. it indicates top margin offset in percentage. rightMagin must be of int type and value from 0 to 15. it indicates right margin offset in percentage. bottomMargin must be of int type and value from 0 to 15. it indicates bottom margin offset in percentage. leftMargin must be of int type and value from 0 to 15. it indicates left margin offset in percentage. Returns a bool indicating that if showOffers call is successful or not. In case of error it can also throw exceptions.
override
toString() String
A string representation of this object.
inherited

Operators

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