Write Flutter UI like SwiftUI

Swiftify brings elegant, chainable modifiers to your Flutter widgets, making your code cleaner and more expressive.

swiftify_example.dart
// Traditional Flutter
Text('Hello'),

// With Swiftify
Text('Hello')
  .fontSize(18)
  .bold()
  .color(Colors.green)
  .padding(EdgeInsets.all(12));

Features

Swiftify transforms how you write Flutter UI code, making it more intuitive and maintainable.

Cleaner Flutter Code

Reduce nesting and improve readability with a clean, chainable syntax that makes your code more maintainable.

SwiftUI-style Modifier Chaining

Apply multiple styling properties in a fluent, chainable way just like you would in SwiftUI.

Open Source & Community-Driven

Built by the community, for the community. Contribute, suggest features, and help shape the future.

Easy to Extend

Create your own modifiers and extensions to fit your project's specific needs and coding style.

How It Works

Swiftify uses Dart extensions to add modifier methods to Flutter widgets, allowing for a more fluent API.

Traditional Flutter

Container(
  padding: EdgeInsets.all(16.0),
  decoration: BoxDecoration(
    color: Colors.blue,
    borderRadius: BorderRadius.circular(8.0),
  ),
  child: Text(
    'Hello, Flutter!',
    style: TextStyle(
      fontSize: 18.0,
      fontWeight: FontWeight.bold,
      color: Colors.white,
    ),
  ),
)

With Swiftify

Text('Hello, Flutter!')
  .fontSize(18.0)
  .bold()
  .color(Colors.white)
  .padding(EdgeInsets.all(16.0))
  .background(
    color: Colors.blue,
    borderRadius: 8.0
  )

How Swiftify Works Under the Hood

Swiftify leverages Dart's extension methods to add new functionality to existing Flutter widgets without modifying their source code.

// Example of a Swiftify extension
extension TextModifiers on Text {
  Text fontSize(double size) {
    return Text(
      this.data!,
      style: (this.style ?? TextStyle()).copyWith(
        fontSize: size,
      ),
    );
  }
  
  Text bold() {
    return Text(
      this.data!,
      style: (this.style ?? TextStyle()).copyWith(
        fontWeight: FontWeight.bold,
      ),
    );
  }
}

Join the project

Help shape the future of expressive Flutter UI.

Report Issues

Found a bug or have a feature request? Open an issue on GitHub.

Submit PRs

Contribute code, documentation, or examples through pull requests.

Join Discussions

Participate in GitHub discussions to help shape the roadmap.