<?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: Muhammad Abdal</title>
    <description>The latest articles on DEV Community by Muhammad Abdal (@muhammad_abdal).</description>
    <link>https://dev.to/muhammad_abdal</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%2F4152614%2Ffa57f8fb-1ee7-4cd8-a9a2-d3292ca3c2f6.png</url>
      <title>DEV Community: Muhammad Abdal</title>
      <link>https://dev.to/muhammad_abdal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muhammad_abdal"/>
    <language>en</language>
    <item>
      <title>What If a Flutter Split View Didn’t Need Material or Cupertino?</title>
      <dc:creator>Muhammad Abdal</dc:creator>
      <pubDate>Wed, 30 Sep 2026 16:43:09 +0000</pubDate>
      <link>https://dev.to/muhammad_abdal/what-if-a-flutter-split-view-didnt-need-material-or-cupertino-27o6</link>
      <guid>https://dev.to/muhammad_abdal/what-if-a-flutter-split-view-didnt-need-material-or-cupertino-27o6</guid>
      <description>&lt;p&gt;I recently published &lt;a href="https://pub.dev/packages/agnostic_split_view" rel="noopener noreferrer"&gt;agnostic_split_view&lt;/a&gt;, an open-source Flutter package built around a simple idea:&lt;br&gt;
A split-view layout shouldn't have to dictate which UI framework your application uses.&lt;br&gt;
Flutter gives us Material and Cupertino, but underneath them is a more fundamental layer: Flutter's widget and rendering system.&lt;br&gt;
So I wanted to explore what a split-view component would look like if it stayed at that lower, framework-agnostic level.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;When building custom interfaces such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;IDE-style layouts&lt;/li&gt;
&lt;li&gt;dashboards&lt;/li&gt;
&lt;li&gt;document editors&lt;/li&gt;
&lt;li&gt;developer tools&lt;/li&gt;
&lt;li&gt;desktop applications&lt;/li&gt;
&lt;li&gt;custom design systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;you may want resizable panes without coupling your layout primitive to Material or Cupertino.&lt;br&gt;
The goal wasn't to build another opinionated UI component.&lt;br&gt;
The goal was to build a &lt;strong&gt;headless layout primitive&lt;/strong&gt; that handles complex layout and interaction logic while leaving visual design to the application.&lt;br&gt;
That's where agnostic_split_view came from.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is agnostic_split_view?
&lt;/h2&gt;

&lt;p&gt;agnostic_split_view is a framework-agnostic split-view layout package for Flutter.&lt;br&gt;
It is built using Flutter's neutral widgets. Dart layer rather than depending on Material or Cupertino.&lt;br&gt;
That means you can use it with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Material applications&lt;/li&gt;
&lt;li&gt;Cupertino applications&lt;/li&gt;
&lt;li&gt;custom design systems&lt;/li&gt;
&lt;li&gt;third-party UI systems&lt;/li&gt;
&lt;li&gt;a bare WidgetsApp
The package itself has no runtime dependencies beyond Flutter.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Architecture
&lt;/h2&gt;

&lt;p&gt;One of the main design decisions was to keep layout calculations separate from the divider's visual appearance.&lt;br&gt;
The split view is responsible for things such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pane geometry&lt;/li&gt;
&lt;li&gt;resizing&lt;/li&gt;
&lt;li&gt;constraints&lt;/li&gt;
&lt;li&gt;collapse behavior&lt;/li&gt;
&lt;li&gt;directionality&lt;/li&gt;
&lt;li&gt;controller state
The application remains responsible for deciding how the divider should look.
This is what makes the package &lt;strong&gt;headless&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  CustomMultiChildLayout
&lt;/h2&gt;

&lt;p&gt;The core layout is built around Flutter's CustomMultiChildLayout.&lt;br&gt;
Instead of stacking multiple independent layout mechanisms together, the split-view geometry is calculated through a custom layout delegate.&lt;br&gt;
Conceptually, the layout needs to answer a few questions:&lt;br&gt;
How much space does the first pane receive?&lt;br&gt;
                ↓&lt;br&gt;
Where does the divider go?&lt;br&gt;
                ↓&lt;br&gt;
How much space remains for the second pane?&lt;br&gt;
The delegate can then position the children according to the current split fraction and the available constraints.&lt;br&gt;
This also gave me a much better understanding of Flutter's layout pipeline and how constraints flow through custom layouts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resizing
&lt;/h2&gt;

&lt;p&gt;Dragging the divider changes the split position.&lt;br&gt;
Instead of treating the divider as merely a visual element, its interaction is connected to the split-view controller.&lt;br&gt;
That allows the layout to respond to user interaction while keeping the controller API independent from the divider's visual implementation.&lt;br&gt;
The result is a separation between:&lt;br&gt;
&lt;strong&gt;Interaction&lt;/strong&gt;&lt;br&gt;
Pointer movement&lt;br&gt;
      ↓&lt;br&gt;
Split position&lt;br&gt;
      ↓&lt;br&gt;
Constraints&lt;br&gt;
      ↓&lt;br&gt;
Layout&lt;br&gt;
and:&lt;br&gt;
&lt;strong&gt;Presentation&lt;/strong&gt;&lt;br&gt;
Divider builder&lt;br&gt;
      ↓&lt;br&gt;
Visual appearance&lt;br&gt;
      ↓&lt;br&gt;
Hover/drag/focus states.&lt;br&gt;
&lt;strong&gt;Constraints&lt;/strong&gt;&lt;br&gt;
A split view becomes much more useful when pane sizes cannot grow or shrink indefinitely.&lt;br&gt;
agnostic_split_view supports minimum and maximum pane constraints so applications can define sensible boundaries for each side.&lt;br&gt;
For example:&lt;br&gt;
┌──────────────────┬──────────────────────┐&lt;br&gt;
│                  │                      │&lt;br&gt;
│   Minimum size   │      Main pane       │&lt;br&gt;
│                  │                      │&lt;br&gt;
└──────────────────┴──────────────────────┘&lt;br&gt;
                   ↑&lt;br&gt;
                Divider&lt;br&gt;
The available space and configured constraints determine how far the divider can move.&lt;br&gt;
Collapsible Panes&lt;br&gt;
I also wanted resizing to support a common desktop UI interaction:&lt;br&gt;
drag → reach threshold → collapse&lt;br&gt;
This makes it possible to create interfaces where a secondary pane can be temporarily hidden without requiring a completely separate navigation mechanism.&lt;br&gt;
The controller can also be used to programmatically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;collapse&lt;/li&gt;
&lt;li&gt;expand&lt;/li&gt;
&lt;li&gt;toggle&lt;/li&gt;
&lt;li&gt;resize&lt;/li&gt;
&lt;li&gt;reset
the split view.
That makes the component useful for both direct manipulation and application-driven state changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Collapsible Panes&lt;/strong&gt;&lt;br&gt;
I also wanted resizing to support a common desktop UI interaction:&lt;br&gt;
drag → reach threshold → collapse&lt;br&gt;
This makes it possible to create interfaces where a secondary pane can be temporarily hidden without requiring a completely separate navigation mechanism.&lt;br&gt;
The controller can also be used to programmatically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;collapse&lt;/li&gt;
&lt;li&gt;expand&lt;/li&gt;
&lt;li&gt;toggle&lt;/li&gt;
&lt;li&gt;resize&lt;/li&gt;
&lt;li&gt;reset
the split view.
That makes the component useful for both direct manipulation and application-driven state changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Divider Is Not the Design System&lt;/strong&gt;&lt;br&gt;
One of the things I deliberately avoided was making the divider visually opinionated.&lt;br&gt;
Instead, the package exposes divider builders.&lt;br&gt;
That means an application can create something as simple as:&lt;br&gt;
──────────│──────────&lt;br&gt;
or something more interactive:&lt;br&gt;
────────── ◉ ──────────&lt;br&gt;
or a completely custom divider with hover, drag, and focus states.&lt;br&gt;
The split-view logic doesn't need to know what the application's design system looks like.&lt;br&gt;
That's an important distinction between a UI component and a layout primitive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Build It?
&lt;/h2&gt;

&lt;p&gt;This package started as more than an attempt to solve a UI problem.&lt;br&gt;
I wanted to understand Flutter at a deeper level.&lt;br&gt;
While building it, I spent time working with:&lt;br&gt;
CustomMultiChildLayout&lt;br&gt;
MultiChildLayoutDelegate&lt;br&gt;
Flutter constraints&lt;br&gt;
layout geometry&lt;br&gt;
pointer interaction&lt;br&gt;
controller-based state&lt;br&gt;
Directionality&lt;br&gt;
rebuild boundaries&lt;br&gt;
headless component design&lt;br&gt;
The interesting part wasn't simply getting a divider to move.&lt;br&gt;
It was understanding** why the layout behaves the way it does.**&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;Building a reusable Flutter package is different from building a feature inside an application.&lt;br&gt;
Inside an application, you already know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the design system&lt;/li&gt;
&lt;li&gt;the state-management approach&lt;/li&gt;
&lt;li&gt;the target platforms&lt;/li&gt;
&lt;li&gt;the expected interaction patterns&lt;/li&gt;
&lt;li&gt;the application's constraints
A public package doesn't have those assumptions.
You have to think about the developer who will use it differently from you.
That changed how I approached the API.
Instead of asking:
"How can I make this UI work?"
I started asking:
"What should the developer be able to control without knowing how the layout works internally?"
That shift was probably the most valuable part of building the package.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;The package is now available on pub.dev:&lt;br&gt;
&lt;strong&gt;Package:&lt;/strong&gt; &lt;a href="https://pub.dev/packages/agnostic_split_view" rel="noopener noreferrer"&gt;https://pub.dev/packages/agnostic_split_view&lt;/a&gt;&lt;br&gt;
If you're building dashboards, IDE-style interfaces, editors, desktop applications, or custom Flutter design systems, I'd love to hear your feedback.&lt;br&gt;
Especially if you find an API edge case, interaction problem, or a use case I haven't considered.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;agnostic_split_view started with a relatively small question:&lt;br&gt;
&lt;strong&gt;What if a split view didn't need to know what your design system was?&lt;/strong&gt;&lt;br&gt;
The result is a small Flutter package, but building it gave me a much deeper understanding of the framework's layout system.&lt;br&gt;
And that's one of the reasons I enjoy building open source:&lt;br&gt;
You start by trying to solve a problem.&lt;br&gt;
You often finish by understanding the platform better.&lt;/p&gt;

&lt;p&gt;#flutter #dart #opensource #programming&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>opensource</category>
      <category>programming</category>
      <category>dart</category>
    </item>
  </channel>
</rss>
