Skip to content

Commit

Permalink
Fix example null safety and improve Features on Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Bwolfs2 committed Feb 18, 2023
1 parent 83ee466 commit c0ead20
Show file tree
Hide file tree
Showing 8 changed files with 187 additions and 137 deletions.
59 changes: 31 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<a name="readme-top"></a>


<h1 align="center">ASUKA - Snackbars, Dialogs and more, the simple way.</h1>

<!-- PROJECT LOGO -->
Expand Down Expand Up @@ -32,8 +31,8 @@
[![Flutterando Analysis](https://img.shields.io/badge/style-flutterando__analysis-blueviolet?style=plastic)](https://pub.dev/packages/flutterando_analysis/)

[![Pub Publisher](https://img.shields.io/pub/publisher/asuka?style=plastic)](https://pub.dev/publishers/flutterando.com.br/packages)
</div>

</div>

<br>

Expand All @@ -55,8 +54,8 @@
<br>

<!-- ABOUT THE PROJECT -->
## About The Project

## About The Project

<!-- PROJECT EXAMPLE (IMAGE) -->

Expand All @@ -69,14 +68,15 @@

<!-- PROJECT DESCRIPTION -->

Asuka is a Dart package that aims to simplify and keep a clean approach when implementing some visual elements from Flutter like Snackbars, Dialogs and ModalSheets.
With few and intuitive lines of code you can have those in your project without the hassle of having to code them from scratch, while having the option of quickly removing them if need be.
Asuka is a Dart package that aims to simplify and keep a clean approach when implementing some visual elements from Flutter like Snackbars, Dialogs and ModalSheets.
With few and intuitive lines of code you can have those in your project without the hassle of having to code them from scratch, while having the option of quickly removing them if need be.

<i> This project is distributed under the MIT License. See `LICENSE.txt` for more information.</i>

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- SPONSORS -->

## Sponsors

<a href="https://fteam.dev">
Expand All @@ -86,26 +86,27 @@ With few and intuitive lines of code you can have those in your project without
<p align="right">(<a href="#readme-top">back to top</a>)</p>
<br>


<!-- GETTING STARTED -->

## Getting Started

To get Asuka in your project follow either of the instructions below:

a) Add Asuka as a dependency in your Pubspec.yaml:
```yaml
dependencies:
asuka: any
```

```yaml
dependencies:
asuka: any
```
b) Use Dart Pub:
```sh
dart pub add asuka
```

<br>


## How to Use

Add the following code where you call your Material App:
Expand All @@ -119,8 +120,9 @@ MaterialApp(
Asuka.asukaHeroController //This line is needed for the Hero widget to work
],
);
```
Now you just have to call the named constructors for each widget that you want to use:
```

Now you just have to call the named constructors for each widget that you want to use:

```dart
import 'package:asuka/asuka.dart';
Expand All @@ -138,32 +140,32 @@ _For more examples, please refer to the_ [Documentation](https://pub.dev/documen

<p align="right">(<a href="#readme-top">back to top</a>)</p>




<!-- FEATURES -->

## Features

- ✅ Snackbars
- ✅ Dialog
- ✅ BottomSheet
- ✅ ModalBottomSheet
- ✅ Overlay
- ✅ CupertinoModalPopup
- ✅ CupertinoDialog
- ✅ CupertinoDialogListener
- ✅ Overlay

Right now this package has concluded all his intended features. If you have any suggestions or find something to report, see below how to contribute to it.
Right now this package has concluded all his intended features. If you have any suggestions or find something to report, see below how to contribute to it.

<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- CONTRIBUTING -->

## Contributing

<!-- 🚧 [Contributing Guidelines]() - _Work in Progress_ 🚧 -->

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the appropriate tag.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the appropriate tag.
Don't forget to give the project a star! Thanks again!

1. Fork the Project
Expand All @@ -172,39 +174,40 @@ Don't forget to give the project a star! Thanks again!
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

Remember to include a tag, and to follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) and [Semantic Versioning](https://semver.org/) when uploading your commit and/or creating the issue.
Remember to include a tag, and to follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) and [Semantic Versioning](https://semver.org/) when uploading your commit and/or creating the issue.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- CONTACT -->

## Contact

Flutterando Community

- [Discord](https://discord.gg/qNBDHNARja)
- [Telegram](https://t.me/flutterando)
- [Website](https://www.flutterando.com.br)
- [Youtube Channel](https://www.youtube.com.br/flutterando)
- [Other useful links](https://linktr.ee/flutterando)


<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- ACKNOWLEDGEMENTS -->
## Acknowledgements

Thank you to all the people who contributed to this project, without you, this project would not be here today.
## Acknowledgements

Thank you to all the people who contributed to this project, without you, this project would not be here today.

<a href="https://github.com/flutterando/asuka/graphs/contributors">
<img src="https://contrib.rocks/image?repo=flutterando/asuka" />
</a>
<!-- Bot para Lista de contribuidores - https://allcontributors.org/ -->
<!-- Opção (utilizada no momento): https://contrib.rocks/preview?repo=flutterando%2Fasuka -->


<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- MANTAINED BY -->

## Maintaned by

<br>
Expand All @@ -217,4 +220,4 @@ Thank you to all the people who contributed to this project, without you, this p
<p align="center">
Built and maintained by <a href="https://www.flutterando.com.br">Flutterando</a>.
</p>
</p>
</p>
6 changes: 4 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void main() {
}

class MyApp extends StatelessWidget {
const MyApp({Key key}) : super(key: key);
const MyApp({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand All @@ -21,7 +21,9 @@ class MyApp extends StatelessWidget {
),
builder: Asuka.builder,
initialRoute: '/',
navigatorObservers: [Asuka.asukaHeroController],
navigatorObservers: [
Asuka.asukaHeroController
],
routes: {
'/': (_) => const HomePage(title: 'Asuka'),
'/second': (_) => const SecondPage(title: 'Second page'),
Expand Down
10 changes: 5 additions & 5 deletions example/lib/src/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'second/second_page.dart';
class HomePage extends StatefulWidget {
final String title;

const HomePage({Key key, this.title}) : super(key: key);
const HomePage({Key? key, required this.title}) : super(key: key);

@override
State<HomePage> createState() => _HomePageState();
Expand All @@ -33,7 +33,9 @@ class _HomePageState extends State<HomePage> {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const SecondPage(),
builder: (context) => const SecondPage(
title: 'Second Page',
),
),
);
},
Expand Down Expand Up @@ -102,10 +104,8 @@ class _HomePageState extends State<HomePage> {
),
const TextField(),
ElevatedButton(
onPressed: homeController.onClickModalBottomSheet,
child: const Text('Show Modal Bottom Sheet'),
onPressed: () {
homeController.onClickModalBottomSheet();
},
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion example/lib/src/second/second_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
class SecondPage extends StatefulWidget {
final String title;

const SecondPage({Key key, this.title}) : super(key: key);
const SecondPage({Key? key, required this.title}) : super(key: key);

@override
State<SecondPage> createState() => _SecondPageState();
Expand Down
Loading

0 comments on commit c0ead20

Please sign in to comment.