anchor.diff:    void didChangeDependencies() {
       super.didChangeDependencies();
   
  -    _memoryController = Provider.of<MemoryController>(context);
  -
  -    colorScheme = Theme.of(context).colorScheme;
  +    final newMemoryController = Provider.of<MemoryController>(context);
  +    if (_initialized && _memoryController == newMemoryController) return;
  +    _memoryController = newMemoryController;
  +    _initialized = true;
   
       cancelListeners();
   
       setupTraces();
       _chartController.setupData();
   
  -    addAutoDisposeListener(_memoryTimeline.sampleAddedNotifier, () {
  -      _processHeapSample(_memoryTimeline.sampleAddedNotifier.value);
  -    });
  +    if (_memoryTimeline.sampleAddedNotifier.value != null) {
  +      addAutoDisposeListener(_memoryTimeline.sampleAddedNotifier, () {
  +        _processHeapSample(_memoryTimeline.sampleAddedNotifier.value!);
  +      });
  +    }
     }
   
     @override
     Widget build(BuildContext context) {
  -    if (_chartController != null) {
  -      if (_chartController.timestamps.isNotEmpty) {
  -        return Container(
  -          child: Chart(_chartController),
  -          height: defaultChartHeight,
  -        );
  -      }
  +    if (_chartController.timestamps.isNotEmpty) {
  +      return Container(
  +        child: Chart(_chartController),
  +        height: defaultChartHeight,
  +      );
       }
   
       return const SizedBox(width: denseSpacing);
  
positive.code: import 'memory_timeline.dart';
  
  class AndroidChartController extends ChartController {
    AndroidChartController(this._memoryController, {List<int> sharedLabels})
        : super(
            displayTopLine: false,
            name: 'Android',
  
negative.code: }
  
  class MemoryAndroidChart extends StatefulWidget {
    const MemoryAndroidChart(this.chartController, {Key? key}) : super(key: key);
  
    final AndroidChartController chartController;
  
  