36 lines
1.0 KiB
Dart
36 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
class CommonSearchField extends StatelessWidget {
|
|
final ValueChanged<String> onChanged;
|
|
final String hint;
|
|
|
|
const CommonSearchField({
|
|
super.key,
|
|
required this.onChanged,
|
|
this.hint = "Search attractions",
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return TextField(
|
|
onChanged: onChanged,
|
|
decoration: InputDecoration(
|
|
hintText: hint,
|
|
hintStyle: GoogleFonts.poppins(color: Colors.grey.shade500),
|
|
filled: true,
|
|
fillColor: Colors.white,
|
|
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderSide: BorderSide(color: Color(0xffF95F62).withOpacity(0.4)),
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderSide: BorderSide(color: Color(0xffF95F62).withOpacity(0.4)),
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|