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 1
1
import 'package:flutter/material.dart' ;
2
2
import 'package:flutter_html/html_parser.dart' ;
3
+ import 'package:flutter_html/shims/dart_ui.dart' as ui;
3
4
import 'package:flutter_html/src/replaced_element.dart' ;
4
5
import 'package:flutter_html/src/utils.dart' ;
5
6
import 'package:flutter_html/style.dart' ;
6
7
import 'package:webview_flutter/webview_flutter.dart' ;
7
8
import 'package:html/dom.dart' as dom;
8
9
// ignore: avoid_web_libraries_in_flutter
9
10
import 'dart:html' as html;
10
- import 'dart:ui' as ui;
11
11
12
12
/// [IframeContentElement is a [ReplacedElement] with web content.
13
13
class IframeContentElement extends ReplacedElement {
You can’t perform that action at this time.
0 commit comments