/*
 * @Author: XianKaiQun
 * @Date: 2020-08-20 10:19:40
 * @LastEditors: XianKaiQun
 * @LastEditTime: 2020-08-20 11:10:24
 * @Description: 
 */
import 'package:flutter/widgets.dart';

extension ExtensionTextStyle on TextStyle {
  get _cw => this.copyWith;

  ///FontWeight
  TextStyle? setWeight(FontWeight weight) => _cw(fontWeight: weight);
  TextStyle? get setWeightBold => setWeight(FontWeight.bold);
  TextStyle? get setWeightNormal => setWeight(FontWeight.normal);
  TextStyle? get setWeightW100 => setWeight(FontWeight.w100);
  TextStyle? get setWeightW200 => setWeight(FontWeight.w200);
  TextStyle? get setWeightW300 => setWeight(FontWeight.w300);
  TextStyle? get setWeightW400 => setWeight(FontWeight.w400);
  TextStyle? get setWeightW500 => setWeight(FontWeight.w500);
  TextStyle? get setWeightW600 => setWeight(FontWeight.w600);
  TextStyle? get setWeightW700 => setWeight(FontWeight.w700);
  TextStyle? get setWeightW800 => setWeight(FontWeight.w800);
  TextStyle? get setWeightW900 => setWeight(FontWeight.w900);

  ///FontSize
  TextStyle? setSize(double size) => _cw(fontSize: size);

  ///Color
  TextStyle? setColor(Color color) => _cw(color: color);
}
