Skip to content

Commit

Permalink
πŸ“ Add README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
istornz committed Nov 15, 2022
1 parent 631a869 commit 8479bca
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 11 deletions.
Binary file added .github/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
TODO: Add your license here.
Copyright Β© Dimitri Dessus
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the β€œSoftware”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

The Software is provided β€œas is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the Software.
63 changes: 53 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,58 @@
# live_activities
<div align="center">
<img alt="flutter ios 16 live activities" />
</div>

A new Flutter plugin project.
# Live Activities

## Getting Started
A Flutter plugin to use iOS 16.1+ **Live Activities** & iPhone 14 Pro **Dynamic Island** features.

This project is a starting point for a Flutter
[plug-in package](https://flutter.dev/developing-packages/),
a specialized package that includes platform-specific implementation code for
Android and/or iOS.
## 🧐 What is it ?

For help getting started with Flutter development, view the
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
This plugin use [iOS ActivityKit API](https://developer.apple.com/documentation/activitykit/displaying-live-data-with-live-activities).

**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
<div align="center">
<img alt="flutter ios 16 live activities logo" src="" />
</div>

## πŸ‘» Getting started

- πŸ“± Create natively your Live Activity view [**tutorial**](https://levelup.gitconnected.com/how-to-create-live-activities-widget-for-ios-16-2c07889f1235)
- ⚫️ (*Opt.*) Create natively a Dynamic Island [**tutorial**](https://medium.com/macoclock/how-to-create-dynamic-island-widgets-on-ios-16-1-or-above-dca0a7dd1483)

- πŸ”Œ Import the plugin.

```dart
import 'package:live_activities/live_activities.dart';
```

- πŸ“£ Create your dynamic activity.

```dart
final Map<String, String> activityModel = {
'name': 'Margherita',
'ingredient': 'tomato, mozzarella, basil',
'quantity': '1',
};
_liveActivitiesPlugin.createActivity(activityModel.toMap());
```

> ⚠️ For now you can only pass a ```String```.
## πŸ“˜ Documentation

| Name | Description | Returned value |
| ---- | ----------- | -------- |
| ```.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 |

## 🎯 Roadmap

- [ ] Support multiple type instead of ```String``` (Date, Number etc.).
- [ ] Inject a Widget inside the notification with Flutter Engine ?

0 comments on commit 8479bca

Please sign in to comment.