• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
5 package io.flutter.plugin.platform;
6 
7 
8 /**
9  * Registry for platform view factories.
10  * <p>
11  * Plugins can register factories for specific view types.
12  */
13 public interface PlatformViewRegistry {
14 
15     /**
16      * Registers a factory for a platform view.
17      *
18      * @param viewTypeId unique identifier for the platform view's type.
19      * @param factory    factory for creating platform views of the specified type.
20      * @return true if succeeded, false if a factory is already registered for viewTypeId.
21      */
registerViewFactory(String viewTypeId, PlatformViewFactory factory)22     boolean registerViewFactory(String viewTypeId, PlatformViewFactory factory);
23 }
24