add_to_app/books/flutter_module_books/README.md
This application simulates a mock scenario in which an existing app with business logic and middleware already exists. It demonstrates how to add Flutter to an app that has established patterns for these domains. For more information on how to use it, see the README.md parent directory.
This application also utilizes the Pigeon plugin to avoid manual platform channel wiring. Pigeon autogenerates the platform channel code in Dart/Java/Objective-C to allow interop using higher order functions and data classes instead of string-encoded methods and serialized primitives.
The Pigeon autogenerated code is checked-in and ready to use. If the schema
in pigeon/schema.dart is updated, the generated classes can also be re-
generated using:
dart run pigeon --input pigeon/schema.dart \
--dart_out lib/api.dart \
--objc_header_out ../ios_books/IosBooks/api.h \
--objc_source_out ../ios_books/IosBooks/api.m \
--objc_prefix BK \
--java_out ../android_books/app/src/main/java/dev/flutter/example/books/Api.java \
--java_package "dev.flutter.example.books"
Book model class is used within the
Kotlin/Swift program, the Dart program and in the interop between Kotlin/Swift
and Dart.For more information about Flutter, check out flutter.dev.
For instructions on how to integrate Flutter modules into your existing applications, see Flutter's add-to-app documentation.