Development for Flutter SDK

Work with the Flutter SDK source code.

SDK development guide

The project consists of Flutter code in the /lib folder, a native Android module in /android, and a native iOS module in /ios. To see SDK functionality in action, we provide an Example app for Flutter SDK you can find in /example.

Flutter

  • We use flutter_test to run unit tests. Use flutter test to run unit tests.

Android

The Android native module is written in Kotlin, since that's also used for our native Android SDK.

  • We use JUnit4 to run unit tests. The tests are hosted by the example app: run ./gradlew :app:testGmsDebugUnitTest in example/android (after flutter pub get in example).

iOS

The iOS native module is written in Swift, since that's also used for our native iOS SDK.

  • We use CocoaPods to manage dependencies. You'll see a Podfile that defines dependencies for the "standalone" Xcode project that we use to develop the iOS native module. These pods won't be part of the released package, the .podspec file is located at package level. Run pod install before opening the Xcode project and starting development.
  • We use Quick and Nimble to write tests. The tests are hosted by the example app's RunnerTests target:
    • Run pod install in example/ios.
    • Then, run the tests in Xcode or with xcodebuild test -workspace Runner.xcworkspace -scheme Runner -only-testing:RunnerTests.

Did this page help you?

© Bloomreach, Inc. All rights reserved.