Swiftify brings elegant, chainable modifiers to your Flutter widgets, making your code cleaner and more expressive.
// Traditional Flutter
Text('Hello'),
// With Swiftify
Text('Hello')
.fontSize(18)
.bold()
.color(Colors.green)
.padding(EdgeInsets.all(12));
Swiftify transforms how you write Flutter UI code, making it more intuitive and maintainable.
Reduce nesting and improve readability with a clean, chainable syntax that makes your code more maintainable.
Apply multiple styling properties in a fluent, chainable way just like you would in SwiftUI.
Built by the community, for the community. Contribute, suggest features, and help shape the future.
Create your own modifiers and extensions to fit your project's specific needs and coding style.
Swiftify uses Dart extensions to add modifier methods to Flutter widgets, allowing for a more fluent API.
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,
),
),
)
Text('Hello, Flutter!')
.fontSize(18.0)
.bold()
.color(Colors.white)
.padding(EdgeInsets.all(16.0))
.background(
color: Colors.blue,
borderRadius: 8.0
)
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,
),
);
}
}
Help shape the future of expressive Flutter UI.
Found a bug or have a feature request? Open an issue on GitHub.
Contribute code, documentation, or examples through pull requests.
Participate in GitHub discussions to help shape the roadmap.