<?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 kelvin on Medium]]></title>
        <description><![CDATA[Stories by kelvin on Medium]]></description>
        <link>https://medium.com/@kelvinthuranira?source=rss-d3ee0d422bc1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hgVUh0WLFEY3ChnkGgh1Eg.jpeg</url>
            <title>Stories by kelvin on Medium</title>
            <link>https://medium.com/@kelvinthuranira?source=rss-d3ee0d422bc1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 00:20:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kelvinthuranira/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[Eye Offline AI Image Scanner]]></title>
            <link>https://kelvinthuranira.medium.com/eye-offline-ai-image-scanner-4d20f1bf988e?source=rss-d3ee0d422bc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d20f1bf988e</guid>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[photography]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[art]]></category>
            <dc:creator><![CDATA[kelvin]]></dc:creator>
            <pubDate>Thu, 29 Oct 2026 23:14:37 GMT</pubDate>
            <atom:updated>2026-10-29T23:14:37.225Z</atom:updated>
            <content:encoded><![CDATA[<p>Similar images search App for Android</p><p>Finding a particular picture among thousands of photos can be frustrating. What if you could simply select one image and let artificial intelligence find visually similar pictures in your gallery?</p><p>Meet Eye Offline AI Image Scanner, an Android app that uses on-device artificial intelligence to search for visually similar images.</p><p>How Does Eye Work?</p><p>Eye analyzes image content using AI and compares visual features to find similar pictures stored on your device.</p><p>Simply:</p><p>Select one image as your reference.</p><p>Let Eye search your indexed gallery.</p><p>Discover visually similar images.</p><p>No need to remember filenames or manually browse thousands of photos.</p><p>Why Use Eye?</p><p>Offline AI: Image analysis happens directly on your device.</p><p>Privacy-focused: No cloud uploads are required for core visual searches.</p><p>Fast searching: Discover similar images across large collections.</p><p>Easy to use: Give it one reference image and let AI find the matches.</p><p>Convenient: Search by visual content instead of filenames.</p><p>Eye is useful for photographers, designers, content creators and anyone with a large photo collection.</p><p>Download Eye</p><p>Looking for an offline AI image search app or a similar photo finder for Android?</p><p>Eye makes image discovery smarter, faster and more convenient.</p><p>Download on Google Play:</p><p><a href="https://play.google.com/store/apps/details?id=com.toptech.eye">https://play.google.com/store/apps/details?id=com.toptech.eye</a></p><p>Eye – Offline AI Image Scanner</p><p>Give it an image. Let it find the matches.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*cJ5n7i5MEBnblVT_VbzX2w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*GS8dad09B6BTtVfzAaRu1w.jpeg" /></figure><p>Download Eye Offline AI Image Scanner from playstore</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d20f1bf988e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In PWA Service Worker in Flutter is Like a Mini CI enabler.]]></title>
            <link>https://kelvinthuranira.medium.com/in-pwa-service-worker-in-flutter-is-like-a-mini-ci-enabler-9bacc5d0f9d8?source=rss-d3ee0d422bc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bacc5d0f9d8</guid>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[pwa]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[kelvin]]></dc:creator>
            <pubDate>Mon, 14 Oct 2024 09:08:56 GMT</pubDate>
            <atom:updated>2024-10-14T09:15:04.798Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>PWA Service Worker in Flutter is a Mini CI enabler.</strong></h3><p>Here’s how you can configure the service worker in Flutter for your PWA to ensure users receive the latest version of your app.</p><p>1. <strong>Configure the index.html File:</strong></p><p>The index.html file in your web/ folder contains the logic for registering the service worker. Modify the file to add logic for handling updates and refreshing the PWA when new features are deployed.</p><p>Go to web/index.html and ensure the service worker registration logic looks like this:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>  &lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;meta name=&quot;description&quot; content=&quot;A Flutter Web App&quot;&gt;<br>    &lt;title&gt;Flutter PWA&lt;/title&gt;<br>    &lt;link rel=&quot;manifest&quot; href=&quot;manifest.json&quot;&gt;<br>    &lt;script&gt;<br>      if (&#39;serviceWorker&#39; in navigator) {<br>        window.addEventListener(&#39;load&#39;, () =&gt; {<br>          navigator.serviceWorker.register(&#39;flutter_service_worker.js&#39;).then((registration) =&gt; {<br>            registration.onupdatefound = () =&gt; {<br>              const installingWorker = registration.installing;<br>              installingWorker.onstatechange = () =&gt; {<br>                if (installingWorker.state === &#39;installed&#39;) {<br>                  if (navigator.serviceWorker.controller) {<br>                    // New update available, notify user to refresh<br>                    console.log(&#39;New content is available; please refresh.&#39;);<br>                    if (confirm(&#39;New version available! Refresh to update?&#39;)) {<br>                      window.location.reload();<br>                    }<br>                  }<br>                }<br>              };<br>            };<br>          }).catch((error) =&gt; {<br>            console.error(&#39;Error during service worker registration:&#39;, error);<br>          });<br>        });<br>      }<br>    &lt;/script&gt;<br>  &lt;/head&gt;<br>  &lt;body&gt;<br>    &lt;script src=&quot;main.dart.js&quot;&gt;&lt;/script&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;<br></pre><p>While Flutter automatically generates the <strong><em>flutter_service_worker.js</em></strong>, you can influence the behavior of the service worker by handling cache updates in the code as shown in the previous step (via <strong><em>index.html</em></strong>). If you want to customize the service worker, you can:</p><p>1. <strong>Handle Service Worker Update:</strong></p><p>The <strong><em>onupdatefound</em></strong> event in the <strong><em>index.html</em></strong> ensures that the service worker checks for updates. If a new version is found, it will reload the app to reflect the new features.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bacc5d0f9d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ACTIVATING FLUTTER WITH DART]]></title>
            <link>https://kelvinthuranira.medium.com/activating-flutter-with-dart-355c813d8e89?source=rss-d3ee0d422bc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/355c813d8e89</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[kelvin]]></dc:creator>
            <pubDate>Mon, 02 Sep 2024 08:27:57 GMT</pubDate>
            <atom:updated>2024-09-02T08:32:28.577Z</atom:updated>
            <content:encoded><![CDATA[<h3>Activate the power of flutter widgets with Dart.</h3><p>In Flutter, Dart concepts play a critical role in managing widgets efficiently. Here’s a comprehensive guide on applying Dart concepts to create and manage widgets, such as creating widgets as functions, using classes, and improving reusability and readability.</p><ol><li><strong>Widgets as Functions</strong><br>One common pattern is to create widgets as functions, especially for simple, reusable widgets.</li></ol><p><strong>Example</strong></p><pre>import &#39;package:flutter/material.dart’;<br><br>class MyApp extends StatelessWidget {<br>  @override<br>  Widget build(BuildContext context) {<br>    return MaterialApp(<br>      home: Scaffold(<br>        appBar: AppBar(<br>          title: Text(&#39;Widgets as Functions&#39;),<br>        ),<br>        body: Column(<br>          children: [<br>            myCustomButton(),<br>            myCustomText(&#39;Hello World!&#39;),<br>          ],<br>        ),<br>      ),<br>    );<br>  }<br>  // Custom button widget as a function<br>  Widget myCustomButton() {<br>    return ElevatedButton(<br>      onPressed: () {<br>        print(&quot;Button Pressed!&quot;);<br>      },<br>      child: Text(&#39;Click Me&#39;),<br>    );<br>  }<br><br>// Custom text widget as a function with parameters<br>  Widget myCustomText(String text) {<br>    return Padding(<br>      padding: const EdgeInsets.all(16.0),<br>      child: Text(<br>        text,<br>        style: TextStyle(fontSize: 24),<br>      ),<br>    );<br>  }<br>}<br><br>void main() {<br>  runApp(MyApp());<br>}<br></pre><p><strong>Advantages:</strong><br><strong>Modularity</strong>: You can modularize your widgets for reuse across different parts of the app.<br>-<strong>Readability</strong>: Your main `build` method stays clean and concise.<br><strong>Parameters</strong>: Functions allow you to pass parameters for customization.</p><p>2. <strong>Widgets as Classes</strong><br>For more complex widgets or those that require state, creating widgets as classes (either `StatelessWidget` or `StatefulWidget`) is preferred.</p><p><strong>Example</strong></p><pre><br>import &#39;package:flutter/material.dart’;<br>class CustomCard extends StatelessWidget {<br>  final String title;<br>  final String subtitle;<br>CustomCard({required this.title, required this.subtitle});<br><br> @override<br>  Widget build(BuildContext context) {<br>    return Card(<br>      child: ListTile(<br>        title: Text(title),<br>        subtitle: Text(subtitle),<br>      ),<br>    );<br>  }<br>}<br><br>class MyApp extends StatelessWidget {<br>  @override<br>  Widget build(BuildContext context) {<br>    return MaterialApp(<br>      home: Scaffold(<br>        appBar: AppBar(title: Text(&#39;Widget as Classes&#39;)),<br>        body: ListView(<br>          children: [<br>            CustomCard(title: &quot;Card 1&quot;, subtitle: &quot;Subtitle 1&quot;),<br>            CustomCard(title: &quot;Card 2&quot;, subtitle: &quot;Subtitle 2&quot;),<br>            CustomCard(title: &quot;Card 3&quot;, subtitle: &quot;Subtitle 3&quot;),<br>          ],<br>        ),<br>      ),<br>    );<br>  }<br>}<br><br>void main() {<br>  runApp(MyApp());<br>}<br></pre><p>3. <strong>Refactoring Widgets</strong><br>Refactoring large widgets into smaller, reusable widgets as classes or functions improves maintainability and reusability. Consider the following:</p><p><strong>Break Down Large Widgets</strong>: When a widget becomes too complex, break it down into smaller components. Each component can be managed as a separate class or function.<br><strong>Reuse</strong>: By extracting widgets into separate functions or classes, you can reuse them across multiple screens.</p><p>4. <strong>Using Named Constructors</strong><br>Named constructors in Dart are great for creating variations of widgets that share common properties.</p><pre>class MyButton extends StatelessWidget {<br>  final String label;<br>  final VoidCallback onPressed;<br>// Default constructor<br>  MyButton({required this.label, required this.onPressed});<br>// Named constructor for a specific button style<br>  MyButton.primary({required this.label, required this.onPressed});<br><br>@override<br>  Widget build(BuildContext context) {<br>    return ElevatedButton(<br>      onPressed: onPressed,<br>      child: Text(label),<br>    );<br>  }<br>}<br></pre><p>5. <strong>Composition Over Inheritance</strong><br>Instead of relying heavily on inheritance, prefer composition, which means building widgets by combining smaller ones.</p><pre>class CustomIconButton extends StatelessWidget {<br>  final IconData icon;<br>  final String label;<br>  final VoidCallback onPressed;<br>CustomIconButton({required this.icon, required this.label, required this.onPressed});<br>@override<br>  Widget build(BuildContext context) {<br>    return Row(<br>      children: [<br>        Icon(icon),<br>        SizedBox(width: 8),<br>        TextButton(<br>          onPressed: onPressed,<br>          child: Text(label),<br>        ),<br>      ],<br>    );<br>  }<br>}<br></pre><p>6. <strong>Understanding Widget Lifecycle</strong><br>Understanding the widget lifecycle, especially for `StatefulWidget`, helps in better managing widgets.</p><p><strong>initState()</strong>: Called once when the widget is inserted into the widget tree. Use it to initialize things.<br><strong>didUpdateWidget()</strong>: Called when the parent widget changes the configuration. It can be used to update based on new inputs.<br><strong>setState()</strong>: Triggers a rebuild and should be used to change the internal state.<br><strong>dispose()</strong>: Clean up resources when the widget is removed.</p><pre>class TimerWidget extends StatefulWidget {<br>  @override<br>  _TimerWidgetState createState() =&gt; _TimerWidgetState();<br>}<br>class _TimerWidgetState extends State&lt;TimerWidget&gt; {<br>  late Timer _timer;<br>  int _counter = 0;<br> @override<br>  void initState() {<br>    super.initState();<br>    _timer = Timer.periodic(Duration(seconds: 1), (timer) {<br>      setState(() {<br>        _counter++;<br>      });<br>    });<br>  }<br>@override<br>  void dispose() {<br>    _timer.cancel();<br>    super.dispose();<br>  }<br>@override<br>  Widget build(BuildContext context) {<br>    return Text(&#39;Counter: $_counter&#39;);<br>  }<br>}<br></pre><p>7. <strong>Using Mixins for Reusability</strong><br>Dart allows you to use <em>mixins</em> to reuse code across different classes, especially when creating custom behaviors.</p><p>To understand more on mixins, check our previous post <a href="https://medium.com/@kelvinthuranira/dart-mixins-376a8af00e07">https://medium.com/@kelvinthuranira/dart-mixins-376a8af00e07</a></p><pre><br>mixin Logger {<br>  void log(String message) {<br>    print(message);<br>  }<br>}<br>class MyWidget extends StatelessWidget with Logger {<br>  @override<br>  Widget build(BuildContext context) {<br>    log(’MyWidget build called’);<br>    return Container();<br>  }<br>}<br><br></pre><p>8. <strong>Handling Asynchronous Widgets</strong><br>Handling async operations with widgets, such as fetching data from an API, can be done using <em>FutureBuilder</em> or <em>StreamBuilder.</em></p><pre>Future&lt;String&gt; fetchData() async {<br>  await Future.delayed(Duration(seconds: 2));<br>  return &quot;Data loaded!&quot;;<br>}<br>class MyAsyncWidget extends StatelessWidget {<br>  @override<br>  Widget build(BuildContext context) {<br>    return FutureBuilder&lt;String&gt;(<br>      future: fetchData(),<br>      builder: (context, snapshot) {<br>        if (snapshot.connectionState == ConnectionState.waiting) {<br>          return CircularProgressIndicator();<br>        } else if (snapshot.hasError) {<br>          return Text(&quot;Error: ${snapshot.error}&quot;);<br>        } else {<br>          return Text(&quot;Result: ${snapshot.data}&quot;);<br>        }<br>      },<br>    );<br>  }<br>}<br></pre><p>9. <strong>Using Enums for Widget State</strong><br>Enums are a great way to manage different states in a widget, especially for UI variations or conditional rendering.</p><pre>enum ButtonState { idle, loading, done }<br>class CustomStateButton extends StatefulWidget {<br>  @override<br>  _CustomStateButtonState createState() =&gt; _CustomStateButtonState();<br>}<br>class _CustomStateButtonState extends State&lt;CustomStateButton&gt; {<br>  ButtonState _buttonState = ButtonState.idle;<br>void _handlePress() {<br>    setState(() {<br>      _buttonState = ButtonState.loading;<br>    });<br>    Future.delayed(Duration(seconds: 2), () {<br>      setState(() {<br>        _buttonState = ButtonState.done;<br>      });<br>    });<br>  }<br>@override<br>  Widget build(BuildContext context) {<br>    return ElevatedButton(<br>      onPressed: _handlePress,<br>      child: _buttonState == ButtonState.loading<br>          ? CircularProgressIndicator(color: Colors.white)<br>          : Text(_buttonState == ButtonState.done ? &#39;Done&#39; : &#39;Press Me&#39;),<br>    );<br>  }<br>}<br></pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=355c813d8e89" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dart Mixins]]></title>
            <link>https://kelvinthuranira.medium.com/dart-mixins-376a8af00e07?source=rss-d3ee0d422bc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/376a8af00e07</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <dc:creator><![CDATA[kelvin]]></dc:creator>
            <pubDate>Fri, 09 Aug 2024 17:19:12 GMT</pubDate>
            <atom:updated>2024-09-02T08:58:53.092Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Dart Mixins</strong></p><p>In Dart, <strong>mixins</strong> and <strong>interfaces</strong> are powerful tools for sharing code and defining reusable behaviors across classes.</p><p>Note: Mixins are like abstract classes, one can inherit from multiple mixins avoiding the diamond of death deadlock. <a href="https://medium.com/@kelvinthuranira/dart-for-deadly-diamond-of-death-7e4c78eb2aa4">https://medium.com/@kelvinthuranira/dart-for-deadly-diamond-of-death-7e4c78eb2aa4</a></p><p><strong>What are Mixins?</strong><br>Mixins in Dart allow you to reuse a class’s methods and properties in other classes without using inheritance. A mixin is typically defined using the mixin keyword.</p><p><strong>How to Use Mixins?</strong><br>Mixins are intended to be used with classes. You can apply a mixin to a class using <strong>with</strong> keyword.</p><p><strong>Example</strong>: Using Mixin in dart</p><pre>mixin Engine{<br>  void start() {<br>    print(&quot;vroom!..engine starting&quot;);<br>  }<br>}<br>class Car {<br>  void park() {<br>    print(&quot;Car is packed&quot;);<br>  }<br>}<br>class Volvo extends  Car with Engine{}<br>void main() {<br>  var volvo= Volvo();<br>  volvo.park(); // Output: car is parked<br>  vol<br></pre><p>In the example above, the Volvo class inherits from Car and also gets the start method from the Engine mixin.</p><p><strong>When to Use Mixins?</strong><br>Use mixins when you want to share methods and properties among classes without establishing a strong inheritance relationship.</p><p>To understand more on mixins and other important applicable concepts in flutter read our previous post: <a href="https://medium.com/@kelvinthuranira/activating-flutter-with-dart-355c813d8e89">https://medium.com/@kelvinthuranira/activating-flutter-with-dart-355c813d8e89</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=376a8af00e07" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dart for Deadly Diamond Of Death.]]></title>
            <link>https://kelvinthuranira.medium.com/dart-for-deadly-diamond-of-death-7e4c78eb2aa4?source=rss-d3ee0d422bc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e4c78eb2aa4</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[kelvin]]></dc:creator>
            <pubDate>Thu, 08 Aug 2024 11:56:04 GMT</pubDate>
            <atom:updated>2024-08-09T17:52:06.429Z</atom:updated>
            <content:encoded><![CDATA[<p>Dart for Deadly Diamond Of Death.</p><p>Dart does not support multiple inheritance. This you might think of as a drawback. Well, have you heard of the Deadly Diamond Of Death? This is a deadlock related to multiple inheritance.</p><p>For example let’s create an abstract class performer and extend two child classes from Performer (Guitarist and class Drummer ) Performer can be both a guitarist and a drummer.</p><p>On extending from class performer we call the abstract method perform(); without an instance of class Performer.</p><h3>Note: Abstract methods don’t need an instance of class to be called.</h3><p>Now deadlock happens because the language supporting multiple inheritance doesn’t really know which of both the classes(Drummer &amp; Guitarist) to call the method performer(); from.</p><p>Since multiple inheritance is really necessary and almost unavoidable, dart team came up with</p><p>Mixins <a href="https://medium.com/@kelvinthuranira/dart-mixins-376a8af00e07">https://medium.com/@kelvinthuranira/dart-mixins-376a8af00e07</a></p><p>and Interfaces as the solution .</p><p>Deep dive into the problem..</p><p>Example of a deadly diamond situation in python .</p><pre>class A:<br> def say_hello(self):<br> print(&quot;Hello from A&quot;)<br><br>class B(A):<br> def say_hello(self):<br> print(&quot;Hello from B&quot;)<br> super().say_hello()<br><br>class C(A):<br> def say_hello(self):<br> print(&quot;Hello from C&quot;)<br> super().say_hello()<br><br>class D(B, C):<br> def say_hello(self):<br> print(&quot;Hello from D&quot;)<br> super().say_hello()<br><br>d = D()<br>d.say_hello()<br><br><br><br></pre><blockquote><strong>Explanation:</strong></blockquote><blockquote>Class A: The base class with a method.</blockquote><blockquote>Class B: Inherits from A and overrides the method. It calls super().method() to invoke the method from its superclass, A.</blockquote><blockquote>Class C: Similar to B, inherits from A, overrides the method, and calls the super().method().</blockquote><blockquote>Class D: Inherits from both B and C, overrides the method, and calls super().method() to invoke the method from its parent classes.</blockquote><blockquote>Output:When you run the</blockquote><blockquote>d = D()<br>d.method()The output will be:</blockquote><blockquote>Method in D<br>Method in B<br>Method in C<br>Method in AThe MRO, when printed, will show the order in which classes are resolved:</blockquote><blockquote>print(D.mro())</blockquote><blockquote>This will output:</blockquote><blockquote>&lt;class &#39;__main__.D’&gt;,</blockquote><blockquote>&lt;class &#39;__main__.B’&gt;,</blockquote><blockquote>&lt;class &#39;__main__.C’&gt;,</blockquote><blockquote>&lt;class &#39;__main__.A’&gt;,</blockquote><blockquote>&lt;class &#39;object’&gt;</blockquote><blockquote>This means that when Python looks for a method in D, it will first check D, then B, then C, and finally A.SummaryThe &quot;Deadly Diamond of Death&quot; is a classic problem in multiple inheritance scenarios, but Python’s MRO and the C3 linearization algorithm resolve it neatly.</blockquote><blockquote>The example above shows how Python determines which method to call when multiple inheritance creates a diamond pattern.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e4c78eb2aa4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DART TUTORIAL CHEATSHEET
Dart is a versatile, object-oriented programming language developed by…]]></title>
            <link>https://kelvinthuranira.medium.com/dart-tutorial-cheatsheet-dart-is-a-versatile-object-oriented-programming-language-developed-by-27d2517d2496?source=rss-d3ee0d422bc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/27d2517d2496</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[dart]]></category>
            <dc:creator><![CDATA[kelvin]]></dc:creator>
            <pubDate>Mon, 05 Aug 2024 14:57:28 GMT</pubDate>
            <atom:updated>2024-09-02T09:09:10.937Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Dart programming guide cheatsheet.</strong></p><p><strong>Thread#1</strong><br>Dart is a versatile, object-oriented programming language developed by Google, designed for building mobile, web, desktop, and server applications. Known for its use with the Flutter framework, Dart enables fast, natively compiled applications through Ahead-of-Time (AOT) compilation and supports real-time development with Just-in-Time (JIT) compilation. It features strong typing, asynchronous programming, and a focus on user interface design, making it ideal for creating high-performance, <strong>cross-platform</strong> applications.<br> Though this cheatsheet will briefly and comprehensively cover dart. Though dart is much more like js, assume you’re familiar with OOP concepts. If you are familiar with java or C++, the better.<br><strong>Structure of this tutorial</strong></p><ul><li>Dart variables</li><li>Dart Operators</li><li>Dart Functions</li><li>Dart classes</li><li>Dart comments</li></ul><p>DART VARIABLES <br>NOTE:</p><p>A <strong>variable</strong> is a named reference to a <strong>memory</strong> block in a computer.</p><p>As in any other language, In Dart variables are used to store data that can be referenced and manipulated in a program. Here are some key aspects of Dart variables:</p><p>1. Declaring Variables<br>Variables in Dart can be declared using the <em>var, final, const</em>, or by specifying the data type explicitly.</p><p>var: Automatically infers the type based on the assigned value.<br><strong>Example One:</strong></p><pre>var: Automatically infers the type based on the assigned value.<br>Example One:<br><br> var name = &#39;Alice’; // type inferred as String<br> var age = 30; // type inferred as int</pre><p>Explicit Type Declaration: Specifies the type explicitly, providing clarity.<br> <strong>Example</strong></p><pre>String name = &#39;Alice’;<br> int age = 30;<br></pre><p><strong>Constants and Final Variables</strong><br><strong>final:</strong> A variable declared with <em>final </em>can be set only once. Unlike <em>const</em>, <em>final</em> can be used with a value that is determined at runtime.<br> <strong>Example</strong></p><pre>final name = &#39;Alice’;<br> final DateTime now = DateTime.now();<br></pre><p><strong>const: </strong>A compile-time constant that cannot change. It must be initialized with a constant value.<br> <strong>Example</strong></p><pre>const pi = 3.14159;<br> const maxUsers = 100;<br></pre><p>3. Type Inference<br>Dart can infer types from context, making <em>`var`</em> useful for brevity while still providing type safety.</p><p><strong>Example</strong></p><pre>var isComplete = false; // Dart infers bool type<br></pre><p>4. <strong>Nullable and Non-nullable Types</strong><br>Dart has sound null safety, meaning types are non-nullable by default. You can declare a variable as nullable by appending a question mark (`?`) to the type.<br><strong>Example</strong></p><pre>String? nullableString = null;<br>// Can hold a String or null<br></pre><p>5. <strong>Dynamic Typing</strong><br>For cases where the type is not known until runtime, Dart provides the `dynamic` keyword. However, this bypasses type checking, so it should be used cautiously.<br><strong>Example</strong></p><pre>dynamic anything = &#39;Hello’;<br>anything = 123; // No error<br></pre><p>6. <strong>Variable Scope</strong><br>Variables in Dart have a scope, which determines where they can be accessed. This scope can be:<br><strong>Global:</strong> Declared outside any function or class, accessible anywhere in the file.<br><strong>Local:</strong> Declared inside a function or block, accessible only within that scope.</p><p><strong>Example</strong></p><pre><br><br>void main() {<br> var name = &#39;Alice’; // Local variable<br> final age = 30; // Local final variable<br> print(’Name: $name, Age: $age’);<br>}</pre><p>Dart provides a flexible and type-safe way to declare and use variables, supporting both compile-time and runtime constants, as well as nullable and non-nullable types.</p><p>Next we will focus on the commonly used dart Operators</p><p>#DartThread1</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27d2517d2496" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CYBER SECURITY FANTASY Cyber sec thread#2
To catch up, check the previous thread: https://medium.com]]></title>
            <link>https://kelvinthuranira.medium.com/cyber-security-fantasy-cyber-sec-thread-2-to-catch-up-check-the-previous-thread-https-medium-com-601715b4e2cd?source=rss-d3ee0d422bc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/601715b4e2cd</guid>
            <category><![CDATA[hacking-tools]]></category>
            <category><![CDATA[cracking]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[blackhat]]></category>
            <dc:creator><![CDATA[kelvin]]></dc:creator>
            <pubDate>Wed, 31 Jul 2024 15:04:25 GMT</pubDate>
            <atom:updated>2024-07-31T15:37:28.845Z</atom:updated>
            <content:encoded><![CDATA[<p>To catch up, check the previous thread: <a href="https://medium.com/@kelvinthuranira591/cyber-security-fantasy-1-3cbd7e1a1eab">https://medium.com/@kelvinthuranira591/cyber-security-fantasy-1-3cbd7e1a1eab</a></p><p>Today we Identify the type of hash and head on to cracking. Through these tools I have proven to be effective on Parrot OS.<br>Hashcat: <a href="https://github.com/realkevo/hashcat">https://github.com/realkevo/hashcat</a><br>or <br>JohnTheRipper<br><a href="https://github.com/realkevo/john">https://github.com/realkevo/john</a><br>Head on to the official websites: <br><a href="https://hashcat.net/hashcat/">https://hashcat.net/hashcat/</a><br>to learn how they are used. <br>End result should be a one line syntax defining the type of hash, attack type(Dictionary attack,Bruteforce attack or hybrid attack) and a Dictionary.</p><p>Linux provides wordlists in this directory: (usr/share/wordlists/ ) e. g the rockyyou dictionary in this directory which contains 14M passwords. You can also download different more comprehensive dictionaries e.g crack station wordlists found here: <br><a href="https://crackstation.net/crackstation-wordlist-password-cracking-dictionary.html">https://crackstation.net/crackstation-wordlist-password-cracking-dictionary.html</a><br>or you can generate custom wordlists with tools like crunch</p><p><a href="https://github.com/realkevo/Crunch.py">https://github.com/realkevo/Crunch.py</a><br>Note: Hashcat and JTR cracking speed greatly depends on your system. Good system, Good speed. <br>Note: GPU is faster than CPU</p><p>CyberSecThread#2</p><h3>Next thread: Cracking wifi networks..</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=601715b4e2cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CYBER SECURITY FANTASY #1]]></title>
            <link>https://kelvinthuranira.medium.com/cyber-security-fantasy-1-3cbd7e1a1eab?source=rss-d3ee0d422bc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/3cbd7e1a1eab</guid>
            <category><![CDATA[blackhat]]></category>
            <category><![CDATA[forensics-software]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking-tools]]></category>
            <dc:creator><![CDATA[kelvin]]></dc:creator>
            <pubDate>Tue, 30 Jul 2024 00:43:48 GMT</pubDate>
            <atom:updated>2024-08-02T13:28:22.195Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*Ymtjc5L6mFCJk0qkpksfyA.jpeg" /></figure><p>#CyberSecThread1</p><ul><li>Note: Due to vastness of the topic this tutorial is summarized.</li></ul><p>A hash is created using a hash function, which is an algorithm that takes an input (or &quot;message&quot;) and returns a fixed-size string of bytes. The output, typically represented in hexadecimal, is called a hash value, hash code, or simply hash.</p><p>All your windows login passwords hashes can be found here, in this directory( C:\Windows\System32\config) in a database called SAM which is locked when your windows machine boots. To access this directory normal user need *elevated privileges* <br>However, this SAM can be accessed and dumped into a flash drive by anyone accessing your computer physically armed with a USB stick and this tool called pwdump</p><p><a href="https://github.com/realkevo/pwdump">https://github.com/realkevo/pwdump</a></p><p>SAM can also be extracted by live booting Parrot Os or Kali on the windows machine and extracting it with SAMDump tool or mimikatz(Whichever works)</p><h4>After extracting the hashes catch on Thread#2 .</h4><h4>CRACKING THE HASHES.</h4><blockquote><a href="https://medium.com/@kelvinthuranira/cyber-security-fantasy-cyber-sec-thread-2-to-catch-up-check-the-previous-thread-https-medium-com-601715b4e2cd.">https://medium.com/@kelvinthuranira/cyber-security-fantasy-cyber-sec-thread-2-to-catch-up-check-the-previous-thread-https-medium-com-601715b4e2cd.</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3cbd7e1a1eab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Approach Thread1]]></title>
            <link>https://kelvinthuranira.medium.com/flutter-approach-thread1-0b5bde34c21b?source=rss-d3ee0d422bc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b5bde34c21b</guid>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[dart]]></category>
            <dc:creator><![CDATA[kelvin]]></dc:creator>
            <pubDate>Tue, 30 Jul 2024 00:34:37 GMT</pubDate>
            <atom:updated>2024-07-30T00:34:37.864Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Flutter Approach Thread1</strong></p><p>Having problems switching from <strong>Imperative</strong> programming to <strong>declarative</strong> Programming?</p><p><strong>What is declarative Programming</strong>?</p><p>Grasp on declarative basics from here</p><p><em>https://docs.flutter.dev/get-started/flutter-for/declarative</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b5bde34c21b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>