fluttercommunity / wakelock_plus

Flutter plugin that allows you to keep the device screen awake on Android, iOS, macOS, Windows, Linux, and web.
BSD 3-Clause "New" or "Revised" License
71 stars 54 forks source link

Use a custom `errorClassName` for Pigeon codegen to prevent Class name clash #18

Closed vanshg closed 8 months ago

vanshg commented 10 months ago

By default, Pigeon creates an error class called FlutterError. However, if someone is consuming 2 libraries that both use Pigeon internally, this causes a class name clash on Kotlin (Type FlutterError is defined multiple times).

This can be resolved by passing in kotlinOptions: KotlinOptions(errorClassName: "YourCustomErrorClassName"), in PigeonOptions in messages.dart

diegotori commented 8 months ago

Addressed in version 1.2.0.