Skip to content

codecoradev/coflui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coflui

A standalone Flutter UI package that combines:

  • Dynamic UI engine — render entire widget trees from JSON (Server-Driven UI), with unlimited nesting, reusable components, input/actionable elements, and a state-agnostic controller.
  • Native Flutter widgetsCofluiText, CofluiButton, CofluiTextField, CofluiDropdown, CofluiCard, CofluiGrid, … one standard used by both the dynamic renderer and hand-written code.
  • Responsive by breakpoint — automatic adaptation across mobile / tablet / desktop (Material 3 adaptive thresholds).

State-management agnostic. The engine is built on ChangeNotifier + ValueNotifier (native Flutter reactivity), so it works with GetX, Riverpod, BLoC, Provider, or plain setState — no binding required.

Install

dependencies:
  coflui:
    git:
      url: https://github.com/codecoradev/coflui.git
      ref: main
import 'package:coflui/coflui.dart';

Quick start — dynamic UI

final controller = CofluiFormController();

// 1. register default builders (once, at app boot)
DynamicUIBootstrap.registerDefaults();

// 2. load JSON
controller.loadFromJson([
  {"id": "name", "type": "textfield", "label": "Name", "props": {"hint": "Your name"}},
  {"id": "submit", "type": "button", "label": "Save", "props": {"action": "submit"}},
]);

// 3. render
Column(
  children: controller.components
      .map((c) => DynamicUIWidget(c, controller: controller))
      .toList(),
);

Quick start — native widgets

CofluiCard(
  title: 'Profile',
  child: CofluiGrid(
    mobileColumns: 1,
    tabletColumns: 2,
    desktopColumns: 3,
    children: [ /* stat tiles */ ],
  ),
);

CofluiButton(
  label: 'Submit',
  variant: CofluiButtonVariant.primary,
  icon: Icons.send,
  fullWidth: true,
  onPressed: submit,
);

Documentation

License

MIT

About

Coflui — standalone Flutter UI package (dynamic JSON-driven + native widgets). State-management agnostic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages