create static method
Implementation
static Future<FlutterBaseSplash> create({
required String channelNm,
required String zoneId,
}) async {
var newInstance = FlutterBaseSplash._internal(channelNm, zoneId);
var handler = SingletonSplashCallbackHandler();
handler.channelName = channelNm;
handler.onLoadAdCallbacks[newInstance.key] = (adInfo) {
if (adInfo != null) {
newInstance.adInfo = adInfo;
newInstance._callResizeCallback();
}
if (newInstance.onLoadAdCallback != null) {
newInstance.onLoadAdCallback!(adInfo);
}
};
handler.onFailAdCallbacks[newInstance.key] = (errorMessage, errorCode) {
if (newInstance.onFailAdCallback != null) {
newInstance.onFailAdCallback!(errorMessage, errorCode);
}
};
await handler.methodChannel!.invokeMethod("makeSplash", {
"key": newInstance.key,
"zoneId": newInstance.zoneId,
});
return newInstance;
}