search_index_page.dart 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import 'package:flutter/material.dart';
  2. import 'package:common_project/common_project.dart';
  3. import 'package:module_home/view_model/search_index/search_index_cubit.dart';
  4. ///des: 搜索导航页面
  5. class SearchIndexPage extends StatefulWidget {
  6. @override
  7. _SearchIndexPage createState() => _SearchIndexPage();
  8. }
  9. class _SearchIndexPage extends State<SearchIndexPage> {
  10. @override
  11. Widget build(BuildContext context) {
  12. return BlocProvider(
  13. create: (context) => SearchIndexCubit(),
  14. child: Scaffold(
  15. body: Column(
  16. children: [
  17. //顶部
  18. Builder(
  19. builder: (context){
  20. SearchIndexCubit bloc = BlocProvider.of<SearchIndexCubit>(context);
  21. return Row(
  22. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  23. children: [
  24. Expanded(child: SearchWidget(
  25. '请输入搜索内容',
  26. bloc.state.searchController,autoFocusBool:false,
  27. onSubmittedF: () {
  28. XLog.d('输出===========');
  29. },
  30. ),),
  31. InkWell(
  32. onTap: (){
  33. Navigator.pop(context);
  34. },
  35. child: Text('取消'),
  36. )
  37. ],
  38. );
  39. }),
  40. ///切换部分
  41. Builder(builder: (context){
  42. return Container();
  43. }),
  44. ],
  45. ),
  46. ),);
  47. }
  48. //搜索历史
  49. Widget searchHistory(){
  50. return Container();
  51. }
  52. //猜你喜欢
  53. Widget guessLike(){
  54. return Container();
  55. }
  56. }