Commit 87f2e2393369cbb1f3e359a06f79ae68703d9e33

Authored by 常守达
1 parent 08d5fdff

fix(feedback):提交按钮不浮动

@@ -46,62 +46,68 @@ class SubmitFeedbackView extends GetView<SubmitFeedbackController> { @@ -46,62 +46,68 @@ class SubmitFeedbackView extends GetView<SubmitFeedbackController> {
46 ), 46 ),
47 ), 47 ),
48 ), 48 ),
49 - body: Stack(  
50 - children: [  
51 - ListView(  
52 - physics: const ClampingScrollPhysics(),  
53 - padding: EdgeInsets.fromLTRB(  
54 - 15,  
55 - 16,  
56 - 16,  
57 - 132 + MediaQuery.paddingOf(context).bottom, 49 + body: CustomScrollView(
  50 + physics: const ClampingScrollPhysics(),
  51 + slivers: [
  52 + SliverPadding(
  53 + padding: const EdgeInsets.fromLTRB(15, 16, 16, 0),
  54 + sliver: SliverList(
  55 + delegate: SliverChildListDelegate([
  56 + const _FeedbackLabel(),
  57 + SizedBox(height: 9),
  58 + const _FeedbackInput(),
  59 + SizedBox(height: 20),
  60 + _SectionLabel(context.l10n.contactInformation),
  61 + SizedBox(height: 8),
  62 + const _ContactInput(),
  63 + SizedBox(height: 20),
  64 + const _UploadHeader(),
  65 + SizedBox(height: 8),
  66 + const _ImagePickerGrid(),
  67 + ]),
58 ), 68 ),
59 - children: [  
60 - const _FeedbackLabel(),  
61 - SizedBox(height: 9),  
62 - const _FeedbackInput(),  
63 - SizedBox(height: 20),  
64 - _SectionLabel(context.l10n.contactInformation),  
65 - SizedBox(height: 8),  
66 - const _ContactInput(),  
67 - SizedBox(height: 20),  
68 - const _UploadHeader(),  
69 - SizedBox(height: 8),  
70 - const _ImagePickerGrid(),  
71 - ],  
72 ), 69 ),
73 - Positioned(  
74 - left: 0,  
75 - right: 0,  
76 - bottom: 36 + MediaQuery.paddingOf(context).bottom,  
77 - child: Center(  
78 - child: Obx(() {  
79 - final isEmpty = controller.isFeedbackEmpty.value;  
80 - return GestureDetector(  
81 - behavior: HitTestBehavior.opaque,  
82 - onTap: isEmpty ? null : controller.submit,  
83 - child: Opacity(  
84 - opacity: isEmpty ? 0.4 : 1.0,  
85 - child: Container(  
86 - width: 280,  
87 - height: 48,  
88 - alignment: Alignment.center,  
89 - decoration: BoxDecoration(  
90 - color: AppColors.primary,  
91 - borderRadius: BorderRadius.circular(24),  
92 - ),  
93 - child: Text(  
94 - AppLocalizations.of(context)!.submit,  
95 - style: TextStyle(  
96 - color: Colors.white,  
97 - fontSize: 16,  
98 - fontWeight: FontWeight.w600, 70 + SliverFillRemaining(
  71 + hasScrollBody: false,
  72 + child: Column(
  73 + children: [
  74 + const Spacer(),
  75 + Padding(
  76 + padding: EdgeInsets.only(
  77 + top: 40,
  78 + bottom: 36 + MediaQuery.paddingOf(context).bottom,
  79 + ),
  80 + child: Center(
  81 + child: Obx(() {
  82 + final isEmpty = controller.isFeedbackEmpty.value;
  83 + return GestureDetector(
  84 + behavior: HitTestBehavior.opaque,
  85 + onTap: isEmpty ? null : controller.submit,
  86 + child: Opacity(
  87 + opacity: isEmpty ? 0.4 : 1.0,
  88 + child: Container(
  89 + width: 280,
  90 + height: 48,
  91 + alignment: Alignment.center,
  92 + decoration: BoxDecoration(
  93 + color: AppColors.primary,
  94 + borderRadius: BorderRadius.circular(24),
  95 + ),
  96 + child: Text(
  97 + AppLocalizations.of(context)!.submit,
  98 + style: TextStyle(
  99 + color: Colors.white,
  100 + fontSize: 16,
  101 + fontWeight: FontWeight.w600,
  102 + ),
  103 + ),
  104 + ),
99 ), 105 ),
100 - ),  
101 - ), 106 + );
  107 + }),
102 ), 108 ),
103 - );  
104 - }), 109 + ),
  110 + ],
105 ), 111 ),
106 ), 112 ),
107 ], 113 ],