Amphitheatre.consume constructor
const
Amphitheatre.consume({
- required AmphitheatreController controller,
- AmphitheatreComponentBuilder buildCloseButton = _buildCloseButton,
- AmphitheatreComponentBuilder? buildDoneButton,
- AmphitheatreComponentBuilder buildReplayButton = _buildReplayButton,
- AmphitheatreComponentBuilder buildProgressSlider = _buildProgressSlider,
- AmphitheatreComponentBuilder buildVideoControls = _buildVideoControls,
- AmphitheatreComponentBuilder buildVideoInfo = _buildVideoInfo,
- bool enableToggleControls = true,
- bool enableReplayButton = true,
- bool autoPlay = true,
- Key? key,
Equivalent to the default constructor, Amphitheatre.new, but indicates
to Amphitheatre that the controller has been 'consumed'.
This means that the Amphitheatre state will automatically initialize and dispose of the controller in accordance with its own lifecycle.
This is intended for where the controller is ephemerally linked to the
Amphitheatre lifecycle (e.g., in the case of launch).
Implementation
const Amphitheatre.consume({
required this.controller,
this.buildCloseButton = _buildCloseButton,
this.buildDoneButton,
this.buildReplayButton = _buildReplayButton,
this.buildProgressSlider = _buildProgressSlider,
this.buildVideoControls = _buildVideoControls,
this.buildVideoInfo = _buildVideoInfo,
this.enableToggleControls = true,
this.enableReplayButton = true,
this.autoPlay = true,
super.key,
}) : consumedController = true;