import 'package:flutter/material.dart';
import 'package:ui_kit/ui_kit.dart';

class SearchSection extends StatefulWidget {
  const SearchSection({super.key});

  @override
  State<SearchSection> createState() => _SearchSectionState();
}

class _SearchSectionState extends State<SearchSection> {
  final TextEditingController controller = TextEditingController();
  @override
  Widget build(BuildContext context) {
    final searchList = [true, false];
    return SizedBox(
      width: width(context) * 100,
      height: height(context) * 30,
      child: ListView.builder(
        itemCount: 2,
        itemBuilder: (BuildContext context, int index) {
          final currentValue = searchList[index];
          return Container(
            margin: EdgeInsets.only(bottom: height(context) * 3),
            child: SearchWidget(
              controller: controller,
              hintText: 'Search',
              isClosable: currentValue,
            ),
          );
        },
      ),
    );
  }
}
