This repository has been archived by the owner on Aug 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lucas Pinheiro
committed
Apr 5, 2021
1 parent
a6adc83
commit 4f51ca4
Showing
86 changed files
with
2,884 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
**/doc/api/ | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
build/ | ||
|
||
# Android related | ||
**/android/**/gradle-wrapper.jar | ||
**/android/.gradle | ||
**/android/captures/ | ||
**/android/gradlew | ||
**/android/gradlew.bat | ||
**/android/local.properties | ||
**/android/**/GeneratedPluginRegistrant.java | ||
|
||
# iOS/XCode related | ||
**/ios/**/*.mode1v3 | ||
**/ios/**/*.mode2v3 | ||
**/ios/**/*.moved-aside | ||
**/ios/**/*.pbxuser | ||
**/ios/**/*.perspectivev3 | ||
**/ios/**/*sync/ | ||
**/ios/**/.sconsign.dblite | ||
**/ios/**/.tags* | ||
**/ios/**/.vagrant/ | ||
**/ios/**/DerivedData/ | ||
**/ios/**/Icon? | ||
**/ios/**/Pods/ | ||
**/ios/**/.symlinks/ | ||
**/ios/**/profile | ||
**/ios/**/xcuserdata | ||
**/ios/.generated/ | ||
**/ios/Flutter/App.framework | ||
**/ios/Flutter/Flutter.framework | ||
**/ios/Flutter/Flutter.podspec | ||
**/ios/Flutter/Generated.xcconfig | ||
**/ios/Flutter/app.flx | ||
**/ios/Flutter/app.zip | ||
**/ios/Flutter/flutter_assets/ | ||
**/ios/Flutter/flutter_export_environment.sh | ||
**/ios/ServiceDefinitions.json | ||
**/ios/Runner/GeneratedPluginRegistrant.* | ||
|
||
# Exceptions to above rules. | ||
!**/ios/**/default.mode1v3 | ||
!**/ios/**/default.mode2v3 | ||
!**/ios/**/default.pbxuser | ||
!**/ios/**/default.perspectivev3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file tracks properties of this Flutter project. | ||
# Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
# | ||
# This file should be version controlled and should not be manually edited. | ||
|
||
version: | ||
revision: 4d7946a68d26794349189cf21b3f68cc6fe61dcb | ||
channel: stable | ||
|
||
project_type: package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
## [1.0.0] - [04.05.2021] | ||
### Release | ||
|
||
- `[on_connectivity_widget]` release. | ||
|
||
## [0.1.0] - [04.04.2021] | ||
### Features | ||
- Added [connectivity_plus](https://pub.dev/packages/connectivity_plus) dependency to listen network states. | ||
- Added `[OnConnectivityWidget]` to show message when state change. | ||
- Added `[OnWifiWidget]`, `[OnMobileWidget]` and `[OnNoneWidget]` as default widgets. | ||
- Added `[PositionType]` to define message position. | ||
|
||
### Documentation | ||
- Updated `README` documentation. | ||
- Updated `pubspec.yaml`. | ||
- Created `README` translation section. | ||
- Created `README` translation for `pt-BR` [Portuguese]. | ||
|
||
## [0.0.1] - [04.03.2021] | ||
### Features | ||
- Created the base for the plugin. | ||
|
||
<!-- | ||
## [Version] - [Date] | ||
### Features | ||
- TODO | ||
### Fixes | ||
- TODO | ||
### Documentation | ||
- TODO | ||
### Changes | ||
- TODO | ||
### Important Changes | ||
- TODO | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Copyright (c) 2021, Lucas Josino | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of Lucas Josino nor the names of its contributors may be | ||
used to endorse or promote products derived from this software without | ||
specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,111 @@ | ||
# on_connectivity_widget | ||
# on_connectivity_widget | ||
|
||
[![Pub.dev](https://img.shields.io/pub/v/on_connectivity_widget?color=9cf&label=Pub.dev&style=flat-square)](https://pub.dev/packages/on_connectivity_widget) | ||
[![Platforms](https://img.shields.io/badge/Platform-Android%20%7C%20IOS%20%7C%20Web-9cf?&style=flat-square)](https://www.android.com/) | ||
[![Flutter](https://img.shields.io/badge/Language-Flutter-9cf?logo=flutter&style=flat-square)](https://www.flutter.dev/) | ||
|
||
`on_connectivity_widget` is a [Flutter](https://flutter.dev/) Package used to listen network states and show a custom message to application. | ||
|
||
This Plugin uses [connectivity_plus](https://pub.dev/packages/connectivity_plus) as dependency to listen network states. | ||
|
||
## Help: | ||
|
||
**Any problem? [Issues](https://github.com/LucasPJS/on_connectivity_widget/issues)** <br> | ||
**Any suggestion? [Pull request](https://github.com/LucasPJS/on_connectivity_widget/pulls)** | ||
|
||
### Translations: | ||
|
||
NOTE: Feel free to help with readme translations | ||
|
||
* [English](README.md) | ||
* [Portuguese](README.pt-BR.md) | ||
|
||
### Topics: | ||
|
||
* [How to Install](#how-to-install) | ||
* [How to use](#how-to-use) | ||
* [Example](#example) | ||
* [License](#license) | ||
|
||
<!-- ## Gif Examples: | ||
| <img src=""/> | <img src=""/> | <img src=""/> | <img src=""/> | | ||
|:---:|:---:|:---:|:---:| | ||
| TOP | BOTTOM | LEFT_TOP | LEFT_BOTTOM | --> | ||
|
||
## How to Install: | ||
Add the following code to your `pubspec.yaml`: | ||
```yaml | ||
dependencies: | ||
on_connectivity_widget: ^1.0.0 | ||
``` | ||
## Some Features: | ||
* Everytime network state change, will shown a message. | ||
* All message has a default widget, but, you can create your own. | ||
* You can define Animation type. | ||
* You can create/set your own Animation. | ||
* You can define how long Animation will last. | ||
* You can define Position type. | ||
* You can create/set your own Position. | ||
* You can define how long Position will last. | ||
## TODO: | ||
* Fix bugs. | ||
* Add more `[Features]` | ||
|
||
## How to use: | ||
|
||
```dart | ||
OnConnectivityWidget() // The main widget to start using the plugin. | ||
``` | ||
All types of parameters on this plugin: | ||
|
||
| Parameters | Arguments | Description | | ||
|--------------|-----------------|-----------------| | ||
| `position` | `PositionType?` | `Used to define message position` | <br> | ||
| `wifiWidget` | `Widget?` | `Widget shown when network state is: Wifi.` | <br> | ||
| `mobileWidget` | `Widget?` | `Widget shown when network state is: Mobile` | <br> | ||
| `noneWidget` | `Widget?` | `Widget shown when network state is: Offline.` | <br> | ||
| `animationDuration` | `Duration?` | `Used to define how long animation will last.` | <br> | ||
| `messageDuration` | `Duration?` | `Used to define how long message will last.` | <br> | ||
| `animationType` | `Curve?` | `Used to define what animation type will be shown.` | <br> | ||
| `cancelInitState` | `bool?` | `Used to define if message will shown when application starts.` | <br> | ||
| `customAnimation` | `Animation<Offset>?` | `Used if you want use your own animation.` | <br> | ||
| `customPosition` | `Alignment?` | `Used if you want use your own position.` | <br> | ||
|
||
**See more in [Documentation](https://pub.dev/documentation/on_connectivity_widget/latest/on_connectivity_widget/on_connectivity_widget-library.html)** | ||
|
||
## Example: | ||
|
||
#### OnConnectivityWidget | ||
```dart | ||
OnConnectivityWidget( | ||
animationDuration: Duration(seconds: 2), | ||
messageDuration: Duration(seconds: 1), | ||
position: PositionType.BOTTOM, | ||
animationType: Curves.bounceInOut, | ||
cancelInitState: true, | ||
wifiWidget: Container( | ||
color: Colors.green, | ||
child: Text("Wifi"), | ||
), | ||
mobileWidget: Container( | ||
color: Colors.blue, | ||
child: Text("Mobile"), | ||
), | ||
noneWidget: Container( | ||
color: Colors.red, | ||
child: Text("None"), | ||
), | ||
//customAnimation: null, | ||
//customPosition: null, | ||
); | ||
``` | ||
|
||
## LICENSE: | ||
|
||
* [LICENSE](https://github.com/LucasPJS/on_connectivity_widget/blob/main/LICENSE) | ||
|
||
> * [Back to top](#on_connectivity_widget) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# on_connectivity_widget | ||
|
||
[![Pub.dev](https://img.shields.io/pub/v/on_connectivity_widget?color=9cf&label=Pub.dev&style=flat-square)](https://pub.dev/packages/on_connectivity_widget) | ||
[![Platforms](https://img.shields.io/badge/Platform-Android%20%7C%20IOS%20%7C%20Web-9cf?&style=flat-square)](https://www.android.com/) | ||
[![Flutter](https://img.shields.io/badge/Language-Flutter-9cf?logo=flutter&style=flat-square)](https://www.flutter.dev/) | ||
|
||
`on_connectivity_widget` é um [Flutter](https://flutter.dev/) Package usado para escultar os estados da internet e mostrar uma menssagem customizável para o aplicativo. | ||
|
||
Esse Plugin usa [connectivity_plus](https://pub.dev/packages/connectivity_plus) como dependência para escultar os estados da internet. | ||
|
||
## Ajuda: | ||
|
||
**Algum problema? [Issues](https://github.com/LucasPJS/on_connectivity_widget/issues)** <br> | ||
**Alguma sugestão? [Pull request](https://github.com/LucasPJS/on_connectivity_widget/pulls)** | ||
|
||
### Traduções: | ||
|
||
NOTE: Fique à vontade para ajudar nas traduções | ||
|
||
* [Inglês](README.md) | ||
* [Português](README.pt-BR.md) | ||
|
||
## Tópicos: | ||
|
||
* [Como instalar](#como-instalar) | ||
* [Como usar](#como-usar) | ||
* [Exemplo](#exemplo) | ||
* [Licença](#licença) | ||
|
||
<!-- ## Gif Examples: | ||
| <img src=""/> | <img src=""/> | <img src=""/> | <img src=""/> | | ||
|:---:|:---:|:---:|:---:| | ||
| TOP | BOTTOM | LEFT_TOP | LEFT_BOTTOM | --> | ||
|
||
## Como instalar: | ||
Adicione o seguinte codigo para seu `pubspec.yaml`: | ||
```yaml | ||
dependencies: | ||
on_connectivity_widget: ^1.0.0 | ||
``` | ||
## Como usar: | ||
```dart | ||
OnConnectivityWidget() // O widget principal para usar o plugin. | ||
``` | ||
Todos os tipos de métodos nesse plugin: | ||
|
||
| Parameters | Arguments | Description | | ||
|--------------|-----------------|-----------------| | ||
| `position` | `PositionType?` | `Usado para definir a posição da menssagem` | <br> | ||
| `wifiWidget` | `Widget?` | `Widget mostrado quando a internet é: Wifi.` | <br> | ||
| `mobileWidget` | `Widget?` | `Widget mostrado quando a internet é: Mobile` | <br> | ||
| `noneWidget` | `Widget?` | `Widget mostrado quando a internet é: Offline.` | <br> | ||
| `animationDuration` | `Duration?` | `Usado para definir quanto tempo a animação irá durar.` | <br> | ||
| `messageDuration` | `Duration?` | `Usado para definir quanto tempo a menssagem irá durar.` | <br> | ||
| `animationType` | `Curve?` | `Usado para definir qual animação será mostrada.` | <br> | ||
| `cancelInitState` | `bool?` | `Usado para definir se menssagem será mostrada quando app iniciar.` | <br> | ||
| `customAnimation` | `Animation<Offset>?` | `Usado se você quer usar sua própria animação.` | <br> | ||
| `customPosition` | `Alignment?` | `Usado se você quer usar sua própria posição.` | <br> | ||
|
||
**Veja mais em [Documentation](https://pub.dev/documentation/on_connectivity_widget/latest/on_connectivity_widget/on_connectivity_widget-library.html)** | ||
|
||
## Exemplo: | ||
|
||
#### OnConnectivityWidget | ||
```dart | ||
OnConnectivityWidget( | ||
animationDuration: Duration(seconds: 2), | ||
messageDuration: Duration(seconds: 1), | ||
position: PositionType.BOTTOM, | ||
animationType: Curves.bounceInOut, | ||
cancelInitState: true, | ||
wifiWidget: Container( | ||
color: Colors.green, | ||
child: Text("Wifi"), | ||
), | ||
mobileWidget: Container( | ||
color: Colors.blue, | ||
child: Text("Mobile"), | ||
), | ||
noneWidget: Container( | ||
color: Colors.red, | ||
child: Text("None"), | ||
), | ||
//customAnimation: null, | ||
//customPosition: null, | ||
); | ||
``` | ||
|
||
## LICENÇA: | ||
|
||
* [LICENSE](https://github.com/LucasPJS/on_connectivity_widget/blob/main/LICENSE) | ||
|
||
> * [Voltar ao Topo](#on_connectivity_widget) |
Oops, something went wrong.