flutter_native_runtime 0.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • new44

Flutter Native Runtime Plugin #

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

Flutter Test pub package Build Status style: effective dart

Features #

  • Access class with name.
  • Access global instance with name.
  • Call method with method name and arguments.
  • Read and write property with property name.

Usage #

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

  flutter_native_runtime: 0.0.1


Access native class or instance target #

import 'package:flutter_native_runtime/flutter_native_runtime.dart';

// Class target for ios
final deviceTarget = nativeRuntime.classNamed('UIDevice');

// Instance target for ios
final deviceTarget = nativeRuntime.instanceNamed('UIDevice');

// Class target for android
final registrarTarget = nativeRuntime.classNamed('Registrar');

// Instance type for android
final registrarTarget = nativeRuntime.instanceNamed('Registrar');

Call native method or property #

import 'package:flutter_native_runtime/flutter_native_runtime.dart';
// iOS
// Access property to get result of UIDevice.currentDevice.systemVersion
final systemVersion = nativeRuntime.classNamed('UIDevice').property('currentDevice').property('systemVersion').get<String>();

// Access method to get result of [[UIDevice currentDevice] systemVersion]
final systemVersion = nativeRuntime.classNamed('UIDevice').method('currentDevice').method('systemVersion').invoke<String>();

// Access method to get result of [UIDevice currentDevice].systemVersion
final systemVersion = nativeRuntime.classNamed('UIDevice').method('currentDevice').property('systemVersion').get<String>();

// Android
// To get Context.getPackageName 
final packageName = nativeRuntime.instanceNamed('Registrar').method('context').method('getPackageName').invoke<String>();

// To get private variable of Context.mVariable 
final variable = nativeRuntime.instanceNamed('Registrar').property('context').variable('mVariable').invoke<String>();

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 Runtime plugin for Flutter is developed by modool. You can contact us at modool.go@gmail.com

0.0.1 #


flutter_native_runtime_example #

Demonstrates how to use the flutter_native_runtime plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_native_runtime: ^0.0.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_native_runtime/flutter_native_runtime.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 8, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:flutter_native_runtime/flutter_native_runtime.dart] that declares support for platforms: android, ios, macos

Package does not support Flutter platform web

Because of import path [package:flutter_native_runtime/flutter_native_runtime.dart] that declares support for platforms: android, ios, macos

Package does not support Flutter platform windows

Because of import path [package:flutter_native_runtime/flutter_native_runtime.dart] that declares support for platforms: android, ios, macos

Package not compatible with SDK dart

because of import path [flutter_native_runtime] that is in a package requiring null.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
uuid ^2.0.4 2.2.0
Transitive dependencies
charcode 1.1.3
collection 1.14.12 1.14.13
convert 2.1.1
crypto 2.1.5
meta 1.1.8 1.2.1
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies