Skip to content

Instantly share code, notes, and snippets.

@simoales
Created February 26, 2020 08:36
Show Gist options
  • Save simoales/66af9a23235abcb537621e5bf9540bc6 to your computer and use it in GitHub Desktop.
Save simoales/66af9a23235abcb537621e5bf9540bc6 to your computer and use it in GitHub Desktop.
dynamic _formulas = {
'0':[1,0.001,0,0,3.28084,0.000621371,0,0],
'1':[1000,1,0,0,3280.84,0.621371,0,0],
'2':[0,0,1,0.0001,0,0,0.00220462,0.035274],
'3':[0,0,1000,1,0,0,2.20462,35.274],
'4':[0.3048,0.0003048,0,0,1,0.000189394,0,0],
'5':[1609.34, 1.60934,0,0,5280,1,0,0],
'6':[0,0,453.592,0.453592,0,0,1,16],
'7':[0,0,28.3495,0.0283495,3.28084,0,0.0625, 1],
};
}
@MuhamadHaydar
Copy link

Q/ What is the type of this variable?
is it the same as Map<String, List> or another thing?

@itzbernoulli
Copy link

Yes, It is a Map<String, List> as you said.

@vacax
Copy link

vacax commented Jan 25, 2021

A visit from the book Flutter Proyects 👍

@ArnaudCalmettes
Copy link

I don't quite understand the reason why the author chose to represent this data this way, whereas a List<List<double>> is much more direct, and doesn't force us to perform a temporary conversion to (and from) string in the method.
I suppose the intent was to make the code more explicit and easy to read, but it's kind of clumsy.

@samievghayrat
Copy link

Thank you. Great Work!!

@jeevankoiri10
Copy link

wow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment