getDimenDesignSystem_text static method

double getDimenDesignSystem_text(
  1. LevelDS levelDS,
  2. double? custom
)

Implementation

static double getDimenDesignSystem_text(LevelDS levelDS , double? custom ) {



  //mobile enter custom
  if ( custom != null &&  custom != 0 ) return custom;

  //default
  custom ??= DSDimen.text_level_1;
  var d = DSDimen.text_level_1;

  //choose
  if( levelDS == LevelDS.parent ) {
    d = DSDimen.text_level_parent ;
  }
  if( levelDS == LevelDS.l1 ) {
    d = DSDimen.text_level_1;
  }
  if( levelDS == LevelDS.l1_dark ) {
    d = DSDimen.text_level_1;
  }
  if( levelDS == LevelDS.l2 ) {
    d = DSDimen.text_level_2;
  }
  if( levelDS == LevelDS.l2_dark ) {
    d = DSDimen.text_level_2;
  }
  if( levelDS == LevelDS.l3 ) {
    d = DSDimen.text_level_3;
  }
  if( levelDS == LevelDS.l3_dark ) {
    d = DSDimen.text_level_3;
  }
  if( levelDS == LevelDS.l4 ) {
    d = DSDimen.text_level_4;
  }
  if( levelDS == LevelDS.l4_dark ) {
    d = DSDimen.text_level_4;
  }

  return d;
}