<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Festus Chris Otopa Ayeh-Datey</title>
    <description>The latest articles on DEV Community by Festus Chris Otopa Ayeh-Datey (@kwesigates).</description>
    <link>https://dev.to/kwesigates</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1109764%2Fe759a05b-9f6c-47e0-83ae-5c3bf1d73f55.jpeg</url>
      <title>DEV Community: Festus Chris Otopa Ayeh-Datey</title>
      <link>https://dev.to/kwesigates</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kwesigates"/>
    <language>en</language>
    <item>
      <title>Learning to Build: My Journey with Flutter &amp; Dart (Part One)</title>
      <dc:creator>Festus Chris Otopa Ayeh-Datey</dc:creator>
      <pubDate>Mon, 25 Aug 2025 19:54:52 +0000</pubDate>
      <link>https://dev.to/kwesigates/learning-to-build-my-journey-with-flutter-dart-part-one-1pbg</link>
      <guid>https://dev.to/kwesigates/learning-to-build-my-journey-with-flutter-dart-part-one-1pbg</guid>
      <description>&lt;p&gt;Over the past few weeks, I’ve taken on something that has been on my radar for a while: learning to build with Dart and Flutter. Mobile technologies have always fascinated me, and I wanted to know what it really meant to sit down, set up the environment, and start piecing widgets, logic, and state into something real.&lt;br&gt;
Coming from a QA test automation background, I’m used to interacting with apps from the outside, probing them for weak points, automating their flows, and breaking things so we can fix them, and overall ensuring users get the best experience possible. Flutter flips that on its head. Instead of consuming an app, I’m learning how to compose one.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is Flutter?
&lt;/h2&gt;

&lt;p&gt;Flutter is a framework built from within Google for building cross-platform apps, and in Flutter you describe what the UI should look like given a specific state (state has suddenly become my favourite word).&lt;br&gt;
Flutter to me feels like assembling Lego blocks but in code. As our tutors like to remind us: “Flutter is all about widgets.” Widgets stacked on widgets, combined and styled until they become a full interface.&lt;/p&gt;
&lt;h2&gt;
  
  
  Foundational Flutter: First Steps
&lt;/h2&gt;

&lt;p&gt;The first step to mastery would be learning Dart. Learning Dart was quite familiar since I have a familiarisation with Java for the work I do with automation. Dart felt oddly similar but lighter and, in some ways, more fun.&lt;/p&gt;
&lt;h2&gt;
  
  
  Quizzla
&lt;/h2&gt;

&lt;p&gt;Soon after an introduction to the Flutter framework and its basics, including handling navigation within Flutter, we were given a UI design to build with Flutter. I decided to take this on with an iterative format of building, learning, and rebuilding.&lt;/p&gt;

&lt;p&gt;Starting the Flutter repo was the first step, which was with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flutter create example_app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Starting a Flutter app, what you will usually see is a main.dart with some boilerplate code. If you are planning to build a mobile app with multiple screens, which I am sure most of us would be doing, the next step would be to go nuclear and then clear out the boilerplate code and leave only the important bits. Which would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'package:flutter/material.dart';

void main() {
  runApp(
    MyApp(),
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(

    );
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After this, the next step was building the splash screen, which I first built as a Stateless widget and then I had to switch it later on to a Stateful widget. Now what this means is for a Stateless widget (immutable), we do not expect the page to change over time based on certain actions, and for a Stateful widget (mutable), it means we expect the page to change over time.&lt;br&gt;
Now why I had to do this was that after building my splash screen and then going on to build my onboarding screen, I quickly realised that for the best user experience it would be best for the splash screen to show for only a few seconds and then the onboarding screen to show. But after running my app by using the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flutter run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I discovered that it was not so. I had to research and discovered that to have this work properly would be to do a Future.delayed and set it to about 3,000 milliseconds, which is the generally recommended amount of time for which a splash screen should show by UX standards. This required a Stateful widget implementation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Future.delayed(const Duration(milliseconds: 300), () {
      Navigator.pushReplacementNamed(context, "/onboarding");
    });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Oh, and lest I forget, a key thing to handling navigation—or the most efficient path I find—is handling routes through the main.dart, which is why you see in the Future.delayed snippet the string “/onboarding”. The initialRoute and routes properties define the navigation structure of the app. initialRoute sets the first screen shown when the app starts, which in my case is the splash screen, and the routes map connects the route names as strings to the widget builders like “/home” does for the Home screen.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return MaterialApp(
      initialRoute: "/",
      routes: {
        "/": (context) =&amp;gt; const SplashScreen(),
        "/onboarding": (context) =&amp;gt; const OnboardingScreen(),
        "/about-me": (context) =&amp;gt; const AboutMe(),
        "/home": (context) =&amp;gt; HomeScreen(),
        "/quiz-categories": (context) =&amp;gt; QuizCategoriesScreen(),
      },
    );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next is building the onboarding screen, and this is where I started having some serious fun with widgets and styling widgets. During this stage, I came across a new favorite widget of mine, which is called SafeArea. I just make the body of all my screens a SafeArea. I liked SafeArea more when I first tried running one Flutter app on various devices using the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flutter run -d all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What SafeArea does is it wraps the whole screen under an area so you do not have to worry about widgets overflowing on other screen sizes.&lt;br&gt;
I also discovered styling widgets and texts using style:. For example, in this child widget, I used style to design an ElevatedButton to make the button background color orange and give it a shape with a border radius:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFFFE950B),
padding: const EdgeInsets.symmetric(vertical: 16),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
 ),
),
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next screen I had to build was the About Me page, which introduced me to TextField widgets and using them to create forms. So what I decided to do was wrap my TextField widgets under a ListView widget.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ListView(
children: [
const Text("Enter your first name"),
const SizedBox(height: 8),
 TextField(decoration: _fieldDecoration("First Name")),

const Text("Enter your last name"),
const SizedBox(height: 8),
TextField(decoration: _fieldDecoration("Last name")),

const Text("Descrbe Yourself"),
const SizedBox(height: 16),
TextField(
                        decoration: _fieldDecoration(
"Briefly Describe yourself and your interests",
                        ),
                      ),
                    ],
                  ),
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next was the Home screen, and this is where I hit my first real wall.&lt;/p&gt;

&lt;p&gt;At first, I had a Container with a Column child that displayed the message “You have no score recorded yet.” On my emulator, this kept throwing overflow errors. At first, I thought it was padding or a missing SizedBox, but after some research I learned that the issue was with how Flutter was trying to fit everything into the screen height.&lt;/p&gt;

&lt;p&gt;The quick fix was to wrap the whole body in a SingleChildScrollView, so the content could scroll vertically instead of being forced into a fixed height. That solved the overflow.&lt;/p&gt;

&lt;p&gt;But then another issue appeared: the user had to start scrolling from the very top of the page, and the header (avatar and username) disappeared behind the emulator’s dynamic island. It worked, but it didn’t feel right. That’s when I realized Flutter requires you to think carefully about layouts, scrollables, and user experience.&lt;/p&gt;

&lt;p&gt;I’ve learned that Flutter really is about stacking and styling widgets until they become something real.&lt;/p&gt;

&lt;p&gt;Quizzla is still evolving, but every new screen I build teaches me something new about how Flutter apps come together.&lt;/p&gt;

&lt;p&gt;This is where I’ll pause Part One of my journey. In Part Two, I’ll be diving into state management and exploring local storage and shared preferences.&lt;/p&gt;

&lt;p&gt;And before I close, a special thanks to Victoria, Eyram, and Elvis for their time and effort in guiding us through Flutter.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>USSD Code Development by Chris Aydat.</title>
      <dc:creator>Festus Chris Otopa Ayeh-Datey</dc:creator>
      <pubDate>Sun, 24 Sep 2023 00:38:07 +0000</pubDate>
      <link>https://dev.to/kwesigates/ussd-code-development-by-chris-aydat-2m32</link>
      <guid>https://dev.to/kwesigates/ussd-code-development-by-chris-aydat-2m32</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/chrisaydat/ussddevelopment.git" rel="noopener noreferrer"&gt;https://github.com/chrisaydat/ussddevelopment.git&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unstructured Supplementary Service Data (USSD) is a protocol that allows basic feature phones to interact with backend systems. In this article, we will go through a USSD code sample developed by Aydat, Inc. to understand how such applications are built.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;The USSD application developed by (chris) Aydat, Inc for Dyrect. provides the following capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User registration&lt;/li&gt;
&lt;li&gt;Balance inquiry&lt;/li&gt;
&lt;li&gt;P2P money transfers&lt;/li&gt;
&lt;li&gt;Purchases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We will understand how the code implements these features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Application Flow
&lt;/h2&gt;

&lt;p&gt;The high-level flow is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User dials USSD code on their phone&lt;/li&gt;
&lt;li&gt;Main handler is invoked which displays menu&lt;/li&gt;
&lt;li&gt;User input is processed to navigate menu options &lt;/li&gt;
&lt;li&gt;Relevant actions like transactions, queries are performed&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is enabled by PHP code and USSD protocol features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Main Handler
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;ussd.php&lt;/code&gt; file handles the USSD session:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;//ussd.php&lt;/span&gt;

&lt;span class="nv"&gt;$text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$_GET&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'text'&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt; 

&lt;span class="nv"&gt;$data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;explode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$text&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;//determine menu level&lt;/span&gt;
&lt;span class="nv"&gt;$level&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;//route user input  &lt;/span&gt;
&lt;span class="k"&gt;switch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]){&lt;/span&gt;

  &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; 
    &lt;span class="nf"&gt;registration&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  

  &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 

    &lt;span class="c1"&gt;//...other cases&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It receives user input, parses it to identify menu level, and routes it accordingly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Registration Flow
&lt;/h2&gt;

&lt;p&gt;Registration prompts user for details one by one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;//functions.php&lt;/span&gt;

&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;registration&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$level&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="nf"&gt;askFirstName&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;  

  &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$level&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="nf"&gt;askLastName&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;//...other fields&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$level&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="nf"&gt;saveToDB&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nf"&gt;confirmRegistration&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; 
  &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;ussd_proceed()&lt;/code&gt; is used to prompt for next field.&lt;/p&gt;

&lt;h2&gt;
  
  
  Session Control
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nf"&gt;ussd_proceed&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="nf"&gt;ussd_stop&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="n"&gt;used&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;manage&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;

&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;ussd_proceed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$text&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
  &lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"CON &lt;/span&gt;&lt;span class="nv"&gt;$text&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;ussd_stop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$text&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
  &lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"END &lt;/span&gt;&lt;span class="nv"&gt;$text&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Database Integration
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;connection.php&lt;/code&gt; sets up database connectivity:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;//connection.php&lt;/span&gt;

&lt;span class="nv"&gt;$host&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"localhost"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$username&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ussd"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"123456"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;$db&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;mysqli&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$host&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"ussdApp"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;//execute queries&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Used for registration, balance check etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The Next Version of this Article Will explore Database Connections and Final Deployment &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>php</category>
      <category>startup</category>
    </item>
  </channel>
</rss>
