fix:修复切换到俄语文本出现溢出的情况
This commit is contained in:
parent
d3aee05534
commit
8b61e3d5a6
@ -109,8 +109,10 @@ class _AuthorizedAdministratorListPageState
|
|||||||
64.h),
|
64.h),
|
||||||
Align(
|
Align(
|
||||||
alignment: const Alignment(0.0, 0.2),
|
alignment: const Alignment(0.0, 0.2),
|
||||||
child: SizedBox(
|
child: Container(
|
||||||
width: 360.w,
|
constraints: BoxConstraints(
|
||||||
|
maxWidth: 0.9.sw,
|
||||||
|
),
|
||||||
child: SubmitBtn(
|
child: SubmitBtn(
|
||||||
btnName: '添加授权管理员'.tr,
|
btnName: '添加授权管理员'.tr,
|
||||||
onClick: () {
|
onClick: () {
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|
||||||
@ -9,9 +8,9 @@ import '../app_settings/app_colors.dart';
|
|||||||
* */
|
* */
|
||||||
|
|
||||||
class SubmitBtn extends StatelessWidget {
|
class SubmitBtn extends StatelessWidget {
|
||||||
|
|
||||||
SubmitBtn({
|
SubmitBtn({
|
||||||
required this.btnName, Key? key,
|
required this.btnName,
|
||||||
|
Key? key,
|
||||||
this.borderRadius,
|
this.borderRadius,
|
||||||
this.color,
|
this.color,
|
||||||
this.padding,
|
this.padding,
|
||||||
@ -49,7 +48,9 @@ class SubmitBtn extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
width: ScreenUtil().screenWidth - 40.w,
|
width: ScreenUtil().screenWidth - 40.w,
|
||||||
height: 60.h,
|
constraints: BoxConstraints(
|
||||||
|
minHeight: 60.h, // 设置最小高度
|
||||||
|
),
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: isDisabled == false
|
backgroundColor: isDisabled == false
|
||||||
@ -63,7 +64,14 @@ class SubmitBtn extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
btnName!,
|
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 {
|
class AddBottomWhiteBtn extends StatelessWidget {
|
||||||
|
|
||||||
AddBottomWhiteBtn({
|
AddBottomWhiteBtn({
|
||||||
required this.btnName, Key? key,
|
required this.btnName,
|
||||||
|
Key? key,
|
||||||
this.onClick,
|
this.onClick,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
String? btnName;
|
String? btnName;
|
||||||
@ -164,9 +172,9 @@ class AddBottomWhiteBtn extends StatelessWidget {
|
|||||||
* */
|
* */
|
||||||
|
|
||||||
class OutLineBtn extends StatelessWidget {
|
class OutLineBtn extends StatelessWidget {
|
||||||
|
|
||||||
OutLineBtn({
|
OutLineBtn({
|
||||||
required this.btnName, Key? key,
|
required this.btnName,
|
||||||
|
Key? key,
|
||||||
this.onClick,
|
this.onClick,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
String? btnName;
|
String? btnName;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user