基础组件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

29 lines
867 B

  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/src/widgets/framework.dart';
  3. import 'package:zhiying_base_widget/widgets/search/appbar/search_appbar_widget.dart';
  4. import 'package:zhiying_comm/zhiying_comm.dart';
  5. import 'dart:ui';
  6. import 'package:zhiying_comm/util/custom_sliver_persistent_header_delegate.dart';
  7. class SearchAppbarCreater extends WidgetCreater {
  8. @override
  9. List<Widget> createWidgets(Map<String, dynamic> model) {
  10. return [
  11. SliverPersistentHeader(
  12. delegate: CustomSliverPersistentHeaderDelegate(
  13. child: SearchAppbarWidget(model),
  14. max: MediaQueryData.fromWindow(window).padding.top + 44,
  15. min: MediaQueryData.fromWindow(window).padding.top + 44,
  16. ),
  17. pinned: true,
  18. floating: false,
  19. ),
  20. ];
  21. }
  22. @override
  23. bool isSliverChild() {
  24. return true;
  25. }
  26. }