getLeadingWidget method

  1. @override
Widget? getLeadingWidget(
  1. BuildContext context
)
override

An optional leading widget for the search bar.

Implementation

@override
Widget? getLeadingWidget(BuildContext context) {
  final SmoothColorsThemeExtension theme = context
      .extension<SmoothColorsThemeExtension>();

  return AspectRatio(
    aspectRatio: 1.0,
    child: Ink(
      decoration: ShapeDecoration(
        shape: const CircleBorder(),
        color: theme.primaryMedium,
      ),
      child: const icons.World.location(),
    ),
  );
}