Examples

These examples show how to use package:code_assets in build hooks to bundle native code with Dart and Flutter applications.

ExampleUse CaseUsed Features
host_nameGet the hostname.- Accessing a system library with DynamicLoadingSystem and LookupInProcess.
- OS-specific differences.
mini_audioPlay audio.- C library built from source with package:native_toolchain_c.
- Bundled with DynamicLoadingBundled.
sqliteDatabase access.- C library built from source with package:native_toolchain_c.
- Bundled with DynamicLoadingBundled.
sqlite_prebuiltDatabase access.- Pre-built binary downloaded from the internet or available on host machine.
- Bundled with DynamicLoadingBundled.
stb_imageRead image metadata.- C library built from source with package:native_toolchain_c.
- Bundled with DynamicLoadingBundled.