fistext.dart 863 B

123456789101112131415161718192021222324252627282930313233
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flyinsonolite/infrastructure/scale.dart';
  3. import 'package:flyinsonolite/infrastructure/storage.dart';
  4. class FISText extends StatelessWidget {
  5. final String data;
  6. final TextStyle? style;
  7. final TextAlign? textAlign;
  8. final bool? softWrap;
  9. final TextOverflow? overflow;
  10. final int? maxLines;
  11. const FISText(this.data,
  12. {this.style,
  13. this.textAlign,
  14. this.softWrap,
  15. this.overflow,
  16. this.maxLines,
  17. key});
  18. @override
  19. Widget build(BuildContext context) {
  20. return Text(
  21. data,
  22. style: style ??
  23. Storage.currentTheme.normalTextStyle.copyWith(
  24. fontSize: Storage.currentTheme.normalTextStyle.fontSize!.s),
  25. textAlign: textAlign,
  26. softWrap: softWrap ?? false,
  27. overflow: overflow,
  28. maxLines: maxLines,
  29. );
  30. }
  31. }