Created
October 7, 2015 00:07
-
-
Save collinjackson/64d3c133bf1e88ff28ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2015 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:sky/material.dart'; | |
import 'package:sky/widgets.dart'; | |
class ReducedTestCaseApp extends StatefulComponent { | |
ReducedTestCaseAppState createState() => new ReducedTestCaseAppState(); | |
} | |
class ReducedTestCaseAppState extends State<ReducedTestCaseApp> { | |
Size _viewportSize = Size.zero; | |
Widget build(BuildContext context) { | |
return new SizeObserver( | |
callback: (newSize) => setState(() { _viewportSize = newSize; }), | |
child: new Container( | |
width: _viewportSize.width, | |
child: new Theme( | |
data: new ThemeData( | |
brightness: ThemeBrightness.light, | |
accentColor: Colors.blueAccent[200] | |
), | |
child: new TabNavigator( | |
views: [ | |
new TabNavigatorView( | |
label: const TabLabel(text: 'HIGHLIGHTS'), | |
builder: (_) => new Text('Highlights') | |
) | |
] | |
) | |
) | |
) | |
); | |
} | |
} | |
void main() { | |
runApp(new ReducedTestCaseApp()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment