Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
PlatformViewRegistry.java
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5package io.flutter.plugin.platform;
6
7import androidx.annotation.NonNull;
8
9/**
10 * Registry for platform view factories.
11 *
12 * <p>Plugins can register factories for specific view types.
13 */
14public interface PlatformViewRegistry {
15
16 /**
17 * Registers a factory for a platform view.
18 *
19 * @param viewTypeId unique identifier for the platform view's type.
20 * @param factory factory for creating platform views of the specified type.
21 * @return true if succeeded, false if a factory is already registered for viewTypeId.
22 */
23 boolean registerViewFactory(@NonNull String viewTypeId, @NonNull PlatformViewFactory factory);
24}
boolean registerViewFactory(@NonNull String viewTypeId, @NonNull PlatformViewFactory factory)