There are many platform constants that need to be sync on dart side and platform side. Following are the constants that are being generated:
- codec types
- platform method and event names
- serializable property names for serialization and de-serialization
cd bin
dart codegen.dart
A straight forward templates creating using dart string interpolation:
source template files are available in bin/templates
and source context data in bin/codegencontext.dart
.
These files are generated/modified upon code generation
lib/src/generated/platformconstants.dart
for use in Flutter/Dartandroid/src/main/java/io/ably/flutter/plugin/generated/PlatformConstants.java
for use in Android/Javaios/Classes/codec/AblyPlatformConstants.h
for use in iOS/Objective-Cios/Classes/codec/AblyPlatformConstants.m
for use in iOS/Objective-C
When any of the below need to be added/updated
- A new codec type - required when a new top level serializable object is required (ex:
ErrorInfo
andClientOptions
) - Platform and event names - when implementing a new method in
MethodChannel
or new event inEventChannel
- A new object needs to be serialized (either top-level, or nested)
- Test that everything still works
- Commit changes to the template(s)
- Commit changes to the generate files