Skip to content

Commit 0151359

Browse files
authored
Fix some errors in snippets (flutter#87528)
1 parent cf0be0a commit 0151359

File tree

8 files changed

+18
-20
lines changed

8 files changed

+18
-20
lines changed

.cirrus.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,15 @@ task:
6767
- date
6868
- which flutter
6969
matrix:
70-
# TODO(flutter): https://github.com/flutter/flutter/issues/87517 analyze linux is only failing on Cirrus due to an unknown snippets issue
71-
# - name: analyze-linux # linux-only
72-
# only_if: "$CIRRUS_PR != ''"
73-
# environment:
74-
# # Empirically, the analyze-linux shard runs surprisingly fast (under 15 minutes) with just 1
75-
# # CPU. We noticed OOM failures with 6GB 4/2020, so we increased the memory.
76-
# CPU: 1
77-
# MEMORY: 8G
78-
# script:
79-
# - dart --enable-asserts ./dev/bots/analyze.dart
70+
- name: analyze-linux # linux-only
71+
only_if: "$CIRRUS_PR != ''"
72+
environment:
73+
# Empirically, the analyze-linux shard runs surprisingly fast (under 15 minutes) with just 1
74+
# CPU. We noticed OOM failures with 6GB 4/2020, so we increased the memory.
75+
CPU: 1
76+
MEMORY: 8G
77+
script:
78+
- dart --enable-asserts ./dev/bots/analyze.dart
8079

8180
- name: framework_tests-widgets-linux
8281
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter/**', 'packages/flutter_test/**', 'packages/flutter_tools/lib/src/test/**', 'bin/**') && $CIRRUS_PR != ''"

dev/bots/analyze.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Future<void> run(List<String> arguments) async {
106106
// Analyze all the sample code in the repo
107107
print('$clock Sample code...');
108108
await runCommand(dart,
109-
<String>[path.join(flutterRoot, 'dev', 'bots', 'analyze_sample_code.dart')],
109+
<String>[path.join(flutterRoot, 'dev', 'bots', 'analyze_sample_code.dart'), '--verbose'],
110110
workingDirectory: flutterRoot,
111111
);
112112

packages/flutter/lib/src/cupertino/context_menu.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class CupertinoContextMenu extends StatefulWidget {
212212
/// onPressed: () {},
213213
/// ),
214214
/// ],
215-
/// ),
215+
/// )
216216
/// ```
217217
///
218218
/// {@end-tool}

packages/flutter/lib/src/material/list_tile.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ enum ListTileControlAffinity {
429429
/// ),
430430
/// title: const Text('title'),
431431
/// dense: false,
432-
/// ),
432+
/// )
433433
/// ```
434434
/// {@end-tool}
435435
///

packages/flutter/lib/src/material/progress_indicator_theme.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,15 @@ class ProgressIndicatorThemeData with Diagnosticable {
138138
/// {@tool snippet}
139139
///
140140
/// Here is an example of a progress indicator theme that applies a red indicator
141-
/// color with a slightly transparent red for the background track color.
141+
/// color.
142142
///
143143
/// ```dart
144-
/// ProgressIndicatorTheme(
144+
/// const ProgressIndicatorTheme(
145145
/// data: ProgressIndicatorThemeData(
146146
/// color: Colors.red,
147-
/// backgroundColor: Colors.red.withOpacity(0.25),
148147
/// ),
149148
/// child: LinearProgressIndicator()
150-
/// ),
149+
/// )
151150
/// ```
152151
/// {@end-tool}
153152
class ProgressIndicatorTheme extends InheritedTheme {

packages/flutter/lib/src/material/text_selection_theme.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class TextSelectionThemeData with Diagnosticable {
128128
/// selectionHandleColor: Colors.lightBlue,
129129
/// ),
130130
/// child: TextField(),
131-
/// ),
131+
/// )
132132
/// ```
133133
/// {@end-tool}
134134
class TextSelectionTheme extends InheritedTheme {

packages/flutter/lib/src/material/tooltip_theme.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ class TooltipThemeData with Diagnosticable {
239239
/// onPressed: () {},
240240
/// ),
241241
/// ),
242-
/// ),
242+
/// )
243243
/// ```
244244
/// {@end-tool}
245245
class TooltipTheme extends InheritedTheme {

packages/flutter/lib/src/painting/strut_style.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ import 'text_style.dart';
282282
/// fontSize: 14,
283283
/// forceStrutHeight: true,
284284
/// ),
285-
/// ),
285+
/// )
286286
/// ```
287287
/// {@end-tool}
288288
///

0 commit comments

Comments
 (0)