dart-decimate 0.0.22 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +1 -1
- package/Cargo.toml +1 -1
- package/package.json +1 -1
- package/src/widgets/unrendered.rs +22 -0
package/Cargo.lock
CHANGED
package/Cargo.toml
CHANGED
package/package.json
CHANGED
|
@@ -541,6 +541,28 @@ void main(BuildContext context) {
|
|
|
541
541
|
.find_map(|child| first_named_node(child, kind))
|
|
542
542
|
}
|
|
543
543
|
|
|
544
|
+
#[test]
|
|
545
|
+
fn object_constructor_names_include_named_argument_arrow_closure_builders()
|
|
546
|
+
-> Result<(), Box<dyn std::error::Error>> {
|
|
547
|
+
let source = r"
|
|
548
|
+
class HomePage extends StatelessWidget {
|
|
549
|
+
const HomePage({super.key});
|
|
550
|
+
|
|
551
|
+
void _show(BuildContext context) {
|
|
552
|
+
showModalBottomSheet<void>(
|
|
553
|
+
context: context,
|
|
554
|
+
builder: (context) => ClosureSheet(label: 'x'),
|
|
555
|
+
);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
";
|
|
559
|
+
let parsed = parse_tree(Path::new("lib/main.dart"), source)?;
|
|
560
|
+
let names = object_constructor_names(parsed.tree().root_node(), parsed.source());
|
|
561
|
+
|
|
562
|
+
assert!(names.iter().any(|name| name == "ClosureSheet"), "{names:?}");
|
|
563
|
+
Ok(())
|
|
564
|
+
}
|
|
565
|
+
|
|
544
566
|
#[test]
|
|
545
567
|
fn object_constructor_names_include_material_page_route_builders()
|
|
546
568
|
-> Result<(), Box<dyn std::error::Error>> {
|