CNFloatingIsland constructor

const CNFloatingIsland({
  1. Key? key,
  2. required Widget collapsed,
  3. Widget? expanded,
  4. bool isExpanded = false,
  5. VoidCallback? onTap,
  6. ValueChanged<bool>? onExpandStateChanged,
  7. CNFloatingIslandPosition position = CNFloatingIslandPosition.top,
  8. double collapsedHeight = 44.0,
  9. double? collapsedWidth,
  10. double? expandedHeight,
  11. double? expandedWidth,
  12. double? cornerRadius,
  13. Color? tint,
  14. Duration animationDuration = const Duration(milliseconds: 400),
  15. double springDamping = 0.8,
  16. double springResponse = 0.4,
  17. EdgeInsets margin = const EdgeInsets.all(16),
  18. CNFloatingIslandController? controller,
})

Creates a floating island.

Implementation

const CNFloatingIsland({
  super.key,
  required this.collapsed,
  this.expanded,
  this.isExpanded = false,
  this.onTap,
  this.onExpandStateChanged,
  this.position = CNFloatingIslandPosition.top,
  this.collapsedHeight = 44.0,
  this.collapsedWidth,
  this.expandedHeight,
  this.expandedWidth,
  this.cornerRadius,
  this.tint,
  this.animationDuration = const Duration(milliseconds: 400),
  this.springDamping = 0.8,
  this.springResponse = 0.4,
  this.margin = const EdgeInsets.all(16),
  this.controller,
});