Skip to content
pubscout

sint

2.2.1, released 4 days ago by openneom.dev

High-performance framework for state, dependency injection, navigation, and translation.

WASM-readyUses material_ui
$ flutter pub add sint
Source repository

What it does

SINT provides a micro-framework covering four foundational pillars: reactive state management with signals, contract-first dependency injection, multi-level prefix trie routing, and locale translation caches.

AI-written summary of version 2.1.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want an all-in-one architecture covering state, navigation, dependency injection, and localization without multiple packages.
  • You need fine-grained reactive signals with batching and computed properties.
  • You want context-free navigation and dependency resolution bound to route lifecycles.

Skip it when

  • You prefer strict separation of concerns using independent single-purpose packages.
  • Your project standardizes on BLoC, Riverpod, or Provider.
  • You want strictly reactive stream-based architectures.

Strengths

  • Fine-grained $O(1)$ reactive signals with zero-allocation batching and computed properties.
  • Contract-first dependency injection with automated route-bound lifecycle disposal.
  • Multi-level prefix trie router for fast route matching.
  • Zero codegen requirement.

Weaknesses

  • Monolithic approach tightly couples state, navigation, and DI into a single framework.
  • Context-free APIs might encourage global state patterns if not carefully managed.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
3
import 'package:flutter/widgets.dart';
import 'package:material_ui/material_ui.dart';
import 'package:sint/sint.dart';

class CartController extends SintController {
  final items = 1.obs;
  final price = 25.obs;
  late final total = computed(() => items.value * price.value);

  void addBundle() => Sint.batch(() {
    items.value += 2;
    price.value = 20;
  });
}

void main() => runApp(
  SintApp(
    materialTheme: ThemeData(),
    initialRoute: '/',
    sintPages: [
      SintPage(
        name: '/',
        binds: [Bind.put(CartController())],
        page: () {
          final c = Sint.find<CartController>();
          return Scaffold(
            body: Center(child: Obx(() => Text('Total: \${c.total.value}'))),
            floatingActionButton: FloatingActionButton(
              onPressed: c.addBundle,
              child: const Text('+'),
            ),
          );
        },
      ),
    ],
  ),
);

Alternatives

Packages that do the same job and could replace sint.

  • yx_state

    A state management library for Dart and Flutter applications.

  • flutter_meedu

    State management and dependency injection library for Flutter apps.

  • bloc_tools

    Command-line tools for generating and linting bloc and cubit components.

  • riverpod

    A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.

Works with

Packages commonly used together with sint: ones it builds on, ones built on it, and its own family.