MaterialHeader constructor

MaterialHeader({
  1. Key? key,
  2. double displacement = 40.0,
  3. Animation<Color?>? valueColor,
  4. Color? backgroundColor,
  5. dynamic completeDuration = const Duration(seconds: 1),
  6. bool enableHapticFeedback = false,
})

Implementation

MaterialHeader({
  this.key,
  this.displacement = 40.0,
  this.valueColor,
  this.backgroundColor,
  completeDuration = const Duration(seconds: 1),
  bool enableHapticFeedback = false,
}) : super(
        float: true,
        extent: 70.0,
        triggerDistance: 70.0,
        completeDuration: completeDuration == null
            ? const Duration(
                milliseconds: 300,
              )
            : completeDuration +
                const Duration(
                  milliseconds: 300,
                ),
        enableInfiniteRefresh: false,
        enableHapticFeedback: enableHapticFeedback,
      );