fix:修复切换到俄语文本出现溢出的情况

This commit is contained in:
liyi 2025-03-20 17:54:14 +08:00
parent d3aee05534
commit 8b61e3d5a6
2 changed files with 21 additions and 11 deletions

View File

@ -109,8 +109,10 @@ class _AuthorizedAdministratorListPageState
64.h),
Align(
alignment: const Alignment(0.0, 0.2),
child: SizedBox(
width: 360.w,
child: Container(
constraints: BoxConstraints(
maxWidth: 0.9.sw,
),
child: SubmitBtn(
btnName: '添加授权管理员'.tr,
onClick: () {

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -9,9 +8,9 @@ import '../app_settings/app_colors.dart';
* */
class SubmitBtn extends StatelessWidget {
SubmitBtn({
required this.btnName, Key? key,
required this.btnName,
Key? key,
this.borderRadius,
this.color,
this.padding,
@ -49,7 +48,9 @@ class SubmitBtn extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
width: ScreenUtil().screenWidth - 40.w,
height: 60.h,
constraints: BoxConstraints(
minHeight: 60.h, //
),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: isDisabled == false
@ -63,7 +64,14 @@ class SubmitBtn extends StatelessWidget {
},
child: Text(
btnName!,
style: TextStyle(color: Colors.white, fontSize: 24.sp),
textAlign: TextAlign.center, //
softWrap: true, //
overflow: TextOverflow.visible, //
style: TextStyle(
color: Colors.white,
fontSize: 24.sp,
height: 1.2, //
),
)),
);
/*
@ -111,9 +119,9 @@ class SubmitBtn extends StatelessWidget {
* */
class AddBottomWhiteBtn extends StatelessWidget {
AddBottomWhiteBtn({
required this.btnName, Key? key,
required this.btnName,
Key? key,
this.onClick,
}) : super(key: key);
String? btnName;
@ -164,9 +172,9 @@ class AddBottomWhiteBtn extends StatelessWidget {
* */
class OutLineBtn extends StatelessWidget {
OutLineBtn({
required this.btnName, Key? key,
required this.btnName,
Key? key,
this.onClick,
}) : super(key: key);
String? btnName;