Allow flutter web to be compiled with flutter (#32360)
This commit is contained in:
16
examples/flutter_gallery/lib/main_web.dart
Normal file
16
examples/flutter_gallery/lib/main_web.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
// Copyright 2019 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Thanks for checking out Flutter!
|
||||
// Like what you see? Tweet us @FlutterDev
|
||||
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'gallery/app.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
await ui.webOnlyInitializePlatform(); // ignore: undefined_function
|
||||
runApp(const GalleryApp());
|
||||
}
|
||||
12
examples/flutter_gallery/web/index.html
Normal file
12
examples/flutter_gallery/web/index.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!-- Copyright 2019 The Chromium Authors. All rights reserved.
|
||||
Use of this source code is governed by a BSD-style license that can be
|
||||
found in the LICENSE file. -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Flutter Gallery</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="main.dart.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user