<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Prem Adithya on Medium]]></title>
        <description><![CDATA[Stories by Prem Adithya on Medium]]></description>
        <link>https://medium.com/@adithyaxx?source=rss-ba75d269c6f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kHM4lKQMzOWk2jVZyJaM3A.png</url>
            <title>Stories by Prem Adithya on Medium</title>
            <link>https://medium.com/@adithyaxx?source=rss-ba75d269c6f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 26 May 2026 19:49:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adithyaxx/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Implementing the Drawer with individual FloatingActionButtons in Flutter]]></title>
            <link>https://medium.com/@adithyaxx/implementing-the-drawer-with-individual-floatingactionbuttons-in-flutter-8773f57332d?source=rss-ba75d269c6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8773f57332d</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[navigation-drawer]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[drawer]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Prem Adithya]]></dc:creator>
            <pubDate>Sun, 19 May 2019 04:38:30 GMT</pubDate>
            <atom:updated>2019-05-19T04:40:09.879Z</atom:updated>
            <content:encoded><![CDATA[<p>This article covers the implementation of the <strong>Drawer</strong> with individual <strong>FloatingActionButtons</strong> for each page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*frRBS1pbFMqqm3dl6vuAgQ.png" /></figure><p>Firstly, let’s set up the object class for drawer items:</p><pre>class <strong>DrawerItem</strong> {<br> String title;<br> IconData icon;<br> DrawerItem(this.title, this.icon);<br>}</pre><p>Next, the essential variables:</p><pre>int <strong>_selectedDrawerIndex</strong> = 0;</pre><pre>final <strong>_drawerItems</strong> = [<br>  DrawerItem(“Pizza”, Icons.local_pizza),<br>  DrawerItem(“Drink”, Icons.local_drink),<br>];</pre><p>Then, we need to build the navigation items:</p><pre>List&lt;Widget&gt; <strong>_buildNavigationItems</strong>()<br>{<br>  List&lt;Widget&gt; list = [];</pre><pre>  for (int i=0; i &lt; _drawerItems.length; i++)<br>  {<br>    list.add(ListTile(<br>      leading: Icon(_drawerItems[i].icon),<br>      title: Text(<br>        _drawerItems[i].title,<br>        style: TextStyle(fontSize: 16.0),<br>      ),<br>      selected: i == _selectedDrawerIndex,<br>      onTap: () =&gt; _onItemSelected(i),<br>    ));<br>  }</pre><pre>  return list;<br>}</pre><pre><strong>_onItemSelected</strong>(int index) {<br>  setState(() =&gt; _selectedDrawerIndex = index);<br>  Navigator.of(context).pop();<br>}</pre><p>Lastly, a method to set the page according to the index selected in the drawer:</p><pre><strong>_getPage</strong>(int index) {<br>  switch (index) {<br>    case 0:<br>      return First(); <em>// from first.dart</em><br>    case 1:<br>      return Second(); <em>// from second.dart</em><br>  }<br>}</pre><p>The full code is available below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ce58fa532b044bab0c9d5d4bae704843/href">https://medium.com/media/ce58fa532b044bab0c9d5d4bae704843/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5dc73b7c20cdac92b8c04d1719f0b1d9/href">https://medium.com/media/5dc73b7c20cdac92b8c04d1719f0b1d9/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4a7c718b59a5b0c14128714e21af6918/href">https://medium.com/media/4a7c718b59a5b0c14128714e21af6918/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*TOV5RSgEJ_5CFhj9JXKDlw.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8773f57332d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>