Commit 25eaaefd authored by Adam Barth's avatar Adam Barth

Switch init command over to package:flutter

parent 9148e177
...@@ -40,11 +40,11 @@ class InitCommand extends Command { ...@@ -40,11 +40,11 @@ class InitCommand extends Command {
String message = '''All done! To run your application: String message = '''All done! To run your application:
cd ${out.path} cd ${out.path}
./packages/sky/sky_tool start ./packages/flutter/sky_tool start
Or if the Sky APK is not already on your device, run: Or if the Flutter APK is not already on your device, run:
./packages/sky/sky_tool start --install ./packages/flutter/sky_tool start --install
'''; ''';
...@@ -108,7 +108,7 @@ String _normalizeProjectName(String name) { ...@@ -108,7 +108,7 @@ String _normalizeProjectName(String name) {
return name; return name;
} }
const _gitignore = r''' const String _gitignore = r'''
.DS_Store .DS_Store
.idea .idea
.packages .packages
...@@ -118,7 +118,7 @@ packages ...@@ -118,7 +118,7 @@ packages
pubspec.lock pubspec.lock
'''; ''';
const _readme = r''' const String _readme = r'''
# {{projectName}} # {{projectName}}
{{description}} {{description}}
...@@ -129,36 +129,45 @@ For help getting started with Flutter, view our online ...@@ -129,36 +129,45 @@ For help getting started with Flutter, view our online
[documentation](http://flutter.io/). [documentation](http://flutter.io/).
'''; ''';
const _pubspec = r''' const String _pubspec = r'''
name: {{projectName}} name: {{projectName}}
description: {{description}} description: {{description}}
dependencies: dependencies:
sky: any flutter: ">=0.0.2 <0.1.0"
dev_dependencies: dev_dependencies:
sky_tools: any sky_tools: any
'''; ''';
const _libMain = r''' const String _libMain = r'''
import 'package:sky/material.dart'; import 'package:flutter/material.dart';
void main() { void main() {
runApp( runApp(
new MaterialApp( new MaterialApp(
title: "Flutter Demo", title: "Flutter Demo",
routes: <String, RouteBuilder>{ routes: {
'/': (RouteArguments args) => new HelloWorldComponent() '/': (RouteArguments args) => new FlutterDemo()
} }
) )
); );
} }
class HelloWorldComponent extends StatelessComponent { class FlutterDemo extends StatelessComponent {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Scaffold( return new Scaffold(
toolBar: new ToolBar(center: new Text("Flutter Demo")), toolBar: new ToolBar(
body: new Material(child: new Center(child: new Text("Hello world!"))), center: new Text("Flutter Demo")
),
body: new Material(
child: new Center(
child: new Text("Hello world!")
)
),
floatingActionButton: new FloatingActionButton( floatingActionButton: new FloatingActionButton(
child: new Icon(type: 'content/add', size: 24) child: new Icon(
type: 'content/add',
size: 24
)
) )
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment