zeba_academy_dynamic_layout_engine 0.0.1 copy "zeba_academy_dynamic_layout_engine: ^0.0.1" to clipboard
zeba_academy_dynamic_layout_engine: ^0.0.1 copied to clipboard

A smart, constraint-based dynamic layout engine for Flutter. Build responsive UIs without breakpoints using rule-based and auto-arranging layouts.

zeba_academy_dynamic_layout_engine #

šŸš€ A smart, constraint-based dynamic layout engine for Flutter.

Build fully responsive UIs without breakpoints using a powerful rule-based and constraint-driven system.


✨ Features #

  • 🧩 Constraint-based layouts (like AutoLayout)
  • šŸ”„ Auto rearrangement based on screen size
  • āš™ļø Rule-based UI engine
  • šŸ“± No breakpoints required
  • ⚔ Lightweight and fast
  • 🧠 Declarative layout system

šŸ“¦ Installation #

Add this to your pubspec.yaml:

dependencies:
  zeba_academy_dynamic_layout_engine: ^0.0.1

šŸš€ Getting Started #

1. Import package #

import 'package:zeba_academy_dynamic_layout_engine/zeba_academy_dynamic_layout_engine.dart';

2. Basic Example #

DynamicLayout(
  engine: LayoutEngine(
    rules: [
      LayoutRule(
        condition: (ctx) => ctx.maxWidth < 400,
        action: (ctx) {
          ctx.nodes['box2']!.y = 100;
        },
      ),
    ],
  ),
  items: [
    DynamicItem(
      node: LayoutNode(
        id: 'box1',
        width: 100,
        height: 100,
      ),
      child: Container(color: Colors.red),
    ),
    DynamicItem(
      node: LayoutNode(
        id: 'box2',
        width: 100,
        height: 100,
        constraints: [
          LayoutConstraint(
            targetId: 'box1',
            type: ConstraintType.rightTo,
            offset: 10,
          ),
        ],
      ),
      child: Container(color: Colors.blue),
    ),
  ],
)

🧠 Core Concepts #

šŸ”¹ LayoutNode #

Represents a UI element with size and constraints.

šŸ”¹ LayoutConstraint #

Defines relationships between nodes (left, right, top, bottom, center).

šŸ”¹ LayoutEngine #

Processes rules and constraints to compute positions.

šŸ”¹ LayoutRule #

Applies dynamic behavior based on screen conditions.


āš™ļø How It Works #

  1. Create nodes with constraints
  2. Define rules for dynamic behavior
  3. LayoutEngine processes rules
  4. Constraint solver calculates positions
  5. UI renders using Stack + Positioned

šŸ“Š Use Cases #

  • Adaptive dashboards
  • Dynamic forms
  • Responsive cards/grid systems
  • Complex UI without breakpoints
  • Low-code UI builders

šŸ›£ļø Roadmap #

  • šŸ”„ Animation support
  • 🧠 Advanced constraint solver (dependency graph)
  • šŸž Debug overlay
  • šŸ“ Intrinsic size support
  • 🧩 Visual layout builder

šŸ¤ Contributing #

Contributions are welcome!

  • Fork the repo
  • Create a feature branch
  • Submit a PR

About Me #

✨ I’m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on Linkedin

Your all-in-one no-bloat hub! #

šŸš€ Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! šŸ’»āœØ

Zeba Academy is a learning platform dedicated to coding, technology, and development. āž” Visit our main site: zeba.academy
āž” Explore hands-on courses and resources at: code.zeba.academy
āž” Check out our YouTube for more tutorials: zeba.academy
āž” Follow us on Instagram: zeba.academy

Thank you for visiting!

0
likes
140
points
0
downloads

Documentation

API reference

Publisher

verified publisherzeba.academy

Weekly Downloads

A smart, constraint-based dynamic layout engine for Flutter. Build responsive UIs without breakpoints using rule-based and auto-arranging layouts.

Homepage

Topics

#flutter #layout #responsive #ui #constraint-layout

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on zeba_academy_dynamic_layout_engine