flow_widget library
Cross-platform home widget framework for Flutter.
await FlowWidget.initialize();
await FlowWidget.saveData(key: 'username', value: 'Amir');
await FlowWidget.update(name: 'ProfileWidget');
FlowWidget.onClicked.listen((event) {
// Handle widget interaction
});
Classes
- FlowWidget
- Primary entry point for the flow_widget plugin.
- FlowWidgetCapabilities
- Feature flags describing what the current host platform can do.
- FlowWidgetClickEvent
- Emitted when the user interacts with a widget (tap, button, toggle).
- FlowWidgetConfig
- Static configuration for a widget family registered with flow_widget.
- FlowWidgetConfiguredEvent
- Emitted when the user finishes configuring a widget.
- FlowWidgetDataEntry
- A single key/value pair for batched shared-storage writes.
- FlowWidgetEncodable
- Contract for strongly typed widget data models.
- FlowWidgetEvent
- Base type for all events emitted by the flow_widget platform channel.
- FlowWidgetId
- Uniquely identifies a widget instance on the host platform.
- FlowWidgetIgnore
- Marks a field to be excluded from generated serializers.
- FlowWidgetImage
- Image payload for widgets, with optional remote URL caching.
- FlowWidgetInfo
- Runtime metadata for an installed widget instance.
- FlowWidgetKey
- Overrides the storage key for a single field.
- FlowWidgetLiveActivityEvent
- Emitted when a Live Activity changes state.
- FlowWidgetLogger
- Internal logger. Disabled in release builds and unless explicitly enabled.
- FlowWidgetModel
- Marks a class as a strongly typed flow_widget data model.
- FlowWidgetOptions
-
Configuration passed to
FlowWidgetPlatform.initialize. - FlowWidgetTimelineEntry
- A single point on a widget timeline (WidgetKit / Glance).
- FlowWidgetTimelineReloadEvent
- Emitted when the host asks the app to reload a timeline.
- FlowWidgetUpdateRequest
- Describes a single widget refresh request.
- FlowWidgetValue
- Strongly typed value suitable for cross-process shared storage.
- LiveActivityConfig
- Configuration used to start a Live Activity / Dynamic Island session.
- LiveActivityController
- Controller for iOS Live Activities and Dynamic Island.
- LiveActivityState
- Snapshot of an active Live Activity.
Enums
- FlowWidgetFamily
- Logical family classifying where a widget appears.
- FlowWidgetImageCachePolicy
- Native caching strategy for remote widget images.
- FlowWidgetPlatformType
- Identifies a platform on which flow_widget can host widgets.
- FlowWidgetSize
- Canonical size classes for home-screen widgets.
- LiveActivityPhase
- Live Activity lifecycle phases.
Mixins
- FlowWidgetJsonModel
- Mixin that stores a model under a single JSON key for simple cases.
Constants
- flowWidgetIgnore → const FlowWidgetIgnore
- Convenience constant for FlowWidgetIgnore.
Exceptions / Errors
- FlowWidgetException
- Base exception for all flow_widget failures.
- FlowWidgetLiveActivityException
- Thrown when Live Activity APIs fail.
- FlowWidgetNotInitializedException
- Thrown when an API is called before FlowWidget.initialize.
- FlowWidgetStorageException
- Thrown when shared storage I/O fails.
- FlowWidgetUnsupportedException
- Thrown when the host platform does not support the requested feature.
- FlowWidgetUpdateException
- Thrown when a widget update fails on the native side.