added contributing.md

This commit is contained in:
Prerak Mann 2020-04-22 14:19:07 +05:30
parent 4ce3f0272a
commit d60098711d
3 changed files with 17 additions and 7 deletions

12
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,12 @@
## How to Contribute
1. Fork this repo
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'useful commit message'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Start a Pull Request
> You can help solve existing [issues](https://github.com/mannprerak2/nearby_connections/issues), in case you want something to be added, please create an issue first
## Project Structure
The structure is pretty much self explainatory, please read the doc comments or see the [API Reference](https://pub.dev/documentation/nearby_connections/latest/) for more info.

View File

@ -102,13 +102,11 @@ class _MyBodyState extends State<Body> {
child: Text("checkLocationEnabled"),
onPressed: () async {
if (await Nearby().checkLocationEnabled()) {
Scaffold.of(context).showSnackBar(SnackBar(
content:
Text("Location is ON :)")));
Scaffold.of(context).showSnackBar(
SnackBar(content: Text("Location is ON :)")));
} else {
Scaffold.of(context).showSnackBar(SnackBar(
content: Text(
"Location is OFF :(")));
Scaffold.of(context).showSnackBar(
SnackBar(content: Text("Location is OFF :(")));
}
},
),

View File

@ -168,7 +168,7 @@ class Nearby {
/// Convinience method
///
/// Checks if Location/GPS is enabled
///
///
/// If Location isn't enabled, devices may disconnect often.
/// Some devices may immediately disconnect
Future<bool> checkLocationEnabled() async =>