Files
engine/shell/platform/android/io/flutter/view/FlutterCallbackInformation.java
T

40 lines
1.3 KiB
Java
Raw Normal View History

2018-11-07 12:24:35 -08:00
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package io.flutter.view;
2019-09-05 13:23:04 -07:00
import android.support.annotation.Keep;
import android.support.annotation.NonNull;
import io.flutter.embedding.engine.FlutterJNI;
/**
* A class representing information for a callback registered using
* `PluginUtilities` from `dart:ui`.
*/
2019-09-05 13:23:04 -07:00
@Keep
public final class FlutterCallbackInformation {
final public String callbackName;
final public String callbackClassName;
final public String callbackLibraryPath;
/**
* Get callback information for a given handle.
* @param handle the handle for the callback, generated by
* `PluginUtilities.getCallbackHandle` in `dart:ui`.
* @return an instance of FlutterCallbackInformation for the provided handle.
*/
@NonNull
public static FlutterCallbackInformation lookupCallbackInformation(long handle) {
return FlutterJNI.nativeLookupCallbackInformation(handle);
}
private FlutterCallbackInformation(String callbackName,
String callbackClassName, String callbackLibraryPath) {
this.callbackName = callbackName;
this.callbackClassName = callbackClassName;
this.callbackLibraryPath = callbackLibraryPath;
}
}