CNFloatingIsland constructor
const
CNFloatingIsland({
- Key? key,
- required Widget collapsed,
- Widget? expanded,
- bool isExpanded = false,
- VoidCallback? onTap,
- ValueChanged<
bool> ? onExpandStateChanged, - CNFloatingIslandPosition position = CNFloatingIslandPosition.top,
- double collapsedHeight = 44.0,
- double? collapsedWidth,
- double? expandedHeight,
- double? expandedWidth,
- double? cornerRadius,
- Color? tint,
- Duration animationDuration = const Duration(milliseconds: 400),
- double springDamping = 0.8,
- double springResponse = 0.4,
- EdgeInsets margin = const EdgeInsets.all(16),
- 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,
});