SearchToClear constructor

const SearchToClear({
  1. Key? key,
  2. required bool isEmpty,
  3. required VoidCallback onTap,
  4. Duration duration = const Duration(milliseconds: 500),
  5. Color? color,
  6. double size = 24.0,
  7. String searchButtonSemanticLabel = 'Search',
  8. String clearButtonSemanticLabel = 'Clear',
})

Creates a Widget that animates between a search and a clear icon.

Implementation

const SearchToClear({
  Key? key,
  required this.isEmpty,
  required this.onTap,
  this.duration = const Duration(milliseconds: 500),
  this.color,
  this.size = 24.0,
  this.searchButtonSemanticLabel = 'Search',
  this.clearButtonSemanticLabel = 'Clear',
}) : super(key: key);