Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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).

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") |
| :---: | :---: | :---: |