1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-10 14:58:34 +00:00

add web_dashboard API (#333)

* add web_dashboard sample

* add docs

* address code review comments

* restructure web_dashboard

* set up provider and mock service

* add copyright headers, use relative imports

* add API class, add tests

* fmt

* rename services -> API, remove data library

* use new API in app

* add stream to items api

* convert from StreamBuilder to StreamProvider

* add subscription to Entry API

* rename API classes

* address comments

* Update README.md

* update README

* remove routing_demo
This commit is contained in:
John Ryan
2020-03-02 16:04:10 -08:00
committed by GitHub
parent 738b0d9958
commit edf219354e
73 changed files with 2681 additions and 13 deletions

View File

@@ -0,0 +1,25 @@
// Copyright 2020, the Flutter project authors. Please see the AUTHORS file
// for details. 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/material.dart';
import 'package:provider/provider.dart';
import 'pages/home.dart';
import 'api/api.dart';
import 'api/mock.dart';
/// An app that shows a responsive dashboard.
class DashboardApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MultiProvider(
providers: [
Provider<DashboardApi>(create: (_) => MockDashboardApi()),
],
child: MaterialApp(
home: HomePage(),
),
);
}
}