- In pubspec.ymal I added english_words and the version to my dependencies list.
- While viewing the pubspec in Android Studio's editor view, I clicked Packages get which I believed pulled the package into my project.
- Then in main.dart I imported the package
- Lastly, I used the english_word to generate text.
Please help me review and see if there's something I didn't do right.
import 'package:english_words/english_words.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final wordPair = WordPair.random();
return MaterialApp(
title: 'Welcome to Flutter',
home: Scaffold(
appBar: AppBar(
title: Text('Welcome to Flutter'),
),
body: Center(
child: Text(wordPair.asPascalCase),
),
),
);
}
}