| 12345678910111213141516171819202122232425262728 |
- import 'package:flutter/material.dart';
- import 'package:news_app/constant/size_res.dart';
- /// @author: bo.zeng
- /// @email: cnhbwds@gmail.com
- /// @date: 2025 2025/4/9 16:00
- /// @description:
- Widget myTxt({
- required String text,
- double? fontSize,
- Color? color,
- FontWeight? fontWeight,
- TextAlign? textAlign,
- TextOverflow? textOverflow,
- int? maxLines,
- TextDecoration? decoration,
- }) {
- return Text(
- text,
- maxLines: maxLines,
- overflow: textOverflow ?? TextOverflow.ellipsis,
- style: TextStyle(
- color: color ?? Colors.black,
- fontSize: fontSize ?? sizeTxt,
- fontWeight: fontWeight ?? FontWeight.normal,
- ),
- );
- }
|