HeroController constructor

HeroController({
  1. CreateRectTween? createRectTween,
})

Creates a hero controller with the given RectTween constructor if any.

The createRectTween argument is optional. If null, the controller uses a linear Tween<Rect>.

Implementation

HeroController({ this.createRectTween }) {
  // TODO(polina-c): stop duplicating code across disposables
  // https://github.com/flutter/flutter/issues/137435
  if (kFlutterMemoryAllocationsEnabled) {
    FlutterMemoryAllocations.instance.dispatchObjectCreated(
      library: 'package:flutter/widgets.dart',
      className: '$HeroController',
      object: this,
    );
  }
}