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, |
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..74ccc08d2a 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 | |
@@ -16,7 +16,7 @@ import 'semantics.dart'; | |
/// respect the `aria-label` without a [DomText] node. Crawlers typically do not | |
/// need this information, as they primarily scan visible text, which is | |
/// communicated in semantics as leaf text and heading nodes. | |
-enum LabelRepresentation { | |
+sealed class LabelRepresentation { |
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; | |
void main() { | |
// Create a paragraph | |
var paragraphStyle = ui.ParagraphStyle( | |
fontFamily: 'Roboto', | |
textDirection: ui.TextDirection.ltr, | |
maxLines: 10, | |
); | |
var paragraphBuilder = ui.ParagraphBuilder(paragraphStyle); |
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; | |
Future<void> main() async { | |
var dispatcher = ui.PlatformDispatcher.instance; | |
dispatcher.onDrawFrame = () { | |
var sb = ui.SceneBuilder(); | |
var scene = sb.build(); | |
dispatcher.implicitView!.render(scene); | |
}; |
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:async'; | |
import 'dart:ui' as ui; | |
Future<void> main() async { | |
// This completer is only used to make the test wait until the frame is done. | |
var frameCompleter = Completer<void>(); | |
// The concept of "dispatcher" is likely irrelevant to the WebText proposal. | |
// It's just part of Flutter's structure of the rendering API. | |
var dispatcher = ui.PlatformDispatcher.instance; |
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:async'; | |
import 'dart:ui' as ui; | |
Future<void> main() async { | |
// This completer is only used to make the test wait until the frame is done. | |
var frameCompleter = Completer<void>(); | |
// The concept of "dispatcher" is likely irrelevant to the WebText proposal. | |
// It's just part of Flutter's structure of the rendering API. | |
var dispatcher = ui.PlatformDispatcher.instance; |
NewerOlder