Last active
April 12, 2019 00:28
-
-
Save Sfshaza/bb51e3b7df4ebbf3dfd02a4a38db2655 to your computer and use it in GitHub Desktop.
Step 2: Flutter Getting Started Codelab
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
// Add the English words package and generate a word pairing each | |
// time the app is hot reloaded. | |
import 'package:flutter/material.dart'; | |
import 'package:english_words/english_words.dart'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
final WordPair wordPair = new WordPair.random(); | |
return new MaterialApp( | |
title: 'Welcome to Flutter', | |
home: new Scaffold( | |
appBar: new AppBar( | |
title: const Text('Welcome to Flutter'), | |
), | |
body: new Center( | |
child: new Text(wordPair.asPascalCase), | |
), | |
), | |
); | |
} | |
} |
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
name: step2_add_package | |
description: A new Flutter application. | |
dependencies: | |
flutter: | |
sdk: flutter | |
cupertino_icons: ^0.1.0 | |
english_words: ^3.1.0 | |
dev_dependencies: | |
flutter_test: | |
sdk: flutter | |
flutter: | |
uses-material-design: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment