1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

Add web_dashboard and form_app to sample index (#506)

* add web_dashboard and form_app to web/ via symlinks

* update samples.yaml, add images

* fix web/readme.md instructions

* remove dependency on package:resource
This commit is contained in:
John Ryan
2020-07-29 11:19:16 -07:00
committed by GitHub
parent 6d909874db
commit 34757d8aac
13 changed files with 54 additions and 6 deletions

View File

@@ -3,8 +3,7 @@
// found in the LICENSE file
import 'dart:convert';
import 'package:resource/resource.dart';
import 'dart:io';
import 'src/data.dart';
import 'package:checked_yaml/checked_yaml.dart';
@@ -12,8 +11,8 @@ import 'package:checked_yaml/checked_yaml.dart';
export 'src/data.dart';
Future<List<Sample>> getSamples() async {
var yamlFile = Resource('package:samples_index/src/samples.yaml');
var cookbookFile = Resource('package:samples_index/src/cookbook.json');
var yamlFile = File('lib/src/samples.yaml');
var cookbookFile = File('lib/src/cookbook.json');
var contents = await yamlFile.readAsString();
var cookbookContents = await cookbookFile.readAsString();
var index = checkedYamlDecode(contents, (m) => Index.fromJson(m),