Created
February 26, 2020 08:36
-
-
Save simoales/66af9a23235abcb537621e5bf9540bc6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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], | |
}; | |
} |
Yes, It is a Map<String, List> as you said.
A visit from the book Flutter Proyects 👍
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.
Thank you. Great Work!!
wow
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Q/ What is the type of this variable?
is it the same as Map<String, List> or another thing?