execute method

void execute(
  1. String statement
)

For internal use only. Implementation detail that may change anytime.

Evaluates the JavaScript statement given.

Implementation

void execute(String statement) {
  final controller = _webViewController;

  if (controller != null) {
    if (kDebugMode) {
      print('📗 chatbox.execute: $statement');
    }

    controller.evaluateJavascript(source: statement);
  } else {
    if (kDebugMode) {
      print('📘 chatbox.execute: $statement');
    }

    this._pending.add(statement);
  }
}