mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Switch init command over to package:flutter
This commit is contained in:
parent
9148e1779f
commit
25eaaefd26
@ -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) {
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
const _gitignore = r'''
|
const String _gitignore = r'''
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.idea
|
.idea
|
||||||
.packages
|
.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
|
|||||||
[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
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user