Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
9e56fc4e
Commit
9e56fc4e
authored
Feb 21, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2063 from abarth/starter_style
Improve the style in the starter app
parents
b7ae0be7
ec0ec75b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
create.dart
packages/flutter_tools/lib/src/commands/create.dart
+13
-11
No files found.
packages/flutter_tools/lib/src/commands/create.dart
View file @
9e56fc4e
...
...
@@ -126,7 +126,7 @@ abstract class Template {
}
class
FlutterSimpleTemplate
extends
Template
{
FlutterSimpleTemplate
()
:
super
(
'flutter-simple'
,
'A
minimal Flutter project
.'
)
{
FlutterSimpleTemplate
()
:
super
(
'flutter-simple'
,
'A
simple Flutter app
.'
)
{
files
[
'.analysis_options'
]
=
_analysis_options
;
files
[
'.gitignore'
]
=
_gitignore
;
files
[
'flutter.yaml'
]
=
_flutterYaml
;
...
...
@@ -201,6 +201,9 @@ const String _flutterYaml = r'''
name: {{projectName}}
material-design-icons:
- name: content/add
- name: navigation/arrow_back
- name: navigation/menu
- name: navigation/more_vert
'''
;
const
String
_libMain
=
r''
'
...
...
@@ -209,7 +212,7 @@ import 'package:flutter/material.dart';
void main() {
runApp(
new MaterialApp(
title:
"Flutter Demo"
,
title:
'
Flutter
Demo
'
,
routes: <String, RouteBuilder>{
'
/
': (RouteArguments args) => new FlutterDemo()
}
...
...
@@ -218,34 +221,33 @@ void main() {
}
class FlutterDemo extends StatefulComponent {
@override
State createState() => new FlutterDemoState();
State createState() => new _FlutterDemoState();
}
class
FlutterDemoState extends State
{
int counter = 0;
class
_FlutterDemoState extends State<FlutterDemo>
{
int
_
counter = 0;
void incrementCounter() {
void
_
incrementCounter() {
setState(() {
counter++;
_
counter++;
});
}
Widget build(BuildContext context) {
return new Scaffold(
toolBar: new ToolBar(
center: new Text(
"Flutter Demo"
)
center: new Text(
'
Flutter
Demo
'
)
),
body: new Material(
child: new Center(
child: new Text(
"Button tapped
$counter
times."
)
child: new Text(
'
Button
tapped
$_counter
times
.
'
)
)
),
floatingActionButton: new FloatingActionButton(
child: new Icon(
icon: '
content
/
add
'
),
onPressed: incrementCounter
onPressed:
_
incrementCounter
)
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment