Overview
To simplify your application logic and integration with the Knot Flutter SDK, Version 1.0 includes a number of breaking changes that may affect the way your integration works or behaves. The new version includes a number of significant improvements:- Enhanced speed and stability in loading merchant flows.
- More streamlined initialization of the SDK.
- Simplified event handling, more informative event messaging, and uniform naming conventions for easier debugging.
- Improved maintainability and foundations for new feature compatibility.
Breaking Changes
Configuring and opening the Knot SDK has changed significantly in Flutter Version 1.0 and requires some refactoring in order to initialize the SDK with a session. Events and Errors now provide additional values to debug with.Session Initialization
Changes.openCardOnFileSwitcheris replaced with a more flexible.open.- The
openaction now requires aKnotConfigurationwhich is nowKnot.open(knotConfiguration).
Dart
Dart
Event Handling
Changes- The
onEventtype now provides the environment and product the event originanted from. - The
KnotErrortype provides improved error descriptions and product type. - The
KnotSuccesstype now provides a product type and a metaData map.
Dart
Dart
Error Handling
Error handling has been improved with more structured and meaningful error messages. Changes- Errors are now encapsulated in the
KnotErrorenum. - Each error has a human-readable description (
errorDescription) and a unique error code (errorCode). - Improved clarity and consistency across error messages.
Dart
Dart
Closing the SDK
Changes- Closing the SDK is now statically accessed via
_knotapiFlutterPlugin.close()as opposed to_knotapiFlutterPlugin.closeKnotSDK().
Dart
Dart