flutter demo1 step 2
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
cd2e5caed9
commit
2c2ef644a7
4
Makefile
4
Makefile
|
@ -1,3 +1,7 @@
|
|||
prep:
|
||||
flutter create flutter_test1
|
||||
flutter bin
|
||||
|
||||
words:
|
||||
flutter pub add english_words
|
||||
flutter pub get
|
||||
|
|
|
@ -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),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue