Analyze dartpad (#45124)

This fixes the sample code analysis to treat dartpad snippets in the same way as snippet snippets, which it wasn't until now (the snippet generator was treating them as "samples"), and some errors crept in. This PR also fixes those errors.

Also, added a --verbose option to the sample analyzer.
This commit is contained in:
Greg Spencer
2019-11-19 15:16:12 -08:00
committed by GitHub
parent 1f296ad78c
commit a3186fbaa1
4 changed files with 47 additions and 7 deletions

View File

@@ -34,6 +34,26 @@
/// ```
/// {@end-tool}
///
/// {@tool dartpad --template=stateless_widget_material}
/// Bla blabla blabla some [Text] when the `_blabla` blabla blabla is true, and
/// blabla it when it is blabla:
///
/// ```dart preamble
/// bool _visible = true;
/// final GlobalKey globalKey = GlobalKey();
/// ```
///
/// ```dart
/// Widget build(BuildContext context) {
/// return Opacity(
/// key: globalKey,
/// opacity: _visible ? 1.0 : 0.0,
/// child: const Text('Poor wandering ones!'),
/// );
/// }
/// ```
/// {@end-tool}
///
/// {@tool sample}
/// Bla blabla blabla some [Text] when the `_blabla` blabla blabla is true, and
/// blabla finale blabla: