open function

void open({
  1. String entryPoint = 'androidWindow',
  2. Size size = const Size(400, 600),
  3. Offset position = const Offset(0, 0),
  4. bool focusable = false,
})

Open an android window that over top of other apps.

The entryPoint is the name of function that annotated with @pragma('vm:entry-point').

For example:

@pragma('vm:entry-point')
void androidWindow() {
  runApp(const AndroidWindowApp());
}

Implementation

void open({
  String entryPoint = 'androidWindow',
  Size size = const Size(400, 600),
  Offset position = const Offset(0, 0),
  bool focusable = false,
}) {
  _api.open(
    entryPoint,
    size.width.toInt(),
    size.height.toInt(),
    position.dx.toInt(),
    position.dy.toInt(),
    focusable,
  );
}