Skip to content

Commit 46db1f1

Browse files
committed
【2.3.5】fix
1 parent 062b850 commit 46db1f1

File tree

6 files changed

+56
-38
lines changed

6 files changed

+56
-38
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.3.5
2+
+ 优化: fix
3+
## 2.3.4
4+
+ 优化: 增加isPrivacyViewDarkMode参数,协议页面是否支持暗黑模式
15
## 2.3.3
26
+ 优化: 修复Android的回调参数个数问题 修复setLogBtnBottomOffsetY不生效问题
37
## 2.3.2

android/src/main/java/com/jiguang/jverify/JverifyPlugin.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ private void layoutOriginOuthView(Map uiconfig, JVerifyUIConfig.Builder builder)
629629

630630
Object privacyItem = valueForKey(uiconfig, "privacyItem");
631631

632-
Object isPrivacyViewDarkMode = valueForKey(uiconfig, "isPrivacyViewDarkMode");
632+
Object setIsPrivacyViewDarkMode = valueForKey(uiconfig, "setIsPrivacyViewDarkMode");
633633

634634

635635
/************* 状态栏 ***************/
@@ -1056,8 +1056,8 @@ private void layoutOriginOuthView(Map uiconfig, JVerifyUIConfig.Builder builder)
10561056
}
10571057

10581058
/************** 协议页面是否支持暗黑模式 ***************/
1059-
if (isPrivacyViewDarkMode != null) {
1060-
builder.isPrivacyViewDarkMode((Boolean)isPrivacyViewDarkMode);
1059+
if (setIsPrivacyViewDarkMode != null) {
1060+
builder.setIsPrivacyViewDarkMode((Boolean)setIsPrivacyViewDarkMode);
10611061
}
10621062
}
10631063

example/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'dart:async';
2-
import 'dart:html';
32
import 'dart:io';
43

54
import 'package:flutter/foundation.dart';
@@ -422,6 +421,8 @@ class _MyAppState extends State<MyApp> {
422421
privacyCheckDialogConfig.logBtnTextColor = Colors.black.value;
423422
uiConfig.privacyCheckDialogConfig = privacyCheckDialogConfig;
424423

424+
uiConfig.setIsPrivacyViewDarkMode = false;//协议页面是否支持暗黑模式
425+
425426
//弹框模式
426427
// JVPopViewConfig popViewConfig = JVPopViewConfig();
427428
// popViewConfig.width = (screenWidth - 100.0).toInt();
@@ -503,7 +504,6 @@ class _MyAppState extends State<MyApp> {
503504
_result = "[2016],msg = 当前网络环境不支持认证";
504505
});
505506

506-
// jverify.isPrivacyViewDarkMode = true;//协议页面是否支持暗黑模式
507507

508508
/* 弹框模式
509509
JVPopViewConfig popViewConfig = JVPopViewConfig();

example/pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ dependencies:
3131
flutter:
3232
sdk: flutter
3333

34-
jverify: ^2.3.4
34+
jverify:
35+
path: ../
3536

3637
# The following adds the Cupertino Icons font to your application.
3738
# Use with the CupertinoIcons class for iOS style icons.

lib/jverify.dart

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -592,29 +592,33 @@ class JVUIConfig {
592592
JVIOSUIModalTransitionStyle modelTransitionStyle = //弹出方式 only ios
593593
JVIOSUIModalTransitionStyle.CoverVertical;
594594

595-
/*** 协议二次弹窗-iOS */
595+
/*** 协议二次弹窗-iOS */
596596

597597
/**协议二次弹窗标题文本样式*/
598598
int agreementAlertViewTitleTexSize = 14;
599599

600-
/**协议二次弹窗标题文本颜色*/
601-
int? agreementAlertViewTitleTextColor;
600+
/**协议二次弹窗标题文本颜色*/
601+
int? agreementAlertViewTitleTextColor;
602602

603-
/**协议二次弹窗内容文本对齐方式*/
604-
JVTextAlignmentType agreementAlertViewContentTextAlignment = JVTextAlignmentType.center;
603+
/**协议二次弹窗内容文本对齐方式*/
604+
JVTextAlignmentType agreementAlertViewContentTextAlignment =
605+
JVTextAlignmentType.center;
605606

606-
/**协议二次弹窗内容文本字体大小*/
607-
int agreementAlertViewContentTextFontSize = 12;
607+
/**协议二次弹窗内容文本字体大小*/
608+
int agreementAlertViewContentTextFontSize = 12;
608609

609610
/**协议二次弹窗登录按钮背景图片
610611
激活状态的图片,失效状态的图片,高亮状态的图片
611612
*/
612613
String? agreementAlertViewLoginBtnNormalImagePath;
613-
String? agreementAlertViewLoginBtnPressedImagePath;
614-
String? agreementAlertViewLoginBtnUnableImagePath;
614+
String? agreementAlertViewLoginBtnPressedImagePath;
615+
String? agreementAlertViewLoginBtnUnableImagePath;
615616

616617
/**协议二次弹窗登录按钮文本颜色*/
617-
int? agreementAlertViewLogBtnTextColor;
618+
int? agreementAlertViewLogBtnTextColor;
619+
620+
/**协议页面是否支持暗黑模式*/
621+
bool setIsPrivacyViewDarkMode = true;
618622

619623
Map toJsonMap() {
620624
return {
@@ -725,16 +729,25 @@ class JVUIConfig {
725729
"privacyNavTitleTitle": privacyNavTitleTitle ??= null,
726730
"textVerAlignment": textVerAlignment,
727731
//ios-协议的二次弹窗
728-
"agreementAlertViewTitleTexSize": agreementAlertViewTitleTexSize ,
729-
"agreementAlertViewTitleTextColor": agreementAlertViewTitleTextColor ??= Colors.black.value,
730-
"agreementAlertViewContentTextAlignment": getStringFromEnum(agreementAlertViewContentTextAlignment),
731-
"agreementAlertViewContentTextFontSize": agreementAlertViewContentTextFontSize,
732-
"agreementAlertViewLoginBtnNormalImagePath": agreementAlertViewLoginBtnNormalImagePath ??= null,
733-
"agreementAlertViewLoginBtnPressedImagePath": agreementAlertViewLoginBtnPressedImagePath ??= null,
734-
"agreementAlertViewLoginBtnUnableImagePath": agreementAlertViewLoginBtnUnableImagePath ??= null,
735-
"agreementAlertViewLogBtnTextColor": agreementAlertViewLogBtnTextColor ??= Colors.black.value,
736-
"privacyCheckDialogConfig":
737-
privacyCheckDialogConfig != null ? privacyCheckDialogConfig?.toJsonMap() : null,
732+
"agreementAlertViewTitleTexSize": agreementAlertViewTitleTexSize,
733+
"agreementAlertViewTitleTextColor": agreementAlertViewTitleTextColor ??=
734+
Colors.black.value,
735+
"agreementAlertViewContentTextAlignment":
736+
getStringFromEnum(agreementAlertViewContentTextAlignment),
737+
"agreementAlertViewContentTextFontSize":
738+
agreementAlertViewContentTextFontSize,
739+
"agreementAlertViewLoginBtnNormalImagePath":
740+
agreementAlertViewLoginBtnNormalImagePath ??= null,
741+
"agreementAlertViewLoginBtnPressedImagePath":
742+
agreementAlertViewLoginBtnPressedImagePath ??= null,
743+
"agreementAlertViewLoginBtnUnableImagePath":
744+
agreementAlertViewLoginBtnUnableImagePath ??= null,
745+
"agreementAlertViewLogBtnTextColor": agreementAlertViewLogBtnTextColor ??=
746+
Colors.black.value,
747+
"privacyCheckDialogConfig": privacyCheckDialogConfig != null
748+
? privacyCheckDialogConfig?.toJsonMap()
749+
: null,
750+
"setIsPrivacyViewDarkMode": setIsPrivacyViewDarkMode,
738751
}..removeWhere((key, value) => value == null);
739752
}
740753
}
@@ -781,15 +794,15 @@ class JVPopViewConfig {
781794
class JVPrivacyCheckDialogConfig {
782795
int? width; //协议⼆次弹窗本身的宽
783796
int? height; //协议⼆次弹窗本身的⾼
784-
int? offsetX ; // 窗口相对屏幕中心的x轴偏移量
785-
int? offsetY ; // 窗口相对屏幕中心的y轴偏移量
786-
int? titleTextSize ; // 弹窗标题字体大小
787-
int? titleTextColor ; // 弹窗标题字体颜色
788-
String? contentTextGravity ; //协议⼆次弹窗协议内容对⻬⽅式
789-
int? contentTextSize ; //协议⼆次弹窗协议内容字体⼤⼩
790-
String? logBtnImgPath ; //协议⼆次弹窗登录按钮的背景图⽚
791-
int? logBtnTextColor ; //协议⼆次弹窗登录按钮的字体颜⾊
792-
String? gravity ; //
797+
int? offsetX; // 窗口相对屏幕中心的x轴偏移量
798+
int? offsetY; // 窗口相对屏幕中心的y轴偏移量
799+
int? titleTextSize; // 弹窗标题字体大小
800+
int? titleTextColor; // 弹窗标题字体颜色
801+
String? contentTextGravity; //协议⼆次弹窗协议内容对⻬⽅式
802+
int? contentTextSize; //协议⼆次弹窗协议内容字体⼤⼩
803+
String? logBtnImgPath; //协议⼆次弹窗登录按钮的背景图⽚
804+
int? logBtnTextColor; //协议⼆次弹窗登录按钮的字体颜⾊
805+
String? gravity; //
793806
bool? enablePrivacyCheckDialog;
794807
JVPrivacyCheckDialogConfig() {
795808
this.enablePrivacyCheckDialog = true;
@@ -808,10 +821,9 @@ class JVPrivacyCheckDialogConfig {
808821
"contentTextSize": contentTextSize,
809822
"logBtnImgPath": logBtnImgPath,
810823
"logBtnTextColor": logBtnTextColor,
811-
"enablePrivacyCheckDialog":enablePrivacyCheckDialog,
824+
"enablePrivacyCheckDialog": enablePrivacyCheckDialog,
812825
}..removeWhere((key, value) => value == null);
813826
}
814-
815827
}
816828

817829
/// 自定义控件
@@ -959,6 +971,7 @@ enum JVIOSUIModalTransitionStyle {
959971
CrossDissolve,
960972
PartialCurl
961973
}
974+
962975
/*
963976
*
964977
* iOS状态栏设置,需要设置info.plist文件中

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: jverify
22
description: JIGUANG Official Jverifycation SDK flutter plugin project.
3-
version: 2.3.4
3+
version: 2.3.5
44
homepage: https://www.jiguang.cn
55

66
environment:

0 commit comments

Comments
 (0)