A declarative library for building reactive user interface
So what does code that uses UniMob.UI look like?
using UniMob;
using UniMob.UI;
using UniMob.UI.Widgets;
using UnityEngine;
public class SimpleCounterApp : UniMobUIApp
{
[Atom] private int Counter { get; set; } = 0;
protected override Widget Build(BuildContext context)
{
return new Container
{
BackgroundColor = Color.cyan,
Child = new UniMobButton
{
OnClick = () => Counter += 1,
Child = new UniMobText(WidgetSize.Fixed(400, 100))
{
Value = "Tap count: " + Counter,
FontSize = 40,
MainAxisAlignment = MainAxisAlignment.Center,
CrossAxisAlignment = CrossAxisAlignment.Center,
}
}
};
}
}
Minimal Unity Version is 2019.3.
Library distributed as git package (How to install package from git URL)
Git URL (UniMob.UI): https://github.com/codewriter-packages/UniMob.UI.git
Git URL (UniMob): https://github.com/codewriter-packages/UniMob.git
UniMob.UI is MIT licensed.
UniMob.UI inspired by Flutter.