Fix crash when removing a card in card_collection

MixedViewport didn't use the building:true flag when locking itself, so
when it caused a rebuild of its children, we assumed that nobody was
allowed to mark things dirty below the list, and things crashed when
Inherited people did in fact rebuild.

Also:
 - default offset for MixedViewport
 - don't bother rebuilding if the underlying RenderObject is going to
   rebuild anyway for some reason
 - better docs for the "items must have keys" assert
 - keep the FlipComponent stuff together in test_widgets.dart
This commit is contained in:
Hixie
2015-10-27 16:54:02 -07:00
parent af790303c2
commit a8a32a972a
5 changed files with 77 additions and 17 deletions

View File

@@ -301,7 +301,7 @@ class CardCollectionState extends State<CardCollection> {
)
: new DefaultTextStyle(
style: DefaultTextStyle.of(context).merge(cardLabelStyle).merge(_textStyle).copyWith(
fontSize: _varyFontSizes ? 5.0 + _cardModels.length.toDouble() : null
fontSize: _varyFontSizes ? _cardModels.length.toDouble() : null
),
child: new Column(<Widget>[
new Text(cardModel.label)