actionscript 3 - What is Dart equivalent to AS3 arguments object? -
i translating as3 code dart. have partially translated following stuck on how handle as3 arguments object. guidance?
void setlabeltextcolors([int upcolor = 0, int overcolor = 0, int downcolor = 0]) { _lcup = arguments.length > 0 ? upcolor : -1; ... }
you can use question mark operator see if argument has been given or not.
void setlabeltextcolors([int upcolor = 0, int overcolor = 0, int downcolor = 0]) { _lcup = ?upcolor ? upcolor : -1; ... }
Comments
Post a Comment