Skip to content

Instantly share code, notes, and snippets.

@collinjackson
Created October 7, 2015 00:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save collinjackson/64d3c133bf1e88ff28ff to your computer and use it in GitHub Desktop.
Save collinjackson/64d3c133bf1e88ff28ff to your computer and use it in GitHub Desktop.
// 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