Fudge
07/29/2020, 7:07 PM@Preview
? I remember there was one but I can't find it.
Something like Something.isInPreview()
jim
07/29/2020, 7:27 PMFudge
07/29/2020, 7:33 PMIan Lake
07/29/2020, 7:50 PMLeland Richardson [G]
07/29/2020, 7:51 PMjim
07/29/2020, 7:52 PM@Composable
fun myWidget(myState: WidgetState = remember { MyWidgetDefaultStateImpl() }) {
// Use/update mystate here
}
Timo Drick
07/29/2020, 8:33 PMIan Lake
07/29/2020, 10:00 PMjim
07/29/2020, 10:05 PM@Preview
not supporting network requests actually ends up pushing developers to write better widgets (specifically, by discouraging widgets which are sideways loading data). So among other reasons that widgets are sandboxed, this does not make me sad.Leland Richardson [G]
07/29/2020, 11:00 PMjim
07/29/2020, 11:10 PM@UnionType
, you need to choose a parameter type, and from an API perspective, accepting the non-string-based type starts to look pretty appealing. And then the question becomes, how easy/hard does it need to be to load an image? Can it be made as simple as a call to a load function? Is Image(url="<https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png>")
really much better than Image(img=network.load("<https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png>"))
? Especially when it opens so many other doors with regards to where that image could have come from.Leland Richardson [G]
07/29/2020, 11:15 PMjim
07/29/2020, 11:16 PMIan Lake
07/30/2020, 1:04 AMTimo Drick
07/30/2020, 10:41 AMcaelum19
07/30/2020, 10:43 AMTimo Drick
07/30/2020, 10:48 AMgildor
07/30/2020, 11:12 AMTimo Drick
07/30/2020, 11:18 AMgildor
07/30/2020, 11:28 AM