flython 0.1.2 copy "flython: ^0.1.2" to clipboard
flython: ^0.1.2 copied to clipboard

outdated

Use Flython to combine the power of Python with Dart. It was originally created to be used with Flutter but, it doesn't depend on Flutter and can be used in pure Dart code.

example/main.dart

import 'package:flython/flython.dart';

class OpenCV extends Flython {
  static const cmdToGray = 1;

  Future<dynamic> toGray(
    String inputFile,
    String outputFile,
  ) async {
    var command = {
      "cmd": cmdToGray,
      "input": inputFile,
      "output": outputFile,
    };
    return await runCommand(command);
  }
}

void main() async {
  final opencv = OpenCV();
  await opencv.initialize("python", "./example/opencv.py", false);
  await opencv.toGray("./image.png", "./image_gray.png");
  opencv.finalize();
}
70
likes
0
points
41
downloads

Publisher

verified publisheramin-ahmadi.com

Weekly Downloads

Use Flython to combine the power of Python with Dart. It was originally created to be used with Flutter but, it doesn't depend on Flutter and can be used in pure Dart code.

Homepage

License

unknown (license)

Dependencies

mutex, uuid

More

Packages that depend on flython