at_notify_flutter 1.0.6 at_notify_flutter: ^1.0.6 copied to clipboard
A Flutter plugin project to send notification to any @sign in @platform apps with ease.
at_notify_flutter example #
The at_notify_flutter package is designed to make it easy to add notifications in atProtocol apps.
Give it a try #
This package includes a working sample application in the example directory that demonstrates the key features of the package. To create a personalized copy, use at_app create
as shown below or check it out on GitHub.
$ flutter pub global activate at_app
$ at_app create --sample=<package ID> <app name>
$ cd <app name>
$ flutter run
Notes:
- You only need to run
flutter pub global activate
once - Use
at_app.bat
for Windows
How it works #
Like most applications built for the atPlatform, we start with the at_onboarding_flutter widget which handles secure management of secret keys for an atsign as cryptographically secure replacement for usernames and passwords.
We use the Onboarding()
widget in our main.dart
and navigate to our second_screen.dart
after successfully onboarding.
If you want to remove any already paired atsign, use the Clear paired atsigns
button, it will remove all the paired atsigns for this example package.
The at_notify_flutter
package has to be initialised.
initializeNotifyService(
atClientManager,
activeAtSign!,
atClientPreference,
rootDomain: AtEnv.rootDomain,
);
The second_screen.dart
consists of the following functions:
- atsign - Type in the receiver atsign.
- Enter message - Type in the message.
- Notify Text - Send the typed in message to the atsign. If you want to use this functionality then call
notifyText()
with the required parameters. - Get past notifications - Navigate to a new screen, to see past notifications of the selected number of days. If you want to use this functionality then navigate to the
NotifyScreen()
screen.
To call notify
notify(
context,
'activeAtSign',
'toAtSign',
'message',
);
#
Like everything else we do, this package and even the sample application are open source software which means we love it when you gift us with your feedback, contributions and even any bugs that you help us to discover. See CONTRIBUTING.md for detailed guidance on how to setup tools, tests and make a pull request.