diff --git a/Makefile b/Makefile index e0db347..32880a0 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ prep: flutter create flutter_test1 flutter bin + +words: + flutter pub add english_words + flutter pub get diff --git a/lib/main.dart b/lib/main.dart index 716b45c..e59b547 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,7 +1,7 @@ // Copyright 2018 The Flutter team. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - +import 'package:english_words/english_words.dart'; import 'package:flutter/material.dart'; void main() { @@ -13,16 +13,17 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { + final wordPair = WordPair.random(); return MaterialApp( title: 'Welcome to Flutter', home: Scaffold( appBar: AppBar( title: const Text('Welcome to Flutter'), ), - body: const Center( - child: Text('Hello World'), + body: Center( + child: Text(wordPair.asPascalCase), ), ), ); } -} +} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 0f3a736..f06a5b8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -43,6 +43,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.5" + english_words: + dependency: "direct main" + description: + name: english_words + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0" fake_async: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index a87a151..97fdbd5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -36,6 +36,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 + english_words: ^4.0.0 dev_dependencies: flutter_test: