at_notify_flutter 1.0.2 at_notify_flutter: ^1.0.2 copied to clipboard
A Flutter plugin project to send notification to any @sign in @platform apps with ease.
Now for some internet optimism. #
at_notify_flutter #
Introduction #
A flutter plugin project to handle notifications in @protocol apps.
Get Started: #
Initially to get a basic overview of the SDK, you must read the atsign docs.
To use this package you must be having a basic setup, Follow here to get started.
Installation: #
To use this library in your app, add it to your pubspec.yaml
dependencies:
at_notify_flutter: ^1.0.2
Add to your project
flutter pub get
Import in your application code
import 'package:at_notify_flutter/at_notify_flutter.dart';
Clone it from github #
Feel free to fork a copy of the source from the GitHub Repo
Initialising #
It is expected that the app will first authenticate an atsign using the Onboarding widget.
The notify service needs to be initialised with a required atClientManager, currentAtSign & atClientPreference.
initializeNotifyService(
atClientManager,
activeAtSign,
atClientPreference,
);
As this package needs local notification permission, so add these for:
IOS: (ios/Runner/AppDelegate.swift)
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}
Android: (android/app/src/main/AndroidManifest.xml)
android:showWhenLocked="true"
android:turnScreenOn="true"
Usage #
To notify an atsign with a message:
notifyText(
context,
currentAtsign,
receiver,
message,
)
To see a list of past notifications:
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
NotifyScreen(notifyService: NotifyService())),
);
Example #
We have a good example with explanation in the at_notify_flutter package.
Open source usage and contributions #
This is freely licensed open source code, so feel free to use it as is, suggest changes or enhancements or create your own version. See CONTRIBUTING.md for detailed guidance on how to setup tools, tests and make a pull request.