Repository: flutter
Issue: Regression: KeepAlive in SliverList throws: Incorrect use of ParentDataWidget
Labels: framework,f: scrolling,d: api docs,P2,team-framework,triaged-framework

We used to be able to manually specify KeepAlive widgets in our SliverLists like so:

```dart
new SliverList(
    delegate: new SliverChildBuilderDelegate(
        (context, index) {
            return new KeepAlive(
                keepAlive: true,
                child: new Container(
                    padding: const EdgeInsets.symmetric(vertical: 8.0),
                    child: new Text('$index'),
                ),
            );
        },
        childCount: formChildren.length,
        addAutomaticKeepAlives: false,
        addRepaintBoundaries: false,
    ),
);
```

After the upgrade to flutter v 0.11.9, this now throws the following exception:

```
I/flutter (29475): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter (29475): The following assertion was thrown during performLayout():
I/flutter (29475): Incorrect use of ParentDataWidget.
I/flutter (29475): KeepAlive widgets must be placed directly inside SliverWithKeepAliveWidget widgets.
I/flutter (29475): KeepAlive(no depth, keepAlive: true, dirty) has a SliverWithKeepAliveWidget ancestor, but there are
I/flutter (29475): other widgets between them:
I/flutter (29475): - IndexedSemantics(index: 0)
I/flutter (29475): These widgets cannot come between a KeepAlive and its SliverWithKeepAliveWidget.
I/flutter (29475): The ownership chain for the parent of the offending KeepAlive was:
I/flutter (29475):   IndexedSemantics ← SliverList ← IconTheme ← _InheritedTheme ← Theme ← _FormScope ← WillPopScope ←
I/flutter (29475):   Form-[LabeledGlobalKey<FormState>#07345] ← StreamBuilder<bool> ← _StoreStreamListener<OPState,
I/flutter (29475):   bool> ← ⋯
```
The solution is to also specify `addSemanticIndexes: false`, and manually wrap the items in an `IndexedSemantics` widget:

```dart
new SliverList(
    delegate: new SliverChildBuilderDelegate(
        (context, index) {
            return new KeepAlive(
                keepAlive: true,
                child: new IndexedSemantics(
                    index: index,
                    child: new Container(
                        padding: const EdgeInsets.symmetric(vertical: 8.0),
                        child: new Text('$index'),
                    ),
                ),
            );
        },
        childCount: formChildren.length,
        addAutomaticKeepAlives: false,
        addRepaintBoundaries: false,
        addSemanticIndexes: false,
    ),
);
```


Flutter doctor output:
```
[✓] Flutter (Channel beta, v0.11.9, on Linux, locale en_US.UTF-8)
    • Flutter version 0.11.9 at /home/vic/devel/flutter
    • Framework revision d48e6e433c (6 days ago), 2018-11-20 22:05:23 -0500
    • Engine revision 5c8147450d
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
```

I suppose this is actually the desired way of doing things now, in which case the issue might just be one of improving docs around KeepAlive: specifically to mention that `addSemanticIndexes` has to be switched to `false` and widgets need to be wrapped in their own `IndexedSemantics` widget as well [eg: https://docs.flutter.io/flutter/widgets/SliverChildListDelegate/addAutomaticKeepAlives.html and https://docs.flutter.io/flutter/widgets/KeepAlive-class.html]?

But I also notice that the documentation steers users towards using the `AutomaticKeepAliveClientMixin` - interestingly I feel like composing with `KeepAlive` is simpler than implementing the mixin (and more "Flutter-y") - specifically because it can be done in one place, in the SliverChildBuilderDelegate's builder, rather than having to implement it for each child widget.