elektronika/lib/app/pages/search/screen.dart

61 lines
2.1 KiB
Dart

// import 'package:flutter/material.dart';
// import 'package:flutter_screenutil/flutter_screenutil.dart';
// import 'package:get/get.dart';
// import '../../app.dart';
// import 'widgets/search_history_widget.dart';
// import 'widgets/search_result_widget.dart';
// import 'widgets/search_widget.dart';
// class SearchPage extends GetView<SearchController> {
// const SearchPage({Key? key}) : super(key: key);
// @override
// Widget build(BuildContext context) {
// return Obx(
// () => Scaffold(
// body: SafeArea(
// child: Column(
// children: [
// Padding(
// padding: EdgeInsets.only(left: 16.w, right: 8.w, top: 16.h),
// child: FittedBox(
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// GestureDetector(
// onTap: () => controller.goBack(),
// child: Icon(Icons.arrow_back, size: 24.sp),
// ),
// SizedBox(width: 20.w),
// SizedBox(
// width: 0.80.sw,
// child: SearchWidget(),
// ),
// ],
// ),
// ),
// ),
// Expanded(
// child: controller.state.isLoading.value
// ? Center(child: CustomLoader())
// : controller.state.searchHistoryList.length > 0
// ? SingleChildScrollView(
// child: Padding(
// padding: EdgeInsets.only(left: 16.w, right: 8.w, top: 16.h),
// child: controller.state.hasSuffixIcon.value ? SearchResultList() : SearchHistoryListWidget(),
// ),
// )
// : Container(),
// )
// ],
// ),
// ),
// ),
// );
// }
// }
// // 1. if hasSuffixIcon=true, show search result
// // 2. else show history