t static method

TextStyle t({
  1. Color? colorOpt = Colors.black,
  2. TextDecoration? textDecoration = TextDecoration.none,
  3. double dimenOpt = 0,
  4. String? fontFamily,
})

Implementation

static TextStyle t({
  Color? colorOpt = Colors.black ,
  TextDecoration? textDecoration = TextDecoration.none,
  double dimenOpt = 0,
  String? fontFamily,
}){

  //set default dimen
  var myDimen = DSDimen.text_level_1;
  if ( dimenOpt != 0 ) {
    myDimen = dimenOpt;
  }

  //color
  Color myColor = DSColor.text_h1;
  if  ( colorOpt != null ) {
    myColor = colorOpt;
  }

  //style
  var myStyle = TextStyle(
    fontSize: myDimen,
    color: myColor,
    fontFamily: fontFamily,
    height: 1.0, //space between lines
    decoration:  textDecoration,
  );

  return myStyle;
}