<?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 Chege Brian on Medium]]></title>
        <description><![CDATA[Stories by Chege Brian on Medium]]></description>
        <link>https://medium.com/@chegebrian?source=rss-56553ae23594------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lOPGF2jTuxJNZ3UIQy9njQ.png</url>
            <title>Stories by Chege Brian on Medium</title>
            <link>https://medium.com/@chegebrian?source=rss-56553ae23594------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 09:57:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chegebrian/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[Unit-Testing Drift Database (DAOs)]]></title>
            <link>https://chegebrian.medium.com/unit-testing-drift-database-daos-a71fc08b0091?source=rss-56553ae23594------2</link>
            <guid isPermaLink="false">https://medium.com/p/a71fc08b0091</guid>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Chege Brian]]></dc:creator>
            <pubDate>Thu, 29 Jun 2023 12:19:53 GMT</pubDate>
            <atom:updated>2023-06-30T05:54:44.069Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E-WJmU19Fp5KpvFbT4FXBw.png" /><figcaption>Photo by <a href="https://unsplash.com/@benjaminlehman?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">benjamin lehman</a> on <a href="https://unsplash.com/photos/GNyjCePVRs8?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>The <a href="https://medium.com/@chegebrian/testing-drift-database-in-flutter-978c3eb620dd">previous article</a> went over the basics of testing Drift database, in this article, we will go over unit testing when there are DAOs involved. As you will see there’s not much difference with how the tests are structured. Let’s jump into it.</p><h4>Create Todo’s DAO</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9e13adbaf6bd840fa6d90d75a3d0f6ac/href">https://medium.com/media/9e13adbaf6bd840fa6d90d75a3d0f6ac/href</a></iframe><p>This creates the basic class setup. I assume you are familiar with what is going on here. If not you can refer to this <a href="https://drift.simonbinder.eu/docs/advanced-features/daos/">article</a> from the official docs. Next, we will bring the methods we had in the AppDatabase class into TodosDAO such that it looks like this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/705a9a3794937afc6d975423012fe712/href">https://medium.com/media/705a9a3794937afc6d975423012fe712/href</a></iframe><p>At this point, the test file will be complaining of missing methods. Opening the test file you will realize this is because on the tests we are referencing methods that should be under AppDatabase class instance.</p><h4>TodosDAO Tests</h4><p>We can reuse the same tests on the app_database_test.dart. In todos_dao_test.dart we copy over the tests but we modify them to be referencing the TodosDao .</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c5a8cef6db6325b0a2749f54eb2d8c9a/href">https://medium.com/media/c5a8cef6db6325b0a2749f54eb2d8c9a/href</a></iframe><p>Note that when testing through the DAO we are referencing the DAO class. If you have layered your app and you have the data source layer getting the data from the database then it becomes easy to create to test. You can choose to Mock the class or just use it as it is. I have found no issue with using the class directly without mocking it as the response is quite okay as the database under test is from memory which is fast enough.</p><p>As you can see testing the DAOs is not different from the previous example. Hope you learnt something new. Leave a clap on your way out. 😊 <br>Until we meet it again let&#39;s keep up the technological revolution age alive.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a71fc08b0091" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Testing Drift database in Flutter]]></title>
            <link>https://chegebrian.medium.com/testing-drift-database-in-flutter-978c3eb620dd?source=rss-56553ae23594------2</link>
            <guid isPermaLink="false">https://medium.com/p/978c3eb620dd</guid>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Chege Brian]]></dc:creator>
            <pubDate>Mon, 12 Jun 2023 19:50:50 GMT</pubDate>
            <atom:updated>2023-06-12T19:50:50.489Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Disclaimer: This article assumes you have the basic setup for drift database as outlined </em><a href="https://drift.simonbinder.eu/docs/getting-started/starting_with_sql/"><em>here</em></a><em> and you know basic drift queries. Let&#39;s jump into it.</em></p><p>Unit Testing of a drift database is done with an in-memory version of the database. This ensures that the tests can run as fast as possible and we can be confident the database works as expected since there’s not much difference between the disk version and the in-memory one. In this article, we will go through the steps to set up the database and write some unit tests for a simple todo app. Yes, it’s another todo app but we won’t focus on the todo app part just the database. Let’s jump right into it.</p><p>For the in-memory database, we need to have SQLite installed on our machine for the tests to be possible without running on a physical device or emulator. The reasons for this have been outlined <a href="https://drift.simonbinder.eu/docs/testing/#setup">here</a> and this snippet from drift documentation adds instructions on how to add SQLite on your machine if not present already.</p><blockquote><strong>Installing sqlite</strong></blockquote><blockquote>We can’t distribute an sqlite installation as a pub package (at least not as something that works outside of a Flutter build), so you need to ensure that you have the sqlite3 shared library installed on your system.</blockquote><blockquote>On macOS, it’s installed by default.</blockquote><blockquote>On Linux, you can use the libsqlite3-dev package on Ubuntu and the sqlite3 package on Arch (other distros will have similar packages).</blockquote><blockquote>On Windows, you can <a href="https://www.sqlite.org/download.html">download ‘Precompiled Binaries for Windows’</a> and extract sqlite3.dll into a folder that’s in your PATH environment variable. Then restart your device to ensure that all apps will run with this PATH change.</blockquote><h4>1. Setting up the database</h4><p>Create a flutter project if you haven’t already to follow along:</p><ol><li>Under the lib folder add a folder that will host our database-related files in this case I will call mine ‘database’.</li><li>Create the<em> ‘app_database.dart’ </em>in the folder to host the database.</li><li>Run the code generator command to generate the necessary code.</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b23e19e2fa2dc8e1f873c8c178a86b60/href">https://medium.com/media/b23e19e2fa2dc8e1f873c8c178a86b60/href</a></iframe><h4><strong>2. Unit Tests setup.</strong></h4><p>Now that we have the base database code we can begin writing the testing code.</p><ol><li>Under the tests folder mirroring the same folder structure as for the database, let&#39;s create app_database_test.dart file under the database folder in the tests folder.</li><li>Create setUp and tearDown methods on the test file to add logic for opening and closing the database for each test we run.</li></ol><pre>import &#39;package:flutter_test/flutter_test.dart&#39;;<br>import &#39;package:todos/database/app_database.dart&#39;;<br><br>void main() {<br>  late AppDatabase appDatabase;<br><br>  // Opens the database for each test.<br>  setUp(() {<br>    appDatabase = AppDatabase();<br>  });<br><br>  // Closes the database after each test.<br>  tearDown(() async {<br>    await appDatabase.close();<br>  });<br>}</pre><p>You will notice by creating the database this way we have not used an in-memory database but the file-based one defined in the _openConnection method above. This is contrary to what we want. Let’s fix that.</p><p>In app_database.dart, add a <a href="https://dart.dev/language/constructors#named-constructors">named constructor</a> that enables creating our test database.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/01330f672b54bb4286ec67918c0d8de8/href">https://medium.com/media/01330f672b54bb4286ec67918c0d8de8/href</a></iframe><p>Line 15 adds the named constructor that enables us to create the in-memory database. Our test file should look like this now.</p><pre>import &#39;package:drift/native.dart&#39;;<br>import &#39;package:flutter_test/flutter_test.dart&#39;;<br>import &#39;package:todos/database/app_database.dart&#39;;<br><br>void main() {<br>  late AppDatabase appDatabase;<br><br>  // Opens the database for each test.<br>  setUp(() {<br>    appDatabase = AppDatabase.forTesting(NativeDatabase.memory());;<br>  });<br><br>  // Closes the database after each test.<br>  tearDown(() async {<br>    await appDatabase.close();<br>  });<br>}</pre><h4>3. Add Todos Table</h4><p>Let’s add a todos table by extending the Table class.</p><pre>class Todos extends Table {<br>  IntColumn get id =&gt; integer().autoIncrement()();<br>  TextColumn get title =&gt; text().withLength(min: 6, max: 10)();<br>  TextColumn get description =&gt; text()();<br>}</pre><p>True to our TDD nature let&#39;s add methods that will interact with the Todos table for simple CRUD actions.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/92f6cf60257aa9a567bfaeeb2505c5da/href">https://medium.com/media/92f6cf60257aa9a567bfaeeb2505c5da/href</a></iframe><p>This sets up the methods that we are going to test.</p><h4>4. Writing the tests</h4><p>We are going to start with the basic tests. Here’s what the tests will look like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6cc3c473d9537e97e76d71263e77e4ed/href">https://medium.com/media/6cc3c473d9537e97e76d71263e77e4ed/href</a></iframe><p>We could re-use the methods we have defined to add todo in the getTodo tests but I chose to use drift API methods just in case our addTodo function is broken.</p><p>If you run the tests at this point they will all fail with unimplemented error that is intended.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZjtsrS7217lzG7cx68ZjFw.png" /></figure><p>Let’s make them pass by adding the necessary code.</p><ol><li><strong>addTodo</strong></li></ol><pre>  Future&lt;Todo&gt; addTodo(String title, String description) {<br>    return into(todos).insertReturning(<br>      TodosCompanion.insert(title: title, description: description),<br>    );<br>  }</pre><p>You can hover over the test case for adding todos and hit run. This particular test should pass.</p><p><strong>2. getTodo</strong></p><pre>Future&lt;Todo&gt; getTodo(int todoId) {<br>  return (select(todos)..where((tbl) =&gt; tbl.id.equals(todoId))).getSingle();<br>}</pre><p>Just like the previous one hover over the test case description and hit run. You should get a green.</p><p>3.<strong> updateTodo</strong></p><pre>Future&lt;bool&gt; updateTodo(int todoId, String title, String description) {<br>   return update(todos)<br>        .replace(Todo(id: todoId, title: title, description: description));<br>}</pre><p>4. <strong>deleteTodo</strong></p><pre>Future&lt;bool&gt; deleteTodo(int todoId) async {<br>  return await (delete(todos)..where((t) =&gt; t.id.equals(todoId))).go() == 1;<br>}</pre><p>Delete returns the number of rows affected and in this case, it should be one.</p><p>Run all the tests from the main method and you should get the satisfying green check marks. ✅</p><p>On a bigger project, you might be using <a href="https://drift.simonbinder.eu/docs/advanced-features/daos/">DAOs</a> and will not necessarily have all your methods in the main database class. In the next article, we will look into how testing changes when we defined our queries in DAOs.</p><blockquote>If you seek tranquility, do less.</blockquote><blockquote>- Marcus Aurelius</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=978c3eb620dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tips for Computer Science students at Kenyan Universities]]></title>
            <link>https://chegebrian.medium.com/tips-for-computer-science-students-at-kenyan-universities-deab64709b57?source=rss-56553ae23594------2</link>
            <guid isPermaLink="false">https://medium.com/p/deab64709b57</guid>
            <category><![CDATA[learn-to-code]]></category>
            <category><![CDATA[university]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Chege Brian]]></dc:creator>
            <pubDate>Fri, 03 Mar 2023 07:01:40 GMT</pubDate>
            <atom:updated>2023-03-03T07:08:48.220Z</atom:updated>
            <content:encoded><![CDATA[<p>Going through campus for four years only to come out without knowing exactly what the course you were doing was about can be disappointing. This usually happens when you rely on the topics taught in class to teach something useful. Some of the topics may be relevant to learn and others may not be taught to the extent that you expect. This is especially true for computer science and related courses in IT. But it does not always have to be like that.</p><p>When I started my first year I had high hopes about what I will learn from the university but I soon came to realize that is will not be the case. Most topics were taught more theoretically and they were outdated. I hardly got any practical application of a topic from class. In this article, I will highlight some of the things I did during campus studies that propelled me to be better equipped by the time I graduated from campus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*JF4MW0nhO05_jWmT3PIQPw.jpeg" /><figcaption>Don’t be here at the end.</figcaption></figure><p>Here are some of the things you can leverage to come out better:</p><ol><li><strong>Understand there is more to what is taught.</strong></li></ol><p>In class, you will realize the way the curriculum is set up you will not get practical knowledge of what is taught till the third or fourth year unless you go out of your way to get it. Most topics are ‘introduction to…’ or “fundamentals of…”. Going by the headings, you realize there will not be more than fundamentals. The fundamentals are important but c’mon. One of the ways to get more is by researching the topics and getting their practical applications in the real world, for example, understanding how Calculus can help you in programming. Right! Okay, I agree that might be overkill but keep reading 😁.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*dSZ-ynp0raE1f73JxbQlRg.png" /><figcaption>What you will not be told of the journey ahead.</figcaption></figure><p>After four years, one is expected to have practical knowledge of the topics learnt to be relevant in the tech job market. And one of the ways I used to get more information was by going through the <a href="https://ocw.mit.edu/search/?s=department_course_numbers.sort_coursenum&amp;t=Computer%20Science&amp;type=course">MIT open courseware </a>and the <a href="https://www.youtube.com/@cs50">CS50 Havard</a> youtube channel. Those two contain information about the topics learnt in class and get to study not to pass the exam but to have more exposure to the topic. There is more to gain by going the extra mile and resources will always be available.</p><p><strong>2. Tech events, Tech Communities and Software Engineering Bootcamps</strong></p><p>While computer science fundamentals are important it may prove difficult to apply them without the knowledge of how to. Tech events expose you to what other guys are doing and it is a great way to network. You can get a mentor while at it. Tech events talks also allow you to be aware of what is out there as the speakers talk about their experiences with ‘XYZ’ technology. Most universities in Kenya have either an IT Club or a Google Student Developer Club (GDSC). At least make sure you are a member of one. I would advise joining the GDSC and not just as a member but also volunteer to give talks or anything that requires volunteers in the club. This gives you a chance to stand out too. Volunteering to give talks on topics even when you do not have a firm understanding can be a great way to learn. At GDSC Chuka University, I got a chance to host the <a href="https://www.youtube.com/playlist?list=PLgA3RP-cwIIDjW-NyLQdpwrQ6QpPhHuF1">#FlutterFridays</a> event. You guessed it right. It was a talk about Flutter that happened on Fridays. It helped me share my knowledge on Flutter and gave me a firm understanding of the topics that I talked about. Teaching something strengthens your understanding of it. Youtube recordings of the events are <a href="https://www.youtube.com/playlist?list=PLgA3RP-cwIIDjW-NyLQdpwrQ6QpPhHuF1">here</a>.</p><p>Boot camps are a great way to get fast-paced knowledge on software engineering that gets you market ready. The boot camps alone can be all you need. I got a chance to go through the Andela Bootcamp which put a jetpack on me to propel me into the deeps of software engineering and shaped my career in tech.</p><h3>Chege Brian on Twitter: &quot;Hats off. One day I will talk about mine. 😊 / Twitter&quot;</h3><p>Hats off. One day I will talk about mine. 😊</p><p>Right now, Andela boot camps are no more but other such opportunities exist. <a href="https://andela.com/alc/google-africa-developer-scholarship-gads/">Google Africa Developer Scholarship (GADS)</a>, <a href="https://moringaschool.com/courses/software-engineering-course-online/">Moringa School</a> and <a href="https://www.alxafrica.com/software-engineering/">ALX</a> are such opportunities. The programs can help you get familiar with the industry even when you are new to software engineering. You just need a curious mind and passion to learn what is required.</p><p>For any of the options above to work, you have to put in the effort as it is not a guarantee that doing any of it will change what you know. Without that extra effort, you will have the bare minimum which is not enough. The tech industry is quite competitive now.</p><p><strong>3. Keeping up with the latest in tech space.</strong></p><p>Tech space is a fast-moving wheel, what you are learning right now will probably be replaced by something else in the next five years or less. But the fundamentals will not change. This creates the need to keep up with the technologies currently used in the tech job market or what promising technologies the techies are talking about. The boot camps, tech events and Twitter are good places to know what technologies people are talking about. Regularly check LinkedIn job posts to know which technologies and skills recruiters are looking for, even when not applying for the job. This gives you a hint at what is expected in the tech job market.</p><p>Doing all this may feel overwhelming as you will be bombarded with a lot of content and you might feel you have a lot to learn. This will contribute to imposter syndrome but do not worry about that. There is nothing wrong with that. It has happened to virtually everyone in the tech community. Ask around. And it will not stop happening. One way to manoeuvre this is by choosing a tech stack and becoming good at it. If programming is your thing, this <a href="https://roadmap.sh/">developer roadmap</a> will give you an idea of which technologies are out there and how to approach them.</p><p>I hope I have given you an idea of how to approach Computer Science and any related courses on campus. The worst thing is to graduate without having ever written code or done anything that relates to the practical use case of the course. The regret is real! If you still have a chance to do something about it, start doing it now. The lecture halls are just that, “lecture halls”. Do not blame the school for not providing enough content for you. The content is already curated and that is the best you will get.</p><h4>Closing Remarks</h4><p>Do your best to not only pass exams but have a proper understanding of what you are studying and how it affects the things around you. I have not had to present my computer science degree during any job interviews and no recruiter I have come across has asked for it. I have peers who did not do anything computer related on campus but they went their way to learn to code and now we work together. What is asked for is proof of work. Put effort into your hobby projects and talk about them with pride. We are lucky that getting experience in programming is cheaper compared to other engineering courses. The only thing required is a computer and good internet. Write your first ‘hello world’ and let go from there.</p><h3>Chege Brian on Twitter: &quot;It&#39;s never work if you enjoy doing it. / Twitter&quot;</h3><p>It&#39;s never work if you enjoy doing it.</p><p>Good luck hunting. Stay curious.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=deab64709b57" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting into Flutter, love at first sight.]]></title>
            <link>https://chegebrian.medium.com/getting-into-flutter-love-at-first-sight-735e059e51be?source=rss-56553ae23594------2</link>
            <guid isPermaLink="false">https://medium.com/p/735e059e51be</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Chege Brian]]></dc:creator>
            <pubDate>Wed, 22 Feb 2023 13:06:45 GMT</pubDate>
            <atom:updated>2023-03-01T04:29:35.590Z</atom:updated>
            <content:encoded><![CDATA[<h3>Getting into Flutter, love at first sight?</h3><p>This article is based on a three-year journey it has the ability to be too long. The reader is warned! I won’t be able to capture every detail but I will try to the best of my ability without making one long article😁. Anyway, it all started with wanting to build mobile apps and after having done some web development hobby projects I yearned for something different. Progressive Web Apps (PWA) was something I had done and grew interested in building native apps.</p><p>After trying out Android developer documentation Codelabs on building mobile apps I wasn’t quite impressed. It was taking a long time for me to get an app running. First, there was the design language, XML, which required me to understand. Second, the programming language; learning Java or Kotlin to build for mobile seemed to have a steep learning curve and the hunger in me to get a mobile app running couldn’t be satisfied as fast. Something needed to come my way before I give up on mobile development.</p><p>During a conversation with a friend, <a href="https://hashnode.com/@Jenny_kibiri">Jennie</a>, she mentioned Flutter and showed me an app she had built using Flutter. The app UI was clean and after she described how she went along building the app I decided to give it a try. As usual, the first thing you ask for is tutorials. I got some video tutorials on Flutter mobile development. The video tutorials were enough to give me a rough understanding of what Flutter was all about but they lacked the details I needed. I’m not such a big fan of video tutorials, no faulting them as I find myself learning better and faster when I read documentation or written tutorials. My go-to is always the documentation, I find them very resourceful. I jumped over to<em> </em><a href="https://flutter.dev/"><em>flutter.dev</em></a> which is the official Flutter documentation. I was wowed by the extensive documentation the Flutter Team has put in place 💪🏽. Kudos!</p><p>On the docs, I skimmed through the topics on the left side pane to get a feel of what it covers. I couldn’t understand everything contained in there as some terms were geared more towards mobile development but one thing that caught my attention was the <a href="https://docs.flutter.dev/get-started/flutter-for/web-devs"><em>Flutter for web devs</em></a> section. That sounded like something placed there for me to find! I went through it and found how similar Flutter UI components were to web HTML/CSS layouts. Widgets like Container, Center, Row and Column were all familiar coming from the CSS world of Bootstrap. This was gonna get interesting and easy for me having had experience building UI’s on the web and utilizing the javascript PWA feature to build app-like experiences on web apps. Right there I knew this was it. This was “my precious”, get it. Gollum. Lord of the Rings. Ok, moving on.</p><p>As it is my custom, I skimmed the documentation from start to end and bookmarked pages that I found important. I started with <a href="https://docs.flutter.dev/get-started/install">Getting started on Flutter</a>, did the initial setup as described and created my first flutter mobile app by running <em>“flutter create test”. </em>I can’t remember clearly what was the name of the app but I might have called it test or test_app, one thing I am sure of is that it had the word “test” in it. “Test” is the industry standard for naming something you are trying out for the first time so I’m sure it had to be “test”. I ran the famous counter app and boom I had a mobile app installed and ready to go. I was amazed by how fast and easy it was to make changes to the code and see results right away without having to rebuild the whole app. It was like magic and still is magic. With <em>hot reload, </em>it felt like a browser refresh ⚡️.</p><h4>Projects:</h4><p>After going through the CookBooks I was confident enough to start taking on complex projects. To begin with, I took a challenge to recreate the google contacts app UI with flutter and boy did I enjoy building this one. Project-based learning will always trump over 10000 hrs of watching tutorials on YouTube or reading blogs about a subject 💯. That project can be found <a href="https://github.com/ChegeBryan/google-contacts-mock">here</a> and it’s pinned on my GitHub as a reminder of where it began.</p><p>The project taught me how to perform simple navigation, pass data around while navigating, customize the app icon and app name, use packages and navigate the widget catalog. Which I’ve gotta say is well documented you will hardly miss a UI element. It was easy too to know what to look for as the widget names are close to what I was used to working with in UI web development, for example, to group sections I could use the Container widget and arranging the layout was easy with Column and Row widgets, creating user avatars was as simple as calling the CircleAvatar widget and so on. It was simply much faster for me to get into Flutter coming from web development. Ooh did I mention Dart, Dart syntax is similar to Javascript and what is even better is that you do not need to learn dart to get started with Flutter. If this is not your first interaction with an object-oriented language it is necessary to learn dart exclusively.</p><p>The Google Contacts mock gave me the confidence to try out a more complex UI. I jumped into other different apps but those were more focused on learning about the extensive widget library Flutter has to offer. I remember at that time everyone seemed to be building a Netflix clone 😁. I can’t remember the reason why I don’t have a Netflix clone too.</p><h3>Chege Brian on Twitter: &quot;Added more widgets to the Google Contacts mock app. Working with forms is quite interesting with flutter. #flutterdev #flutter pic.twitter.com/n3GoBGoSgE / Twitter&quot;</h3><p>Added more widgets to the Google Contacts mock app. Working with forms is quite interesting with flutter. #flutterdev #flutter pic.twitter.com/n3GoBGoSgE</p><p>I was still in the uni and my internship was coming up, luckily I got to intern at a company that was using Flutter and I had a chance to put my skills to the test. With my internship buddy, we worked on a <a href="https://github.com/ChegeBryan/scholarships">student sponsorship app</a>. I had a lot of time on my hands I decided to try out some crazy UI’s with the app and dribble was the place to get those inspirations from. Glassmorphism was a thing and decided to try it out on the auth pages. Wasn’t as easy as I thought it would be but I pulled through.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7w0Rb5xfDX6rceskARrzyA.png" /><figcaption>Sponsorship app screenshots.</figcaption></figure><p>During my internship, I had another app called <a href="https://github.com/ChegeBryan/design-delivery">design-delivery</a> that I was working on the side. This one was a different one as it came as a request from a student who needed an app for their final year project. (If you happen to read this and it is or you are the lecturer who invigilated this project just know it was fun building this one). I got my hands dirty on this one it had hefty requirements but I was ambitious enough to try them out. It was an e-commerce-like app with the seller, buyer and delivery guy all using the same app. It was pretty much to put on one app.😁 On a production app this is not something wise to do but for this, it was easier doing it like this. It was yet another Flutter app for project-based learning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T71aMeXKhn20b4erF0_S_g.png" /><figcaption>Design Delivery App screenshots</figcaption></figure><p>By building both the sponsorship app and the delivery app, I learnt about working with Firebase, Firebase Auth, Flutter Firestore, Provider and authentication and authorization on mobile apps and much more. It was during the scholarship app that I came across the <a href="https://bloclibrary.dev/#/">bloc state management library</a> and after reading the documentation it felt all too tough for me to get started. The separation between business logic and UI was not that clear at the time, it seemed all too hard. I abandoned it and stuck with the <a href="https://pub.dev/packages/provider">Provider</a> state management pattern. If I hadn’t given up so early I would have understood that bloc is based on the provider pattern. Shame! 🫠</p><p>It wasn’t until when I landed my first job, in 2021, that I picked up an app that was built with Flutter and was using the BLOC pattern that I now had to put some effort into understanding bloc. Luckily the previous developer had left comments on their code and also had left links to resources one could check to understand what the architecture of the app was based on. Something that I found very important to do in projects I’m involved in. The resource they left behind was <a href="https://resocoder.com/category/tutorials/flutter/tdd-clean-architecture/">ResoCoder’s Clean Architecture</a> articles. I found it to be a good way to architect production apps and apps that are likely to grow bigger with time. I remember I used to go to work every morning and just go through the article series till I understood the architecture to be able to apply it to the project that I was supposed to work on. The experience on this app is what made me understand how to architect a Flutter app the bloc pattern way. I admit seeing a fully functional app did propel me forward miles ahead.</p><p>Over the years each project has taught me something new and helped me to tackle topics that I had initially deemed too difficult. One step at a time. Wanting to know everything there is to know will only make you frustrated about what you ought to know and still don’t which can contribute to imposter syndrome.</p><p>Fast forward to today and we just launched a media player app that works on iOS, Android and Apple Watch with support for Apple CarPlay and Android Auto. I couldn’t be prouder of what I have achieved to learn on this project. The embedded Apple Watch app on the Flutter app that communicates with the app through platform channels all seemed like magic making me appreciate the power one can leverage with Flutter even with currently unsupported platforms. I will put the whole experience in an article to summarize the adventure it has.</p><p>Looking back to the counter app and being amazed by the blazing fast hot reload, Flutter felt at home.</p><blockquote>When you are almost “completing” your app and you feel it has been a tough journey to get there, go back to the first commit and build the app from the state it was when you just created it using <em>“flutter create” </em>you will appreciate the journey. 💪🏽</blockquote><p>Most UI elements were familiar and the extensive documentation made it easy to pick up Flutter and make it my first tool of the trade. It has been a journey of 3 years and I still feel there’s a lot to learn in Flutter. Heck, I still come across new widgets every time I dig into the documentation. As I write this two days ago I came across the Placeholder widget. I had no idea it existed, I did think it was added to the Flutter 3.0.0 release and went to read the release notes.</p><p>I have loved the experience so far with Flutter and it has been a journey of learning and unlearning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=735e059e51be" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>