vox 0.6.0
vox: ^0.6.0 copied to clipboard
One import, full power. Write logic, not Flutter. A pseudo-code-like framework that hides boilerplate, never behavior.
0.6.0 #
- Demo apps: Three production-quality example apps —
demo/todo_app(local persistence),demo/news_reader(real Dev.to API),demo/chat_app(Gemini AI chatbot with per-user key viasaveSecure()). - New layout APIs:
scaffold(),safe(),card(),list(),swipeable(),hscroll(),gap(),hgap(),spacer,divider,indexed(),expanded(). - New widget APIs:
fab(),switchTile(),tile(),progress(),ring(),loader(). - VoxLabel weights:
.semibold,.medium,.heavy,.thinin addition to.bold. - VoxLabel extras:
.letterSpacing(),.maxLines(),.ellipsis,.alignTo(). - Widget extensions:
.scaleBy(double)for reactive runtime scaling withanim()..hscrollablefor horizontal scroll..maxW(),.minW(),.minH(). list(reverse: true): Reversed list for chat-style UIs (newest message at bottom).- VoxModel redesign: Prototype-factory pattern —
decode(Map)replacesfromJson.VoxDataextension onMap<String, dynamic>with.str(),.flag(),.date(),.n()helpers. - Numeric padding everywhere: All layout/widget functions accept
pad,padH,padV,padTop,padBottom,padLeft,padRightasdouble?— no rawEdgeInsetsneeded. - Bug fix:
VoxField(TextEditingController) now uses a freshTextEditingValuewhen resetting/clearing a field, preventing a Flutter assertion crash when the cursor offset exceeded the new text length.
0.5.0 #
- Phase 9 — Testing:
voxTest()wrapstestWidgetswith aVoxTesterAPI.tester.render(screen),tester.tap(btn('+')),tester.type(field, text),tester.expect(state, matcher). Smart matchers:isVisible,isHidden,findsCount(n). Import viapackage:vox/testing.dart— separate from main barrel, test files only. - Phase 10 — Locale / i18n:
VoxLocale.configure({...})with multi-language maps.VoxLocale.set('fr')switches language at runtime.t('key')andt('welcome', {'name': 'Sam'})for interpolation. Falls back to'en'if key missing in current language. - Phase 11 — Realtime:
ws("wss://...")opens aVoxSocketconnection.socket.on("event", fn)dispatches bytype/eventfield in JSON.socket.send({...}),socket.sendText(),socket.close().socket.isConnectedbool property. - Phase 12 — Model:
VoxModelabstract base class withfromJson(),toJson(),listFromJson(), andcopyWith(). Prototype-factory pattern — extend to define type-safe JSON models. - Phase 13 — pub.dev score: Comprehensive README rewrite with full code examples for all 20+ features. Version bumped
0.4.0→0.5.0.
0.4.0 #
- Phase 8 — Tabs:
tabs([tab("Home", Icons.home, HomeScreen())])— bottom navigation bar withIndexedStackstate preservation.topTabs("Title", [...])—AppBar+TabBar+TabBarView.tab()factory for both. - Phase 8 — Drawer:
drawer([navItem("Home", Icons.home, onTap: ...)])— side navigation drawer.openDrawer()/closeDrawer()work from anywhere without BuildContext.screen()gainsdrawer:andfloatingActionButton:params. - Phase 8 — Share:
shareText(),shareLink(),shareFiles()— native share sheet viashare_plus.VoxSharestatic facade for direct calls. - Phase 8 — Config / Env:
VoxEnv.configure({...})at startup, thenenv("API_URL")anywhere.env("KEY", fallback: "value")for safe access. ThrowsVoxErrorwith a clear hint if key is missing. - Phase 8 — Permissions:
ask(VoxPermission.camera),check(VoxPermission.location)— runtime permission requests viapermission_handler.openPermissionSettings()sends user to device settings. - Phase 8 — Pickers:
pickDate(),pickTime(),pickOne(options),pickMany(options)— context-free pickers using the global navigator key. All returnnullon cancel.
0.3.0 #
- Phase 7 — Animations:
.animate(preset)widget extension with built-in presets (fade,scale,slide.fromBottom/Top/Left/Right), chainable.duration(ms),anim<T>()for smooth value-change transitions..hero(tag)extension for shared-element transitions. - Phase 7 — Theme:
VoxThemetoken class (primary,background,surface,text,radius,dark).VoxThemeControllersingleton for runtime switching (vox.theme.toggle(),vox.theme.set(...)).voxApp(theme:)now acceptsVoxTheme(replaces rawThemeData). App wrapsMaterialAppinListenableBuilderfor reactive theme changes. - Phase 7 — Device & Platform: Global
voxcontext —vox.isIOS,vox.isAndroid,vox.isMobile,vox.isDesktop,vox.isWeb.vox.device.name/vox.device.osviadevice_info_plus.vox.theme.*shortcuts. - Phase 7 — DI:
provide<T>(),use<T>(),has<T>()— type-based service locator with no string keys.VoxContainer.override<T>()for test doubles. voxApp()gainsinit: Future<void> Function()?— async startup hook called post-first-frame.
0.2.0 #
- Phase 4 — Reactive state fully wired:
shared()(app-global state),computed()(derived signals with dependency tracking),watch()(side-effect listener),stored()(persisted state via SharedPreferences),VoxListStateoperations (each,where,search,sort,paginate),List<Widget>extensions (.col,.row,.stack) - Phase 5 — Networking, Navigation, Storage:
VoxClient(Dio wrapper withconfigureHttp()),VoxRequest<T>with>>pipe operator,.loading()and.onError()chains;VoxRouterwith context-free navigation (go(),back(),canBack);VoxStorage(SharedPreferences) andVoxSecure(FlutterSecureStorage) - Phase 6 — Forms, UI utilities:
VoxField(reactive form field with.inputwidget + two-way sync),VoxForm(batch validate/submit),VoxToast(floating snackbar with success/warning/error types),VoxOverlay(alert(),confirm(),sheet()),VoxLog(ANSI-colored leveled logger with globallogsingleton),VoxTimer(delay(),every()),VoxClipboard(copy(),paste())
0.1.0 #
- Initial package structure
- API layer: 25 syntax modules (state, screen, widget, layout, widgets, extensions, net, nav, storage, forms, animation, permissions, theme, device, overlay, toast, tabs, drawer, di, config, locale, realtime, log, timer, picker, clipboard, share, model)
- Core engine layer: 20 modules (~60 files)
- Two barrel exports:
vox.dart(full) andlite.dart(minimal) - Design document with full API surface