84 lines
2.9 KiB
Dart
84 lines
2.9 KiB
Dart
part of 'widgets.dart';
|
|
|
|
// class EnhancedSearchView<QueryType> extends StatelessWidget {
|
|
// const EnhancedSearchView({
|
|
// super.key,
|
|
// required this.filter,
|
|
// required this.cast,
|
|
// });
|
|
|
|
// final void Function(QueryType query) filter;
|
|
// final QueryType Function(String query) cast;
|
|
|
|
// @override
|
|
// Widget build(BuildContext context) {
|
|
// final theme = FlutterFlowTheme.of(context);
|
|
// final locale = FFLocalizations.of(context);
|
|
// TextEditingController controller = TextEditingController();
|
|
// return TextFormField(
|
|
// controller: controller,
|
|
// onChanged: (value) => EasyDebounce.debounce(
|
|
// '_model.keyTextFieldTextController',
|
|
// const Duration(milliseconds: 500),
|
|
// () => filter.call(cast.call(value)),
|
|
// ),
|
|
// cursorColor: theme.primaryText,
|
|
// showCursor: false,
|
|
// cursorWidth: 2.0,
|
|
// cursorRadius: Radius.circular(100),
|
|
// style: TextStyle(
|
|
// color: theme.primaryText,
|
|
// fontSize: 16.0,
|
|
// decorationColor: Colors.amber,
|
|
// ),
|
|
// keyboardType: TextInputType.text,
|
|
// textInputAction: TextInputAction.search,
|
|
// autocorrect: true,
|
|
// textCapitalization: TextCapitalization.sentences,
|
|
// decoration: InputDecoration(
|
|
// prefixIcon: Icon(Icons.search, color: theme.primary),
|
|
// labelText: locale.getVariableText(
|
|
// ptText: 'Pesquisar',
|
|
// enText: 'Search',
|
|
// ),
|
|
// labelStyle: TextStyle(
|
|
// color: theme.primaryText,
|
|
// fontSize: 16.0,
|
|
// ),
|
|
// hintText: locale.getVariableText(
|
|
// ptText: 'Digite sua pesquisa',
|
|
// enText: 'Enter your search',
|
|
// ),
|
|
// hintStyle: TextStyle(
|
|
// color: theme.accent2,
|
|
// fontSize: 14.0,
|
|
// ),
|
|
// filled: true,
|
|
// fillColor: Colors.transparent,
|
|
// helperStyle: TextStyle(
|
|
// color: theme.primaryText,
|
|
// decorationColor: theme.primaryText,
|
|
// ),
|
|
// focusColor: theme.primaryText,
|
|
// contentPadding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 15.0),
|
|
// enabledBorder: UnderlineInputBorder(
|
|
// borderRadius: BorderRadius.all(Radius.circular(15.0)),
|
|
// borderSide: BorderSide(color: theme.primaryText),
|
|
// ),
|
|
// focusedBorder: UnderlineInputBorder(
|
|
// borderRadius: BorderRadius.all(Radius.circular(15.0)),
|
|
// borderSide: BorderSide(color: theme.primaryText),
|
|
// ),
|
|
// errorBorder: UnderlineInputBorder(
|
|
// borderRadius: BorderRadius.all(Radius.circular(15.0)),
|
|
// borderSide: BorderSide(color: theme.primaryText),
|
|
// ),
|
|
// focusedErrorBorder: UnderlineInputBorder(
|
|
// borderRadius: BorderRadius.all(Radius.circular(15.0)),
|
|
// borderSide: BorderSide(color: theme.primaryText, width: 2.0),
|
|
// ),
|
|
// ),
|
|
// );
|
|
// }
|
|
// }
|