layout-converter

Convert Flutter layout widgets to React Native Flexbox layouts.

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/Saurav-snapwork/NewAppTemplate --skill layout-converter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: layout-converter
Source: https://github.com/Saurav-snapwork/NewAppTemplate/tree/main/.github/skills/layout-converter
Command: npx skills add https://github.com/Saurav-snapwork/NewAppTemplate --skill layout-converter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Flutter to React Native migration often breaks layout when Row, Column, Expanded, Spacer, Stack, Positioned, or Wrap widgets are translated. This Skill provides a deterministic mapping that preserves visual hierarchy and scroll behavior during migration.

Core Features & Use Cases

  • Maps Flutter layout widgets to React Native flexbox equivalents (Row, Column, Expanded, Flexible, Spacer, Stack, Positioned, Wrap) and ensures main/cross axis alignments are translated to justifyContent and alignItems.
  • Translates MediaQuery usage to Dimensions or responsive hooks, enabling responsive layouts without Flutter's context-based media queries.
  • Preserves nesting, order, and scroll behavior across migration, reducing layout regressions.

Quick Start

Feed your Flutter layout tree into the converter to generate a React Native layout that preserves structure and alignment.

Frequently Asked Questions about layout-converter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Flutter Row and Column widgets to React Native flexbox?

Flutter Row and Column widgets convert to React Native flexbox by mapping MainAxisAlignment and CrossAxisAlignment directly to justifyContent and alignItems, preserving the visual hierarchy and nesting structure throughout the migration process.

What is the best way to translate Flutter MediaQuery to React Native for responsive layouts?

Translating Flutter MediaQuery to React Native involves mapping context-based media queries to the Dimensions API or responsive hooks, enabling responsive layouts while replacing Flutter's context-dependent media query mechanism during migration.

Does converting Flutter Stack and Positioned to React Native preserve scroll behavior?

Converting Flutter Stack and Positioned to React Native preserves scroll behavior and nesting order by applying a deterministic layout mapping, ensuring that overlapping UI structures and scrolling containers maintain their original visual hierarchy.

How do I handle unsupported Flutter widgets when migrating to React Native flexbox?

Handling unsupported Flutter widgets during migration requires strict validation to prevent silent drops, utilizing a defined LAYOUT_MAP and alignment mappers to safely warn on unknown widgets rather than failing silently.

Can I migrate Flutter Expanded, Flexible, and Spacer directly to React Native?

Migrating Flutter Expanded, Flexible, and Spacer to React Native uses direct flexbox equivalents to maintain proportional sizing and spacing, ensuring flexible child components adapt correctly within Row and Column containers.