getChapitre static method

dynamic getChapitre(
  1. String value, {
  2. int? returnType,
})

Implementation

static getChapitre(String value, { int? returnType }){
  if( returnType == null ) {
    return value.toString().split('.').first;
  }
  if( returnType == Constant.stringNew ) {
    return value.toString().split('.').first;
  }
  if( returnType == Constant.intNew ) {
    return int.parse(value.toString().split('.').first);
  }
}