niku 0.1.0 copy "niku: ^0.1.0" to clipboard
niku: ^0.1.0 copied to clipboard

outdated

Property builder for styling Widget

Niku #

Property builder for styling Widget

Niku

Why #

Styling widget in Flutter is hard to maintain. Since everything is a widget, a style property like Padding, Align, FractionallySizedBox, Tooltip is nested to compose a simple widget.

Niku allow developer to style property using builder or SwiftUI modifier like to compose styling. By reducing the nested hell andbracket usage in Flutter which made styling Flutter widget more maintainable.

// Traditional Flutter
Center(
  child: Tooltip(
    message: "A Flat Button",
    child: Padding(
      padding: EdgeInsets.symmetric(vertical: 20)
      child: FractionallySizedBox(
        widthFactor: .7,
        child: FlatButton(
          onPressed: () {},
            color: Colors.blue 
            child: Text(
              "Flat Button",
              style: const TextStyle(
              fontSize: 21,
              color: Colors.white
            )
          )
        )
      )
    )
  )
);

// Niku
NikuFlatButton(
  NikuText("Flat Button")
    .fontSize(21)
    .color(Colors.blue)
    .build()
)
  .py(20)
  .niku()
  .fractionWidth(.7)
  .tooltip("A Flat Button")
  .center()
  .build();

Getting Started #

Niku required no dependencies at all. Starting by adding niku to pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter

  niku: 0.1.0

Then you're ready to create your awesome Flutter project with effortless styling!

Documentation #

Currently, Niku is experimental library for styling user interface.

Niku contains available Widget:

62
likes
0
pub points
80%
popularity

Publisher

verified publishersaltyaom.com

Property builder for styling Widget

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on niku