You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Bump version to 0.1.1 for both cnativeapi and nativeapi
- Update cnativeapi dependency constraint to ^0.1.1 in nativeapi
- Add CHANGELOG entries for 0.1.1
- Update README files: add platform support table, features list,
Work in Progress notice, and correct usage examples
final result = UrlOpener.instance.open('https://example.com');
70
+
print('Opened: ${result.success}');
71
+
72
+
// Preferences (synchronous, dispose when done)
73
+
final prefs = Preferences();
74
+
prefs.set('theme', 'dark');
75
+
final theme = prefs.get('theme', 'light'); // second arg is default value
76
+
prefs.dispose();
30
77
```
31
78
79
+
> 📖 More detailed documentation and examples are coming soon. See the [`examples/`](https://github.com/libnativeapi/nativeapi-flutter/tree/main/examples) directory for working sample apps.
Native API C bindings for Flutter, auto-generated via [ffigen](https://pub.dev/packages/ffigen) from the [libnativeapi](https://github.com/libnativeapi/nativeapi) C library.
4
+
5
+
> This package provides low-level FFI bindings and is typically used as an internal dependency of [`nativeapi`](https://pub.dev/packages/nativeapi). You generally don't need to depend on it directly.
6
+
7
+
## Platform Support
8
+
9
+
| Android | iOS | Linux | macOS | Windows |
10
+
|:-------:|:---:|:-----:|:-----:|:-------:|
11
+
| ✅ | ✅ | ✅ | ✅ | ✅ |
12
+
13
+
## Usage
14
+
15
+
If you need to use the raw C bindings directly:
16
+
17
+
```dart
18
+
import 'package:cnativeapi/cnativeapi.dart';
19
+
```
20
+
21
+
For higher-level Dart APIs, use the [`nativeapi`](https://pub.dev/packages/nativeapi) package instead.
22
+
23
+
## Regenerating Bindings
24
+
25
+
Bindings are generated from C headers using `ffigen`. To regenerate:
26
+
27
+
```bash
28
+
cd packages/cnativeapi
29
+
dart run ffigen --config ffigen.yaml
30
+
```
31
+
32
+
Regeneration is needed when:
33
+
- The native C library ([libnativeapi/nativeapi](https://github.com/libnativeapi/nativeapi)) is updated
0 commit comments