flutter_native_bridge 1.1.0
flutter_native_bridge: ^1.1.0 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.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