@@ -183,73 +183,75 @@ class _SetStatusPageState extends State<SetStatusPage> {
183183 }),
184184 ],
185185 ),
186- body: Column (children: [
187- Padding (
188- padding: const EdgeInsetsDirectional .only (
189- // In Figma design, this is 16px, but we compensate for that in
190- // the icon button below.
191- start: 8 ,
192- top: 8 , end: 10 ,
193- // In Figma design, this is 4px, be we compensate for that in
194- // [SingleChildScrollView.padding] below.
195- bottom: 0 ),
196- child: Row (
197- crossAxisAlignment: CrossAxisAlignment .start,
198- children: [
199- IconButton (
200- onPressed: chooseStatusEmoji,
201- style: IconButton .styleFrom (
202- splashFactory: NoSplash .splashFactory,
203- foregroundColor: designVariables.icon,
204- tapTargetSize: MaterialTapTargetSize .shrinkWrap,
205- padding: EdgeInsets .symmetric (
206- vertical: 8 ,
207- // In Figma design, there is no horizontal padding, but we
208- // provide it in order to create a proper tap target size.
209- horizontal: 8 )),
210- icon: Row (spacing: 4 , children: [
211- ValueListenableBuilder (
212- valueListenable: statusChange,
213- builder: (_, change, _) {
214- final emoji = change.emoji.or (oldStatus.emoji);
215- return emoji == null
216- ? const Icon (ZulipIcons .smile, size: 24 )
217- : UserStatusEmoji (emoji: emoji, size: 24 , neverAnimate: false );
218- }),
219- Icon (ZulipIcons .chevron_down, size: 16 ),
220- ]),
221- ),
222- Expanded (child: TextField (
223- controller: statusTextController,
224- minLines: 1 ,
225- maxLines: 2 ,
226- // The limit on the size of the status text is 60 characters.
227- // See: https://zulip.com/api/update-status#parameter-status_text
228- maxLength: 60 ,
229- cursorColor: designVariables.textInput,
230- textCapitalization: TextCapitalization .sentences,
231- style: TextStyle (fontSize: 19 , height: 24 / 19 ),
232- decoration: InputDecoration (
233- // TODO: display a counter as suggested in CZO discussion:
234- // https://chat.zulip.org/#narrow/channel/530-mobile-design/topic/Set.20user.20status/near/2224549
235- counterText: '' ,
236- hintText: localizations.statusTextHint,
237- hintStyle: TextStyle (color: designVariables.labelSearchPrompt),
238- isDense: true ,
239- contentPadding: EdgeInsets .symmetric (
240- vertical: 8 ,
241- // Subtracting 4 pixels to account for the internal
242- // 4-pixel horizontal padding.
243- horizontal: 10 - 4 ,
244- ),
245- filled: true ,
246- fillColor: designVariables.bgSearchInput,
247- border: OutlineInputBorder (
248- borderRadius: BorderRadius .circular (10 ),
249- borderSide: BorderSide .none,
250- )))),
251- ]),
252- ),
186+ body: SafeArea (
187+ bottom: false ,
188+ child: Column (children: [
189+ Padding (
190+ padding: const EdgeInsetsDirectional .only (
191+ // In Figma design, this is 16px, but we compensate for that in
192+ // the icon button below.
193+ start: 8 ,
194+ top: 8 , end: 10 ,
195+ // In Figma design, this is 4px, be we compensate for that in
196+ // [SingleChildScrollView.padding] below.
197+ bottom: 0 ),
198+ child: Row (
199+ crossAxisAlignment: CrossAxisAlignment .start,
200+ children: [
201+ IconButton (
202+ onPressed: chooseStatusEmoji,
203+ style: IconButton .styleFrom (
204+ splashFactory: NoSplash .splashFactory,
205+ foregroundColor: designVariables.icon,
206+ tapTargetSize: MaterialTapTargetSize .shrinkWrap,
207+ padding: EdgeInsets .symmetric (
208+ vertical: 8 ,
209+ // In Figma design, there is no horizontal padding, but we
210+ // provide it in order to create a proper tap target size.
211+ horizontal: 8 )),
212+ icon: Row (spacing: 4 , children: [
213+ ValueListenableBuilder (
214+ valueListenable: statusChange,
215+ builder: (_, change, _) {
216+ final emoji = change.emoji.or (oldStatus.emoji);
217+ return emoji == null
218+ ? const Icon (ZulipIcons .smile, size: 24 )
219+ : UserStatusEmoji (emoji: emoji, size: 24 , neverAnimate: false );
220+ }),
221+ Icon (ZulipIcons .chevron_down, size: 16 ),
222+ ]),
223+ ),
224+ Expanded (child: TextField (
225+ controller: statusTextController,
226+ minLines: 1 ,
227+ maxLines: 2 ,
228+ // The limit on the size of the status text is 60 characters.
229+ // See: https://zulip.com/api/update-status#parameter-status_text
230+ maxLength: 60 ,
231+ cursorColor: designVariables.textInput,
232+ textCapitalization: TextCapitalization .sentences,
233+ style: TextStyle (fontSize: 19 , height: 24 / 19 ),
234+ decoration: InputDecoration (
235+ // TODO: display a counter as suggested in CZO discussion:
236+ // https://chat.zulip.org/#narrow/channel/530-mobile-design/topic/Set.20user.20status/near/2224549
237+ counterText: '' ,
238+ hintText: localizations.statusTextHint,
239+ hintStyle: TextStyle (color: designVariables.labelSearchPrompt),
240+ isDense: true ,
241+ contentPadding: EdgeInsets .symmetric (
242+ vertical: 8 ,
243+ // Subtracting 4 pixels to account for the internal
244+ // 4-pixel horizontal padding.
245+ horizontal: 10 - 4 ,
246+ ),
247+ filled: true ,
248+ fillColor: designVariables.bgSearchInput,
249+ border: OutlineInputBorder (
250+ borderRadius: BorderRadius .circular (10 ),
251+ borderSide: BorderSide .none,
252+ )))),
253+ ]),
254+ ),
253255 Expanded (child: InsetShadowBox (
254256 top: 6 , bottom: 6 ,
255257 color: designVariables.mainBackground,
@@ -261,7 +263,7 @@ class _SetStatusPageState extends State<SetStatusPage> {
261263 status: status,
262264 onTap: () => chooseStatusSuggestion (status)),
263265 ])))),
264- ]),
266+ ])) ,
265267 );
266268 }
267269}
0 commit comments