1
0
mirror of https://github.com/flutter/samples.git synced 2026-03-29 07:41:41 +00:00

Add flutter_web samples (#75)

This commit is contained in:
Kevin Moore
2019-05-07 13:32:08 -07:00
committed by Andrew Brogdon
parent 42f2dce01b
commit 3fe927cb29
697 changed files with 241026 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,58 @@
[
{
"family": "MaterialIcons",
"fonts": [
{
"asset": "https://fonts.gstatic.com/s/materialicons/v42/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2"
}
]
},
{
"family": "GoogleSans",
"fonts": [
{
"asset": "GoogleSans-Regular.ttf"
}
]
},
{
"family": "GalleryIcons",
"fonts": [
{
"asset": "GalleryIcons.ttf"
}
]
},
{
"family": "AbrilFatface",
"fonts": [
{
"asset": "AbrilFatface-Regular.ttf"
}
]
},
{
"family": "LibreFranklin",
"fonts": [
{
"asset": "LibreFranklin-Regular.ttf"
}
]
},
{
"family": "Merriweather",
"fonts": [
{
"asset": "Merriweather-Regular.ttf"
}
]
},
{
"family": "Raleway",
"fonts": [
{
"asset": "Raleway-Regular.ttf"
}
]
}
]

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,34 @@
Note: a reference to `MaterialIcons` is intentionally omitted because the
corresponding font is not included in this source.
If you add `MaterialIcons-Extended.ttf` to this directory, you can update
`FontManifest.json` as follows:
```json
[
{
"family": "MaterialIcons",
"fonts": [
{
"asset": "MaterialIcons-Extended.ttf"
}
]
},
{
"family": "GoogleSans",
"fonts": [
{
"asset": "GoogleSans-Regular.ttf"
}
]
},
{
"family": "GalleryIcons",
"fonts": [
{
"asset": "GalleryIcons.ttf"
}
]
}
]
```

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link href="https://fonts.gstatic.com/s/materialicons/v42/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2" rel="preload" as="font" crossorigin>
<link href="assets/GoogleSans-Regular.ttf" rel="preload" as="font" crossorigin>
<link href="assets/GalleryIcons.ttf" rel="preload" as="font" crossorigin>
<link href="assets/AbrilFatface-Regular.ttf" rel="preload" as="font" crossorigin>
<link href="assets/LibreFranklin-Regular.ttf" rel="preload" as="font" crossorigin>
<link href="assets/Merriweather-Regular.ttf" rel="preload" as="font" crossorigin>
<link href="assets/Raleway-Regular.ttf" rel="preload" as="font" crossorigin>
<script defer src="main.dart.js" type="application/javascript"></script>
</head>
<body>
</body>
</html>

View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Gallery sample - Flutter for web</title>
<style>
html, body {
height: 100%;
margin: 0;
background: #eee;
}
div {
position: relative;
margin: 0 auto;
max-width: 600px;
height: 100%;
}
iframe {
position: absolute;
top: 0;
left: 0;
border: 0;
display: block;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div>
<iframe src="frame.html"></iframe>
</div>
</body>
</html>

10
web/gallery/web/main.dart Normal file
View File

@@ -0,0 +1,10 @@
// 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.
import 'package:flutter_web_ui/ui.dart' as ui;
import 'package:flutter_web.examples.gallery/main.dart' as app;
main() async {
await ui.webOnlyInitializePlatform();
app.main();
}

BIN
web/gallery/web/preview.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB