swiftui 0.1.0

Flutter Android iOS web

A faithful implementation of SwiftUI as extensions on Widgets.

swiftui #

A research implementation of SwiftUI view transformations on Flutter Widgets using Dart extensions.

dependencies:
  flutter:
    sdk: flutter
  swiftui:
    git: https://github.com/lukepighetti/flutter_swiftui
class Example extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: <Widget>[
        Text("padded").padded(8),
        Text("offsetX").offsetX(100),
        Text("offsetY").offsetY(-200),
        Text("offsetDegrees").offsetDegrees(180, 100),
        Text("foo").border(Border.all()),
        Text("More padded").padded(40),
      ],
    );
  }
}

Contributing #

Since this API is intended for research, I'm totally happy with people submitting breaking changes and altering the direction of this project. My starting point was to try to implement the most-common View transformations you see in SwiftUI, but I make no claims that the architecture I've chosen makes the most sense. I'd much rather someone break the API with something novel than try to fight with implementing the SwiftUI api extactly.

In other words, SwiftUI is merely an inspiration, and not a specification.

0
likes
110
pub points
0%
popularity

A faithful implementation of SwiftUI as extensions on Widgets.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

lukepighetti@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on swiftui