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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user