GlassSlideToConfirm constructor

const GlassSlideToConfirm({
  1. Key? key,
  2. required VoidCallback? onConfirmed,
  3. String label = 'Slide to confirm',
  4. String? confirmedLabel,
  5. Duration? resetAfter,
  6. double threshold = 0.9,
  7. double height = 56,
  8. Color? activeColor,
  9. bool shimmer = true,
  10. String? semanticLabel,
  11. FocusNode? focusNode,
  12. bool autofocus = false,
})

Creates a slide to confirm; threshold must be above 0 and at most 1, and height at least 32.

Implementation

const GlassSlideToConfirm({
  super.key,
  required this.onConfirmed,
  this.label = 'Slide to confirm',
  this.confirmedLabel,
  this.resetAfter,
  this.threshold = 0.9,
  this.height = 56,
  this.activeColor,
  this.shimmer = true,
  this.semanticLabel,
  this.focusNode,
  this.autofocus = false,
}) : assert(threshold > 0 && threshold <= 1),
     assert(height >= 32);