A Flutter-inspired UI toolkit for Nim. API reference.
Three quick entry points:
flit (the umbrella import),
alphabetical symbol index,
or jump to a module below.
Core types and the runtime that drives the build/layout/paint cycle.
foundation/widget — Widget, Element, State, BuildContext, setStatefoundation/render_object — RenderObject, Canvas, PaintingContext, hit-testingfoundation/geometry — Offset, Size, Rect, Constraints, EdgeInsets, Alignment, lerpfoundation/color — Color, rgba/rgb/fromHex, withAlpha/withOpacity, lerp, named constantsfoundation/key — Key, ValueKey, UniqueKey, GlobalKeyfoundation/binding — Binding, PointerEvent, KeyEvent, frame callbacksfoundation/runtime — mountElement, rebuildElement, runLayout, runPaint, processPointerEventsfoundation/listenable — ValueNotifier[T], ListenableBuilder — shared mutable state with auto-rebuild of watchersfoundation/diagnostics — DiagnosticsNode, prettyPrint, logf
State management quick reference: see
ValueNotifier[T]
for a subscribable cell, and
dependOnInheritedOfType[T]
for ancestor-data subscriptions via InheritedWidget.
Worked example in examples/state_demo/main.nim.
widgets/basic — Container, Row, Column, Stack, Text, Padding, Align, SizedBox, AspectRatio, ClipRect, Opacity, ScrollView, …material/material — MaterialApp, Scaffold, AppBar, ElevatedButton, TextButton, Card, FloatingActionButtonmaterial/theme — ThemeData, ColorScheme, Typography, currentTheme, setThemecupertino/cupertino — CupertinoApp, CupertinoNavigationBar, CupertinoButton, CupertinoThemeanimation/animation — AnimationController, Ticker, Tween, curvesgestures/detector — GestureDetector, HitTestBehavior, callback typesRender objects that back the widgets above. Most users don't import these directly.
rendering/proxy_box — RenderProxyBox + single-child render objects (Padding, Align, SizedBox, …)rendering/flex — RenderFlex, FlexParentData, FlexFitrendering/stack — RenderStack, StackParentData, StackFitrendering/decoration — BoxDecoration, Border, BoxShadow, RenderDecoratedBoxrendering/text — TextStyle, RenderParagraph, measureTextrendering/viewport — RenderViewport, scrollOffset, scrollbarrendering/canvas_sdl — SdlCanvas (SDL2 + Pixie backend)app — runApp(widget) dispatch by build targetplatform/desktop/runner — macOS / Linux / Windows via SDL2platform/embedded/runner — framebuffer / kioskplatform/mobile/runner — iOS / Android via SDL2platform/web/runner — HTMLCanvas (nim js)
Generated by nim doc --project.
Regenerate with nimble docs.