-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Example added & General enhancements
- Loading branch information
Showing
6 changed files
with
70 additions
and
10 deletions.
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
.svn/ | ||
migrate_working_dir/ | ||
.vscode | ||
.github | ||
|
||
# IntelliJ related | ||
*.iml | ||
|
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,4 +1,5 @@ | ||
.git | ||
.github | ||
.dart_tool | ||
.vscode | ||
build |
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,9 +1,13 @@ | ||
## 1.0.2 | ||
|
||
- Example added to the package | ||
|
||
## 1.0.1 | ||
|
||
* More comments added to `lib/greip.dart` file | ||
* All package files are formatted to match the Dart formatter | ||
* Package description modified | ||
- More comments added to `lib/greip.dart` file | ||
- All package files are formatted to match the Dart formatter | ||
- Package description modified | ||
|
||
## 1.0.0 | ||
|
||
* Initial commit | ||
- Initial commit |
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
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,54 @@ | ||
# Example | ||
|
||
This example demonstrates how to use the Greip package in a Flutter application. | ||
|
||
## Getting Started | ||
|
||
1. Add the Greip package to your `pubspec.yaml` file: | ||
|
||
```yaml | ||
dependencies: | ||
greip: ^1.0.2 | ||
``` | ||
2. Import the Greip package in your Dart code: | ||
```dart | ||
import 'package:greip/greip.dart'; | ||
``` | ||
|
||
3. Import the Enums you need: | ||
|
||
```dart | ||
import 'package:greip/src/enums/mode.dart'; | ||
import 'package:greip/src/enums/param.dart'; | ||
import 'package:greip/src/enums/language.dart'; | ||
``` | ||
|
||
4. Initialize the Greip package and use its functionalities: | ||
|
||
```dart | ||
void main() { | ||
Greip greip = Greip(); | ||
greip.setToken('your-greip-token'); | ||
try { | ||
Map<String, dynamic> result = await greip.geoIp(params: [ | ||
Param.security, | ||
Param.currency, | ||
Param.timezone, | ||
Param.location, | ||
], lang: Language.en, mode: Mode.live); | ||
print(result); | ||
} catch (e) { | ||
print('Error: $e'); | ||
} | ||
} | ||
``` | ||
|
||
5. Run your Flutter application to see the package in action. | ||
|
||
## Additional Information | ||
|
||
- For detailed API documentation, refer to the [official API reference](https://docs.greip.io/). | ||
- Check out the tests included in the package for usage examples. |
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