提交 df271162 编写于 作者: E Eric Seidel

Add Cards and Fitness demos, remove sector.

The launch cards still need to be made nicer.

R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1232103006 .
上级 30cdf999
......@@ -90,27 +90,33 @@ List<SkyDemo> demos = [
)
),
new SkyDemo(
name: 'Interactive Flex',
href: '../../rendering/interactive_flex.dart',
bundle: 'interactive_flex.skyx',
description: 'Swipe to adjust the layout of the app',
name: 'Fitness',
href: '../../fitness/lib/main.dart',
bundle: 'fitness.skyx',
description: 'Collin should write a nice description',
textTheme: typography.white,
decoration: new BoxDecoration(
backgroundColor: const Color(0xFF0081C6)
)
),
new SkyDemo(
name: 'Sector',
href: '../../widgets/sector.dart',
bundle: 'sector.skyx',
description: 'Demo of alternative layouts',
textTheme: typography.black,
name: 'Cards',
href: '../../widgets/card_collection.dart',
bundle: 'cards.skyx',
description: 'Demo of interactive Cards',
textTheme: typography.white,
decoration: new BoxDecoration(
backgroundColor: colors.black,
backgroundImage: new BackgroundImage(
image: _bundle.loadImage('assets/sector_thumbnail.png'),
fit: BackgroundFit.cover
)
backgroundColor: const Color(0xFF0081C6)
)
),
new SkyDemo(
name: 'Interactive Text',
href: '../../rendering/interactive_flex.dart',
bundle: 'interactive_flex.skyx',
description: 'Swipe to reflow the app',
textTheme: typography.white,
decoration: new BoxDecoration(
backgroundColor: const Color(0xFF0081C6)
)
),
// new SkyDemo(
......@@ -178,7 +184,7 @@ class SkyHome extends App {
Widget build() {
return new Theme(
data: new ThemeData(
brightness: ThemeBrightness.dark,
brightness: ThemeBrightness.light,
primarySwatch: colors.Teal
),
child: new TaskDescription(
......
......@@ -7,6 +7,7 @@ import 'package:sky/widgets/basic.dart';
import 'package:sky/widgets/navigator.dart';
import 'package:sky/widgets/theme.dart';
import 'package:sky/widgets/widget.dart';
import 'package:sky/widgets/task_description.dart';
import 'measurement.dart';
import 'home.dart';
......@@ -20,7 +21,7 @@ class FitnessApp extends App {
void initState() {
_navigationState = new NavigationState([
new Route(
name: '/',
name: '/',
builder: (navigator, route) => new HomeFragment(navigator, _userData)
),
new Route(
......@@ -61,7 +62,10 @@ class FitnessApp extends App {
primarySwatch: colors.Indigo,
accentColor: colors.PinkAccent[200]
),
child: new Navigator(_navigationState)
child: new TaskDescription(
label: 'Fitness',
child: new Navigator(_navigationState)
)
);
}
}
......
......@@ -12,11 +12,16 @@ skyx("piano") {
main_dart = "piano.dart"
}
skyx("cards") {
main_dart = "card_collection.dart"
}
group("widgets") {
testonly = true
deps = [
":sector",
":cards",
":piano",
":sector",
]
}
......@@ -13,6 +13,8 @@ import 'package:sky/widgets/variable_height_scrollable.dart';
import 'package:sky/widgets/theme.dart';
import 'package:sky/widgets/tool_bar.dart';
import 'package:sky/widgets/widget.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/widgets/task_description.dart';
class CardCollectionApp extends App {
......@@ -71,9 +73,19 @@ class CardCollectionApp extends App {
)
);
return new Scaffold(
toolbar: new ToolBar(center: new Text('Swipe Away')),
body: cardCollection
return new Theme(
data: new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: colors.Blue,
accentColor: colors.RedAccent[200]
),
child: new TaskDescription(
label: 'Cards',
child: new Scaffold(
toolbar: new ToolBar(center: new Text('Swipe Away')),
body: cardCollection
)
)
);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册