Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Package Attributes | List of all members
io.flutter.plugin.platform.PlatformViewsControllerTest.CountingPlatformView Class Reference
Inheritance diagram for io.flutter.plugin.platform.PlatformViewsControllerTest.CountingPlatformView:
io.flutter.plugin.platform.PlatformView

Public Member Functions

 CountingPlatformView (Context context)
 
void dispose ()
 
View getView ()
 
void onFlutterViewAttached (View flutterView)
 
void onFlutterViewDetached ()
 
- Public Member Functions inherited from io.flutter.plugin.platform.PlatformView
default void onFlutterViewAttached (@NonNull View flutterView)
 
default void onInputConnectionLocked ()
 
default void onInputConnectionUnlocked ()
 

Public Attributes

int disposeCalls = 0
 
int attachCalls = 0
 
int detachCalls = 0
 

Static Package Attributes

static final String VIEW_TYPE_ID = "CountingPlatformView"
 

Detailed Description

Definition at line 73 of file PlatformViewsControllerTest.java.

Constructor & Destructor Documentation

◆ CountingPlatformView()

io.flutter.plugin.platform.PlatformViewsControllerTest.CountingPlatformView.CountingPlatformView ( Context  context)
inline

Definition at line 77 of file PlatformViewsControllerTest.java.

77 {
78 view = new SurfaceView(context);
79 }

Member Function Documentation

◆ dispose()

void io.flutter.plugin.platform.PlatformViewsControllerTest.CountingPlatformView.dispose ( )
inline

Dispose this platform view.

The PlatformView object is unusable after this method is called.

Plugins implementing PlatformView must clear all references to the View object and the PlatformView after this method is called. Failing to do so will result in a memory leak.

References related to the Android View attached in onFlutterViewAttached(View) must be released in dispose() to avoid memory leaks.

Implements io.flutter.plugin.platform.PlatformView.

Definition at line 86 of file PlatformViewsControllerTest.java.

86 {
87 // We have been removed from the view hierarhy before the call to dispose.
88 assertNull(view.getParent());
90 }

◆ getView()

View io.flutter.plugin.platform.PlatformViewsControllerTest.CountingPlatformView.getView ( )
inline

Returns the Android view to be embedded in the Flutter hierarchy.

Implements io.flutter.plugin.platform.PlatformView.

Definition at line 93 of file PlatformViewsControllerTest.java.

93 {
94 return view;
95 }

◆ onFlutterViewAttached()

void io.flutter.plugin.platform.PlatformViewsControllerTest.CountingPlatformView.onFlutterViewAttached ( View  flutterView)
inline

◆ onFlutterViewDetached()

void io.flutter.plugin.platform.PlatformViewsControllerTest.CountingPlatformView.onFlutterViewDetached ( )
inline

Called by the io.flutter.embedding.engine.FlutterEngine that owns this
PlatformView
when the Android View responsible for rendering a Flutter UI is detached and disassociated from the io.flutter.embedding.engine.FlutterEngine.

This means that our associated io.flutter.embedding.engine.FlutterEngine no longer has a rendering surface, or a user interaction surface of any kind.

This platform view must release any references related to the Android View that was provided in onFlutterViewAttached(View).

Implements io.flutter.plugin.platform.PlatformView.

Definition at line 103 of file PlatformViewsControllerTest.java.

Member Data Documentation

◆ attachCalls

int io.flutter.plugin.platform.PlatformViewsControllerTest.CountingPlatformView.attachCalls = 0

Definition at line 82 of file PlatformViewsControllerTest.java.

◆ detachCalls

int io.flutter.plugin.platform.PlatformViewsControllerTest.CountingPlatformView.detachCalls = 0

Definition at line 83 of file PlatformViewsControllerTest.java.

◆ disposeCalls

int io.flutter.plugin.platform.PlatformViewsControllerTest.CountingPlatformView.disposeCalls = 0

Definition at line 81 of file PlatformViewsControllerTest.java.

◆ VIEW_TYPE_ID

final String io.flutter.plugin.platform.PlatformViewsControllerTest.CountingPlatformView.VIEW_TYPE_ID = "CountingPlatformView"
staticpackage

Definition at line 74 of file PlatformViewsControllerTest.java.


The documentation for this class was generated from the following file: