terra_flutter 0.0.1-alpha.1
terra_flutter: ^0.0.1-alpha.1 copied to clipboard
A flutter plug-in for the native Terra library (Android and iOS).
terra_flutter #
A flutter plug-in for the native Terra library (Android and iOS).
Installation #
First, add apollo_flutter as a dependency in your pubspec.yaml file.
Android #
Add TekoGoogleRegistryToken to local.properties of this project (contact [email protected] to get
the token).
// android/local.properties
TekoGoogleRegistry.password=<your-token>
In project build.grade. Add the following code:
allprojects {
repositories {
...
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
maven {
setUrl("https://asia-southeast1-maven.pkg.dev/teko-development/teko-mobile-sdks")
authentication {
basic(BasicAuthentication)
}
credentials {
username = "_json_key_base64"
password = properties.getProperty('TekoGoogleRegistry.password')
}
}
}
}
iOS #
Setup github access token for accessing Teko iOS frameworks (contact [email protected] to get the token)..
- Open terminal:
touch /.bash_profile; open /.bash_profile(a text editor will be opened) - Add a new line:
export GITHUB_USER_TOKEN="<your-token>" - Save file and go back to terminal:
source ~/.bash_profile
Library usage #
Initialize Terra App #
Static Method: Future<TerraApp> initTerraApp
Initialize a new Terra App.You should call this function inside the entry-point to use other Terra services smoothly.
Get the Terra App #
Static Method: `TerraApp TerraApp.getInstance(String appName)
Get the current Terra App that is identified by appName
Get service config #
Method: Future<ServiceConfig> getServiceConfig()
Get a specific config in Terra