Flutter Engine
The Flutter Engine
shell
platform
android
io
flutter
plugin
platform
PlatformViewRegistryImpl.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
5
package
io.flutter.plugin.platform;
6
7
import
java.util.HashMap;
8
import
java.util.Map;
9
10
class
PlatformViewRegistryImpl
implements
PlatformViewRegistry
{
11
12
PlatformViewRegistryImpl
() {
13
viewFactories =
new
HashMap<>();
14
}
15
16
// Maps a platform view type id to its factory.
17
private
final
Map<String, PlatformViewFactory> viewFactories;
18
19
@Override
20
public
boolean
registerViewFactory
(String viewTypeId,
PlatformViewFactory
factory) {
21
if
(viewFactories.containsKey(viewTypeId))
return
false
;
22
viewFactories.put(viewTypeId, factory);
23
return
true
;
24
}
25
26
PlatformViewFactory
getFactory
(String viewTypeId) {
27
return
viewFactories.get(viewTypeId);
28
}
29
}
io.flutter.plugin.platform.PlatformViewFactory
Definition:
PlatformViewFactory.java:12
io.flutter.plugin.platform.PlatformViewRegistryImpl
Definition:
PlatformViewRegistryImpl.java:10
io.flutter.plugin.platform.PlatformViewRegistryImpl.getFactory
PlatformViewFactory getFactory(String viewTypeId)
Definition:
PlatformViewRegistryImpl.java:26
io.flutter.plugin.platform.PlatformViewRegistryImpl.registerViewFactory
boolean registerViewFactory(String viewTypeId, PlatformViewFactory factory)
Definition:
PlatformViewRegistryImpl.java:20
io.flutter.plugin.platform.PlatformViewRegistryImpl.PlatformViewRegistryImpl
PlatformViewRegistryImpl()
Definition:
PlatformViewRegistryImpl.java:12
io.flutter.plugin.platform.PlatformViewRegistry
Definition:
PlatformViewRegistry.java:14
Generated on Sun Jun 23 2024 21:55:10 for Flutter Engine by
1.9.4