getName method
Gets a localized name for this unit.
Implementation
String getName({
required String locale,
}) {
switch (this) {
// SI.
case InformationUnit.bit:
return 'bit';
case InformationUnit.crumb:
return 'crumb';
case InformationUnit.nibble:
return 'nibble';
case InformationUnit.kilobit:
return 'kilobit';
case InformationUnit.megabit:
return 'megabit';
case InformationUnit.gigabit:
return 'gigabit';
case InformationUnit.terabit:
return 'terabit';
case InformationUnit.petabit:
return 'petabit';
case InformationUnit.exabit:
return 'exabit';
case InformationUnit.zettabit:
return 'zettabit';
case InformationUnit.yottabit:
return 'yottabit';
case InformationUnit.byte:
return 'byte';
case InformationUnit.kilobyte:
return 'kilobyte';
case InformationUnit.megabyte:
return 'megabyte';
case InformationUnit.gigabyte:
return 'gigabyte';
case InformationUnit.terabyte:
return 'terabyte';
case InformationUnit.petabyte:
return 'petabyte';
case InformationUnit.exabyte:
return 'exabyte';
case InformationUnit.zettabyte:
return 'zettabyte';
case InformationUnit.yottabyte:
return 'yottabyte';
// IEC.
case InformationUnit.kibibit:
return 'kibibit';
case InformationUnit.mebibit:
return 'mebibit';
case InformationUnit.gibibit:
return 'gibibit';
case InformationUnit.tebibit:
return 'tebibit';
case InformationUnit.pebibit:
return 'pebibit';
case InformationUnit.exbibit:
return 'exbibit';
case InformationUnit.zebibit:
return 'zebibit';
case InformationUnit.yobibit:
return 'yobibit';
case InformationUnit.kibibyte:
return 'kibibyte';
case InformationUnit.mebibyte:
return 'mebibyte';
case InformationUnit.gibibyte:
return 'gibibyte';
case InformationUnit.tebibyte:
return 'tebibyte';
case InformationUnit.pebibyte:
return 'pebibyte';
case InformationUnit.exbibyte:
return 'exbibyte';
case InformationUnit.zebibyte:
return 'zebibyte';
case InformationUnit.yobibyte:
return 'yobibyte';
}
}