Allow flutter web to be compiled with flutter (#32360)

This commit is contained in:
Jonah Williams
2019-05-09 08:57:26 -07:00
committed by GitHub
parent e8c5c98132
commit 4d3b51e284
4 changed files with 54 additions and 9 deletions

View 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());
}

View 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>