|
|
@@ -291,34 +291,36 @@ class KeyBoardView extends BaseView<KeyBoardController> {
|
|
|
),
|
|
|
Container(
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 4.w),
|
|
|
- constraints: BoxConstraints(
|
|
|
- maxWidth: 76.w,
|
|
|
- ),
|
|
|
+ constraints: BoxConstraints(maxWidth: 76.w),
|
|
|
decoration: BoxDecoration(
|
|
|
color: Colors.white,
|
|
|
borderRadius: BorderRadius.circular(22.r),
|
|
|
),
|
|
|
- child: isUser
|
|
|
- ? AutoSizeText(
|
|
|
- controller.homeInfo?.name ?? StringName.keyboardNoLogin,
|
|
|
- style: Styles.getTextStyleBlack204W400(14.sp),
|
|
|
- maxLines: 1,
|
|
|
- minFontSize: 10,
|
|
|
- overflow: TextOverflow.clip,
|
|
|
- )
|
|
|
- : AutoSizeText(
|
|
|
- controller.homeInfo?.targetName ?? StringName.keyboardAdd,
|
|
|
- style: controller.homeInfo?.targetName != null
|
|
|
- ? Styles.getTextStyleBlack204W400(14.sp)
|
|
|
- : TextStyle(
|
|
|
- color: const Color(0xFF8651FF),
|
|
|
- fontSize: 14.sp,
|
|
|
- fontWeight: FontWeight.w400,
|
|
|
- ),
|
|
|
- maxLines: 1,
|
|
|
- minFontSize: 10,
|
|
|
- overflow: TextOverflow.ellipsis,
|
|
|
- ),
|
|
|
+ child:
|
|
|
+ isUser
|
|
|
+ ? AutoSizeText(
|
|
|
+ controller.homeInfo?.name ??
|
|
|
+ StringName.keyboardNoLogin,
|
|
|
+ style: Styles.getTextStyleBlack204W400(14.sp),
|
|
|
+ maxLines: 1,
|
|
|
+ minFontSize: 10,
|
|
|
+ overflow: TextOverflow.clip,
|
|
|
+ )
|
|
|
+ : AutoSizeText(
|
|
|
+ controller.homeInfo?.targetName ??
|
|
|
+ StringName.keyboardAdd,
|
|
|
+ style:
|
|
|
+ controller.homeInfo?.targetName != null
|
|
|
+ ? Styles.getTextStyleBlack204W400(14.sp)
|
|
|
+ : TextStyle(
|
|
|
+ color: const Color(0xFF8651FF),
|
|
|
+ fontSize: 14.sp,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ ),
|
|
|
+ maxLines: 1,
|
|
|
+ minFontSize: 10,
|
|
|
+ overflow: TextOverflow.ellipsis,
|
|
|
+ ),
|
|
|
),
|
|
|
],
|
|
|
),
|
|
|
@@ -456,25 +458,44 @@ class KeyBoardView extends BaseView<KeyBoardController> {
|
|
|
child: Row(
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
children: [
|
|
|
- GestureDetector(
|
|
|
- onTap: controller.clickEasyReply,
|
|
|
- child: Container(
|
|
|
- width: 170.w,
|
|
|
- height: 155.85.w,
|
|
|
- child: Assets.images.bgKeyboardEasyReply.image(
|
|
|
- fit: BoxFit.contain,
|
|
|
+ Obx(() {
|
|
|
+ ImageProvider imageProvider;
|
|
|
+ // 已选择为默认键盘,显示启用键盘
|
|
|
+ if (!controller.isDefaultKeyboard.value) {
|
|
|
+ imageProvider = Assets.images.bgKeyboardStartUsing.provider();
|
|
|
+ } else {
|
|
|
+ // 未选择为默认键盘,显示体验键盘
|
|
|
+ imageProvider = Assets.images.bgKeyboardTryExperience.provider();
|
|
|
+ }
|
|
|
+ return GestureDetector(
|
|
|
+ onTap: controller.clickEasyReply,
|
|
|
+ child: SizedBox(
|
|
|
+ width: 170.w,
|
|
|
+ height: 155.85.w,
|
|
|
+ child: Image(
|
|
|
+ image: imageProvider,
|
|
|
+ fit: BoxFit.contain,
|
|
|
+ ),
|
|
|
),
|
|
|
- ),
|
|
|
- ),
|
|
|
+ );
|
|
|
+ }),
|
|
|
|
|
|
Column(
|
|
|
children: [
|
|
|
_buildFeatureCard(
|
|
|
- bg: Assets.images.bgKeyboardIntimacyAnalyze.image(width: 162.w,height: 77.5.w,fit: BoxFit.contain,),
|
|
|
+ bg: Assets.images.bgKeyboardIntimacyAnalyze.image(
|
|
|
+ width: 162.w,
|
|
|
+ height: 77.5.w,
|
|
|
+ fit: BoxFit.contain,
|
|
|
+ ),
|
|
|
onTap: controller.clickIntimacyAnalyze,
|
|
|
),
|
|
|
_buildFeatureCard(
|
|
|
- bg: Assets.images.bgKeyboardScreenshotReply.image(width: 162.w,height: 77.5.w,fit: BoxFit.contain,),
|
|
|
+ bg: Assets.images.bgKeyboardScreenshotReply.image(
|
|
|
+ width: 162.w,
|
|
|
+ height: 77.5.w,
|
|
|
+ fit: BoxFit.contain,
|
|
|
+ ),
|
|
|
onTap: controller.clickScreenshotReply,
|
|
|
),
|
|
|
],
|
|
|
@@ -487,16 +508,8 @@ class KeyBoardView extends BaseView<KeyBoardController> {
|
|
|
}
|
|
|
|
|
|
// 功能卡片
|
|
|
- Widget _buildFeatureCard({
|
|
|
- required Widget bg,
|
|
|
- required VoidCallback onTap,
|
|
|
- }) {
|
|
|
- return GestureDetector(
|
|
|
- onTap: onTap,
|
|
|
- child: Container(
|
|
|
- child: bg,
|
|
|
- ),
|
|
|
- );
|
|
|
+ Widget _buildFeatureCard({required Widget bg, required VoidCallback onTap}) {
|
|
|
+ return GestureDetector(onTap: onTap, child: Container(child: bg));
|
|
|
}
|
|
|
|
|
|
// 当前键盘人设信息
|