{"id":25280114,"url":"https://github.com/mmmzq/bot_toast","last_synced_at":"2025-05-15T16:02:18.269Z","repository":{"id":34986758,"uuid":"194421449","full_name":"MMMzq/bot_toast","owner":"MMMzq","description":"A very easy-to-use flutter popup library. Including toast, loading, etc.","archived":false,"fork":false,"pushed_at":"2024-05-29T17:59:39.000Z","size":30485,"stargazers_count":836,"open_issues_count":3,"forks_count":110,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-03T04:12:20.580Z","etag":null,"topics":["attachments","custom-toast","flutter","flutter-toast","loading","notification","toast"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MMMzq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-29T15:38:39.000Z","updated_at":"2025-03-26T07:58:00.000Z","dependencies_parsed_at":"2024-06-18T12:33:20.386Z","dependency_job_id":"48f427ad-1e6f-49c3-9d1f-1eead4c98e0c","html_url":"https://github.com/MMMzq/bot_toast","commit_stats":{"total_commits":277,"total_committers":10,"mean_commits":27.7,"dds":0.2057761732851986,"last_synced_commit":"39fe8abde5e1d98b3185982494124b471c3b40c9"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMMzq%2Fbot_toast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMMzq%2Fbot_toast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMMzq%2Fbot_toast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMMzq%2Fbot_toast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MMMzq","download_url":"https://codeload.github.com/MMMzq/bot_toast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246933382,"owners_count":20857055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["attachments","custom-toast","flutter","flutter-toast","loading","notification","toast"],"created_at":"2025-02-12T18:38:26.123Z","updated_at":"2025-04-03T04:12:34.884Z","avatar_url":"https://github.com/MMMzq.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"BotToast 🤖\n========= \nA really easy to use flutter toast library!\n\n[![](https://img.shields.io/pub/v/bot_toast.svg?label=bot_toast\u0026logo=https%3A%2F%2Fpub.flutter-io.cn%2Fpackages%2Fbot_toast)](https://pub.dev/packages/bot_toast)\n\n### Language: English | [中文简体](README_zh.md)\n\n* [Overview](#Overview)\n* [Online Demo](#Online-Demo)\n* [Example](#Example)\n* [Renderings](#Renderings)\n* [Getting started](#Getting-started) \n* [3.0 version](#30-version)\n* [Documentation](#Documentation) \n\n###  Overview\n\n- In the true sense of Toast, you can call it whenever you need it, without any restrictions! \n\n- Feature-rich, support for displaying notifications, text, loading, attachments, etc. Toast\n\n- Support for popping up various custom Toasts, or you can pop up any Widget as long as it meets the requirements of the flutter code.\n\n- API is simple and easy to use\n\n- Pure flutter implementation\n\n- Supports global configuration\n\n\n### Online Demo\n\n**[Online demo](https://mmmzq.github.io/bot_toast/#/)** (Web effects may be biased, the actual effect is subject to the mobile phone)\n\n### Example\n**[Sample project](example)**\n\n### Renderings\n\nNotification|Attached|CustomAnimation\n--------|-------|--------\n![Notification](doc/gif/notification.gif)|![Attached](doc/gif/attached.gif)|![CustomAnimation](doc/gif/custom_animation.gif)\n\nLoading|Text|CustomWidget\n--------|-------|----------\n![Loading](doc/gif/loading.gif)|![Text](doc/gif/text.gif)|![CustomWidget](doc/gif/custom_widget.gif)\n\n### Getting started\n\n#### 1. Add dependencies into you project pubspec.yaml file\n``` yaml\ndependencies:\n   bot_toast: ^4.1.0 #null safety\n```\n\n#### 2. Import BotToast Lib\n``` dart\nimport 'package:bot_toast/bot_toast.dart';\n```\n\n#### 3. Initialization BotToast\n``` dart\nMaterialApp(\n      title: 'BotToast Demo',\n      builder: BotToastInit(), //1. call BotToastInit\n      navigatorObservers: [BotToastNavigatorObserver()], //2. registered route observer\n      home: XxxxPage(),\n  )\n```\nor\n``` dart\n//Warning: Don't arbitrarily adjust the position of calling the BotToastInit function \nfinal botToastBuilder = BotToastInit();  //1. call BotToastInit \nMaterialApp(\n      title: 'BotToast Demo',\n      builder: (context, child) {\n        child = myBuilder(context,child);  //do something\n        child = botToastBuilder(context,child); \n        return child;\n      }, \n      navigatorObservers: [BotToastNavigatorObserver()], //2. registered route observer\n      home: XxxxPage(),\n  )\n```\n\n#### 4. Use BotToast\n``` dart\nvar cancel = BotToast.showText(text:\"xxxx\");  //popup a text toast;\n...\ncancel();  //close\n```\n\n```dart\nvar cancel = BotToast.showSimpleNotification(title: \"init\"); // popup a notification toast;\n...\ncancel();  //close\n```\n\n```dart\nvar cancel = BotToast.showLoading(); //popup a loading toast\n...\ncancel();  //close\n```\n\n```dart\n//popup a attachments toast\nvar cancel = BotToast.showAttachedWidget(\n    attachedBuilder: (_) =\u003e Card(\n          child: Padding(\n            padding: const EdgeInsets.all(8.0),\n            child: Icon(\n              Icons.favorite,\n              color: Colors.redAccent,\n            ),\n          ),\n        ),\n    duration: Duration(seconds: 2),\n    target: Offset(520, 520));\n...\ncancel();  //close\n```\n\n```dart\n//custom api\nvar cancel = BotToast.showCustomNotification(...)\nvar cancel = BotToast.showCustomText(...)\nvar cancel = BotToast.showCustomLoading(...)\nvar cancel = BotToast.showAnimationWidget(...)\n...\ncancel();  //close\n```\n\n#### 5. Modify Global Configuration\n\n``` dart\n/// For example: Globally change the animation duration for standard notifications to 1 second.\nBotToast.defaultOption.notification.animationDuration = const Duration(seconds: 1);\n\n/// For more default options, refer to the following configurations:\n/// [BotToast.defaultOption.simpleNotification] corresponds to the default values of [showSimpleNotification].\n/// [BotToast.defaultOption.notification] corresponds to the default values of [showNotification].\n/// [BotToast.defaultOption.customNotification] corresponds to the default values of [showCustomNotification].\n/// [BotToast.defaultOption.text] corresponds to the default values of [showText].\n/// [BotToast.defaultOption.customText] corresponds to the default values of [showCustomText].\n/// [BotToast.defaultOption.loading] corresponds to the default values of [showLoading].\n/// [BotToast.defaultOption.customLoading] corresponds to the default values of [showCustomLoading].\n/// [BotToast.defaultOption.attached] corresponds to the default values of [showAttachedWidget].\n/// [BotToast.defaultOption.animation] corresponds to the default values of [showAnimationWidget].\n/// [BotToast.defaultOption.enhanced] corresponds to the default values of [showEnhancedWidget].\n```\n\n### 3.0 version\n\n#### Major changes:\n\n- Reimplemented the underlying initialization logic, the code is simpler and more general, and no longer depends on `Navigator`\n\n- Modify the initialization method\n\n#### 2.x version upgrade to 3.x version\nchange:\n``` dart\n//2.x.x version initialization method\nBotToastInit(\n  child:MaterialApp(\n      title: 'BotToast Demo',\n      navigatorObservers: [BotToastNavigatorObserver()],\n      home: XxxxPage(),\n  )\n);\n```\nto:\n``` dart\n//3.x.x version initialization method\nMaterialApp(\n      title: 'BotToast Demo',\n      builder: BotToastInit(), \n      navigatorObservers: [BotToastNavigatorObserver()],\n      home: XxxxPage(),\n  )\n```\n\n\n\u003cbr\u003e\n\n\n###  Documentation\n[API Documentation](API.md)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmmzq%2Fbot_toast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmmzq%2Fbot_toast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmmzq%2Fbot_toast/lists"}