diff --git a/analysis_options.yaml b/analysis_options.yaml index a5744c1..872a1eb 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,4 +1,4 @@ include: package:flutter_lints/flutter.yaml # Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options +# https://dart.dev/guides/language/analysis-options \ No newline at end of file diff --git a/lib/live_activities.dart b/lib/live_activities.dart index 1ea5dcf..27eb853 100644 --- a/lib/live_activities.dart +++ b/lib/live_activities.dart @@ -12,6 +12,7 @@ class LiveActivities { /// Create an App Group inside "Runner" target & "Extension" in Xcode. /// Be sure to set the *SAME* App Group in both targets. /// [urlScheme] is optional and is the scheme sub-component of the URL. + /// [appGroupId] is the App Group identifier. Future init({required String appGroupId, String? urlScheme}) { _appGroupsImageService.appGroupId = appGroupId; return LiveActivitiesPlatform.instance.init( @@ -87,7 +88,7 @@ class LiveActivities { } /// Check if iOS 16.1+ live activities are enabled. - Future areActivitiesEnabled() async { + Future areActivitiesEnabled() { return LiveActivitiesPlatform.instance.areActivitiesEnabled(); } diff --git a/lib/models/live_activity_image.dart b/lib/models/live_activity_image.dart index d012522..a0b2684 100644 --- a/lib/models/live_activity_image.dart +++ b/lib/models/live_activity_image.dart @@ -1,14 +1,16 @@ -import 'dart:typed_data'; - import 'package:flutter/services.dart'; +/// Interface for images displayed on live activity widget / dynamic island. +/// The image can be loaded from an asset, an url or from memory. abstract class LiveActivityImage { + /// You can use the ```resizeFactor``` to resize the image (1 is the original size). num resizeFactor; LiveActivityImage( this.resizeFactor, ); + /// Load the image. Future loadImage(); } @@ -16,6 +18,7 @@ abstract class LiveActivityImage { /// Image need to have small resolution to be displayed on live activity widget / dynamic island. /// You can use the ```resizeFactor``` to resize the image (1 is the original size). class LiveActivityImageFromAsset extends LiveActivityImage { + /// Path to the image asset. final String path; LiveActivityImageFromAsset(