Skip to content

2.2 Aegleseeker

Compare
Choose a tag to compare
@SaltyAom SaltyAom released this 18 Mar 08:32
· 48 commits to main since this release
8ee7833

It's only been just 2 weeks since the latest release of 2.1.
Today, we're expanding the horizon of Niku across the board again with Niku 2.2

This time, the name "Aegleseeker" is from the name of music composed by "Silentroom" vs "Frums", which featured in Rhythm game called Arcaea.

Aegleseeker

This version features more of a parent proxy.

Extended Parent Proxy

Quote from 2.1 (Ga1ahad)

Parent Proxy allows you to compose your parent with access to parent property without having to create useParent.

Previously, only Column and Row got extended parent proxy which normal Niku widget only got margin for parent proxy.

We investigated that Flutter developers commonly want more than just margin, but the more common proxy like width, height is also important, so we port all of the sizing shortcuts to every Niku widget.

We also add more proxy to AxisLayoutProxy, which add more common pattern like parent alignment.

Take a look at below figure, notice that there's no useParent because it's now handled by common property builder provided by extended parent proxy.
image

Introducing useTransition

Ever want to animate property from one to another without hassle? Then you might want to use useTransition!

With use transition, Niku auto animate property you provided from previous to new without you manually creating AnimationController or StatefulWidget, it can be used directly in StatelessWidget like any other property builder.

To see how clean the useTransition can provide at the figure below.
Without useTransition:
Without useTransition

With useTransition and Niku:
With useTransition

Improvement of UseQueryMacro

Reduce Time Complexity of hooks from UseQueryMacro from O(n(2i + p)) to O(n) where n is property, p is parent total call stack, and i is a total invocation.

Bypassing widget self as reference instead of immutable copied then diffing, and apply

The following hooks benefits in performance improvement:
- useQuery
- useSize
- useDarkMode
- useThemeSelector
- useScreen

Feature:

  • New parent proxy available for all widget:
    • expanded
    • flex
    • fullSize
    • fullWidth, wFull, w100
    • fullHeight, hFull, h100
    • fractionSize, sizePercent
    • fractionWidth, fractionW, fw, wFactor, widthPercent, wPercent
    • fractionHeight, fractionH, hw, hFactor, heightPercent, hPercent
    • boxConstraints
    • nikuConstraints
    • maxSize
    • minSize
    • maxWidth, maxW, wMax
    • minWidth, minW, wMin
    • maxHeight, maxH, hMax
    • minHeight, minH, hMin
    • width, w
    • height, h
    • useGesture
  • New parent proxy available for AxisLayourProxy
    • alignTopLeft
    • alignTopCenter
    • alignTopRight
    • alignCenterLeft
    • alignCenter
    • alignCenterRight
    • alignBottomLeft
    • alignBottomCenter
    • alignBottomRight
    • New widget: NikuRadio, NikuRadioListTile, NikuDismissible
  • New hook: useTransition, useTransitions
  • Add property: splash, wFactor, hFactor to Niku
  • New utility widget NikuAnimated, NikuAnimateds
  • New proxy: ListTile with dismiss for NikuDismissible

Change:

  • Move part of AxisProxy to NikuBuildMacro
  • Refactor, and organize examples

Bug fixes:

  • obscureCharacter not working in NikuTextFormField