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.
56 lines
1.5 KiB
56 lines
1.5 KiB
1 week ago
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
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,
|
||
|
elevation: 0,
|
||
|
leading: IconButton(
|
||
|
icon: const Icon(Icons.arrow_back, color: Colors.black),
|
||
|
onPressed: onBack,
|
||
|
),
|
||
|
titleSpacing: 0,
|
||
|
title: Container(
|
||
|
height: 40,
|
||
|
decoration: BoxDecoration(
|
||
|
color: Colors.white,
|
||
|
borderRadius: BorderRadius.circular(24),
|
||
|
border: Border.all(color: Colors.grey.shade400),
|
||
|
),
|
||
|
child: TextField(
|
||
|
controller: controller,
|
||
|
decoration: const InputDecoration(
|
||
|
hintText: "Search order",
|
||
|
hintStyle: TextStyle(fontSize: 14, color: Colors.grey),
|
||
|
prefixIcon: Icon(Icons.search, color: Colors.grey),
|
||
|
border: InputBorder.none,
|
||
|
contentPadding: EdgeInsets.symmetric(vertical: 10),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
actions: [
|
||
|
IconButton(
|
||
|
icon: const Icon(Icons.help_outline, color: Colors.black),
|
||
|
onPressed: onHelp,
|
||
|
),
|
||
|
const SizedBox(width: 8),
|
||
|
],
|
||
|
);
|
||
|
}
|
||
|
|
||
|
@override
|
||
|
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
|
||
|
}
|