vox 0.6.0 copy "vox: ^0.6.0" to clipboard
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.

example/lib/main.dart

import 'package:vox/vox.dart';

/// A simple counter app built with vox.
///
/// This demonstrates how vox eliminates Flutter boilerplate.
/// No StatefulWidget. No setState. No BuildContext.
/// Just your logic and your layout.
void main() => voxApp(
      title: 'Vox Counter',
      home: CounterScreen(),
    );

/// A counter screen — the vox way.
///
/// Compare this to a traditional Flutter StatefulWidget counter.
/// No State class. No initState. No setState.
/// Just `state()` for your data, and `view` for your layout.
class CounterScreen extends VoxScreen {
  /// Reactive state. That's it. One line.
  final count = state(0);

  @override
  get view => screen(
        'Counter',
        col([
          // Label reads `count` — auto-rebuilds when count changes.
          label('Tapped: ${count.val} times')
              .size(24).bold.center.expand,

          row([
            btn('−')
                .onTap(() => count.update((v) => v - 1))
                .expand,
            space(16),
            btn('+')
                .onTap(() => count.update((v) => v + 1))
                .expand,
          ]).pad(h: 32),
        ]).gap(24),
      );
}
1
likes
140
points
25
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

One import, full power. Write logic, not Flutter. A pseudo-code-like framework that hides boilerplate, never behavior.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

cached_network_image, connectivity_plus, device_info_plus, dio, flutter, flutter_secure_storage, flutter_test, permission_handler, share_plus, shared_preferences, web_socket_channel

More

Packages that depend on vox