51 lines
1.2 KiB
Dart
51 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rkm/utils/color_palette.dart';
|
|
import '../utils/const_variable.dart';
|
|
|
|
class InputSearchText extends StatelessWidget {
|
|
var controller;
|
|
double fontSize;
|
|
String hint;
|
|
double width;
|
|
Color color;
|
|
bool border;
|
|
var onChanged;
|
|
|
|
InputSearchText({
|
|
required this.controller,
|
|
required this.width,
|
|
this.fontSize = 15.0,
|
|
this.hint = '',
|
|
this.color = ColorPalette.white,
|
|
this.border = true,
|
|
this.onChanged = null
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
color: color,
|
|
margin: ConstVariable().marginHightInput,
|
|
width: width,
|
|
child: TextFormField(
|
|
onChanged: onChanged,
|
|
controller: this.controller,
|
|
style: TextStyle(
|
|
color: Colors.black,
|
|
fontSize: this.fontSize,
|
|
),
|
|
decoration: InputDecoration(
|
|
fillColor: ColorPalette.appBar,
|
|
prefixIcon: Icon(Icons.search),
|
|
border: border?OutlineInputBorder():null,
|
|
hintText: this.hint,
|
|
hintStyle: TextStyle(
|
|
color: Colors.black,
|
|
fontSize: this.fontSize,
|
|
)
|
|
)
|
|
),
|
|
);
|
|
}
|
|
}
|