one_line_text_style 0.6.0  one_line_text_style: ^0.6.0 copied to clipboard
one_line_text_style: ^0.6.0 copied to clipboard
This package simplifies the process of creating and applying text styles by introducing a set of convenient extensions, which make your code more readable.
example/one_line_text_style.dart
/// Generated by one_line_text_style package
import 'package:flutter/material.dart';
extension SizeExtension on TextStyle {
  TextStyle get size8 => copyWith(
    fontSize: 8,
  );
  TextStyle get size10 => copyWith(
    fontSize: 10,
  );
  TextStyle get size12 => copyWith(
    fontSize: 12,
  );
  TextStyle get size14 => copyWith(
    fontSize: 14,
  );
  TextStyle get size16 => copyWith(
    fontSize: 16,
  );
  TextStyle get size18 => copyWith(
    fontSize: 18,
  );
  TextStyle get size20 => copyWith(
    fontSize: 20,
  );
  TextStyle get size22 => copyWith(
    fontSize: 22,
  );
  TextStyle get size24 => copyWith(
    fontSize: 24,
  );
  TextStyle get size26 => copyWith(
    fontSize: 26,
  );
  TextStyle get size28 => copyWith(
    fontSize: 28,
  );
  TextStyle get size30 => copyWith(
    fontSize: 30,
  );
  TextStyle get sizeMedium => copyWith(
    fontSize: 30,
  );
  TextStyle get sizeLarge => copyWith(
    fontSize: 40,
  );
}
extension WeightExtension on TextStyle {
  TextStyle get weight100 => copyWith(
    fontWeight: FontWeight.w100,
  );
  TextStyle get weight200 => copyWith(
    fontWeight: FontWeight.w200,
  );
  TextStyle get weight300 => copyWith(
    fontWeight: FontWeight.w300,
  );
  TextStyle get weight400 => copyWith(
    fontWeight: FontWeight.w400,
  );
  TextStyle get weight500 => copyWith(
    fontWeight: FontWeight.w500,
  );
  TextStyle get weight600 => copyWith(
    fontWeight: FontWeight.w600,
  );
  TextStyle get weight700 => copyWith(
    fontWeight: FontWeight.w700,
  );
  TextStyle get weight800 => copyWith(
    fontWeight: FontWeight.w800,
  );
  TextStyle get weight900 => copyWith(
    fontWeight: FontWeight.w900,
  );
  TextStyle get semibold => copyWith(
    fontWeight: FontWeight.w600,
  );
  TextStyle get bold => copyWith(
    fontWeight: FontWeight.w700,
  );
  TextStyle get extraThin => copyWith(
    fontWeight: FontWeight.w100,
  );
}
extension ColorExtension on TextStyle {
  TextStyle get colorWhite => copyWith(
    color: const Color(0xFFFFFFFF),
  );
  TextStyle get colorBlack => copyWith(
    color: const Color(0xFF000000),
  );
  TextStyle get colorGrey => copyWith(
    color: const Color(0xFF9E9E9E),
  );
  TextStyle get colorRed => copyWith(
    color: const Color(0xFFF44336),
  );
  TextStyle get colorYellow => copyWith(
    color: const Color(0xFFAAAAAA),
  );
}
extension FontFamilyExtension on TextStyle {
  TextStyle get dmsans => copyWith(
    fontFamily: 'DM Sans',
  );
}
extension StyleExtension on TextStyle {
  TextStyle get italic => copyWith(
    fontStyle: FontStyle.italic,
  );
}
extension DecorationExtension on TextStyle {
  TextStyle get underline => copyWith(
    decoration: TextDecoration.underline,
  );
  TextStyle get overline => copyWith(
    decoration: TextDecoration.overline,
  );
  TextStyle get lineThrough => copyWith(
    decoration: TextDecoration.lineThrough,
  );
}
extension DecorationStyleExtension on TextStyle {
  TextStyle get solid => copyWith(
    decorationStyle: TextDecorationStyle.solid,
  );
  TextStyle get double => copyWith(
    decorationStyle: TextDecorationStyle.double,
  );
  TextStyle get dotted => copyWith(
    decorationStyle: TextDecorationStyle.dotted,
  );
  TextStyle get dashed => copyWith(
    decorationStyle: TextDecorationStyle.dashed,
  );
  TextStyle get wavy => copyWith(
    decorationStyle: TextDecorationStyle.wavy,
  );
}
extension OverflowExtension on TextStyle {
  TextStyle get overflowClip => copyWith(
    overflow: TextOverflow.clip,
  );
  TextStyle get overflowFade => copyWith(
    overflow: TextOverflow.fade,
  );
  TextStyle get overflowEllipsis => copyWith(
    overflow: TextOverflow.ellipsis,
  );
  TextStyle get overflowVisible => copyWith(
    overflow: TextOverflow.visible,
  );
}