Skip to content

Mix 1.5.0 "Nielsen"

Latest
Compare
Choose a tag to compare
@tilucasoli tilucasoli released this 17 Sep 17:52
Frame 37@2x

Jakob Nielsen, a leading figure in UI/UX design, transformed the field with his Ten Usability Heuristics and emphasis on user-centered design. His work highlights the importance of intuitive, efficient interfaces and usability testing. Nielsen’s mantra, “users are not like you,” serves as a reminder to prioritize real user needs, making his contributions essential in shaping modern digital experiences.

Release Notes

Highlights

New Feature: Fluent API

The fluent API allows for more expressive and readable code when working with Mix specifications and utilities. It enables chaining of method calls and provides a more intuitive way to configure and build Mix components.

Key Points:

  • Simplified and more concise code when defining Mix specifications.
  • Improved readability and maintainability of the codebase.
  • Enhanced developer experience and productivity.
final style = Style(
  $text.chain
    ..uppercase()
    ..textAlign.center()
    ..style.color.blue()
    ..style.fontSize(20),
);

New Feature: Remove All Previous Spec Modifiers and Color Directives

This feature gives developers greater control over their Styles by allowing them to clear any spec modifier or color directive and start fresh with new ones.

Key Points:

  • Added a method to remove all previously applied Spec Modifiers and Color Directives
final style = Style(
  $box.chain
    ..width(100)
    ..height(100)
    ..color.red()
    ..color.withHue(200)
    ..color.withSaturation(0.3)
    ..color.withLightness(0.3)
    ..color.resetDirectives()
    ..color.withAlpha(140)
);

In this example, all previous directives are ignored after the resetDirectives attribute.

Refactor: Generic Brightness Detection

Previously, $on.dark relied on Material design because it was using Theme.of(context), causing issues when using the Cupertino theme. With this update, brightness detection works consistently across different design systems, ensuring better compatibility and reliability.

Key Points:

  • Replaced Theme.of(context) with MediaQuery for brightness detection.
  • Ensures compatibility with both Material and Cupertino design systems.

What's Changed

New Contributors

Full Changelog: mix-1.4.6...mix-1.5.0