<?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 tayo olakunle on Medium]]></title>
        <description><![CDATA[Stories by tayo olakunle on Medium]]></description>
        <link>https://medium.com/@tayolakunle?source=rss-f843c72f7401------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ISal_H0Air94uk7cL_wk8A.png</url>
            <title>Stories by tayo olakunle on Medium</title>
            <link>https://medium.com/@tayolakunle?source=rss-f843c72f7401------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 05:48:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tayolakunle/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[Network Request with GetConnect in flutter]]></title>
            <link>https://tayolakunle.medium.com/network-request-with-getconnect-in-flutter-4d7c5d7c0309?source=rss-f843c72f7401------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d7c5d7c0309</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[getx]]></category>
            <category><![CDATA[get]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[tayo olakunle]]></dc:creator>
            <pubDate>Wed, 23 Jun 2021 13:31:54 GMT</pubDate>
            <atom:updated>2021-07-23T12:06:54.733Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nsblR5oC25Gzf-pmr7pi_Q.jpeg" /><figcaption><a href="https://unsplash.com/photos/rhNff6hB41s">https://unsplash.com/photos/rhNff6hB41s</a></figcaption></figure><p>This article is intended for those who use Getx package to manage their state or route, but use other packages to handle network calls like Dio or Http.</p><p>Getx is arguably the easiest to use lightweight state management package for flutter and it is widely accepted by the flutter community being the most liked flutter package. <br>Today we would explore another part of the Getx package aside from the widely known route and state management, this article will focus on networking with GetConnect.</p><p>The documentation is out of the box for many to understand but still, there are better ways to go about solutions. <br>Being a big fan of Dio package, I started to explore everything Dio can do if GetConnect can do the same, and yes I found some interesting stuff I can show off.</p><p>Talk is cheap show me the code.</p><p><em>Want to read this story later? </em><a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_read_later_text"><em>Save it in Journal.</em></a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F5002827&amp;display_name=Tenor&amp;url=https%3A%2F%2Ftenor.com%2Fview%2Fminion-woohoo-yeah-excited-cheer-gif-5002827&amp;image=https%3A%2F%2Fc.tenor.com%2FkwuyggO2hcEAAAAC%2Fminion-woohoo.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=tenor" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/b85e34261c2f24c85238128a5a5031b0/href">https://medium.com/media/b85e34261c2f24c85238128a5a5031b0/href</a></iframe><p>First let’s create a <em>BaseService</em> class where we would do the basic configuration of our <em>GetConnect</em> class.</p><pre>class BaseService extends GetConnect {<br>  @override<br>  void onInit() {</pre><pre>    // add your local storage here to load for every request<br>    var token = LocalStorage.<em>readToken</em>();</pre><pre>    //1.base_url <br>    httpClient.baseUrl = &quot;http://base_url here&quot;;</pre><pre>    //2.<br>    httpClient.defaultContentType = &quot;application/json&quot;;<br>    httpClient.timeout = Duration(seconds: 8);<br>    httpClient.addResponseModifier((request, response) async {<br>      print(response.body);<br>    });<br>    httpClient.addRequestModifier((request) async {<br>     // add request here<br>      return request;<br>    });<br>    var headers = {&#39;Authorization&#39;: &quot;Bearer $token&quot;};<br>    httpClient.addAuthenticator((request) async {<br>      request.headers.addAll(headers);<br>      return request;<br>    });<br><br>    super.onInit();<br>  }<br>}</pre><p>Our <em>BaseService</em> class extends <em>GetConnect</em> giving the base class access to all its method declarations.<br>The <em>GetConnect</em> has an onInit method that needs to be overridden. Inside the onInit method we do all our base setup, these are things that are likely constant throughout the application, for example;</p><p>1. <strong>The base url</strong>: this is where you set the base url of your endpoint so you don’t have to call it over and over again.</p><p>2. <strong>The headers:</strong> this is where you add the content type you are about sending to the server, most time they are <em>application/json </em>except in rare cases.</p><p>3. <strong>On Request Modifier:</strong> this is an interceptor that intercepts your request, for example you want to print the url on every request it intercepts the request to perform its specified action when making the request.</p><p>4. <strong>Authentication</strong>: this is where you specify your token headers like <em>basic auth</em> or <em>oAuth</em> or the popular <em>bearer token</em>.</p><p>5. <strong>On response modifier:</strong> this is an interceptor that intercepts when the request is completed.</p><p>And that’s all we need to do for the configuration.What we need next is to use the base service throughout the whole application. Next, create another class called the <em>PersonService</em> and let it extend <em>BaseService</em> this time.</p><pre>class PersonService extends BaseService {<br>/// add your service code here</pre><pre>}</pre><blockquote><em>Now </em>PersonService<em> has all the methods of </em>BaseService<em> including </em>GetConnect<em> we extended in </em>BaseService<em> class.<br>Now to perform our network request, all we need to do is this:</em></blockquote><pre>/// for get requests.</pre><pre>Future&lt;ResponseModel&gt; getPersonData() async {<br>  var res = await get(&quot;person_url<em>&quot;</em>);<br>  print(res); <br>}</pre><pre>/// for post requests.</pre><pre>Future&lt;ResponseModel&gt; postPersonData(dynamic body) async {<br>  var res = await post(&quot;person_url<em>&quot;, body</em>);<br>  print(res); <br>}</pre><pre>/// for put requests.</pre><pre>Future&lt;ResponseModel&gt; putPersonData(dynamic body) async {<br>  var res = await put(&quot;person_url<em>&quot;, body</em>);<br>  print(res); <br>}</pre><pre>/// for delete requests.</pre><pre>Future&lt;ResponseModel&gt; deletePersonData() async {<br>  var res = await delete(&quot;person_url<em>&quot;</em>);<br>  print(res); <br>}</pre><p>See how simple it is to pass the url? Just pass the remaining part of the url, and <em>GetConnect</em> connects the base url with the url automatically for you leaving you the stress of knowing how they are linked together.</p><p><em>GetConnect</em> also has other nice method that are worth exploring depending on your use case</p><pre>/// for adding a trusted certificate to the request<br>@override<br>set trustedCertificates(List&lt;TrustedCertificate&gt; _trustedCertificates) {<br>  // <em>TODO: implement trustedCertificates<br>  </em>super.trustedCertificates = _trustedCertificates;<br>}</pre><pre>/// for making socket request <br>@override<br>GetSocket socket(String url, {Duration ping = const Duration(seconds: 5)}) {<br>  // <em>TODO: implement socket<br>  </em>return super.socket(url, ping);<br>}</pre><pre>/// for setting up GraphQl with getConnect<br>@override<br>  Future&lt;GraphQLResponse&lt;T&gt;&gt; mutation&lt;T&gt;(String mutation, {String url, Map&lt;String, dynamic&gt; variables, Map&lt;String, String&gt; headers}) {<br>    // <em>TODO: implement mutation<br>    </em>return super.mutation(mutation, url, variables, headers);<br>  }</pre><p>Also, to enable us have a base error response class that handles errors for us, Getx doesn’t have any out of the box but hoping they would consider that in the nearest future while but here is what you can do to handle your errors yourself.</p><p>Create a new method called error handler</p><pre>dynamic errorHandler(Response response) {<br>  print(response.toString());<br>  switch (response.statusCode) {<br>    case 200:<br>    case 201:<br>    case 202:<br>      var responseJson = response.body.toString();<br>      return responseJson;<br>    case 500:<br>      throw &quot;Server Error pls retry later&quot;;<br>    case 403:<br>      throw &#39;Error occurred pls check internet and retry.&#39;;<br>    case 500:<br>    default:<br>      throw &#39;Error occurred retry&#39;;<br>  }<br>}</pre><p>Now to connect our error handler to our request go into <em>PersonService</em> class, and add a try catch to your request to catch the error.</p><pre>Future&lt;ResponseModel&gt; postPersonData(dynamic body) async {<br>var res;<br>try {<br> res = await post(&quot;url<em>&quot;</em>, body);<br>    return ResponseModel.fromJson(res.body);<br>  } catch (e) {<br>    errorHandler(res);<br>  }<br>}</pre><p>And that’s all we need to do to connect our app to the server using <em>GetConnect</em> without any added package like Http or Dio or retrofit and the likes.</p><p><a href="https://pub.dev/packages/get">get | Flutter package</a></p><p>I hope this was helpful, if you have any questions please drop on the comment section I would be happy to answer</p><p>Here is a link to the Git repo thats shows how it works</p><p><a href="https://github.com/Mtconcept/FlutterTest">GitHub - Mtconcept/FlutterTest</a></p><p>Happy Fluttering 💙</p><p>Enjoyed this post? Subscribe to the <a href="http://subscribe.machinelearnings.co/">Machine Learnings newsletter</a> for an easy understanding of AI advances shaping our world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d7c5d7c0309" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Problem Solver Product Designer]]></title>
            <link>https://tayolakunle.medium.com/problem-solver-product-designer-d33171792932?source=rss-f843c72f7401------2</link>
            <guid isPermaLink="false">https://medium.com/p/d33171792932</guid>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[ux-design]]></category>
            <category><![CDATA[hnginternship]]></category>
            <category><![CDATA[ui-ux-design]]></category>
            <category><![CDATA[timbu]]></category>
            <dc:creator><![CDATA[tayo olakunle]]></dc:creator>
            <pubDate>Wed, 03 Apr 2019 06:35:58 GMT</pubDate>
            <atom:updated>2019-04-03T06:35:58.674Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*c66XU1R54HBJI0Zr.jpg" /><figcaption>Solving Problem are product designers biggest companion</figcaption></figure><p>In the last article, there i wrote about my journey as a Product Designer. I hope you had a glanced through it, tho every day is actually a journey in product design, today i would take you through another journey of a product designer which is problem-solving, have you ever thought of becoming a product designer, you should know this is one of the best parts of becoming a product designer, today i would use a website as a case study, I would like you to visit <a href="https://timbu.com/">https://timbu.com/</a> browse through and tell me what you noticed in the comment section, but before that i would tell you what i noticed, I tried opening this website on my mobile device and also through a desktop device.</p><p>I saw various changes within this both device, yes to a visitor you might not really notice so many things wrong but as a product designer this would shine to your face, one of the best parts of a product designer is functionality, either your website or your software/(products), must be functional within any device, that&#39;s when you can boast of a perfect product,</p><p>The worse a product designer would do is working on a product and it isn&#39;t functional, that&#39;s how important the functionalities a website would be, as a product designer you would have the opportunities of working with various front &amp; back end programmers many who would know the importance of a bootstrap so when also creating the interface of your product you need to know the importance of this bootstrap if <a href="https://timbu.com/">https://timbu.com/</a> was designed with bootstrap in mind it would be a more functional and better usage.</p><p>Another aspect of a product designer is to cater for all responsiveness sometimes you met developers that don&#39;t use bootstrap, you should know you are the one within the client &amp; developer bringing this both together to achieve the clients&#39; goals… Don&#39;t forget you are called a problem solver so if a product is faulty it&#39;s your reach to figure it out and solve this bug don&#39;t forget it all lies with you and nobody else what&#39;s your feedback about <a href="https://timbu.com/">https://timbu.com/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d33171792932" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Journey Into Product Design]]></title>
            <link>https://tayolakunle.medium.com/journey-into-product-design-26de24662208?source=rss-f843c72f7401------2</link>
            <guid isPermaLink="false">https://medium.com/p/26de24662208</guid>
            <category><![CDATA[ui-ux-design]]></category>
            <category><![CDATA[hnginternship]]></category>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[tayo olakunle]]></dc:creator>
            <pubDate>Sun, 31 Mar 2019 11:18:28 GMT</pubDate>
            <atom:updated>2019-03-31T11:18:28.510Z</atom:updated>
            <content:encoded><![CDATA[<p>Well we all have a story mine is crazy yours could be better i met my match on the social media and here are my writing and designing for the love of what i want to do. Product design is my joy when i heard the word at first i thought it was designing Plastic &amp; industrial products but now am very clear what it entails tnx to a team of scholars who tried as much as possible to make it possible for me to reach this dream, am grateful</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26de24662208" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>