Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Plugins | 16,786 | 1,556 | 615 | a month ago | 58 | June 06, 2022 | 1 | bsd-3-clause | Dart | |
Plugins for Flutter maintained by the Flutter team | ||||||||||
Flutter Desktop Embedding | 7,078 | 6 | 2 months ago | 10 | August 18, 2022 | 3 | apache-2.0 | C++ | ||
Experimental plugins for Flutter for Desktop | ||||||||||
Flutter Ui Nice | 3,388 | a year ago | 7 | Dart | ||||||
More than 130+ pages in this beautiful app and more than 45 developers has contributed to it. | ||||||||||
Figmatocode | 2,870 | 25 days ago | 23 | gpl-3.0 | TypeScript | |||||
Generate responsive pages and apps on HTML, Tailwind, Flutter and SwiftUI. | ||||||||||
Sqflite | 2,587 | 799 | 139 | 9 days ago | 125 | September 19, 2022 | 142 | bsd-2-clause | Dart | |
SQLite flutter plugin | ||||||||||
Flutter_inappwebview | 2,446 | 1 | 46 | a day ago | 51 | May 05, 2022 | 685 | apache-2.0 | Dart | |
A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window. | ||||||||||
Flutter Study | 2,254 | 3 years ago | 5 | |||||||
Flutter Study | ||||||||||
Flutter_local_notifications | 2,166 | 108 | 52 | 3 days ago | 221 | September 23, 2022 | 44 | bsd-3-clause | Dart | |
A Flutter plugin for displaying local notifications on Android, iOS, macOS and Linux | ||||||||||
Flutter Intellij | 1,858 | a day ago | 517 | bsd-3-clause | Java | |||||
Flutter Plugin for IntelliJ | ||||||||||
Cloudbase Framework | 1,827 | 21 | 6 months ago | 130 | August 23, 2022 | 37 | other | JavaScript | ||
腾讯云开发云原生一体化部署工具 🚀 CloudBase Framework:一键部署,不限框架语言,云端一体化开发,基于Serverless 架构。A front-end and back-end integrated deployment tool. One-click deploy to serverless architecture. https://docs.cloudbase.net/framework/index |
A Flutter plugin to use iOS 16.1+ Live Activities & iPhone 14 Pro Dynamic Island features.
This plugin use iOS ActivityKit API.
live_activities can be used to show dynamic live notification & implement dynamic island feature on the iPhone 14 Pro / Max
live_activities is only intended to use with iOS 16.1+ ! It will simply do nothing on other platform & < iOS 16.1
Due to some technical restriction, it's not currently possible to only use Flutter .
You need to implement in your Flutter iOS project a Widget Extension & develop in Swift/Objective-C your own Live Activity / Dynamic Island design.
You can check into the example repository for a full example app using Live Activities & Dynamic Island
ios/Runner.xcworkspace
.File
-> New
-> Target...
Widget Extension
& click on Next.Runner
app only!.Info.plist
for both Runner
& your Widget Extension
.<key>NSSupportsLiveActivities</key>
<true/>
Runner
& your Widget Extension
.You can check on this resource or here for more native informations.
ActivityAttributes
called EXACTLY LiveActivitiesAppAttributes
(if you rename, activity will be created but not appear!)struct LiveActivitiesAppAttributes: ActivityAttributes, Identifiable {
public typealias LiveDeliveryData = ContentState // don't forget to add this line, otherwise, live activity will not display it.
public struct ContentState: Codable, Hashable { }
var id = UUID()
}
UserDefaults
with your group id to access Flutter data in your Swift code.// Create shared default with custom group
let sharedDefault = UserDefaults(suiteName: "YOUR_GROUP_ID")!
struct FootballMatchApp: Widget {
var body: some WidgetConfiguration {
ActivityConfiguration(for: LiveActivitiesAppAttributes.self) { context in
// create your live activity widget extension here
// to access Flutter properties:
let myVariableFromFlutter = sharedDefault.string(forKey: "myVariableFromFlutter")!
// [...]
}
}
}
import 'package:live_activities/live_activities.dart';
final _liveActivitiesPlugin = LiveActivities();
_liveActivitiesPlugin.init(appGroupId: "YOUR_CREATED_APP_ID");
final Map<String, dynamic> activityModel = {
'name': 'Margherita',
'ingredient': 'tomato, mozzarella, basil',
'quantity': 1,
};
_liveActivitiesPlugin.createActivity(activityModel);
You can pass all type of data you want but keep it mind it should be compatible with
UserDefaults
UserDefaults
instance to access data:let sharedDefault = UserDefaults(suiteName: "YOUR_CREATED_APP_ID")!
Be sure to use the SAME group id in your Swift extension and your Flutter app!
let pizzaName = sharedDefault.string(forKey: "name")! // put the same key as your Dart map
let pizzaPrice = sharedDefault.float(forKey: "price")
let quantity = sharedDefault.integer(forKey: "quantity")
// [...]
LiveActivityImageFromAsset
or LiveActivityImageFromUrl
object:final Map<String, dynamic> activityModel = {
'assetKey': LiveActivityImageFromAsset('assets/images/pizza_chorizo.png'),
'url': LiveActivityImageFromUrl(
'https://cdn.pixabay.com/photo/2015/10/01/17/17/car-967387__480.png',
resizeFactor: 0.3,
),
};
_liveActivitiesPlugin.createActivity(activityModel);
Use LiveActivityImageFromAsset
to load an image from your Flutter asset.
Use LiveActivityImageFromUrl
to load an image from an external url.
Image need to be in a small resolution to be displayed in your live activity/dynamic island, you can use
resizeFactor
to automatically resize the image .
if let assetImage = sharedDefault.string(forKey: "assetKey"), // <-- Put your key here
let uiImage = UIImage(contentsOfFile: shop) {
Image(uiImage: uiImage)
.resizable()
.frame(width: 53, height: 53)
.cornerRadius(13)
} else {
Text("Loading")
}
In order to pass some useful data between your native live activity / dynamic island with your Flutter app you just need to setup URL scheme.
Link(destination: URL(string: "la://my.app/order?=123")!) { // Replace "la" with your scheme
Text("See order")
}
Don't forget to put the URL Scheme you have typed in the previous step.
_liveActivitiesPlugin.urlSchemeStream().listen((schemeData) {
// do what do you want here
});
You can update live activity directly in your app using the updateActivity()
method, but if your app was killed or in the background, you cant update the notification...
To do this, you can update it using Push Notification on a server.
_liveActivitiesPlugin.activityUpdateStream.listen((event) {
event.map(
active: (activity) {
// Get the token
print(activity.activityToken);
},
ended: (activity) {},
unknown: (activity) {},
);
});
final activityToken = await _liveActivitiesPlugin.getPushToken(_latestActivityId!);
print(activityToken);
Name | Description | Returned value |
---|---|---|
.init() |
Initialize the Plugin by providing an App Group Id (see above) |
Future When the plugin is ready to create/update an activity |
.createActivity() |
Create an iOS live activity |
String The activity identifier |
.updateActivity() |
Update the live activity data by using the activityId provided |
Future When the activity was updated |
.endActivity() |
End the live activity by using the activityId provided |
Future When the activity was ended |
.getAllActivitiesIds() |
Get all activities ids created |
Future<List<String>> List of all activities ids |
.endAllActivities() |
End all live activities of the app |
Future When all activities was ended |
.areActivitiesEnabled() |
Check if live activities feature are supported & enabled |
Future<bool> Live activities supported or not |
.getActivityState() |
Get the activity current state |
Future<LiveActivityState> An enum to know the status of the activity (active , dismissed or ended ) |
.getPushToken() |
Get the activity push token synchronously (prefer using activityUpdateStream instead to keep push token up to date) |
String? The activity push token (can be null) |
.urlSchemeStream() |
Subscription to handle every url scheme (ex: when the app is opened from a live activity / dynamic island button, you can pass data) |
Future<UrlSchemeData> Url scheme data which handle scheme url host path queryItems
|
.dispose() |
Remove all pictures passed in the AppGroups directory in the current session, you can use the force parameters to remove all pictures |
Future Picture removed |
.activityUpdateStream |
Get notified with a stream about live activity push token & status |
Stream<ActivityUpdate> Status updates for new push tokens or when the activity ends |
Contributions are welcome. Contribute by creating a PR or create an issue .
String
(Date, Number etc.).