flutter_simple_updates 0.1.3 copy "flutter_simple_updates: ^0.1.3" to clipboard
flutter_simple_updates: ^0.1.3 copied to clipboard

Simple in app notifications from different sources with prebuild widget, easy to extend.

A simple way to display notifications to users in your app from 3rd party services like mastodon etc.

Features #

  • A simple yet highly customizable notification button
  • A dialog to render your latest notifications
  • Caching is implemented by default
  • Easily write your own parsers to fetch data from everywhere you want

Getting started #

Run: flutter pub add flutter_simple_updates

  • Search for your 3rd party parser (currently Mastodon is the only supported one by me)
  • If not yet existing build your own

Usage #

  • Add the ǸotificationWidget anywhere you like and you are ready to go.
  • Below I'm using the ! to filter out messages that should reach the app. So every message starting with ! will be displayed if the user presses the button.
  • Add your desired cache to the NotificationWidget and optionaly change it's parameters (e.g. storage path, max items etc.)
class MyHomePage extends StatelessWidget {
  MyHomePage({super.key});
  final SimpleMastodonParser parser =
      SimpleMastodonParser("!", "https://mastodon.world/<your-tag-here>");// Not included in this package!

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: NotificationWidget(
          cache: HiveCacheWrapper(), // Included Cache
          feedProvider: parser,
        ),
      ),
    );
  }
}

copied to clipboard

Parsers #

Additional information #

If you want to create a new parser, simply extend ÀFeedParsingService and pass it to the NotificationWidget and you are good to go.
Desire a custom cache? Same thing applies, just implement the ICacheWrapper and you are ready.

Your data is not markdown? Don't worry, just build your own adapter by implementing the ÌConverter interface and pass it to the NotificationWidget, just make sure it afterwards returns markdown data.

If you are writing a package for a provider, consider letting me know so I can link it here for others to find and use.

The trigger character, sentence (or whatever) needs to be the first thing in your post!

2
likes
140
points
65
downloads

Publisher

unverified uploader

Weekly Downloads

2024.08.27 - 2025.03.11

Simple in app notifications from different sources with prebuild widget, easy to extend.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, html, html2md, markdown_widget, path_provider, stash, stash_hive, url_launcher

More

Packages that depend on flutter_simple_updates