This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
for (final day in List<int>.generate(365, (n) => n)) { | |
print('day $day, week ${day ~/ 7}, 28-day period ${day ~/ 28}'); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// The names for the values computed for each [BenchmarkMetric]. | |
enum BenchmarkMetricComputation { | |
/// The name for the computed value tracking the average value of the measured | |
/// samples without outliers. | |
average, | |
/// The name for the computed value tracking the average of outlier samples. | |
outlierAverage, | |
/// The name for the computed value tracking the outlier average divided by |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed class BenchmarkMetricComputation { | |
const BenchmarkMetricComputation(this.name); | |
final String name; | |
/// The name for the computed value tracking the average value of the measured | |
/// samples without outliers. | |
static const NamedMetricComputation average = NamedMetricComputation('average'); | |
/// The name for the computed value tracking the average of outlier samples. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:ui' as ui; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override | |
Widget build(BuildContext context) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pragma('dart2js:tryInline') | |
bool get assertionsEnabled { | |
var enabled = false; | |
assert(enabled = true); | |
return enabled; | |
} | |
// Elsewhere | |
void main() { | |
if (assertionsEnabled) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@widget Counter { | |
final int initialValue; | |
@state { | |
int count = initialValue; | |
String buttonLabel = 'Increment'; | |
} | |
Widget build(context) { | |
return Column(children: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp(name: 'Dash')); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key, required this.name}); | |
final String name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp(name: 'Dash')); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key, required this.name}); | |
final String name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/web_ui/lib/src/engine/semantics/label_and_value.dart b/lib/web_ui/lib/src/engine/semantics/label_and_value.dart | |
index b1e5cbbfab..8c28be3d08 100644 | |
--- a/lib/web_ui/lib/src/engine/semantics/label_and_value.dart | |
+++ b/lib/web_ui/lib/src/engine/semantics/label_and_value.dart | |
@@ -242,12 +242,9 @@ final class SizedSpanRepresentation extends LabelRepresentationBehavior { | |
// `inline` does not support them. | |
..display = 'inline-block' | |
- // Stretch the text full width because if the text is broken up into a | |
- // multi-line paragraph the width of the paragraph can become smaller than |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/web_ui/lib/src/engine/semantics/label_and_value.dart b/lib/web_ui/lib/src/engine/semantics/label_and_value.dart | |
index 843c4dedda..f5e1bc7780 100644 | |
--- a/lib/web_ui/lib/src/engine/semantics/label_and_value.dart | |
+++ b/lib/web_ui/lib/src/engine/semantics/label_and_value.dart | |
@@ -27,7 +27,7 @@ enum LabelRepresentation { | |
/// role) JAWS on Windows. However, this role is still the most common, as it | |
/// applies to all container nodes, and many ARIA roles (e.g. checkboxes, | |
/// radios, scrollables, sliders). | |
- ariaLabel(AriaLabelRepresentation), | |
+ ariaLabel, |
NewerOlder