merge static method
Widget
merge({
- Key? key,
- Duration? duration,
- Duration? reverseDuration,
- Curve? switchInCurve,
- Curve? switchOutCurve,
- AnimatedSwitcherTransitionBuilder? transitionBuilder,
- AnimatedSwitcherLayoutBuilder? layoutBuilder,
- bool? maintainKey,
- DrivenSwitcherThemeData? data,
- required Widget child,
Creates an DrivenSwitcherTheme that controls the style of descendant widgets, and merges in the current DrivenSwitcherTheme, if any.
The style
and child
arguments must not be null.
Implementation
static Widget merge({
Key? key,
Duration? duration,
Duration? reverseDuration,
Curve? switchInCurve,
Curve? switchOutCurve,
AnimatedSwitcherTransitionBuilder? transitionBuilder,
AnimatedSwitcherLayoutBuilder? layoutBuilder,
bool? maintainKey,
DrivenSwitcherThemeData? data,
required Widget child,
}) {
return Builder(
builder: (BuildContext context) {
final parent = DrivenSwitcherTheme.of(context);
return DrivenSwitcherTheme(
key: key,
data: parent.merge(data).copyWith(
duration: duration,
reverseDuration: reverseDuration,
switchInCurve: switchInCurve,
switchOutCurve: switchOutCurve,
transitionBuilder: transitionBuilder,
layoutBuilder: layoutBuilder,
maintainKey: maintainKey,
),
child: child,
);
},
);
}