@@ -310,6 +310,7 @@ void _showMainMenu(BuildContext context, {
310310            crossAxisAlignment:  CrossAxisAlignment .stretch,
311311            mainAxisSize:  MainAxisSize .min,
312312            children:  [
313+               _OrganizationHeader (),
313314              Flexible (child:  InsetShadowBox (
314315                top:  8 , bottom:  8 ,
315316                color:  designVariables.bgBotBar,
@@ -326,6 +327,69 @@ void _showMainMenu(BuildContext context, {
326327    });
327328}
328329
330+ class  _OrganizationHeader  extends  StatelessWidget  {
331+   @override 
332+   Widget  build (BuildContext  context) {
333+     final  store =  PerAccountStoreWidget .of (context);
334+     final  designVariables =  DesignVariables .of (context);
335+     final  zulipLocalizations =  ZulipLocalizations .of (context);
336+ 
337+     String  organizationName =  store.realmName;
338+     Uri ?  organizationIcon =  store.tryResolveUrl (store.realmIcon);
339+     final  buttonStyle =  TextButton .styleFrom (
340+       splashFactory:  NoSplash .splashFactory,
341+       overlayColor:  Colors .transparent
342+     );
343+ 
344+     return  Padding (
345+       padding:  const  EdgeInsets .symmetric (vertical:  8 , horizontal:  16 ),
346+       child:  Row (
347+         mainAxisAlignment:  MainAxisAlignment .spaceBetween,
348+         children:  [
349+           Expanded (
350+             child:  Row (
351+               children:  [
352+                 Image .network (
353+                   organizationIcon.toString (),
354+                   width:  28 ,
355+                   height:  28 ,
356+                   fit:  BoxFit .contain,
357+                 ),
358+                 const  SizedBox (width:  8 ),
359+                 Expanded (
360+                   child:  Text (
361+                     organizationName,
362+                     style:  const  TextStyle (
363+                       fontWeight:  FontWeight .bold,
364+                       fontSize:  20 ,
365+                     ),
366+                     overflow:  TextOverflow .ellipsis,
367+                     maxLines:  1 ,
368+                   ),
369+                 ),
370+               ],
371+             ),
372+           ),
373+           TextButton (
374+             onPressed:  () {
375+               Navigator .of (context).push (MaterialWidgetRoute (page:  const  ChooseAccountPage ()));
376+             },
377+             style:  buttonStyle,
378+             child:  Text (
379+               zulipLocalizations.organizationsButtonLabel,
380+               style:  TextStyle (
381+                 fontSize:  19 ,
382+                 fontWeight:  FontWeight .w500,
383+                 color:  designVariables.icon,
384+               ),
385+             ),
386+           ),
387+         ],
388+       ),
389+     );
390+   }
391+ }
392+ 
329393abstract  class  _MenuButton  extends  StatelessWidget  {
330394  const  _MenuButton ();
331395
0 commit comments