Skip to content

platformViewRegistry.registerViewFactory func is missing in import dart.ui  #41563

@zengfr

Description

@zengfr

Upgrading-from-package:flutter_web-to-the-Flutter-SDK in flutter>=1.9
import 'package:flutter_web_ui/ui.dart' as ui change to import 'dart.ui '
ui.platformViewRegistry.registerViewFactory func is missing.

import 'package:flutter_web_ui/ui.dart' as ui;
 ui.platformViewRegistry.registerViewFactory(
        'maphtml',
            (int viewId) => IFrameElement()
          ..allowFullscreen=true
          ..height = '360'
          ..src = 'https://github.com/zengfr?'+_params
          ..style.border = 'none');

https://github.com/flutter/flutter/wiki/Upgrading-from-package:flutter_web-to-the-Flutter-SDK
Update the pubspec.yaml
Change:
dependencies:
flutter_web: any
flutter_web_ui: any
to:
dependencies:
flutter:
sdk: flutter

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: buildBuilding flutter applications with the toola: error messageError messages from the Flutter frameworkcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.found in release: 1.22Found to occur in 1.22frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions