This is part of an article I originally wrote in Medium, but it's also available in DEV.to, check it out!
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
-- Determines if this script is running on Windows | |
os.is_win = package.config:sub(1, 1) == "\\" | |
-- Return the path to the temp dir | |
function os.get_temp_dir() | |
if os.is_win then | |
-- Windows. Same as: | |
-- os.getenv("TEMP") | |
-- os.getenv("TMP") | |
return os.getenv("UserProfile") .. "/AppData/Local/Temp" |
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
import std/uri | |
proc `?+`*(url: Uri, ql: openArray[tuple[string, string]]): Uri = | |
var qs = @ql | |
if url.query.len() != 0: | |
for k, v in url.query.decodeQuery(): | |
qs.add( (k, v) ) | |
return url ? qs |
Learning how to use OverlayPortal
and CompositedTransformTarget
to build a custom dropdown in Flutter without external packages!
This is part of an article I wrote in DEV.to, go check it out! :)
OlderNewer