You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.6 KiB

2 weeks ago
import 'package:flutter/material.dart';
import 'package:supplier_new/common/settings.dart';
2 weeks ago
class SearchOrderAppBar extends StatelessWidget implements PreferredSizeWidget {
final TextEditingController controller;
final VoidCallback onBack;
final VoidCallback onHelp;
const SearchOrderAppBar({
super.key,
required this.controller,
required this.onBack,
required this.onHelp,
});
@override
Widget build(BuildContext context) {
return AppBar(
backgroundColor: Colors.white,
scrolledUnderElevation: 0,
2 weeks ago
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
),
),
2 weeks ago
),
titleSpacing: 0,
title: Container(
height: 40,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(22),
border: Border.all(color: Color(0XFF939495)),
2 weeks ago
),
child: TextField(
controller: controller,
decoration: InputDecoration(
2 weeks ago
hintText: "Search order",
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,
),
),
),
2 weeks ago
border: InputBorder.none,
contentPadding: const EdgeInsets.symmetric(vertical: 0),
2 weeks ago
),
style: fontTextStyle(16,Color(0XFF2A2A2A),FontWeight.w400),
2 weeks ago
),
),
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
),
),
),)
2 weeks ago
],
);
}
@override
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
}