Dynamic vs static linking

A native library can be linked into an app either
dynamically or statically. A statically linked library
is embedded into the app’s executable image,
and is loaded when the app starts.

Symbols from a statically linked library can be
loaded using DynamicLibrary.executable or
DynamicLibrary.process.

A dynamically linked library, by contrast, is distributed
in a separate file or folder within the app,
and loaded on-demand. On Android, a dynamically
linked library is distributed as a set of .so (ELF)
files, one for each architecture.

A dynamically linked library can be loaded into
Dart via DynamicLibrary.open.

API documentation is available from the Dart dev channel:
Dart API reference documentation.

Step 1: Create a plugin

If you already have a plugin, skip this step.

To create a plugin called “native_add”,
do the following:

flutter create