ShoeSize constructor
ShoeSize({})
Class for ShoeSize conversions, e.g. if you want to convert 1 centimeter in eu shoes size:
var ShoeSize = ShoeSize(removeTrailingZeros: false);
ShoeSize.convert(Unit(SHOE_SIZE.centimeters, value: 1));
print(SHOE_SIZE.eu_china);
Implementation
ShoeSize(
{super.significantFigures,
super.removeTrailingZeros,
super.useScientificNotation,
name})
: super(
name: name ?? PROPERTY.shoeSize,
mapSymbols: {
SHOE_SIZE.centimeters: 'cm',
SHOE_SIZE.inches: 'in',
},
conversionTree:
ConversionNode(name: SHOE_SIZE.centimeters, children: [
ConversionNode(
coefficientProduct: 1 / 1.5,
coefficientSum: -1.5,
name: SHOE_SIZE.euChina,
),
ConversionNode(
coefficientProduct: 2.54,
name: SHOE_SIZE.inches,
children: [
ConversionNode(
coefficientProduct: 1 / 3,
coefficientSum: 10 / 3,
name: SHOE_SIZE.ukIndiaChild,
),
ConversionNode(
coefficientProduct: 1 / 3,
coefficientSum: 23 / 3,
name: SHOE_SIZE.ukIndiaMan,
),
ConversionNode(
coefficientProduct: 1 / 3,
coefficientSum: 23.5 / 3,
name: SHOE_SIZE.ukIndiaWoman,
),
ConversionNode(
coefficientProduct: 1 / 3,
coefficientSum: 49 / 9,
name: SHOE_SIZE.usaCanadaChild,
),
ConversionNode(
coefficientProduct: 1 / 3,
coefficientSum: 22 / 3,
name: SHOE_SIZE.usaCanadaMan,
),
ConversionNode(
coefficientProduct: 1 / 3,
coefficientSum: 21 / 3,
name: SHOE_SIZE.usaCanadaWoman,
),
]),
ConversionNode(
coefficientSum: -1.5,
name: SHOE_SIZE.japan,
),
]),
);