Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/christoph-jerolimov/flutter_alert
A Flutter package to simplify alert messages on Android (Material) and iOS (Cupertino).
https://github.com/christoph-jerolimov/flutter_alert
dart dartlang flutter flutter-package flutter-plugin flutterandroid flutterios
Last synced: 28 days ago
JSON representation
A Flutter package to simplify alert messages on Android (Material) and iOS (Cupertino).
- Host: GitHub
- URL: https://github.com/christoph-jerolimov/flutter_alert
- Owner: christoph-jerolimov
- License: mit
- Created: 2018-12-16T13:05:50.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-08T22:02:10.000Z (almost 6 years ago)
- Last Synced: 2024-11-25T12:16:27.377Z (28 days ago)
- Topics: dart, dartlang, flutter, flutter-package, flutter-plugin, flutterandroid, flutterios
- Language: Dart
- Homepage:
- Size: 34.2 KB
- Stars: 4
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_alert
[![Build Status](https://travis-ci.org/jerolimov/flutter_alert.svg?branch=master)](https://travis-ci.org/jerolimov/flutter_alert)
Flutter package which shows a crossplatform alert messages on Android (Material) and iOS (Cupertino).
## Getting Started
Add this to your package's pubspec.yaml file:
```yaml
dependencies:
flutter_alert: ^0.4.0
```You can install packages from the command line:
```
$ flutter packages get
```Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.
## Example
In your Dart code, add this import:
```darf
import 'package:flutter_alert/flutter_alert.dart';
```And later show an alert when neccessary:
```dart
void _showMessageDialog() {
showAlert(
context: context,
title: "Awesome feature enabled.",
);
}void _showQuestionDialog() {
showAlert(
context: context,
title: "Delete file?",
body: "Should we delete the file XYZ?",
actions: [
AlertAction(
text: "Delete",
isDestructiveAction: true,
onPressed: () {
// TODO
},
),
],
cancelable: true,
);
}
```## Contributors
This project follows the [all-contributors](https://all-contributors.js.org/) specification.
Contributions of any kind welcome!
Thanks goes to these people:
|
Christoph Jerolimov
[💻](https://github.com/jerolimov/flutter_alert/commits?author=jerolimov "Code") [📖](https://github.com/jerolimov/flutter_alert/commits?author=jerolimov "Documentation") [⚠️](https://github.com/jerolimov/flutter_alert/commits?author=jerolimov "Tests") | [
Christian Stahl](https://github.com/thinkmobilede)
[💻](https://github.com/jerolimov/flutter_alert/commits?author=thinkmobilede "Code") [🤔](#ideas-thinkmobilede "Ideas, Planning, & Feedback") | [
Pascal Welsch](https://github.com/passsy)
[🤔](#ideas-passsy "Ideas, Planning, & Feedback") |
| :---: | :---: | :---: |