sint 1.0.0
sint: ^1.0.0 copied to clipboard
SINT (State, Injection, Navigation, Translation) - The Four Pillars of High-Fidelity Flutter Infrastructure.
SINT #
State, Injection, Navigation, Translation — The Four Pillars of High-Fidelity Flutter Infrastructure.
- About SINT
- Installing
- The Four Pillars
- Counter App with SINT
- Migration from GetX
- Origin & Philosophy
About SINT #
SINT is an architectural evolution of GetX (v5.0.0-rc), built as a focused framework around four pillars only:
| Pillar | Responsibility |
|---|---|
| S — State Management | SintController, SintBuilder, Obx, .obs, Rx types, Workers |
| I — Injection | Sint.put, Sint.find, Sint.lazyPut, Bindings, SmartManagement |
| N — Navigation | SintPage, Sint.toNamed, middleware, SintMaterialApp, transitions |
| T — Translation | .tr extension, Translations class, locale management |
Everything outside these four pillars has been removed: no HTTP client, no animations, no string validators, no generic utilities. The result is 37.7% less code than GetX — 12,849 LOC vs 20,615 LOC.
Key principles:
- PERFORMANCE: No Streams or ChangeNotifier overhead. Minimal RAM consumption.
- PRODUCTIVITY: Simple syntax. One import:
import 'package:sint/sint.dart'; - ORGANIZATION: Clean Architecture structure. 5 modules, each mapping to a pillar.
Installing #
Add SINT to your pubspec.yaml:
dependencies:
sint: ^1.0.0
Import it:
import 'package:sint/sint.dart';
High-Fidelity Performance (Benchmarks) #
SINT is built for speed. Every pillar is audited against the Open Neom Standard to ensure minimal latency in high-load scenarios.
Current Performance Audit (v1.0.0) Pillar Metric Result Context S (State) Reactive Core Speed 5.0151 µs/op 30,000 updates stress test T (Translation) Dynamic Interpolation 2.1614 µs/op 10,000 trParams lookups I (Injection) Registry Lookup 1.1688 µs/find Depth 10 dependency resolution N (Navigation) Middleware Latency 1,504 µs 5-layer middleware chain execution Core Sync Latency 803 µs Stream-to-Rx event synchronization
Why SINT is Faster: • Pillar S: SINT avoids Stream overhead by using microtasks for high-fidelity notifications. • Pillar I: Dependency resolution uses O(1) hash lookups in the global registry. • Pillar N: Navigation is context-less, removing the need for heavy widget tree lookups during routing.
The Four Pillars #
State Management (S) #
Two approaches: Reactive (.obs + Obx) and Simple (SintBuilder).
// Reactive
var count = 0.obs;
Obx(() => Text('${count.value}'));
// Simple
SintBuilder<Controller>(
builder: (_) => Text('${_.counter}'),
)
Injection (I) #
Dependency injection without context:
Sint.put(AuthController());
final controller = Sint.find<AuthController>();
Navigation (N) #
Route management without context:
SintMaterialApp(
getPages: [
SintPage(name: '/', page: () => Home()),
SintPage(name: '/details', page: () => Details()),
],
)
Sint.toNamed('/details');
Sint.back();
Sint.snackbar('Title', 'Message');
Translation (T) #
Internationalization with .tr:
Text('hello'.tr);
Text('welcome'.trParams({'name': 'Serzen'}));
Sint.updateLocale(Locale('es', 'ES'));
Counter App with SINT #
void main() => runApp(SintMaterialApp(home: Home()));
class Controller extends SintController {
var count = 0.obs;
increment() => count++;
}
class Home extends StatelessWidget {
@override
Widget build(context) {
final c = Sint.put(Controller());
return Scaffold(
appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))),
body: Center(
child: ElevatedButton(
child: Text("Go to Other"),
onPressed: () => Sint.to(Other()),
),
),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.add),
onPressed: c.increment,
),
);
}
}
class Other extends StatelessWidget {
final Controller c = Sint.find();
@override
Widget build(context) {
return Scaffold(body: Center(child: Text("${c.count}")));
}
}
Migration from GetX #
- Replace
get:withsint:inpubspec.yaml - Replace
import 'package:get/get.dart'withimport 'package:sint/sint.dart' - Your existing
Get.calls work — gradually replace withSint.to remove deprecation warnings GetMaterialApp→SintMaterialAppGetPage→SintPage
Origin & Philosophy #
SINT is a hard fork of GetX v5.0.0-rc. After 8 years of accumulated code, GetX's repository became inactive and carried significant unused weight. SINT strips away everything that does not serve the four pillars, resulting in a clean, maintainable foundation built with Clean Architecture principles.
GetX: "Do everything." SINT: "Do the right things."
S + I + N + T — State, Injection, Navigation, Translation. Nothing more, nothing less.
License #
SINT is released under the MIT License.
Part of the Open Neom ecosystem.