Jolt Flutter

CI/CD codecov jolt_flutter License: MIT

Flutter widgets that rebuild from Jolt reads.

jolt_flutter lets Flutter views read Signal, Computed, and other Jolt values directly inside JoltBuilder. When those reads change, Flutter rebuilds that part of the tree.

It re-exports jolt, so most Flutter apps can import package:jolt_flutter/jolt_flutter.dart and start there.

A Small Example

import 'package:flutter/material.dart';
import 'package:jolt_flutter/jolt_flutter.dart';

final counter = Signal(0);

void main() {
  runApp(const CounterApp());
}

class CounterApp extends StatelessWidget {
  const CounterApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: JoltBuilder(
            builder: (context) => Text('Count: ${counter.value}'),
          ),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () => counter.value++,
          child: const Icon(Icons.add),
        ),
      ),
    );
  }
}

JoltBuilder is the default entry point. It runs builder in a reactive scope, so any Jolt value read there becomes a rebuild dependency.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Libraries

jolt_flutter
Flutter widgets, frame-aligned effects, and listenable bridges for Jolt.