Last active
February 7, 2023 00:05
Revisions
-
Tim Sneath revised this gist
Feb 7, 2023 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ // A simple example of records and patterns (double x, double y) getLocation(String name) { if (name == 'Nairobi') { return (1.2921, 36.8219); -
Tim Sneath created this gist
Jan 25, 2023 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ (double x, double y) getLocation(String name) { if (name == 'Nairobi') { return (1.2921, 36.8219); } else { return (0, 0); } } void main(List<String> args) { final (lat, long) = getLocation('Nairobi'); print('Current location: $lat, $long'); }