Highlights
FlexBox
Gets a Dedicated Spec and Utility
In this release, FlexBox now has its own dedicated utility: $flexbox
. Previously, you styled FlexBox using either $flex or $box
. With $flexbox
, you get a utility that combines attributes from both, offering a more intuitive and efficient way to handle a common use case in most applications.
This enhancement simplifies your code by reducing the need to use both box and any flex widget, making it easier to define layouts with different children.
FlexBox(
direction: Axis.vertical,
style: Style(
$flexbox.chain
..flex.mainAxisAlignment.center()
..flex.crossAxisAlignment.center()
..flex.gap(12)
..padding.all(12)
..color.red()
..border.all.color.redAccent(),
),
children: const [
Text('Hello'),
Text('World'),
],
),
Important Note: Starting with the next major version, FlexBox will exclusively use $flexbox
. This change ensures that FlexBox styling is fully aligned with the existing API conventions in Mix, offering a more consistent developer experience.
Introducing the Remix Playground
Remix now includes a fully interactive playground, allowing you to explore and preview all available components in one place.
Try out the playground today to get hands-on with Remix components and unlock new possibilities for your UI design!
Introducing Design Token Support in mix_generator
The mix_generator and mix_annotation now include full support for design token generation. With this update, you can effortlessly define your design tokens and let the generator handle creating everything needed to integrate them into your MixThemeData.
Simply annotate a class with @MixableToken
, specifying the token type, and the generator will do the rest. This feature supports all design token categories: Radius, Color, Space, and TextStyle.
@MixableToken(Color)
class CustomColors {
final Color primary;
final Color surface;
const CustomColors({
required this.primary,
required this.surface,
});
Map<ColorToken, Color> toMap() => _$CustomColorsToMap(this);
}
Directly in Styles:
The generated code supports you reference tokens directly in your styles for a cleaner, more declarative approach:
$box.color.$primary()
Access from Context:
You can also access tokens dynamically through the context
context.$color.primary()
This update ensure consistency across your app while reducing boilerplate. The added utilities make tokens easier to use, improving developer productivity.
Packages Updates
mix
- v1.5.3
- REFACTOR: Solve dcm lint issues (#519).
- FIX: Order of modifiers implementation on Box, Image and Text (#529).
- FIX: reset modifiers and directives when using fluentAPI (#482).
- FEAT: Add spring curve (#503).
- FEAT: Create StrokeAlignUtility (#496).
- FEAT: Utilities for text height behavior (#495).
- FEAT: Rewrite FlexBox as a Mix's primitive component (#517).
- FEAT: Add
SpecConfiguration
(#483). - DOCS: Add section for
TokenResolver
(#537).
remix
- v0.0.3
- REFACTOR: Create a new Architecture for remix's components (#446).
- REFACTOR(remix): improve widgetbook navigation (#524).
- REFACTOR: Add in code documentation and rename params for each component (#514).
- REFACTOR: Remix progress (#429).
- REFACTOR: small fixes on remix (#512).
- REFACTOR: Rewrite Fortaleza theme using the new code gen for tokens (#528).
- REFACTOR: Remix was rewritten using Fluent API (#476).
- REFACTOR: Rewrite all components in the new Archtecture (#467).
- FIX: Textfield helper Text (#531).
- FIX: Toast animation trigger (#530).
- FEAT: Create Textfield (#511).
- FEAT: Chip component (#504).
- FEAT: implement toast component (#503).
- FEAT: Card has child instead of children parameter (#499).
- FEAT: Create dark base theme for Remix (#498).
- FEAT: remix-styling-configuration (#483).
- FEAT: Segmented control (#479).
- FEAT: Accordion component (#433).
- FEAT: Slider component (#509).
- FEAT: Add more directives to Colors (#477).
- FEAT: Menu Item Component (#508).
- FEAT: Add group feature to Radio (#435).
- FEAT: Create Select component (#448).
- FEAT: Add parameter onEnd for AnimatedStyle (#458).
- FEAT: button supports component builder (#444).
- FEAT: Create a theme for Remix (#470).
- FEAT: Refactor Remix components (#428).
- FEAT: Remix improvements and further improvements (#410).
- FEAT: Rewrite FlexBox as a Mix's primitive component (#517).
mix_annotations
- v0.3.1
- FEAT: Create code gen for design tokens (#521).
mix_generator
- v0.3.2
- REFACTOR: Rewrite Fortaleza theme using the new code gen for tokens (#528).
- FIX: Shadow list animation (#445).
- FEAT: Create code gen for design tokens (#521).
- FEAT: Rewrite FlexBox as a Mix's primitive component (#517).
- FEAT: Fluent API (#475).
- FEAT: Remix improvements and further improvements (#410).
- DOCS: improve mix theme data features explanations (#404).
mix_lint
- v0.1.2
- FEAT: Rewrite FlexBox as a Mix's primitive component (#517).
What's Changed
- feat: Utilities for text height behavior by @tilucasoli in #495
- feat: Create StrokeAlignUtility by @tilucasoli in #496
- feat: Create dark base theme for Remix by @tilucasoli in #498
- feat: Card has child instead of children parameter by @tilucasoli in #499
- feat: implement toast component by @tilucasoli in #503
- feat: Chip component by @tilucasoli in #504
- feat: Improve spring curve by @tilucasoli in #507
- feat: Add Dark Theme by @tilucasoli in #510
- feat: Menu Item Component by @tilucasoli in #508
- feat: Slider component by @tilucasoli in #509
- feat: Create Textfield by @tilucasoli in #511
- refactor: small fixes on remix by @tilucasoli in #512
- chore: improve the package scores by @hesham04Dev in #513
- feat: Bring TextStyle properties to the root of TextSpecUtility by @tilucasoli in #516
- feat: Rewrite FlexBox as a Mix's primitive component by @tilucasoli in #517
- refactor: Solve dcm lint issues by @tilucasoli in #519
- refactor: Modernize MediaQuery usage by @cabaucom376 in #520
- refactor: Add in code documentation and rename params for each component by @tilucasoli in #514
- docs: Update creating-a-widget.md by @cabaucom376 in #518
- fix: Token was not being resolved correctly by @tilucasoli in #525
- feat: Create code gen for design tokens by @tilucasoli in #521
- refactor(remix): improve widgetbook navigation by @yousinix in #524
- fix: Order of modifiers implementation on Box, Image and Text by @tilucasoli in #529
- fix: Toast animation trigger by @tilucasoli in #530
- fix: Textfield helper Text by @tilucasoli in #531
- docs: Add section for
TokenResolver
by @tilucasoli in #537 - refactor: Rewrite Fortaleza theme using the new code gen for tokens by @tilucasoli in #528
- chore: version packages by @github-actions in #543
New Contributors
- @hesham04Dev made their first contribution in #513
- @cabaucom376 made their first contribution in #520
- @yousinix made their first contribution in #524
Full Changelog: mix-1.5.2...mix-1.5.3