This Flutter sample project demonstrates how to use the tru_sdk_flutter plugin.
Before you begin, you will need:
- For iOS: Xcode 12+
- For Android: Android Studio version 3.0 or later
- For Android Studio Flutter and Dart Plugins installed.
- For VS Code Flutter and Dart Plugins installed.
- A mobile phone with mobile data connection.
-
Open the phonecheck-flutter-example folder with Android Studio or VS Code.
-
Android Studio/IntelliJ will notify you of updates to your package dependencies. Click Pub get in the action ribbon at the top of
pubspec.yaml. -
VS Code: Click Get Packages located in right side of the action ribbon at the top of
pubspec.yaml -
This sample app uses the tru.ID dev server. To get setup:
Create a tru.ID account.
Install the tru.ID CLI via:
npm i -g @tru_id/cli
Set up the CLI with the tru.ID credentials which can be found within the tru.ID console.
Install the tru.ID CLI development server plugin.
Create a new tru.ID project within the root directory via:
tru projects:create flutter-sdk-server --project-dir .Run the development server, pointing it to the directory containing the newly created project configuration. This will also open up a localtunnel to your development server, making it publicly accessible to the Internet so that your mobile phone can access it when only connected to mobile data.
tru server -t --project-dir .In
phonecheck_flutter_example/lib/main.dart, replacebase_urlwith your development server URL. -
Android Studio Run -> Run
It may be a good idea to work on the native Android or iOS example projects in separate windows/IDEs. Android Studio will provide a banner suggesting this.
Don't forget to make sure Cocoapods installed on your machine.
Please note that the minimum target for iOS is iOS 13. For Android the minSDKVersion is 21 and gradle wrapper is 6.7.1
Distributed under the MIT license. See LICENSE for more information.