notes static method

Text notes(
  1. String text, {
  2. TextAlign textAlign = TextAlign.left,
  3. TextDecoration decoration = TextDecoration.none,
  4. Color? color,
  5. TextOverflow textOverflow = TextOverflow.ellipsis,
  6. int? maxLines,
  7. bool isItalic = false,
  8. bool isUnderline = false,
  9. bool isOverline = false,
  10. bool isLineTrough = false,
  11. bool isBold = false,
  12. double? scaleFactor,
})

Implementation

static Text notes(
  String text, {
  TextAlign textAlign = TextAlign.left,
  TextDecoration decoration = TextDecoration.none,
  Color? color,
  TextOverflow textOverflow = TextOverflow.ellipsis,
  int? maxLines,
  bool isItalic = false,
  bool isUnderline = false,
  bool isOverline = false,
  bool isLineTrough = false,
  bool isBold = false,
  double? scaleFactor,
}) {
  return Text(
    text,
    textScaleFactor: scaleFactor,
    maxLines: maxLines,
    textAlign: textAlign,
    overflow: textOverflow,
    style: TextStyle(
      fontStyle: isItalic ? FontStyle.italic : FontStyle.normal,
      fontWeight: isBold ? FontWeight.bold : FontWeight.w400,
      fontSize: 8.0.sp,
      color: color,
      letterSpacing: .5,
      decoration: (isUnderline && isOverline && isLineTrough)
          ? TextDecoration.combine(
              [
                TextDecoration.underline,
                TextDecoration.overline,
                TextDecoration.lineThrough,
              ],
            )
          : (isUnderline && isOverline)
              ? TextDecoration.combine(
                  [
                    TextDecoration.underline,
                    TextDecoration.overline,
                  ],
                )
              : (isUnderline && isLineTrough)
                  ? TextDecoration.combine(
                      [
                        TextDecoration.underline,
                        TextDecoration.lineThrough,
                      ],
                    )
                  : (isOverline && isLineTrough)
                      ? TextDecoration.combine(
                          [
                            TextDecoration.overline,
                            TextDecoration.lineThrough,
                          ],
                        )
                      : isUnderline
                          ? TextDecoration.underline
                          : isOverline
                              ? TextDecoration.overline
                              : isLineTrough
                                  ? TextDecoration.lineThrough
                                  : TextDecoration.none,
    ),
  );
}