class
UI::WidgetPlacement
- UI::WidgetPlacement
- Reference
- Object
Overview
Describes how a widget should be placed and refreshed on a specific platform surface.
This stays intentionally declarative. It records the widget family's intended placement and timeline behavior so host tooling can export the metadata into WidgetKit or another extension layer without pretending to render the widget in-app.
Defined in:
ui/widgets.crConstructors
Instance Method Summary
- #add_family(family : String) : String
- #export_widgetkit_scaffold(indent : String = " ") : String
- #families : Array(String)
- #families=(families : Array(String))
- #notes : String | Nil
- #notes=(notes : String | Nil)
- #refresh_policy : String | Nil
- #refresh_policy=(refresh_policy : String | Nil)
- #surface : String
- #surface=(surface : String)
- #timeline_intent : String
- #timeline_intent=(timeline_intent : String)
- #to_payload(json : JSON::Builder) : Nil
- #widgetkit_families : String
Constructor Detail
def self.new(surface : String, families : Array(String) | Nil = nil, timeline_intent : String = "snapshot", refresh_policy : String | Nil = nil, notes : String | Nil = nil)
#