A native runtime package for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and call native method or variable.
- Access android classes.
- Access ios classes.
To use this package, add flutter_native
as a dependency in your pubspec.yaml file. For example:
dependencies:
flutter_object_cache: 0.0.1
import 'package:flutter_native/flutter_native.dart';
// To get system version for ios
final iosDevice = Device();
final systemVersion = await iosDevice.systemVersion;
// To get package name for android
final context = Context();
final packageName = await context.packageName;
// Instance type for android
final registrarTarget = nativeRuntime.instanceNamed('Registrar');
Native Class | Futter Class |
---|---|
------------- | -------------- |
UIDevice | Device |
UIScreen | Screen |
UIApplication | Application |
NSBundle | Bundle |
NSProcessInfo | Process |
NSUserDefaults | UserDefaults |
Native Class | Futter Class |
---|---|
Context | Context |
AssetManager | AssetManager |
ClassLoader | ClassLoader |
ApplicationInfo | ApplicationInfo |
Resources | Resources |
ResourcesImpl | ResourcesImpl |
SharedPreferences | SharedPreferences |
Please file any issues, bugs or feature request as an issue on our Github page.
If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our contribution guide and send us your pull request.
This Flutter Native package for Flutter is developed by modool. You can contact us at [email protected]