Redesign Semantic Tree Compilation Algorithm (#12605)

* Oct 12 10:12am

* implicit_semantics_test.dart passes

* refactoring

* works in nice

* minor rename

* more doc comments

* to be explicit check better

* fix test

* ++

* ++

* semantics_9_test (BlockSemantics) and implicit_semantics_test are passing

* doc updates

* tiny refactor

* fix static errors in tests

* fix gesture detector

* ++

* ++

* geometry

* ++

* remove noGeometry

* revert test

* +

* all tests but scrolling/clipping pass

* clipping works

* scrolling halfway

* sliver tests pass

* ALL TESTS PASS

* SemanticsNode changed

* docs and tiny fixes

* card test

* more doc comments

* remove missed print

* more tests

* make test pass on Linux

* remove changes to intellij proj file

* review comments
This commit is contained in:
Michael Goderbauer
2017-10-18 16:28:24 -07:00
committed by GitHub
parent d47d268719
commit f8a2bd20e9
43 changed files with 2440 additions and 1789 deletions

View File

@@ -251,48 +251,46 @@ class RecipeCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MergeSemantics(
child: new GestureDetector(
onTap: onTap,
child: new Card(
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
new Hero(
tag: 'packages/$_kGalleryAssetsPackage/${recipe.imagePath}',
child: new Image.asset(
recipe.imagePath,
package: recipe.imagePackage,
fit: BoxFit.contain,
),
return new GestureDetector(
onTap: onTap,
child: new Card(
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
new Hero(
tag: 'packages/$_kGalleryAssetsPackage/${recipe.imagePath}',
child: new Image.asset(
recipe.imagePath,
package: recipe.imagePackage,
fit: BoxFit.contain,
),
new Expanded(
child: new Row(
children: <Widget>[
new Padding(
padding: const EdgeInsets.all(16.0),
child: new Image.asset(
recipe.ingredientsImagePath,
package: recipe.ingredientsImagePackage,
width: 48.0,
height: 48.0,
),
),
new Expanded(
child: new Row(
children: <Widget>[
new Padding(
padding: const EdgeInsets.all(16.0),
child: new Image.asset(
recipe.ingredientsImagePath,
package: recipe.ingredientsImagePackage,
width: 48.0,
height: 48.0,
),
new Expanded(
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Text(recipe.name, style: titleStyle, softWrap: false, overflow: TextOverflow.ellipsis),
new Text(recipe.author, style: authorStyle),
],
),
),
new Expanded(
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Text(recipe.name, style: titleStyle, softWrap: false, overflow: TextOverflow.ellipsis),
new Text(recipe.author, style: authorStyle),
],
),
],
),
),
],
),
],
),
),
],
),
),
);

View File

@@ -31,20 +31,18 @@ class GalleryItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MergeSemantics(
child: new ListTile(
title: new Text(title),
subtitle: new Text(subtitle),
onTap: () {
if (routeName != null) {
Timeline.instantSync('Start Transition', arguments: <String, String>{
'from': '/',
'to': routeName
});
Navigator.pushNamed(context, routeName);
}
return new ListTile(
title: new Text(title),
subtitle: new Text(subtitle),
onTap: () {
if (routeName != null) {
Timeline.instantSync('Start Transition', arguments: <String, String>{
'from': '/',
'to': routeName
});
Navigator.pushNamed(context, routeName);
}
),
}
);
}
}