Skip to content

Instantly share code, notes, and snippets.

@Sfshaza
Last active April 12, 2019 00:28
Show Gist options
  • Save Sfshaza/bb51e3b7df4ebbf3dfd02a4a38db2655 to your computer and use it in GitHub Desktop.
Save Sfshaza/bb51e3b7df4ebbf3dfd02a4a38db2655 to your computer and use it in GitHub Desktop.
Step 2: Flutter Getting Started Codelab
// 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),
),
),
);
}
}
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