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

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();
}
60
likes
0
pub points
78%
popularity

Publisher

verified publisheramin-ahmadi.com

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