Layrz SDK for Dart

Pub version likes GitHub license

It's a group of classes/SDK that can help you to implement scripts into Layrz modules, or incorporate them into your own projects.

Installation

To use this package, add layrz_sdk to your pubspec.yaml:

flutter pub add layrz_sdk

Requires Dart >=3.13.0 <4.0.0 and Flutter >=3.47.0.

FAQ

Why is this package called layrz_sdk?

All packages developed by Layrz are prefixed with layrz_, check out our other packages on pub.dev.

What is this package for?

This package is a port of layrz_models, converting our API responses into Dart objects so you can use them in your Flutter projects, and evolving beyond that into a full SDK.

layrz_sdk is the same as layrz_models?

Essentially, yes — same thing, same behavior. The main difference is that layrz_models has Material dependencies, and that's not compatible with layrz_ui, our 100% design-system-agnostic library and the next evolution of layrz_theme. The Flutter team is leading the charge on decoupling Material and Cupertino from the core framework, and that vision inspired us to go all in. So we're porting layrz_models to layrz_sdk, making adjustments on how things are declared, along with the connectors.

And if it's essentially yes, why not just remove the Material dependencies from layrz_models? Because our scope is bigger than just having an API connector — to be on the same page as the rest of our ecosystem, we're evolving the models into a full SDK.

I have a question, how can I contact you?

If you need more assistance, you can open an issue on the Repository and we're happy to help you :)

License

This project is licensed under the MIT License - see the LICENSE file for details.

This project is maintained by Golden M with authorization of Layrz LTD.

Who are you? / Want to work with us?

Golden M is a software and hardware development company what is working on a new, innovative and disruptive technologies. For more information, contact us at sales@goldenm.com or via WhatsApp at +(507)-6979-3073.

Icon Registry

The lib/src/icons/ module provides a runtime registry mapping icon names to MdiRemapIcon objects for use in SDK models (e.g., Avatar.icon, AvatarInput.icon). It is not an icon library for apps; applications should depend on flutter_material_design_icons directly.

Regenerating the Registry

When Material Design Icons updates, regenerate the registry:

make -C dart icons

This runs dart run dart/tool/generate_icons.dart and formats output. The generator parses flutter_material_design_icons source to extract icon names, codepoints, and tags.

Icon Tree-Shaking

The iconMapping const map references all 7447 MDI icons. Because it is part of the SDK's public API and is pulled in by Avatar models, any app depending on layrz_sdk cannot tree-shake icon glyphs — all 7447 are included in the app binary. This is not a regression (the same applied when using the separate layrz_icons package) but should be noted when budgeting app size.

To use only specific icons, depend directly on flutter_material_design_icons instead of layrz_sdk.

Libraries

layrz_sdk
The Layrz SDK provides shared data models, enums, and utilities for the Layrz IoT platform.