<?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: Ali Çimen</title>
    <description>The latest articles on DEV Community by Ali Çimen (@ali_cimen).</description>
    <link>https://dev.to/ali_cimen</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4080645%2F7b49fd6f-90fb-44af-a70a-77592ce81d7e.png</url>
      <title>DEV Community: Ali Çimen</title>
      <link>https://dev.to/ali_cimen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ali_cimen"/>
    <language>en</language>
    <item>
      <title>Facing State Management: "Truly" Understanding Provider in Flutter</title>
      <dc:creator>Ali Çimen</dc:creator>
      <pubDate>Tue, 25 Aug 2026 14:07:02 +0000</pubDate>
      <link>https://dev.to/ali_cimen/facing-state-management-truly-understanding-provider-in-flutter-29ka</link>
      <guid>https://dev.to/ali_cimen/facing-state-management-truly-understanding-provider-in-flutter-29ka</guid>
      <description>&lt;h2&gt;
  
  
  The Beginning: Why This Project?
&lt;/h2&gt;

&lt;p&gt;You somehow learn to build UIs in Flutter, but when it comes to state management, it's a wall you inevitably hit. To &lt;em&gt;truly&lt;/em&gt; understand Provider instead of just memorizing code by copying and pasting, I built a cart management app called "Sneaker Shop." My goal was to focus purely on the data's journey between screens and the logic behind Provider. Because of this, I intentionally kept the UI minimal and used basic widget structures rather than complex designs.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Fundamentals of Provider: The "Radio Station" Analogy
&lt;/h2&gt;

&lt;p&gt;At its core, Provider is like a radio station you set up in the middle of your app. Instead of passing data through complex paths between your pages (widgets), they just put on their headphones and listen directly to this central station.&lt;/p&gt;

&lt;p&gt;The brain of this station is the &lt;code&gt;ChangeNotifier&lt;/code&gt; class. You store your data inside this class, and when a change occurs (like a new item being added to the cart), you grab the microphone and make an announcement using the &lt;code&gt;notifyListeners()&lt;/code&gt; function. The pages listening to this announcement instantly update themselves with the new data.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Set Up Provider in the Project
&lt;/h2&gt;

&lt;p&gt;I built the core cart logic—the heart of the e-commerce app—in two main steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Setting Up the Broadcast Tower:&lt;/strong&gt; First, at the very top of my app in the &lt;code&gt;main.dart&lt;/code&gt; file, I defined a &lt;code&gt;MultiProvider&lt;/code&gt; (to keep it scalable for the future). This allowed all the pages inside the app to access this state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Writing the Brain (Provider Class):&lt;/strong&gt; I created a &lt;code&gt;CartProvider&lt;/code&gt; class and defined a private cart list inside it. I wrote functions to add, remove, and completely clear the cart. To notify the UI after each action, I added &lt;code&gt;notifyListeners()&lt;/code&gt; to the end of these functions. I also used a sleek &lt;code&gt;.fold()&lt;/code&gt; method to calculate the total price of the items in the cart dynamically.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  My Learning Strategy: Pair Programming with AI
&lt;/h2&gt;

&lt;p&gt;While building this project, I set a strict rule for myself: use AI not as an assistant, but as a "pair programmer."&lt;/p&gt;

&lt;p&gt;Whenever I moved to a new structure, I first let the AI write the skeleton code and analyzed how it worked. Then, I closed the screen and rewrote the exact same code entirely by hand without looking anywhere. It was an amazing method to build muscle memory after understanding the logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Badges of Honor: 69 Errors and the Power of a Single Letter
&lt;/h2&gt;

&lt;p&gt;Of course, writing everything from scratch by hand comes with a funny cost. When I reached the end of the project and tried to compile it, I suddenly faced &lt;strong&gt;69 errors&lt;/strong&gt; on the screen! I panicked briefly before realizing there were zero logic flaws; it was entirely a "domino effect" caused by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Forgetting to add the &lt;code&gt;import&lt;/code&gt; path of a page in &lt;code&gt;main.dart&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Typing &lt;code&gt;lengt&lt;/code&gt; instead of &lt;code&gt;length&lt;/code&gt;, swallowing a single "h".&lt;/li&gt;
&lt;li&gt;Writing the &lt;code&gt;Colors.red&lt;/code&gt; class with a lowercase letter as &lt;code&gt;colors.red&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;And those innocent missing commas that wreaked havoc on the widget tree...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They were all sweet mistakes born from touching the code with my own hands.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Biggest Lesson Learned: Read vs. Watch
&lt;/h2&gt;

&lt;p&gt;The most valuable skill this simple project taught me was moving the &lt;code&gt;context.read&lt;/code&gt; vs. &lt;code&gt;context.watch&lt;/code&gt; distinction out of memorization and into logical understanding.&lt;/p&gt;

&lt;p&gt;If I just needed to click a button to add an item to the cart without needing to listen to an instant change on the screen, I used the triggering &lt;code&gt;read&lt;/code&gt; method to boost performance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// We only trigger the action; we don't unnecessarily rebuild the UI.&lt;/span&gt;
&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;CartProvider&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;addToCart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, on the cart page, where I needed to calculate and display the items and the total price instantly, I used &lt;code&gt;watch&lt;/code&gt; to listen to the radio live and keep the data synchronized with the UI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// This page updates instantly every time notifyListeners() runs in the Provider.&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;cart&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;watch&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;CartProvider&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the end, by making mistakes and fixing them, I completely grasped the Provider lifecycle. You can find all the source code and the folder architecture of the app on my GitHub repo: &lt;strong&gt;[&lt;a href="https://github.com/allicimen/Flutter-Labs/tree/main/sneaker_shop_provider" rel="noopener noreferrer"&gt;https://github.com/allicimen/Flutter-Labs/tree/main/sneaker_shop_provider&lt;/a&gt;]&lt;/strong&gt;&lt;/p&gt;




</description>
      <category>flutter</category>
      <category>dart</category>
      <category>ai</category>
      <category>development</category>
    </item>
    <item>
      <title>Why I Built a Simple App to Understand Isar in Flutter (And the Challenges I Faced)</title>
      <dc:creator>Ali Çimen</dc:creator>
      <pubDate>Fri, 21 Aug 2026 17:56:37 +0000</pubDate>
      <link>https://dev.to/ali_cimen/why-i-built-a-simple-app-to-understand-isar-in-flutter-and-the-challenges-i-faced-4p1n</link>
      <guid>https://dev.to/ali_cimen/why-i-built-a-simple-app-to-understand-isar-in-flutter-and-the-challenges-i-faced-4p1n</guid>
      <description>&lt;p&gt;When learning a new tool or technology, everyone usually tries to build massive projects like e-commerce apps or social media clones. Instead, I turned to a much more focused and simple project to wrap my head around a new local database solution: a &lt;strong&gt;Minimalist Habit Tracker&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;My goal was to focus directly on database operations and state management integration without getting lost in complex UI designs or API integrations.&lt;/p&gt;

&lt;p&gt;So, why Isar?&lt;/p&gt;

&lt;h3&gt;
  
  
  For Those Who Don't Know: What is Isar?
&lt;/h3&gt;

&lt;p&gt;When Flutter developers think of local storage, SQLite, Shared Preferences, or Hive usually come to mind. Isar is a &lt;strong&gt;next-generation, blazing-fast NoSQL database&lt;/strong&gt; developed by Simon Leier, the creator of the legendary Hive package.&lt;/p&gt;

&lt;p&gt;What makes Isar so special:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Blazing Fast:&lt;/strong&gt; Thanks to its C-based engine under the hood, read/write speeds are massive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fully Type-Safe:&lt;/strong&gt; It prevents string-based errors when querying. You can write your queries safely with auto-completion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Advanced Queries:&lt;/strong&gt; It offers out-of-the-box capabilities like full-text search, filtering, and multi-indexing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visual Inspector:&lt;/strong&gt; While your app is running, you can view the inside of your database live on your browser, just like an Excel spreadsheet.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How I Structured the Architecture
&lt;/h3&gt;

&lt;p&gt;To prevent the code from turning into "spaghetti," I applied the classic "divide and conquer" approach:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Models:&lt;/strong&gt; Collection schemas leveraging Isar's power (&lt;code&gt;Habit&lt;/code&gt; class).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Services:&lt;/strong&gt; An isolated layer handling database CRUD operations and date updates (&lt;code&gt;IsarService&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Providers:&lt;/strong&gt; The &lt;code&gt;HabitProvider&lt;/code&gt; that acts as a bridge between the UI and the Isar service.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Screens:&lt;/strong&gt; A clean, minimalist interface for user interaction.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Real Deal: Where Did I Struggle and How Did I Solve It?
&lt;/h3&gt;

&lt;p&gt;Everything looked great on paper, but I hit some walls in practice. Here are those issues and my practical solutions:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wall 1: The Gradle and "Namespace" Rebellion&lt;/strong&gt;&lt;br&gt;
When I installed the Isar package and tried to build the project for the first time, the Android Gradle engine threw an error. I realized that the &lt;code&gt;isar_flutter_libs&lt;/code&gt; package didn't comply with the "namespace" rule and the minimum SDK 34 requirement demanded by modern Flutter projects.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;** Solution:** Instead of spending hours searching for a fix online, I went straight to the heart of the package inside the pub cache. I manually added the &lt;code&gt;namespace 'dev.isar.isar_flutter_libs'&lt;/code&gt; line to the package's &lt;code&gt;android/build.gradle&lt;/code&gt; file and updated the &lt;code&gt;compileSdkVersion&lt;/code&gt; to &lt;code&gt;34&lt;/code&gt;, solving the problem at its root.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Wall 2: Provider's Silent Scream: `T != dynamic&lt;/strong&gt;&lt;code&gt;&lt;br&gt;
When I tried to save a new habit from the UI, the app suddenly crashed with a &lt;/code&gt;Tried to call Provider.of` error.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Solution:&lt;/strong&gt; I realized the issue stemmed from a very simple typing omission. Dart was essentially telling me, "I don't know who you are talking to." By writing &lt;code&gt;context.read&amp;lt;HabitProvider&amp;gt;().addNewHabit()&lt;/code&gt; instead of &lt;code&gt;context.read().addNewHabit()&lt;/code&gt;, I experienced firsthand how critical it is to strictly specify the &lt;code&gt;&amp;lt;HabitProvider&amp;gt;&lt;/code&gt; type.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Wall 3: GitHub Thinking My Project was an "HTML Project"&lt;/strong&gt;&lt;br&gt;
I proudly pushed the project to GitHub, only to check my repository's language stats and see 7% Dart and 90% HTML!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Solution:&lt;/strong&gt; I immediately created a &lt;code&gt;.gitattributes&lt;/code&gt; file in the root directory of the project. I told GitHub's language parser to ignore certain autogenerated folders by adding this code:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*.html linguist-generated=true
web/** linguist-generated=true
build/** linguist-generated=true

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result? My Dart percentage went right back up to its well-deserved 100% level!&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion and Takeaways
&lt;/h3&gt;

&lt;p&gt;This small project showed me this: The best way to learn a technology (especially a powerful database like Isar) is to abstract it from complex app structures and use it in its most fundamental form.&lt;/p&gt;

&lt;p&gt;If you'd like to check out my project or take a look at the code, I'm leaving my repo link below. I'm looking forward to your comments and code critiques!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/allicimen/Flutter-Labs/tree/main/habit_tracking_with_Isar" rel="noopener noreferrer"&gt;My GitHub Repo Link&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>flutter</category>
      <category>database</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Hello, DEV Community</title>
      <dc:creator>Ali Çimen</dc:creator>
      <pubDate>Mon, 17 Aug 2026 17:58:33 +0000</pubDate>
      <link>https://dev.to/ali_cimen/hello-dev-community-1bhp</link>
      <guid>https://dev.to/ali_cimen/hello-dev-community-1bhp</guid>
      <description>&lt;p&gt;I'm a newly graduated developer currently focusing on &lt;strong&gt;Flutter and mobile app development&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I've been spending a lot of time building projects with Flutter, experimenting with different approaches, and—like many developers today—using &lt;strong&gt;AI as part of my development workflow&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;But I don't want AI to simply write my code for me.&lt;/p&gt;

&lt;p&gt;I want to understand the code, question the solutions it gives me, fix the mistakes, and learn from the process.&lt;/p&gt;

&lt;p&gt;So I decided to start sharing that journey here on DEV.&lt;/p&gt;

&lt;p&gt;I'll be writing about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Flutter projects I'm building&lt;/li&gt;
&lt;li&gt; Things I'm learning along the way&lt;/li&gt;
&lt;li&gt; Bugs and problems I encounter&lt;/li&gt;
&lt;li&gt; How I use AI while developing&lt;/li&gt;
&lt;li&gt; Architecture and development decisions&lt;/li&gt;
&lt;li&gt; Lessons I learn from building real projects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm still at the beginning of my professional journey, but I'm building, learning, and improving every day.&lt;/p&gt;

&lt;p&gt;Hopefully, some of the things I share will be useful to other developers as well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is the beginning. Let's build. 🚀&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  flutter #dart #mobiledevelopment #ai #devjourney
&lt;/h1&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>mobile</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
