import 'package:flutter/material.dart'; import 'package:supplier_new/common/settings.dart'; class SearchPlanAppBar extends StatelessWidget implements PreferredSizeWidget { final TextEditingController controller; final VoidCallback onBack; final VoidCallback onHelp; const SearchPlanAppBar({ super.key, required this.controller, required this.onBack, required this.onHelp, }); @override Widget build(BuildContext context) { return AppBar( backgroundColor: Colors.white, scrolledUnderElevation: 0, elevation: 0, leading: GestureDetector( onTap: () { Navigator.pop(context); }, child: Padding( padding: const EdgeInsets.fromLTRB( 8, 8, 8, 8), // Add padding if needed child: Image.asset( 'images/backbutton_appbar.png', height: 24, width: 24,// Replace with your image path fit: BoxFit.contain, // Adjust the fit ), ), ), titleSpacing: 0, title: Container( height: 40, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(22), border: Border.all(color: Color(0XFF939495)), ), child: TextField( controller: controller, decoration: InputDecoration( hintText: "Search Plan", hintStyle: fontTextStyle(16, Color(0XFF646566), FontWeight.w400), prefixIcon: SizedBox( height: 20, width: 20, child: Padding( padding: const EdgeInsets.all(8.0), // adjust spacing child: Image.asset( 'images/search.png', fit: BoxFit.contain, ), ), ), border: InputBorder.none, contentPadding: const EdgeInsets.symmetric(vertical: 0), ), style: fontTextStyle(16,Color(0XFF2A2A2A),FontWeight.w400), ), ), actions: [ Padding(padding: EdgeInsets.all(8), child: GestureDetector( onTap: () { }, child: Padding( padding: const EdgeInsets.fromLTRB( 8, 8, 8, 8), // Add padding if needed child: Image.asset( 'images/help_appbar.png', height: 24, width: 24,// Replace with your image path fit: BoxFit.contain, // Adjust the fit ), ), ),) ], ); } @override Size get preferredSize => const Size.fromHeight(kToolbarHeight); }