Juxtapose constructor

Juxtapose({
  1. Key? key,
  2. required Widget backgroundWidget,
  3. required Widget foregroundWidget,
  4. Color dividerColor = Colors.white,
  5. Color thumbColor = Colors.white,
  6. double dividerThickness = 3,
  7. Size thumbSize = const Size(12, 100),
  8. Axis direction = Axis.horizontal,
  9. double? height,
  10. double? width,
  11. BorderRadius? thumbBorderRadius,
  12. bool showArrows = false,
  13. Color backgroundColor = Colors.transparent,
})

Creates a Juxtapose widget.

This widget simply is used to compare two stacked frames/widgets by dragging or sliding the thumb based on the set direction.

direction can be Axis.horizontal or Axis.vertical.

Default direction is Axis.horizontal.

Implementation

Juxtapose({
  Key? key,
  required this.backgroundWidget,
  required this.foregroundWidget,
  // this.fit = StackFit.expand,
  this.dividerColor = Colors.white,
  this.thumbColor = Colors.white,
  this.dividerThickness = 3,
  this.thumbSize = const Size(12, 100),
  this.direction = Axis.horizontal,
  this.height,
  this.width,
  this.thumbBorderRadius,
  this.showArrows = false,
  this.backgroundColor = Colors.transparent,
})  : assert(thumbSize.width >= 12 || thumbSize.height >= 12),
      super(key: key);