-
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.
- Loading branch information
1 parent
1c17bcb
commit fc2530c
Showing
17 changed files
with
359 additions
and
64 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
enable-beta-ecosystems: true | ||
updates: | ||
- package-ecosystem: "pub" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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,32 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "**.md" | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "**.md" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Dart | ||
uses: dart-lang/setup-dart@v1 | ||
|
||
- name: Get dependencies | ||
run: dart pub get | ||
|
||
- name: Analyze | ||
run: dart analyze | ||
|
||
- name: Test | ||
run: dart test --coverage=coverage |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Nguyen Minh Dung | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,2 +1,7 @@ | ||
A sample command-line application with an entrypoint in `bin/`, library code | ||
in `lib/`, and example unit test in `test/`. | ||
# Dart Google Sheet Remote Config | ||
|
||
This is a Dart package that allows you to use Google Sheets as a remote config for your Dart/Flutter app. It is inspired by @theapache64's [blog](https://theapache64.github.io/posts/google-sheet-as-remote-config-for-microcontrollers/). | ||
|
||
## Why Google Sheets? | ||
|
||
## How to use |
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 was deleted.
Oops, something went wrong.
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,3 +1,32 @@ | ||
int calculate() { | ||
return 6 * 7; | ||
import 'package:dart_gsheet_remote_config/dart_gsheet_remote_config.dart'; | ||
import 'package:version/version.dart'; | ||
|
||
Future<void> main() async { | ||
final remoteConfig = SheetRemoteConfig(); | ||
|
||
await remoteConfig.initilize( | ||
id: "1qEskeRwdtAfnewig-slspPHKafDKV0JMexXdDWgCCeQ"); | ||
|
||
final testValue = remoteConfig.getDouble("test"); | ||
print("test: $testValue"); | ||
|
||
final themeMode = remoteConfig.getString("themeMode"); | ||
|
||
print("themeMode: $themeMode"); | ||
|
||
final enableAds = remoteConfig.getBool("enableAds"); | ||
|
||
print("enableAds: $enableAds"); | ||
|
||
final inAppVersion = Version.parse("1.0.0"); | ||
|
||
final currentVersion = remoteConfig.getString("currentVersion"); | ||
|
||
print("currentVersion: $currentVersion"); | ||
|
||
if (currentVersion != null && inAppVersion < Version.parse(currentVersion)) { | ||
print("Please update your app"); | ||
} else { | ||
print("You are using the latest version"); | ||
} | ||
} |
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
This file was deleted.
Oops, something went wrong.
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,2 +1,2 @@ | ||
export 'dart_gsheet_remote_config.dart'; | ||
export 'src/sheet_remote_config.dart'; | ||
export 'src/sheet_remote_config_exception.dart'; |
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
Oops, something went wrong.