question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for viewing and running Flutter documentation code samples

See original GitHub issue

A meta-issue to track sample creation (e.g., flutter create -sample) and execution from the IDE.

Flutter

IDEA / IntelliJ

  • support for creating sample content in the New Project Wizard (IDEA) #2974
  • support for creating sample content in the New Project Wizard (Android Studio) #2975
  • banner notifications for source files containing runnable samples (IDEA) #2976
    • (in Android Studio) #3143

VSCode

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
InMatrixcommented, Dec 18, 2018

(The question remains though if anyone would find it since I’m not sure how well used that view is…)

My impression is Quick Documentation a little bit hard to discover by users new to IntelliJ. In contrast, VS Code shows Quick Documentation anytime the mouse cursor is on a class name or method name.

I suspect we need to provide two entry points for running sample code in API docs: one from Flutter’s API references on docs.flutter.io, and another one from within the IDE when the user checks documentation in the source code. For the latter, maybe the IDE can show a banner notification when the source file contains a runnable sample?

1reaction
DanTupcommented, Dec 18, 2018

I tested out the VS Code protocol handler, and the rest of it works great. For ex. if https://github.com/Dart-Code/Dart-Code/pull/1358 is landed, we can link to vscode://Dart-Code.dart-code/flutter/sample/material.AppBar.actions (both on the web and hopefully in hovers if the bug above is fixed) and it’ll create the sample project (similar to how Flutter: New Project works).

If we get the ability to enumerate the full list, I can also add in a command that lets you select one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flutter documentation | Flutter
Get started with Flutter. Widgets, examples, updates, and API docs to help you write your first Flutter app.
Read more >
Flutter Dart Documentation - Medium
In this article, we are going to see how to do the flutter code documentation effectively and in a stranded manner. Which improves...
Read more >
Effective Dart: Documentation - Dart programming language
For historical reasons, dart doc supports two syntaxes of doc comments: /// (“C# ... A couple of complete code samples that walk through...
Read more >
Dart programming language | Dart
Make changes to your source code iteratively, using hot reload to instantly see the effect in the running app · Write code using...
Read more >
Meet Android Studio | Android Developers
Code templates and GitHub integration to help you build common app features and import sample code; Extensive testing tools and frameworks; Lint tools...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found