fix:修复切换到俄语文本出现溢出的情况
This commit is contained in:
parent
d3aee05534
commit
8b61e3d5a6
@ -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: () {
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user