Unverified Commit 4e7dbefd authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Explicitly call out documentation links in "flutter create" (#114181)

The recent survey suggests that some people are not finding documentation after they get started with Flutter, so let's just give them links right away. It might not help everyone but there's not really any downside so...
parent ad72a452
......@@ -434,7 +434,7 @@ class CreateCommand extends CreateBase {
globals.printStatus('Wrote $generatedFileCount files.');
globals.printStatus('\nAll done!');
final String application =
'${emptyArgument ? 'empty' : ''}${sampleCode != null ? 'sample' : ''} application';
'${emptyArgument ? 'empty ' : ''}${sampleCode != null ? 'sample ' : ''}application';
if (generatePackage) {
final String relativeMainPath = globals.fs.path.normalize(globals.fs.path.join(
relativeDirPath,
......@@ -476,6 +476,10 @@ class CreateCommand extends CreateBase {
// Let them know a summary of the state of their tooling.
globals.printStatus('''
You can find general documentation for Flutter at: https://docs.flutter.dev/
Detailed API documentation is available at: https://api.flutter.dev/
If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev
In order to run your $application, type:
\$ cd $relativeAppPath
......
......@@ -164,17 +164,23 @@ void main() {
'lib/main.dart',
],
);
expect(logger.statusText, contains('In order to run your application, type:'));
// check that we're telling them about documentation
expect(logger.statusText, contains('https://docs.flutter.dev/'));
expect(logger.statusText, contains('https://api.flutter.dev/'));
// check that the tests run clean
return _runFlutterTest(projectDir);
}, overrides: <Type, Generator>{
Pub: () => Pub(
fileSystem: globals.fs,
logger: globals.logger,
logger: logger,
processManager: globals.processManager,
usage: globals.flutterUsage,
botDetector: globals.botDetector,
platform: globals.platform,
stdio: mockStdio,
),
Logger: () => logger,
});
testUsingContext('can create a skeleton (list/detail) app', () async {
......@@ -597,7 +603,7 @@ void main() {
platform: globals.platform,
stdio: mockStdio,
),
Logger: ()=>logger,
Logger: () => logger,
});
testUsingContext('plugin example app depends on plugin', () async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment