<?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: Eldho Paulose</title>
    <description>The latest articles on DEV Community by Eldho Paulose (@eldhopaulose).</description>
    <link>https://dev.to/eldhopaulose</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%2F913451%2F2e0c646d-26b0-4971-83c4-bceab6a78c7a.jpeg</url>
      <title>DEV Community: Eldho Paulose</title>
      <link>https://dev.to/eldhopaulose</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eldhopaulose"/>
    <language>en</language>
    <item>
      <title>RoutePilot — Flutter routing without the boilerplate</title>
      <dc:creator>Eldho Paulose</dc:creator>
      <pubDate>Mon, 23 Mar 2026 06:47:59 +0000</pubDate>
      <link>https://dev.to/eldhopaulose/routepilot-flutter-routing-without-the-boilerplate-1p6n</link>
      <guid>https://dev.to/eldhopaulose/routepilot-flutter-routing-without-the-boilerplate-1p6n</guid>
      <description>&lt;p&gt;Flutter's built-in navigation works fine for small apps. But the moment you need &lt;strong&gt;auth guards&lt;/strong&gt;, &lt;strong&gt;deep links&lt;/strong&gt;, &lt;strong&gt;typed arguments&lt;/strong&gt;, and the ability to show a dialog without a &lt;code&gt;BuildContext&lt;/code&gt; — you're either drowning in boilerplate or relying on a package that generates 500 lines of code every time you add a route.&lt;/p&gt;

&lt;p&gt;I wanted something in between: a clean, composable API that covers 95% of real-world routing needs, ships as a single package, and stays out of the way.&lt;/p&gt;

&lt;p&gt;That's &lt;strong&gt;RoutePilot&lt;/strong&gt; — one singleton (&lt;code&gt;routePilot&lt;/code&gt;) that handles push/pop, middleware, overlays, URL launching, and more.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✨ What's inside
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Capabilities&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Navigation&lt;/td&gt;
&lt;td&gt;Push, pop, replace, clear stack, pop-until by name or predicate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Transitions&lt;/td&gt;
&lt;td&gt;9 built-in transitions with custom curves and durations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deep Linking&lt;/td&gt;
&lt;td&gt;Navigator 2.0 Router API with automatic browser URL sync&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Middleware&lt;/td&gt;
&lt;td&gt;Async guards with &lt;code&gt;FutureOr&amp;lt;String?&amp;gt;&lt;/code&gt; redirect — auth, loading states&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Typed Routes&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;PilotRoute&amp;lt;TArgs, TReturn&amp;gt;&lt;/code&gt; for compile-safe navigation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Route Groups&lt;/td&gt;
&lt;td&gt;Shared prefix, middleware, and transition across related routes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Overlays&lt;/td&gt;
&lt;td&gt;Dialogs, bottom sheets, snackbars, loading overlays — no &lt;code&gt;BuildContext&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;URL Launcher&lt;/td&gt;
&lt;td&gt;Browser, in-app WebView, phone calls, SMS, email&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Observer&lt;/td&gt;
&lt;td&gt;Built-in route stack tracking with &lt;code&gt;currentRoute&lt;/code&gt; and &lt;code&gt;previousRoute&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🚀 Get started in 3 minutes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Install
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# pubspec.yaml&lt;/span&gt;
&lt;span class="na"&gt;dependencies&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;route_pilot&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;^0.2.0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;flutter pub get
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Define your routes
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;abstract&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PilotRoutes&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;home&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'/'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;profile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'/profile'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'/user/:id'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;pages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="n"&gt;PilotPage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;name:&lt;/span&gt; &lt;span class="n"&gt;PilotRoutes&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;home&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;page:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;HomePage&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="nl"&gt;transition:&lt;/span&gt; &lt;span class="n"&gt;Transition&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ios&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;PilotPage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;name:&lt;/span&gt; &lt;span class="n"&gt;PilotRoutes&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;page:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ProfilePage&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="nl"&gt;transition:&lt;/span&gt; &lt;span class="n"&gt;Transition&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fadeIn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;middlewares:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;AuthGuard&lt;/span&gt;&lt;span class="p"&gt;()],&lt;/span&gt; &lt;span class="c1"&gt;// 👈 guard this route&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;h3&gt;
  
  
  3. Wire up your app
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MyApp&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;StatelessWidget&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nd"&gt;@override&lt;/span&gt;
  &lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;MaterialApp&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;router&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nl"&gt;routerConfig:&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getRouterConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nl"&gt;pages:&lt;/span&gt; &lt;span class="n"&gt;pages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;initialRoute:&lt;/span&gt; &lt;span class="n"&gt;PilotRoutes&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;home&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;notFoundPage:&lt;/span&gt; &lt;span class="n"&gt;PilotPage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="nl"&gt;name:&lt;/span&gt; &lt;span class="s"&gt;'/404'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="nl"&gt;page:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;NotFoundPage&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;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;That's it — deep linking, browser URL sync, and the full navigation API are ready.&lt;/p&gt;




&lt;h2&gt;
  
  
  🗺️ Navigation API
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Push / pop&lt;/span&gt;
&lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;toNamed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'/profile'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;back&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Pass arguments&lt;/span&gt;
&lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;toNamed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'/profile'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;arguments:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'userId'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="s"&gt;'userId'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Replace or clear the stack&lt;/span&gt;
&lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;off&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'/home'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;    &lt;span class="c1"&gt;// replace current route&lt;/span&gt;
&lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;offAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'/home'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// clear stack + push&lt;/span&gt;

&lt;span class="c1"&gt;// Path + query params → /user/42?tab=settings&lt;/span&gt;
&lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;toNamed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'/user/42?tab=settings'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;uid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;param&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'id'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;   &lt;span class="c1"&gt;// '42'&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;tab&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;param&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'tab'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 'settings'&lt;/span&gt;

&lt;span class="c1"&gt;// Navigate directly to a widget (no route name needed)&lt;/span&gt;
&lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;DetailsPage&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="nl"&gt;transition:&lt;/span&gt; &lt;span class="n"&gt;Transition&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;bottomToTop&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;transitionDuration:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;Duration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;milliseconds:&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;curve:&lt;/span&gt; &lt;span class="n"&gt;Curves&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;easeInOut&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;
  
  
  🎞️ All 9 transitions, zero config
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Transition&lt;/th&gt;
&lt;th&gt;Effect&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Transition.ios&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Native Cupertino swipe-back&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Transition.fadeIn&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Cross-fade&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Transition.rightToLeft&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Standard push slide&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Transition.leftToRight&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Slide from left&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Transition.bottomToTop&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sheet-style rise&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Transition.topToBottom&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Drop-down&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Transition.scale&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Scale up from center&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Transition.rotate&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Rotation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Transition.size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Size expansion&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every transition accepts a custom &lt;code&gt;curve&lt;/code&gt; and &lt;code&gt;transitionDuration&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔒 Async middleware — the right way to handle auth
&lt;/h2&gt;

&lt;p&gt;Middleware runs &lt;strong&gt;before a route renders&lt;/strong&gt;. Return a redirect path to block navigation, or &lt;code&gt;null&lt;/code&gt; to allow it.&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="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AuthGuard&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;PilotMiddleware&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nd"&gt;@override&lt;/span&gt;
  &lt;span class="n"&gt;FutureOr&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;redirect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;route&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;isLoggedIn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;checkAuthToken&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="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;'/login'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// redirect&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// allow&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Show a spinner while the guard resolves&lt;/span&gt;
&lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;middlewareLoadingWidget&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;Center&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;CircularProgressIndicator&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Middleware can be attached to individual &lt;code&gt;PilotPage&lt;/code&gt;s or shared across a &lt;code&gt;PilotRouteGroup&lt;/code&gt;. Nested groups cascade automatically.&lt;/p&gt;




&lt;h2&gt;
  
  
  📦 Route groups — keep things organized
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;PilotRouteGroup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;prefix:&lt;/span&gt; &lt;span class="s"&gt;'/dashboard'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;middlewares:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;AuthGuard&lt;/span&gt;&lt;span class="p"&gt;()],&lt;/span&gt;
  &lt;span class="nl"&gt;transition:&lt;/span&gt; &lt;span class="n"&gt;Transition&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fadeIn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;children:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="n"&gt;PilotPage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;name:&lt;/span&gt; &lt;span class="s"&gt;'/home'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;     &lt;span class="nl"&gt;page:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;DashboardHome&lt;/span&gt;&lt;span class="p"&gt;()),&lt;/span&gt;
    &lt;span class="n"&gt;PilotPage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;name:&lt;/span&gt; &lt;span class="s"&gt;'/settings'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;page:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;SettingsPage&lt;/span&gt;&lt;span class="p"&gt;()),&lt;/span&gt;
    &lt;span class="c1"&gt;// resolves to: /dashboard/home, /dashboard/settings&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;
  
  
  💬 Overlays without BuildContext
&lt;/h2&gt;

&lt;p&gt;Show any overlay from a ViewModel, a service class, or anywhere else in your app — no context threading required.&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;// Dialog with a typed return value&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;confirmed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;dialog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;AlertDialog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;title:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Delete item?'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;actions:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="n"&gt;TextButton&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;onPressed:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;back&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Cancel'&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
    &lt;span class="n"&gt;TextButton&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;onPressed:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;back&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Delete'&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;span class="c1"&gt;// SnackBar — queue-safe, clears any previous snackbar automatically&lt;/span&gt;
&lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;snackBar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Saved!'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;backgroundColor:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;green&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Non-dismissible full-screen loading overlay&lt;/span&gt;
&lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;showLoading&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;uploadFile&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;hideLoading&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Bottom sheet&lt;/span&gt;
&lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;bottomSheet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;MyBottomSheetWidget&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="nl"&gt;isScrollControlled:&lt;/span&gt; &lt;span class="kc"&gt;true&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;
  
  
  🧩 Typed routes — compile-time safety
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Define once&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;userRoute&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;PilotRoute&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;PersonData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="s"&gt;'/user/:id'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Push with type-safe args + auto path/query substitution&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;userRoute&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;arguments:&lt;/span&gt;   &lt;span class="n"&gt;PersonData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;id:&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;title:&lt;/span&gt; &lt;span class="s"&gt;'Eldho'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;pathParams:&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'id'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;'42'&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nl"&gt;queryParams:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'tab'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;'settings'&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Navigates to: /user/42?tab=settings&lt;/span&gt;
&lt;span class="c1"&gt;// result is bool? — fully typed return value&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔗 URL Launcher &amp;amp; System Intents
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Open in browser / in-app browser / WebView&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;launchInBrowser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'https://flutter.dev'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;launchInAppBrowser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'https://dart.dev'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;launchInAppWebView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'https://pub.dev'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;span class="c1"&gt;// Phone, SMS, Email&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;makePhoneCall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'+1-234-567-8900'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;sendSms&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'+1-234-567-8900'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;body:&lt;/span&gt; &lt;span class="s"&gt;'Hello!'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;sendEmail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'hello@example.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;subject:&lt;/span&gt; &lt;span class="s"&gt;'Hi'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;body:&lt;/span&gt; &lt;span class="s"&gt;'From RoutePilot!'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧭 Route observer
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Access current and previous route names from anywhere&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;currentRoute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// e.g. '/profile'&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;previousRoute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// e.g. '/'&lt;/span&gt;

&lt;span class="c1"&gt;// Full route stack&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;stack&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;routePilot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;observer&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;routeStack&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why not GetX or GoRouter?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GetX&lt;/strong&gt; bundles state management, dependency injection, and routing together. If you only want routing, you're carrying a lot of extra weight.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GoRouter&lt;/strong&gt; is the official recommendation, but middleware (redirects) requires working around the &lt;code&gt;redirect&lt;/code&gt; callback in ways that don't handle async loading states well out of the box.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AutoRoute&lt;/strong&gt; requires code generation — every time you add a route, you run the build runner.&lt;/p&gt;

&lt;p&gt;RoutePilot is focused on &lt;strong&gt;routing only&lt;/strong&gt;. Bring your own state manager. Zero code generation. Middleware is first-class, not a workaround.&lt;/p&gt;




&lt;h2&gt;
  
  
  By the numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;9&lt;/strong&gt; built-in transitions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;0&lt;/strong&gt; code generation steps&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2&lt;/strong&gt; dependencies: &lt;code&gt;flutter&lt;/code&gt; + &lt;code&gt;url_launcher&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MIT&lt;/strong&gt; licensed&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;dependencies&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;route_pilot&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;^0.2.0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The package ships with a full example app demonstrating:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigator 2.0 with deep linking&lt;/li&gt;
&lt;li&gt;Typed routes and typed arguments&lt;/li&gt;
&lt;li&gt;Auth guard middleware with redirect&lt;/li&gt;
&lt;li&gt;Route groups with shared prefix&lt;/li&gt;
&lt;li&gt;Every overlay type&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;📦 &lt;strong&gt;pub.dev&lt;/strong&gt;: &lt;a href="https://pub.dev/packages/route_pilot" rel="noopener noreferrer"&gt;https://pub.dev/packages/route_pilot&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🐙 &lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/eldhopaulose/route_pilot" rel="noopener noreferrer"&gt;https://github.com/eldhopaulose/route_pilot&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🌐 &lt;strong&gt;Author&lt;/strong&gt;: &lt;a href="https://eldhopaulose.github.io" rel="noopener noreferrer"&gt;https://eldhopaulose.github.io&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; 🏢 &lt;strong&gt;Resizo&lt;/strong&gt;: &lt;a href="https://resizo.in" rel="noopener noreferrer"&gt;https://resizo.in&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you find it useful, a ⭐ on GitHub goes a long way. Issues and PRs are very welcome!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with ❤️ by &lt;a href="https://eldhopaulose.github.io" rel="noopener noreferrer"&gt;Eldho Paulose&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>mobiledev</category>
      <category>android</category>
      <category>ios</category>
    </item>
    <item>
      <title>Free Online Image Resizer (No Upload Required) — Resize JPG, PNG &amp; WebP Instantly</title>
      <dc:creator>Eldho Paulose</dc:creator>
      <pubDate>Sun, 01 Mar 2026 19:16:15 +0000</pubDate>
      <link>https://dev.to/eldhopaulose/free-online-image-resizer-no-upload-required-resize-jpg-png-webp-instantly-20of</link>
      <guid>https://dev.to/eldhopaulose/free-online-image-resizer-no-upload-required-resize-jpg-png-webp-instantly-20of</guid>
      <description>&lt;p&gt;Looking for a &lt;strong&gt;free online image resizer that works instantly in your browser&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;Resize &lt;strong&gt;JPG, PNG, and WebP images&lt;/strong&gt; without uploading files or losing quality.&lt;/p&gt;

&lt;p&gt;Many online image tools require uploading your images to a server, signing up, or waiting for processing. This can slow down your workflow and raise privacy concerns.&lt;/p&gt;

&lt;p&gt;That's why I built &lt;strong&gt;Resizo&lt;/strong&gt; — a simple browser-based image tool that resizes and converts images directly on your device.&lt;/p&gt;

&lt;p&gt;👉 Try it here&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.resizo.in/" rel="noopener noreferrer"&gt;https://www.resizo.in/&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Why Image Resizing Matters
&lt;/h1&gt;

&lt;p&gt;Images that are too large can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Slow down websites&lt;/li&gt;
&lt;li&gt;Increase page load time&lt;/li&gt;
&lt;li&gt;Affect SEO performance&lt;/li&gt;
&lt;li&gt;Use unnecessary storage space&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For developers, bloggers, and designers, resizing images is a frequent task.&lt;/p&gt;

&lt;p&gt;But traditional tools often require:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uploading images to a server&lt;/li&gt;
&lt;li&gt;Creating an account&lt;/li&gt;
&lt;li&gt;Waiting for processing&lt;/li&gt;
&lt;li&gt;Accepting reduced image quality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A &lt;strong&gt;browser-based tool&lt;/strong&gt; removes these problems.&lt;/p&gt;




&lt;h1&gt;
  
  
  What Makes Resizo Different
&lt;/h1&gt;

&lt;p&gt;Resizo processes images &lt;strong&gt;directly in your browser&lt;/strong&gt;, meaning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No uploads required&lt;/li&gt;
&lt;li&gt;No account needed&lt;/li&gt;
&lt;li&gt;Faster processing&lt;/li&gt;
&lt;li&gt;Better privacy&lt;/li&gt;
&lt;li&gt;Instant results&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your image never leaves your device.&lt;/p&gt;




&lt;h1&gt;
  
  
  Key Features
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Instant Image Resizing
&lt;/h3&gt;

&lt;p&gt;Resize images directly in your browser.&lt;/p&gt;

&lt;p&gt;Supported formats:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JPG&lt;/li&gt;
&lt;li&gt;PNG&lt;/li&gt;
&lt;li&gt;WebP&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Privacy Focused
&lt;/h3&gt;

&lt;p&gt;Since everything runs locally in your browser, your files remain private.&lt;/p&gt;




&lt;h3&gt;
  
  
  Simple Interface
&lt;/h3&gt;

&lt;p&gt;The tool is designed to be clean and easy to use without unnecessary steps.&lt;/p&gt;




&lt;h1&gt;
  
  
  Available Image Tools
&lt;/h1&gt;

&lt;p&gt;Resizo also includes multiple tools for image optimization.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resize Image for Social Media
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Instagram Image Resizer&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.resizo.in/resize-image-for-instagram/" rel="noopener noreferrer"&gt;https://www.resizo.in/resize-image-for-instagram/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;YouTube Image Resizer&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.resizo.in/resize-image-for-youtube/" rel="noopener noreferrer"&gt;https://www.resizo.in/resize-image-for-youtube/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Facebook Image Resizer&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.resizo.in/resize-image-for-facebook/" rel="noopener noreferrer"&gt;https://www.resizo.in/resize-image-for-facebook/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Twitter Image Resizer&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.resizo.in/resize-image-for-twitter/" rel="noopener noreferrer"&gt;https://www.resizo.in/resize-image-for-twitter/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;LinkedIn Image Resizer&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.resizo.in/resize-image-for-linkedin/" rel="noopener noreferrer"&gt;https://www.resizo.in/resize-image-for-linkedin/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;WhatsApp Image Resizer&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.resizo.in/resize-image-for-whatsapp/" rel="noopener noreferrer"&gt;https://www.resizo.in/resize-image-for-whatsapp/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Image Optimization Tools
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;PNG Compressor&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.resizo.in/compress-png-online/" rel="noopener noreferrer"&gt;https://www.resizo.in/compress-png-online/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JPG to WebP Converter&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.resizo.in/jpg-to-webp-converter/" rel="noopener noreferrer"&gt;https://www.resizo.in/jpg-to-webp-converter/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Who Can Use This Tool?
&lt;/h1&gt;

&lt;p&gt;Resizo is useful for:&lt;/p&gt;

&lt;h3&gt;
  
  
  Developers
&lt;/h3&gt;

&lt;p&gt;Quickly resize UI images, thumbnails, or assets.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bloggers
&lt;/h3&gt;

&lt;p&gt;Optimize blog images for faster loading pages.&lt;/p&gt;

&lt;h3&gt;
  
  
  eCommerce Sellers
&lt;/h3&gt;

&lt;p&gt;Prepare product images for marketplaces and stores.&lt;/p&gt;

&lt;h3&gt;
  
  
  Social Media Creators
&lt;/h3&gt;

&lt;p&gt;Resize images for different platform requirements.&lt;/p&gt;




&lt;h1&gt;
  
  
  Why Browser-Based Tools Are Better
&lt;/h1&gt;

&lt;p&gt;Traditional image tools upload your images to a remote server. This can cause:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;privacy risks&lt;/li&gt;
&lt;li&gt;slower performance&lt;/li&gt;
&lt;li&gt;file size limitations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With &lt;strong&gt;browser-based processing&lt;/strong&gt;, images stay on your device and are processed instantly.&lt;/p&gt;




&lt;h1&gt;
  
  
  Try the Tool
&lt;/h1&gt;

&lt;p&gt;If you're looking for a fast and private way to resize images, check it out here:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://www.resizo.in/" rel="noopener noreferrer"&gt;https://www.resizo.in/&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;Image optimization is essential for websites, social media, and digital content.&lt;/p&gt;

&lt;p&gt;Using a &lt;strong&gt;browser-based image resizer&lt;/strong&gt; makes the process faster, safer, and easier without sacrificing quality.&lt;/p&gt;

&lt;p&gt;If you regularly work with images, tools like Resizo can help simplify your workflow.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>resources</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Creating a Responsive Flutter Application for All Devices</title>
      <dc:creator>Eldho Paulose</dc:creator>
      <pubDate>Mon, 10 Jun 2024 08:33:27 +0000</pubDate>
      <link>https://dev.to/eldhopaulose/creating-a-responsive-flutter-application-for-all-devices-1fl5</link>
      <guid>https://dev.to/eldhopaulose/creating-a-responsive-flutter-application-for-all-devices-1fl5</guid>
      <description>&lt;p&gt;Building a responsive application in Flutter ensures that your app provides a seamless experience across different devices, whether it’s a mobile phone, tablet, or desktop. In this blog post, we will explore how to make your Flutter app responsive by using various techniques and widgets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Setting Up Your Flutter Environment&lt;/li&gt;
&lt;li&gt;Understanding MediaQuery&lt;/li&gt;
&lt;li&gt;Using LayoutBuilder for Adaptive Layouts&lt;/li&gt;
&lt;li&gt;Leveraging Flex Widgets (Row and Column)&lt;/li&gt;
&lt;li&gt;Utilizing the Expanded and Flexible Widgets&lt;/li&gt;
&lt;li&gt;Responsive Text Scaling&lt;/li&gt;
&lt;li&gt;Platform-Specific Adjustments&lt;/li&gt;
&lt;li&gt;Testing Responsiveness&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. Introduction
&lt;/h2&gt;

&lt;p&gt;Responsive design is crucial for creating applications that offer an optimal user experience regardless of the device being used. In Flutter, there are multiple approaches and widgets that facilitate the development of responsive layouts. Let's dive into these methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Setting Up Your Flutter Environment
&lt;/h2&gt;

&lt;p&gt;Before we start, ensure that your Flutter environment is set up. You can follow the official Flutter &lt;a href="https://docs.flutter.dev/get-started/install" rel="noopener noreferrer"&gt;installation guide &lt;/a&gt;if you haven’t already.&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 responsive_app
cd responsive_app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open your project in your preferred IDE (VS Code, Android Studio, etc.).&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Understanding MediaQuery
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;MediaQuery&lt;/code&gt; widget is a powerful tool in Flutter that provides information about the size and orientation of the current screen. It allows you to adjust your layout based on the screen dimensions.&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 {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: ResponsiveHomePage(),
    );
  }
}

class ResponsiveHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    var screenSize = MediaQuery.of(context).size;

    return Scaffold(
      appBar: AppBar(title: Text('Responsive App')),
      body: Center(
        child: Text(
          'Screen width: ${screenSize.width}, height: ${screenSize.height}',
          style: TextStyle(fontSize: 20),
        ),
      ),
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6sstl32esfliwboaro8i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6sstl32esfliwboaro8i.png" alt=" " width="800" height="1644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Using LayoutBuilder for Adaptive Layouts
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;LayoutBuilder&lt;/code&gt; is another essential widget that builds a widget tree based on the parent widget's constraints.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class ResponsiveLayout extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: LayoutBuilder(
        builder: (context, constraints) {
          if (constraints.maxWidth &amp;gt; 600) {
            return _buildWideContainers();
          } else {
            return _buildNarrowContainers();
          }
        },
      ),
    );
  }

  Widget _buildWideContainers() {
    return Row(
      children: [
        Expanded(child: Container(color: Colors.red, height: 200)),
        Expanded(child: Container(color: Colors.blue, height: 200)),
      ],
    );
  }

  Widget _buildNarrowContainers() {
    return Column(
      children: [
        Container(color: Colors.red, height: 200),
        Container(color: Colors.blue, height: 200),
      ],
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Mobile View:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frfevqekpjcr7fyxcg16f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frfevqekpjcr7fyxcg16f.png" alt=" " width="800" height="1644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;desktop View:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwprhx112v7o28ffnfpmn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwprhx112v7o28ffnfpmn.png" alt=" " width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Leveraging Flex Widgets (Row and Column)
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Row&lt;/code&gt; and &lt;code&gt;Column&lt;/code&gt; are flexible widgets that can adapt to different screen sizes. Using these widgets effectively can help create responsive layouts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class FlexLayout extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          Expanded(
            child: Row(
              children: [
                Expanded(child: Container(color: Colors.green)),
                Expanded(child: Container(color: Colors.orange)),
              ],
            ),
          ),
          Expanded(
            child: Row(
              children: [
                Expanded(child: Container(color: Colors.blue)),
                Expanded(child: Container(color: Colors.purple)),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Mobile View:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Femvglm24c7brspskw4o8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Femvglm24c7brspskw4o8.png" alt=" " width="800" height="1644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;desktop View:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fantdqt8tn0tkqzxyyeb8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fantdqt8tn0tkqzxyyeb8.png" alt=" " width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Utilizing the Expanded and Flexible Widgets
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;Expanded&lt;/code&gt; and &lt;code&gt;Flexible&lt;/code&gt; widgets control how a child of a &lt;code&gt;Row&lt;/code&gt;, &lt;code&gt;Column&lt;/code&gt;, or &lt;code&gt;Flex&lt;/code&gt; flexes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class ExpandedFlexibleExample extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          Expanded(
            child: Container(color: Colors.red),
          ),
          Flexible(
            child: Container(color: Colors.blue),
          ),
        ],
      ),
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Mobile View:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk6na775m58uz1myfjnmx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk6na775m58uz1myfjnmx.png" alt=" " width="800" height="1644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;desktop View:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3b9t71o06cxdlzt3h319.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3b9t71o06cxdlzt3h319.png" alt=" " width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Responsive Text Scaling
&lt;/h2&gt;

&lt;p&gt;Ensure that your text scales appropriately by using the &lt;code&gt;textScaler&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class ResponsiveText extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Text(
          'Responsive Text',
          style: TextStyle(fontSize: 20),
          textScaler: MediaQuery.textScalerOf(context),
        ),
      ),
    );
  }
}

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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Mobile View:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb13pyawfmjupufun1keo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb13pyawfmjupufun1keo.png" alt=" " width="800" height="1644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;desktop View:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7qalbuuvp3zofh5snr46.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7qalbuuvp3zofh5snr46.png" alt=" " width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Platform-Specific Adjustments
&lt;/h2&gt;

&lt;p&gt;Adjust your layout based on the platform (iOS, Android, Web).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Platform.isWindows ? _buildWindowsLayout() : _buildAndroidLayout(),
    );
  }

  Widget _buildWindowsLayout() {
    return Center(child: Text('Windows Layout'));
  }

  Widget _buildAndroidLayout() {
    return Center(child: Text('Android Layout'));
  }
}

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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Mobile View:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F837128p1oaifb41mpj02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F837128p1oaifb41mpj02.png" alt=" " width="800" height="1644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;desktop View:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcywn667hq6tunil2pwup.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcywn667hq6tunil2pwup.png" alt=" " width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Testing Responsiveness
&lt;/h2&gt;

&lt;p&gt;Test your app on multiple devices and screen sizes using the Flutter emulator or physical devices. You can also use tools like &lt;code&gt;flutter_device_preview&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dependencies:
  flutter:
    sdk: flutter
  device_preview: ^0.8.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





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

void main() {
  runApp(
    DevicePreview(
      enabled: !kReleaseMode,
      builder: (context) =&amp;gt; MyApp(),
    ),
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fakklgx5b5xar5d02f0yr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fakklgx5b5xar5d02f0yr.png" alt=" " width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Conclusion
&lt;/h2&gt;

&lt;p&gt;Making a Flutter app responsive involves understanding and using widgets like &lt;code&gt;MediaQuery&lt;/code&gt;, &lt;code&gt;LayoutBuilder&lt;/code&gt;, &lt;code&gt;Row&lt;/code&gt;, &lt;code&gt;Column&lt;/code&gt;, and more. By following these practices, you can ensure that your app provides a great user experience on any device.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect with Me
&lt;/h2&gt;

&lt;p&gt;If you enjoyed this post and want to see more of my work, feel free to check out my GitHub and personal website:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;GitHub: &lt;a href="https://github.com/eldhopaulose" rel="noopener noreferrer"&gt;eldhopaulose &lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Website: &lt;a href="https://eldhopaulose.info" rel="noopener noreferrer"&gt;Eldho Paulose&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Resizo: &lt;a href="https://resizo.in/" rel="noopener noreferrer"&gt;Resizo&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>frontend</category>
      <category>google</category>
    </item>
    <item>
      <title>Flutter Fundamentals: Unwrapping the Essentials of Basic Widgets</title>
      <dc:creator>Eldho Paulose</dc:creator>
      <pubDate>Fri, 07 Jun 2024 16:41:44 +0000</pubDate>
      <link>https://dev.to/eldhopaulose/flutter-fundamentals-unwrapping-the-essentials-of-basic-widgets-5a41</link>
      <guid>https://dev.to/eldhopaulose/flutter-fundamentals-unwrapping-the-essentials-of-basic-widgets-5a41</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Flutter, Google’s UI toolkit for crafting natively compiled applications for mobile, web, and desktop from a single codebase, has gained immense popularity. At the heart of Flutter are its widgets, the building blocks of any Flutter app. Understanding these widgets is crucial for any Flutter developer. In this blog, we will unwrap the essentials of basic Flutter widgets and how to use them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Widgets in Flutter?
&lt;/h2&gt;

&lt;p&gt;Widgets in Flutter describe what their view should look like given their current configuration and state. When a widget’s state changes, Flutter rebuilds the widget to reflect the changes. This declarative approach to UI development makes the code more predictable and easier to manage.&lt;/p&gt;




&lt;h2&gt;
  
  
  Basic Flutter Widgets
&lt;/h2&gt;




&lt;h2&gt;
  
  
  Scaffold
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;Scaffold&lt;/code&gt;widget is the base of the visual interface and provides a structure to the app, such as an &lt;code&gt;AppBar&lt;/code&gt;, &lt;code&gt;Drawer&lt;/code&gt;, &lt;code&gt;BottomNavigationBar&lt;/code&gt;, and more.&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="n"&gt;Scaffold&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;appBar:&lt;/span&gt; &lt;span class="n"&gt;AppBar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;title:&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Flutter Demo'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;body:&lt;/span&gt; &lt;span class="n"&gt;Center&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Hello, world!'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;floatingActionButton:&lt;/span&gt; &lt;span class="n"&gt;FloatingActionButton&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;onPressed:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
    &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Icon&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Icons&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&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;h2&gt;
  
  
  Text
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;Text&lt;/code&gt; widget is used to display a string of text with a single style.&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="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="s"&gt;'Hello, Flutter!'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;style:&lt;/span&gt; &lt;span class="n"&gt;TextStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;fontSize:&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;fontWeight:&lt;/span&gt; &lt;span class="n"&gt;FontWeight&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;bold&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;
  
  
  Container
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;Container&lt;/code&gt;widget is a versatile widget that can contain a single child widget, and allows you to customize its appearance with padding, margin, borders, and background color.&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="n"&gt;Container&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;padding:&lt;/span&gt; &lt;span class="n"&gt;EdgeInsets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;16.0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;margin:&lt;/span&gt; &lt;span class="n"&gt;EdgeInsets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;10.0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;decoration:&lt;/span&gt; &lt;span class="n"&gt;BoxDecoration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;color:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;borderRadius:&lt;/span&gt; &lt;span class="n"&gt;BorderRadius&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;circular&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;8.0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'I am inside a container'&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;
  
  
  Row and Column
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Row&lt;/code&gt; and &lt;code&gt;Column&lt;/code&gt; widgets are used to arrange other widgets in a horizontal and vertical manner respectively.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Row Example:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;Row&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;mainAxisAlignment:&lt;/span&gt; &lt;span class="n"&gt;MainAxisAlignment&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;spaceEvenly&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;children:&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Item 1'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Item 2'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Item 3'&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;blockquote&gt;
&lt;p&gt;Column Example:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;Column&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;mainAxisAlignment:&lt;/span&gt; &lt;span class="n"&gt;MainAxisAlignment&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;center&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;children:&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Item 1'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Item 2'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Item 3'&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;h2&gt;
  
  
  Image
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;Image&lt;/code&gt;widget is used to display images in your Flutter app.&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="n"&gt;Image&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;network&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'https://flutter.dev/images/flutter-logo-sharing.png'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Icons
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;Icon&lt;/code&gt;widget is used to display Material icons.&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="n"&gt;Icon&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;Icons&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;favorite&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;color:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;pink&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;size:&lt;/span&gt; &lt;span class="mf"&gt;24.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;
  
  
  Button Widgets
&lt;/h2&gt;

&lt;p&gt;Buttons are used to capture user interactions and can come in various forms such as &lt;code&gt;ElevatedButton&lt;/code&gt;, &lt;code&gt;TextButton&lt;/code&gt;, and &lt;code&gt;IconButton&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ElevatedButton Example:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;ElevatedButton&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;onPressed:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Pressed'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Elevated Button'&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;blockquote&gt;
&lt;p&gt;TextButton Example:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;TextButton&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;onPressed:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Pressed'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Text Button'&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;blockquote&gt;
&lt;p&gt;IconButton Example:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;IconButton&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;icon:&lt;/span&gt; &lt;span class="n"&gt;Icon&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Icons&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;thumb_up&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;onPressed:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Pressed'&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;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;These basic widgets form the foundation of any Flutter application. By mastering these, you will be well-equipped to build more complex interfaces. Remember, Flutter’s true power lies in its widget composition, allowing you to create sophisticated UIs from simple building blocks.&lt;/p&gt;




&lt;h2&gt;
  
  
  Connect with Me
&lt;/h2&gt;

&lt;p&gt;If you enjoyed this post and want to see more of my work, feel free to check out my GitHub and personal website:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;GitHub: &lt;a href="https://github.com/eldhopaulose" rel="noopener noreferrer"&gt;eldhopaulose &lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Website: &lt;a href="https://eldhopaulose.info" rel="noopener noreferrer"&gt;Eldho Paulose&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Resizo: &lt;a href="https://resizo.in/" rel="noopener noreferrer"&gt;Resizo&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>flutter</category>
      <category>frontend</category>
      <category>google</category>
      <category>dart</category>
    </item>
    <item>
      <title>Understanding Flutter Widgets: Column vs Row</title>
      <dc:creator>Eldho Paulose</dc:creator>
      <pubDate>Thu, 30 May 2024 05:09:39 +0000</pubDate>
      <link>https://dev.to/eldhopaulose/understanding-flutter-widgets-column-vs-row-2m5o</link>
      <guid>https://dev.to/eldhopaulose/understanding-flutter-widgets-column-vs-row-2m5o</guid>
      <description>&lt;p&gt;In Flutter, the layout design revolves around widgets. Two of the most essential layout widgets are &lt;code&gt;Column&lt;/code&gt;and &lt;code&gt;Row&lt;/code&gt;. They control how child widgets are positioned vertically and horizontally, respectively. Let’s dive into the details and see them in action with example code.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Column Widget
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;Column&lt;/code&gt;widget in Flutter is used to align child widgets in a vertical manner. It’s similar to a vertical &lt;code&gt;LinearLayout&lt;/code&gt;in Android or a vertical &lt;code&gt;StackPanel&lt;/code&gt;in UWP. Here’s a simple example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F921eza2bh4f0acjzfwya.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F921eza2bh4f0acjzfwya.png" alt=" " width="800" height="604"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example, the &lt;code&gt;mainAxisAlignment&lt;/code&gt; property is set to &lt;code&gt;MainAxisAlignment.center&lt;/code&gt;, which centers the children vertically. The &lt;code&gt;crossAxisAlignment&lt;/code&gt; is set to &lt;code&gt;CrossAxisAlignment.start&lt;/code&gt;, aligning the children to the start of the cross axis (horizontally in this case).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdllemrgxvmnf410iik7t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdllemrgxvmnf410iik7t.png" alt=" " width="800" height="828"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Row Widget
&lt;/h2&gt;

&lt;p&gt;Conversely, the &lt;code&gt;Row&lt;/code&gt;widget arranges its children horizontally. It’s akin to a horizontal &lt;code&gt;LinearLayout&lt;/code&gt;in Android or a horizontal &lt;code&gt;StackPanel&lt;/code&gt;in UWP. Here’s an example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fagksnofd8on4srcw06q7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fagksnofd8on4srcw06q7.png" alt=" " width="800" height="441"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, &lt;code&gt;mainAxisAlignment&lt;/code&gt;is set to &lt;code&gt;MainAxisAlignment.spaceEvenly&lt;/code&gt;, which distributes the children evenly across the horizontal axis with equal spacing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Combining Column and Row
&lt;/h2&gt;

&lt;p&gt;You can nest &lt;code&gt;Row&lt;/code&gt;and &lt;code&gt;Column&lt;/code&gt;widgets to create complex layouts. Here’s a nested example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fonv1z9bbhglzir7bl9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fonv1z9bbhglzir7bl9.png" alt=" " width="800" height="557"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this nested layout, a &lt;code&gt;Row&lt;/code&gt;is placed inside a &lt;code&gt;Column&lt;/code&gt;, combining both horizontal and vertical alignment.&lt;/p&gt;

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

&lt;p&gt;Understanding the &lt;code&gt;Column&lt;/code&gt;and &lt;code&gt;Row&lt;/code&gt;widgets is crucial for effective layout design in Flutter. Experiment with the properties and nesting to create the desired UI for your app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://eldhopaulose.info/" rel="noopener noreferrer"&gt;Contact with me&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/eldhopaulose" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Resizo: &lt;a href="https://resizo.in/" rel="noopener noreferrer"&gt;Resizo&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>google</category>
      <category>frontend</category>
    </item>
    <item>
      <title>TS-BoilerplateX</title>
      <dc:creator>Eldho Paulose</dc:creator>
      <pubDate>Mon, 20 May 2024 10:17:59 +0000</pubDate>
      <link>https://dev.to/eldhopaulose/ts-boilerplatex-flj</link>
      <guid>https://dev.to/eldhopaulose/ts-boilerplatex-flj</guid>
      <description>&lt;p&gt;TS-BoilerplateX is a meticulously crafted boilerplate tailored for developers seeking a seamless starting point for building powerful web applications with TypeScript and Express.js. With TS-BoilerplateX, harness the combined benefits of TypeScript's static typing and Express.js' flexibility to expedite your development process while ensuring code integrity and maintainability.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Starting off&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I've documented my process and highlighted the main components in this article. If you're eager to dive into the code right away, you can head straight to the repository:&lt;a href="https://github.com/eldhopaulose/TS-BoilerplateX.git" rel="noopener noreferrer"&gt;github&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Features&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;TypeScript support&lt;/li&gt;
&lt;li&gt;    Express.js integration&lt;/li&gt;
&lt;li&gt;    ESLint for code linting&lt;/li&gt;
&lt;li&gt;    Example controllers and routes&lt;/li&gt;
&lt;li&gt;    Comprehensive documentation&lt;/li&gt;
&lt;li&gt;    EditorConfig for consistent coding style&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Installation&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To quickly create an application skeleton, you can utilize the TS-BoilerplateX tool. You can run the application generator using the npx command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx ts-boilerplatex

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

&lt;/div&gt;



&lt;p&gt;To install TS-BoilerplateX, you can use npm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install ts-boilerplatex

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

&lt;/div&gt;



&lt;p&gt;-&amp;gt; dev: Start the development server with nodemon.&lt;br&gt;
-&amp;gt; start: Start the application using ts-node to execute src/main.ts.&lt;br&gt;
-&amp;gt; lint: Run ESLint to lint source files in the src/ directory.&lt;br&gt;
-&amp;gt; docs: Generate documentation using Typedoc from src/main.ts.&lt;br&gt;
-&amp;gt; build: Compile TypeScript files using the TypeScript compiler (tsc) based on the tsconfig.json configuration.&lt;br&gt;
-&amp;gt; build-all: Clean the build directory, then run build, esbuild-node, and esbuild-browser scripts.&lt;br&gt;
-&amp;gt; clean: Remove build artifacts and generated documentation.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Project Structure&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The project structure is organized as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TS-BoilerplateX/
|-- bin/
|   -- server.ts
|-- controller/
|   -- indexController.ts
|-- routes/
|   -- index.ts
|-- README.md
|-- package.json
|-- tsconfig.json
`-- ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;bin/: Contains the server configuration.&lt;/li&gt;
&lt;li&gt;controller/: Contains controller functions to handle route logic.&lt;/li&gt;
&lt;li&gt;routes/: Contains route definitions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Middleware&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Morgan
Morgan middleware is used for logging HTTP requests. It's configured to log requests in the "dev" format.&lt;/li&gt;
&lt;li&gt;bodyParser
bodyParser middleware is used to parse incoming JSON and URL-encoded requests. It's configured to handle JSON and URL-encoded requests with extended mode enabled.&lt;/li&gt;
&lt;li&gt;compression
compression middleware compresses HTTP responses before sending them to the client.&lt;/li&gt;
&lt;li&gt;cookieParser
cookieParser middleware is used to parse cookies attached to incoming requests.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ts</category>
      <category>typescript</category>
      <category>express</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
