Search packages, repositories and app categories

Package detailsv2.4.3

niku

Property builder for styling Widget with SwiftUI like pattern

AndroidiOSWebmacOSWindowsLinux
30-day downloads
535
Likes
69
Pub points
130

Install package

flutter pub add niku

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Niku is a Flutter package that provides a SwiftUI-like property builder pattern for styling widgets, enabling a more concise and readable syntax when defining UI layouts. It allows developers to chain styling properties fluently, reducing boilerplate code and improving code maintainability. With support across all major platforms, Niku enhances the developer experience by offering a declarative approach to widget styling similar to SwiftUI's syntax. The package integrates seamlessly into existing Flutter projects.

Use cases

  • Building responsive UIs with minimal code
  • Simplifying complex widget styling
  • Creating reusable UI components
  • Improving code readability in large projects
  • Rapid prototyping of UI layouts

Key features

  • SwiftUI-like fluent API
  • Property-based styling builder
  • Cross-platform compatibility
  • Minimal boilerplate
  • Extensible and composable

Suitable for

  • Developers seeking SwiftUI-inspired syntax
  • Teams prioritizing clean and readable UI code
  • Projects requiring rapid UI development
  • Flutter developers familiar with functional UI patterns

Considerations

  • May require learning curve for new users
  • Limited documentation compared to core Flutter
  • Potential performance overhead from chaining
  • Not a replacement for standard Flutter widgets
  • Best suited for projects where UI clarity is prioritized

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Discord Shield

Niku

Create Flutter UI, easier, faster, smarter

Fluently developing without headache and Nested Hell.

korone-drake-format

Why

Recommended: See why people choose and how it get along with your codebase in the documentation

Styling in Flutter is complex and verbose.

Developers have to describe every styling detail to Widget. It’s like low-level programming UI, having to adapt between property is hard when some are more complex than others, for instance, MaterialStateProperty.

When the codebase gets more complex, the syntax of Flutter itself is too verbose, nested than it should be, result being hard to maintain mostly known as Nested Hell.

Niku helps to solve the problem by providing a cascade notation to style widget. Exposing the same naming convention, shorten property, parent builder and style extraction.

Providing a smoother, shorter yet, more straightforward and maintainable way to compose styling in Flutter.

Documentation

Documentation for v2 can be found on niku.saltyaom.com

License

Niku is MIT Licensed.

Maintainers

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package