flutter_native_bridge 1.1.1
flutter_native_bridge: ^1.1.1 copied to clipboard
Zero-boilerplate bridge between Flutter and native platforms. Call native Kotlin/Swift methods from Dart with minimal setup - just annotate and call!
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.1.1 - 2025-12-30 #
Fixed #
- iOS Swift Compilation Errors (#1)
- Fixed
@objcvariadic parameter error by changingAnyObject...to[AnyObject] - Fixed access control issues with
activeStreamSinksandeventChannelPrefix - Made plugin Swift-only to resolve module generation issues
- Fixed
EXC_BAD_ACCESScrash when calling methods with primitive return types (Int, Bool, Double, etc.) - Fixed crash when calling void methods by using IMP-based direct method invocation
- Properly handle Objective-C type encodings for all return types
- Fixed
Changed #
- Cleaned up debug logging in iOS plugin for production release
- Fixed lint warnings in Dart code (doc comments, library directive)
1.1.0 - 2025-12-21 #
Added #
- EventChannel/Stream Support
@NativeStreamannotation for streaming methods (Android)StreamSinkinterface for emitting events to Flutter- iOS stream support via
WithSink:selector pattern FlutterNativeBridge.stream<T>()runtime API for dynamic stream subscriptionsFlutterNativeBridge.discoverStreams()for stream introspection- Generated Stream methods in Dart code (
Stream<dynamic>)
- Code Generator
- Generates Stream methods for
@NativeStreamannotations - Handles generic types (Map, List) correctly
- Generates Stream methods for
1.0.0 - 2024-12-15 #
Added #
- Initial release of Flutter Native Bridge
- Android Support
@NativeBridgeannotation for exposing entire classes@NativeFunctionannotation for exposing individual methods@NativeIgnoreannotation for excluding methods- Auto-discovery of annotated classes
- Support for Activity, Context, and no-arg constructors
- iOS Support
- Support for classes inheriting from
NSObject @objcmethod exposure- Manual registration via
FlutterNativeBridge.register()
- Support for classes inheriting from
- Code Generator
- Parses Kotlin files for Android annotations
- Parses Swift files for
@objcmethods - Generates type-safe Dart code with IDE autocomplete
- Merges classes from both platforms
- Runtime API
FlutterNativeBridge.call<T>()for dynamic method callsNativeBridgeclass for instance-based callsFlutterNativeBridge.discover()for introspection
- Type Support
- Kotlin: String, Int, Long, Double, Float, Boolean, Unit, List, Map
- Swift: String, Int, Double, Float, Bool, Void, Array, Dictionary