Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- /// Custom Text with a default font Monospace and a default font size.
- class CustomText extends Text {
- /// Custom Text Constructor extend of Text constructor.
- CustomText(this.dataCustom, {this.styleCustom, this.textAlignCustom})
- : super(dataCustom,
- style: styleCustom.copyWith(fontFamily: 'Monospace', fontSize: 12));
- /// The text to display.
- ///
- /// This will be null if a [textSpan] is provided instead.
- final String dataCustom;
- /// If non-null, the style to use for this text.
- ///
- /// If the style's "inherit" property is true, the style will be merged with
- /// the closest enclosing [DefaultTextStyle]. Otherwise, the style will
- /// replace the closest enclosing [DefaultTextStyle].
- final TextStyle styleCustom;
- /// How the text should be aligned horizontally.
- final TextAlign textAlignCustom;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement