feat: 添加一个新的sdk初始化方法,参数为config和uiConfig

master
wangtao 2023-03-20 10:43:14 +08:00
parent d86d2e232b
commit 01c782236a
3 changed files with 254 additions and 139 deletions

View File

@ -90,9 +90,10 @@
uiconfig.hideFeedbackMenu = [_uiConfig[@"isHideFeedbackAndComplaints"] boolValue];
uiconfig.hideBackToHome = [_uiConfig[@"isHideBackHome"] boolValue];
uiconfig.hideForwardMenu = [_uiConfig[@"isHideForwardMenu"] boolValue];
// uiconfig. = [_uiConfig[@"isHideRefreshMenu"] integerValue];
uiconfig.moreMenuStyle = [_uiConfig[@"moreMenuStyle"] integerValue];
uiconfig.moreMenuStyle = [_uiConfig[@"moreMenuStyle"] integerValue];
uiconfig.hideShareAppletMenu = [_uiConfig[@"isHideShareAppletMenu"] boolValue];
uiconfig.hideRefreshMenu = [_uiConfig[@"isHideRefreshMenu"] boolValue];
uiconfig.hideTransitionCloseButton = [_uiConfig[@"hideTransitionCloseButton"] integerValue];
uiconfig.disableSlideCloseAppletGesture = [_uiConfig[@"disableSlideCloseAppletGesture"] boolValue];
if (_uiConfig[@"progressBarColor"]) {
uiconfig.progressBarColor = [MOPTools colorWithRGBHex:[_uiConfig[@"progressBarColor"] intValue]];
}
@ -102,7 +103,6 @@
uiconfig.autoAdaptDarkMode = [_uiConfig[@"autoAdaptDarkMode"] boolValue];
uiconfig.appletText = _uiConfig[@"appletText"];
uiconfig.hideTransitionCloseButton = [_uiConfig[@"hideTransitionCloseButton"] boolValue];
uiconfig.disableSlideCloseAppletGesture = [_uiConfig[@"disableSlideCloseAppletGesture"] boolValue];
if (_uiConfig[@"capsuleConfig"]) {
NSDictionary *capsuleConfigDic = _uiConfig[@"capsuleConfig"];
@ -127,8 +127,120 @@
uiconfig.capsuleConfig = capsuleConfig;
}
uiconfig.appendingCustomUserAgent = _uiConfig[@"customWebViewUserAgent"];
if (_uiConfig[@"navHomeConfig"]) {
NSDictionary *navHomeConfigDic = _uiConfig[@"navHomeConfig"];
FATNavHomeConfig *navHomeConfig = [[FATNavHomeConfig alloc]init];
navHomeConfig.width = [navHomeConfigDic[@"width"] floatValue];
navHomeConfig.height = [navHomeConfigDic[@"height"] floatValue];
navHomeConfig.leftMargin = [navHomeConfigDic[@"leftMargin"] floatValue];
navHomeConfig.cornerRadius = [navHomeConfigDic[@"cornerRadius"] floatValue];
navHomeConfig.borderWidth = [navHomeConfigDic[@"width"] floatValue];
if (navHomeConfigDic[@"borderLightColor"]) {
navHomeConfig.borderLightColor = [MOPTools colorWithRGBHex:[navHomeConfigDic[@"borderLightColor"] intValue]];
}
if (navHomeConfigDic[@"borderDarkColor"]) {
navHomeConfig.borderDarkColor = [MOPTools colorWithRGBHex:[navHomeConfigDic[@"borderDarkColor"] intValue]];
}
if (navHomeConfigDic[@"bgLightColor"]) {
navHomeConfig.bgLightColor = [MOPTools colorWithRGBHex:[navHomeConfigDic[@"bgLightColor"] intValue]];
}
if (navHomeConfigDic[@"bgDarkColor"]) {
navHomeConfig.bgDarkColor = [MOPTools colorWithRGBHex:[navHomeConfigDic[@"bgDarkColor"] intValue]];
}
uiconfig.navHomeConfig = navHomeConfig;
}
if (_uiConfig[@"authViewConfig"]) {
NSDictionary *authViewConfigDic = _uiConfig[@"authViewConfig"];
FATAuthViewConfig *authViewConfig = [[FATAuthViewConfig alloc]init];
authViewConfig.appletNameFont = [UIFont systemFontOfSize:[authViewConfigDic[@"appletNameFont"] integerValue]];
if (authViewConfigDic[@"appletNameLightColor"]) {
authViewConfig.appletNameLightColor = [MOPTools colorWithRGBHex:[authViewConfigDic[@"appletNameLightColor"] intValue]];
}
if (authViewConfigDic[@"appletNameDarkColor"]) {
authViewConfig.appletNameDarkColor = [MOPTools colorWithRGBHex:[authViewConfigDic[@"appletNameDarkColor"] intValue]];
}
authViewConfig.authorizeTitleFont = [UIFont systemFontOfSize:[authViewConfigDic[@"authorizeTitleFont"] integerValue] weight:UIFontWeightMedium];
if (authViewConfigDic[@"authorizeTitleLightColor"]) {
authViewConfig.authorizeTitleLightColor = [MOPTools colorWithRGBHex:[authViewConfigDic[@"authorizeTitleLightColor"] intValue]];
}
if (authViewConfigDic[@"authorizeTitleDarkColor"]) {
authViewConfig.authorizeTitleDarkColor = [MOPTools colorWithRGBHex:[authViewConfigDic[@"authorizeTitleDarkColor"] intValue]];
}
authViewConfig.authorizeDescriptionFont = [UIFont systemFontOfSize:[authViewConfigDic[@"authorizeDescriptionFont"] integerValue]];
if (authViewConfigDic[@"authorizeDescriptionLightColor"]) {
authViewConfig.authorizeDescriptionLightColor = [MOPTools colorWithRGBHex:[authViewConfigDic[@"authorizeDescriptionLightColor"] intValue]];
}
if (authViewConfigDic[@"authorizeDescriptionDarkColor"]) {
authViewConfig.authorizeDescriptionDarkColor = [MOPTools colorWithRGBHex:[authViewConfigDic[@"authorizeDescriptionDarkColor"] intValue]];
}
authViewConfig.agreementTitleFont = [UIFont systemFontOfSize:[authViewConfigDic[@"agreementTitleFont"] integerValue]];
if (authViewConfigDic[@"agreementTitleLightColor"]) {
authViewConfig.agreementTitleLightColor = [MOPTools colorWithRGBHex:[authViewConfigDic[@"agreementTitleLightColor"] intValue]];
}
if (authViewConfigDic[@"agreementTitleDarkColor"]) {
authViewConfig.agreementTitleDarkColor = [MOPTools colorWithRGBHex:[authViewConfigDic[@"agreementTitleDarkColor"] intValue]];
}
authViewConfig.agreementDescriptionFont = [UIFont systemFontOfSize:[authViewConfigDic[@"agreementDescriptionFont"] integerValue]];
if (authViewConfigDic[@"agreementDescriptionLightColor"]) {
authViewConfig.agreementDescriptionLightColor = [MOPTools colorWithRGBHex:[authViewConfigDic[@"agreementDescriptionLightColor"] intValue]];
}
if (authViewConfigDic[@"agreementDescriptionDarkColor"]) {
authViewConfig.agreementDescriptionDarkColor = [MOPTools colorWithRGBHex:[authViewConfigDic[@"agreementDescriptionDarkColor"] intValue]];
}
if (authViewConfigDic[@"linkLightColor"]) {
authViewConfig.linkLightColor = [MOPTools colorWithRGBHex:[authViewConfigDic[@"linkLightColor"] intValue]];
}
if (authViewConfigDic[@"linkDarkColor"]) {
authViewConfig.linkDarkColor = [MOPTools colorWithRGBHex:[authViewConfigDic[@"linkDarkColor"] intValue]];
}
if (authViewConfigDic[@"allowButtonLightConfig"]) {
FATAuthButtonConfig *allowButtonLightConfig = [self createAuthButtonConfigWithDic:authViewConfigDic[@"allowButtonLightConfig"]];
authViewConfig.allowButtonLightConfig = allowButtonLightConfig;
}
if (authViewConfigDic[@"allowButtonDarkConfig"]) {
FATAuthButtonConfig *allowButtonDarkConfig = [self createAuthButtonConfigWithDic:authViewConfigDic[@"allowButtonDarkConfig"]];
authViewConfig.allowButtonDarkConfig = allowButtonDarkConfig;
}
if (authViewConfigDic[@"rejectButtonLightConfig"]) {
FATAuthButtonConfig *rejectButtonLightConfig = [self createAuthButtonConfigWithDic:authViewConfigDic[@"rejectButtonLightConfig"]];
authViewConfig.rejectButtonLightConfig = rejectButtonLightConfig;
}
if (authViewConfigDic[@"rejectButtonDarkConfig"]) {
FATAuthButtonConfig *rejectButtonDarkConfig = [self createAuthButtonConfigWithDic:authViewConfigDic[@"rejectButtonDarkConfig"]];
authViewConfig.rejectButtonDarkConfig = rejectButtonDarkConfig;
}
uiconfig.authViewConfig = authViewConfig;
}
uiconfig.appendingCustomUserAgent = _uiConfig[@"customWebViewUserAgent"];
uiconfig.hideWebViewProgressBar = [_uiConfig[@"hideWebViewProgressBar"] boolValue];
uiconfig.autoAdaptDarkMode = [_uiConfig[@"autoAdaptDarkMode"] boolValue];
uiconfig.transtionStyle = [_uiConfig[@"transtionStyle"] integerValue];
}
// uiconfig.moreMenuStyle = FATMoreViewStyleNormal;
@ -146,4 +258,34 @@
success(@{});
}
- (FATAuthButtonConfig *)createAuthButtonConfigWithDic:(NSDictionary *)dic {
if (!dic) {
return nil;
}
FATAuthButtonConfig * authButtonConfig = [[FATAuthButtonConfig alloc]init];
if (dic[@"cornerRadius"]) {
authButtonConfig.cornerRadius = [dic[@"cornerRadius"] floatValue];
}
if (dic[@"normalBackgroundColor"]) {
authButtonConfig.normalBackgroundColor = [MOPTools colorWithRGBHex:[dic[@"normalBackgroundColor"] intValue]];
}
if (dic[@"pressedBackgroundColor"]) {
authButtonConfig.pressedBackgroundColor = [MOPTools colorWithRGBHex:[dic[@"pressedBackgroundColor"] intValue]];
}
if (dic[@"normalTextColor"]) {
authButtonConfig.normalTextColor = [MOPTools colorWithRGBHex:[dic[@"normalTextColor"] intValue]];
}
if (dic[@"pressedTextColor"]) {
authButtonConfig.pressedTextColor = [MOPTools colorWithRGBHex:[dic[@"pressedTextColor"] intValue]];
}
if (dic[@"normalBorderColor"]) {
authButtonConfig.normalBorderColor = [MOPTools colorWithRGBHex:[dic[@"normalBorderColor"] intValue]];
}
if (dic[@"pressedBorderColor"]) {
authButtonConfig.pressedBorderColor = [MOPTools colorWithRGBHex:[dic[@"pressedBorderColor"] intValue]];
}
return authButtonConfig;
}
@end

View File

@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk.
s.dependency 'Flutter'
s.ios.deployment_target = '9.0'
s.dependency 'FinApplet' , '2.39.7'
s.dependency 'FinAppletExt' , '2.39.7'
s.dependency 'FinApplet' , '2.39.11'
s.dependency 'FinAppletExt' , '2.39.11'
end

View File

@ -53,73 +53,77 @@ class FinStoreConfig {
class FATConfig {
/**
*/
List<FinStoreConfig> storeConfigs;
/**
id->->id
userId
//退
userId
*/
String? currentUserId;
String? currentUserId;
/**
finclipfinogeeksuserAgentfinogeeks
*/
String? productIdentification;
String? productIdentification;
/**
SDK
trueSDK使api
*/
bool disableAuthorize = false;
bool disableAuthorize = false;
/**
true
*/
bool appletAutoAuthorize = false;
bool appletAutoAuthorize = false;
/**
SDKAPIfalse
trueSDKAPI
*/
bool disableGetSuperviseInfo = false;
bool disableGetSuperviseInfo = false;
/**
webviewfalse,
trueHttps
*/
bool ignoreWebviewCertAuth = false;
bool ignoreWebviewCertAuth = false;
/**
SDKwifi使x
0~5003
*/
int appletIntervalUpdateLimit = 3;
int appletIntervalUpdateLimit = 3;
/**
apm
*/
Map<String,String>? apmExtension;
Map<String, String>? apmExtension;
/** Crashfalse(iOS)
UnrecognizedSelectorKVONotificationTimerContainer(nil)String (nil)
便
*/
bool startCrashProtection = false;
bool startCrashProtection = false;
Map? theme;
Map? theme;
/**
*
* false
*/
bool enableApmDataCompression = false;
bool enableApmDataCompression = false;
/**
使
YES
*/
bool encryptServerData = false;
bool encryptServerData = false;
/**
debug
@ -128,43 +132,43 @@ bool encryptServerData = false;
FATBOOLStateFalse
FATBOOLStateForbiddenvconsoleapi
*/
@property (nonatomic, assign) FATBOOLState enableAppletDebug;
FATBOOLState enableAppletDebug = FATBOOLState.FATBOOLStateUndefined;
/**
*/
bool enableWatermark = false;
bool enableWatermark = false;
/**
*/
ConfigPriority watermarkPriority = ConfigPriority.ConfigGlobalPriority;
ConfigPriority watermarkPriority = ConfigPriority.ConfigGlobalPriority;
/**
FATBaseLoadingView
swiftSwiftDemo.FCloadingViewSwiftDemoFCloadingView
*/
String? baseLoadingViewClass;
String? baseLoadingViewClass;
/**
FATBaseLoadFailedView
swiftSwiftDemo.FCloadingViewSwiftDemoFCloadingView
*/
String? baseLoadFailedViewClass;
String? baseLoadFailedViewClass;
/**
header
apikey
ft.requestft.downloadFileft.uploadFile
*/
Map<String,dynamic>? header;
Map<String, dynamic>? header;
/**
header
*/
ConfigPriority headerPriority = ConfigPriority.ConfigGlobalPriority;
ConfigPriority headerPriority = ConfigPriority.ConfigGlobalPriority;
/**
H5hook
@ -172,30 +176,34 @@ ConfigPriority headerPriority = ConfigPriority.ConfigGlobalPriority;
body宿App宿Apprequestbody
URLProtocolbody
*/
bool enableH5AjaxHook = false;
bool enableH5AjaxHook = false;
/**
enableH5AjaxHookhook requestrequest url FinClipHookBridge-RequestId=xxx
Key FinClip-RequestIdFinClip-RequestId=xxx
*/
String? h5AjaxHookRequestKey;
String? h5AjaxHookRequestKey;
/**
0
55navigateTo 4
*/
int pageCountLimit = 0;
int pageCountLimit = 0;
/**
scheme
*/
List<String> schemes = [];
List<String> schemes = [];
FATConfig(this.storeConfigs);
Map<String, dynamic> toMap() {
List<Map<String, dynamic>>? finStoreConfigs =
storeConfigs.map((e) => e.toMap()).toList();
return {
"storeConfigs": finStoreConfigs,
"currentUserId": currentUserId,
"productIdentification": productIdentification,
"disableAuthorize": disableAuthorize,
"appletAutoAuthorize": appletAutoAuthorize,
"disableGetSuperviseInfo": disableGetSuperviseInfo,
@ -204,7 +212,7 @@ List<String> schemes = [];
"apmExtension": apmExtension,
"enableApmDataCompression": enableApmDataCompression,
"encryptServerData": encryptServerData,
"enableAppletDebug": enableAppletDebug,
"enableAppletDebug": enableAppletDebug.index,
"enableWatermark": enableWatermark,
"watermarkPriority": watermarkPriority.index,
"baseLoadingViewClass": baseLoadingViewClass,
@ -234,19 +242,19 @@ class UIConfig {
int navigationBarBackBtnLightColor = 0xffffffff;
//
int navigationBarBackBtnDarkColor 0xff000000;
int navigationBarBackBtnDarkColor = 0xff000000;
// int? navigationBackImage;
// 0: 1:
int moreMenuStyle = 0;
// FATConfigAppletFilePriority
ConfigPriority hideBackToHomePriority = ConfigPriority.ConfigGlobalPriority
ConfigPriority hideBackToHomePriority = ConfigPriority.ConfigGlobalPriority;
///
/// ios
bool isAlwaysShowBackInDefaultNavigationBar = false;
///
/// ios
bool isClearNavigationBarNavButtonBackground = false;
///"更多""反馈与投诉"
@ -258,9 +266,6 @@ class UIConfig {
//... false
bool isHideForwardMenu = false;
//... false
bool isHideFeedbackMenu = false;
//... true
bool isHideShareAppletMenu = true;
@ -270,12 +275,6 @@ class UIConfig {
//... false
bool isHideSettingMenu = false;
/// ServiceSDK
bool hideTransitionCloseButton = false;
///
bool disableSlideCloseAppletGesture = false;
///
CapsuleConfig? capsuleConfig;
@ -294,8 +293,6 @@ class UIConfig {
//H5false
bool hideWebViewProgressBar = false;
//true
bool autoAdaptDarkMode = true;
@ -310,7 +307,7 @@ class UIConfig {
*/
TranstionStyle transtionStyle = TranstionStyle.TranstionStyleUp;
//false
/// ServiceSDK
bool hideTransitionCloseButton = false;
/**
@ -338,23 +335,20 @@ class UIConfig {
"isHideBackHome": isHideBackHome,
"isHideForwardMenu": isHideForwardMenu,
"isHideRefreshMenu": isHideRefreshMenu,
"isHideFeedbackMenu": isHideFeedbackMenu,
"isHideShareAppletMenu": isHideShareAppletMenu,
"isHideSettingMenu": isHideSettingMenu,
"hideTransitionCloseButton": hideTransitionCloseButton,
"disableSlideCloseAppletGesture": disableSlideCloseAppletGesture,
"capsuleConfig": capsuleConfig?.toMap(),
"navHomeConfig": navHomeConfig?.toMap(),
"authViewConfig": authViewConfig,toMap(,)
"authViewConfig": authViewConfig?.toMap(),
"floatWindowConfig": floatWindowConfig?.toMap(),
"progressBarColor": progressBarColor,
"hideWebViewProgressBar": hideWebViewProgressBar,
"moreMenuStyle": moreMenuStyle,
"hideBackToHomePriority": hideBackToHomePriority,
"hideBackToHomePriority": hideBackToHomePriority.index,
"autoAdaptDarkMode": autoAdaptDarkMode,
"appendingCustomUserAgent": appendingCustomUserAgent,
"transtionStyle":transtionStyle.index,
"hideTransitionCloseButton": hideTransitionCloseButton,
"transtionStyle": transtionStyle.index,
"disableSlideCloseAppletGesture": disableSlideCloseAppletGesture,
"appletText": appletText
};
@ -482,29 +476,17 @@ class NavHomeConfig {
/**
10
*/
double leftMargin;
double leftMargin = 10;
/**
5
*/
double cornerRadius;
double cornerRadius = 5;
/**
0.8
*/
double borderWidth;
/**
使
*/
// int? lightImage;
/**
使
*/
// int? darkImage;
double borderWidth = 0.8;
/**
@ -530,6 +512,9 @@ class NavHomeConfig {
*/
int bgDarkColor;
NavHomeConfig(this.width, this.height, this.borderLightColor,
this.borderDarkColor, this.bgLightColor, this.bgDarkColor);
Map<String, dynamic> toMap() {
return {
"width": width,
@ -549,110 +534,90 @@ class AuthViewConfig {
/**
PingFangSC-Regular16
*/
int appletNameFont;
int appletNameFont = 16;
/**
#202020
*/
int appletNameLightColor;
int appletNameLightColor = 0xff202020;
/**
#D0D0D0
*/
int appletNameDarkColor;
/**
icon22pt@2× @3×
*/
int agreementLightImage;
/**
icon22pt@2× @3×
*/
int agreementDarkImage;
int appletNameDarkColor = 0xffd0d0d0;
/**
PingFangSC-Medium17
使PingFangSC-Regular
*/
int authorizeTitleFont;
int authorizeTitleFont = 17;
/**
#202020
使
*/
int authorizeTitleLightColor;
int authorizeTitleLightColor = 0xff202020;
/**
#D0D0D0
使
*/
int authorizeTitleDarkColor;
int authorizeTitleDarkColor = 0xffd0d0d0;
/**
PingFangSC-Regular14
*/
int authorizeDescriptionFont;
int authorizeDescriptionFont = 14;
/**
#666666
*/
int authorizeDescriptionLightColor;
int authorizeDescriptionLightColor = 0xff666666;
/**
#8C8C8C
*/
int authorizeDescriptionDarkColor;
int authorizeDescriptionDarkColor = 0xff8c8c8c;
/**
PingFangSC-Regular16
*/
int agreementTitleFont;
int agreementTitleFont = 16;
/**
#202020
*/
int agreementTitleLightColor;
int agreementTitleLightColor = 0xff202020;
/**
#D0D0D0
*/
int agreementTitleDarkColor;
int agreementTitleDarkColor = 0xffd0d0d0;
/**
PingFangSC-Regular14
*/
int agreementDescriptionFont;
int agreementDescriptionFont = 14;
/**
#202020
*/
int agreementDescriptionLightColor;
int agreementDescriptionLightColor = 0xff202020;
/**
#D0D0D0
*/
int agreementDescriptionDarkColor;
/**
icon22pt@2× @3×
*/
int authorizeSelectedLightImage;
/**
icon22pt@2× @3×
*/
int authorizeSelectedDarkImage;
int agreementDescriptionDarkColor = 0xffd0d0d0;
/**
#409EFF
*/
int linkLightColor;
int linkLightColor = 0xff409eff;
/**
#368CE4
*/
int linkDarkColor;
int linkDarkColor = 0xff368ce4;
/**
@ -664,7 +629,7 @@ int linkDarkColor;
#3B77DB
#FFFFFF
*/
AuthButtonConfig allowButtonLightConfig;
AuthButtonConfig? allowButtonLightConfig;
/**
@ -676,7 +641,7 @@ AuthButtonConfig allowButtonLightConfig;
#5E97F5
#FFFFFF
*/
AuthButtonConfig allowButtonDarkConfig;
AuthButtonConfig? allowButtonDarkConfig;
/**
@ -688,7 +653,7 @@ AuthButtonConfig allowButtonDarkConfig;
#D8D8D8
#222222
*/
AuthButtonConfig rejectButtonLightConfig;
AuthButtonConfig? rejectButtonLightConfig;
/**
@ -700,9 +665,9 @@ AuthButtonConfig rejectButtonLightConfig;
#414141
#D0D0D0
*/
AuthButtonConfig rejectButtonDarkConfig;
AuthButtonConfig? rejectButtonDarkConfig;
Map<String, dynamic> toMap() {
Map<String, dynamic> toMap() {
return {
"appletNameFont": appletNameFont,
"appletNameLightColor": appletNameLightColor,
@ -713,7 +678,6 @@ Map<String, dynamic> toMap() {
"authorizeDescriptionFont": authorizeDescriptionFont,
"authorizeDescriptionLightColor": authorizeDescriptionLightColor,
"authorizeDescriptionDarkColor": authorizeDescriptionDarkColor,
"agreementTitleFont": agreementTitleFont,
"agreementTitleLightColor": agreementTitleLightColor,
"agreementTitleDarkColor": agreementTitleDarkColor,
@ -721,10 +685,10 @@ Map<String, dynamic> toMap() {
"agreementDescriptionDarkColor": agreementDescriptionDarkColor,
"linkLightColor": linkLightColor,
"linkDarkColor": linkDarkColor,
"allowButtonLightConfig": allowButtonLightConfig.toMap(),
"allowButtonDarkConfig": allowButtonDarkConfig.toMap(),
"rejectButtonLightConfig": rejectButtonLightConfig.toMap(),
"rejectButtonDarkConfig": rejectButtonDarkConfig.toMap(),
"allowButtonLightConfig": allowButtonLightConfig?.toMap(),
"allowButtonDarkConfig": allowButtonDarkConfig?.toMap(),
"rejectButtonLightConfig": rejectButtonLightConfig?.toMap(),
"rejectButtonDarkConfig": rejectButtonDarkConfig?.toMap(),
};
}
}
@ -733,39 +697,48 @@ class AuthButtonConfig {
/**
*/
double cornerRadius;
double cornerRadius;
/**
*/
int normalBackgroundColor;
int normalBackgroundColor;
/**
*/
int pressedBackgroundColor;
int pressedBackgroundColor;
/**
*/
int normalTextColor;
int normalTextColor;
/**
*/
int pressedTextColor;
int pressedTextColor;
/**
*/
int normalBorderColor;
int normalBorderColor;
/**
*/
int pressedBorderColor;
int pressedBorderColor;
Map<String, dynamic> toMap() {
AuthButtonConfig(
this.cornerRadius,
this.normalBackgroundColor,
this.pressedBackgroundColor,
this.normalTextColor,
this.pressedTextColor,
this.normalBorderColor,
this.pressedBorderColor);
Map<String, dynamic> toMap() {
return {
"cornerRadius": cornerRadius,
"normalBackgroundColor": normalBackgroundColor,
@ -886,7 +859,7 @@ enum Anim {
}
enum ConfigPriority {
ConfigGlobalPriority , //
ConfigGlobalPriority, //
ConfigSpecifiedPriority, //
ConfigAppletFilePriority, // app.ext.json
}
@ -896,6 +869,14 @@ enum TranstionStyle {
TranstionStylePush, // push
}
enum FATBOOLState {
FATBOOLStateUndefined, //
FATBOOLStateTrue, // vconsoleapi
FATBOOLStateFalse, // setEnableDebugvconsole
FATBOOLStateForbidden, // vconsoleapi
}
class Mop {
static final Mop _instance = new Mop._internal();
late MethodChannel _channel;
@ -1024,18 +1005,10 @@ class Mop {
return ret;
}
Future<Map> newInitialize(
FATConfig config,
{
UIConfig? uiConfig
}
}) async {
List<Map<String, dynamic>>? storeConfigs =
finStoreConfigs?.map((e) => e.toMap()).toList();
Future<Map> newInitialize(FATConfig config, {UIConfig? uiConfig}) async {
final Map ret = await _channel.invokeMethod('newInitialize', {
'config': config,
'uiConfig': uiConfig,
'config': config.toMap(),
'uiConfig': uiConfig?.toMap(),
});
return ret;
}