Skip to content

A native runtime package for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and call native method or variable.

License

Notifications You must be signed in to change notification settings

Modool/flutter_native

Repository files navigation

Flutter Native Runtime Package

A native runtime package for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and call native method or variable.

Flutter Test pub package Build Status style: effective dart

Features

  • Access android classes.
  • Access ios classes.

Usage

To use this package, add flutter_native as a dependency in your pubspec.yaml file. For example:

dependencies:
  flutter_object_cache: 0.0.1

API

Access native

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');

iOS Support class

Native Class Futter Class
------------- --------------
UIDevice Device
UIScreen Screen
UIApplication Application
NSBundle Bundle
NSProcessInfo Process
NSUserDefaults UserDefaults

Android Support class

Native Class Futter Class
Context Context
AssetManager AssetManager
ClassLoader ClassLoader
ApplicationInfo ApplicationInfo
Resources Resources
ResourcesImpl ResourcesImpl
SharedPreferences SharedPreferences

Issues

Please file any issues, bugs or feature request as an issue on our Github page.

Want to contribute

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.

Author

This Flutter Native package for Flutter is developed by modool. You can contact us at [email protected]

About

A native runtime package for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and call native method or variable.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages