File tree Expand file tree Collapse file tree 4 files changed +35
-1
lines changed
Expand file tree Collapse file tree 4 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1+ // Copyright 2019 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+ /// This file shims dart:ui in web-only scenarios, getting rid of the need to
6+ /// suppress analyzer warnings.
7+
8+ // TODO: flutter/flutter#55000 Remove this file once web-only dart:ui APIs
9+ // are exposed from a dedicated place.
10+ export 'dart_ui_fake.dart' if (dart.library.html) 'dart_ui_real.dart' ;
Original file line number Diff line number Diff line change 1+ // Copyright 2019 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+ // Fake interface for the logic that this package needs from (web-only) dart:ui.
6+ // This is conditionally exported so the analyzer sees these methods as available.
7+
8+ /// Shim for web_ui engine.PlatformViewRegistry
9+ /// https://github.com/flutter/engine/blob/master/lib/web_ui/lib/ui.dart#L62
10+ // ignore: camel_case_types
11+ class platformViewRegistry {
12+ /// Shim for registerViewFactory
13+ /// https://github.com/flutter/engine/blob/master/lib/web_ui/lib/ui.dart#L72
14+ static void registerViewFactory (
15+ String viewTypeId, dynamic Function (int viewId) viewFactory) {}
16+ }
17+
18+ /// Signature of callbacks that have no arguments and return no data.
19+ typedef VoidCallback = void Function ();
Original file line number Diff line number Diff line change 1+ // Copyright 2019 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+ export 'dart:ui' ;
Original file line number Diff line number Diff line change 11import 'package:flutter/material.dart' ;
22import 'package:flutter_html/html_parser.dart' ;
3+ import 'package:flutter_html/shims/dart_ui.dart' as ui;
34import 'package:flutter_html/src/replaced_element.dart' ;
45import 'package:flutter_html/src/utils.dart' ;
56import 'package:flutter_html/style.dart' ;
67import 'package:webview_flutter/webview_flutter.dart' ;
78import 'package:html/dom.dart' as dom;
89// ignore: avoid_web_libraries_in_flutter
910import 'dart:html' as html;
10- import 'dart:ui' as ui;
1111
1212/// [IframeContentElement is a [ReplacedElement] with web content.
1313class IframeContentElement extends ReplacedElement {
You can’t perform that action at this time.
0 commit comments