34 lines
1020 B
Dart
34 lines
1020 B
Dart
/*
|
|
* @Author: wangyang 1147192855@qq.com
|
|
* @Date: 2022-08-01 14:11:37
|
|
* @LastEditors: wangyang 1147192855@qq.com
|
|
* @LastEditTime: 2022-08-02 15:34:34
|
|
* @FilePath: \marking_app\lib\utils\my_text.dart
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
*/
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:school_asignment_app/common/config/colorUtils.dart';
|
|
|
|
// 快捷Text使用
|
|
Text quickText(text,
|
|
{double? size,
|
|
Color color = CommonColors.defaultColor,
|
|
TextAlign? align,
|
|
FontWeight? fontWeight,
|
|
TextOverflow overflow = TextOverflow.ellipsis,
|
|
int maxLines = 1,
|
|
TextDecoration decoration = TextDecoration.none}) {
|
|
return Text(
|
|
text.toString(),
|
|
textAlign: align,
|
|
maxLines: maxLines,
|
|
overflow: overflow,
|
|
style: TextStyle(
|
|
decoration: decoration,
|
|
fontSize: size,
|
|
color: color,
|
|
fontWeight: fontWeight,
|
|
),
|
|
);
|
|
}
|