nuke 0.0.11 copy "nuke: ^0.0.11" to clipboard
nuke: ^0.0.11 copied to clipboard

Super slim state management that gets the job done.

example/lib/main.dart

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

void main()=>runApp(MyApp());

final $n = Nuke();

class MyApp extends StatelessWidget
{
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(),
    );
  }
}


class MyHomePage extends StatelessWidget
{

  final simple = $rx(0, ref:'simple/0');

  MyHomePage({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context)
  {
    return Scaffold
    (
      body: Center
      (
        child: RX(const ['simple/0'],(context)=>
          Text($rx.$ref('simple/0').value.toString()))
      ),
      floatingActionButton: FloatingActionButton
      (
        onPressed: ()=>simple.value++,
        child: const Icon(Icons.add),
      ),
    );
  }
}
0
likes
100
pub points
0%
popularity

Publisher

unverified uploader

Super slim state management that gets the job done.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

equatable, flutter, path_to_regexp, uuid

More

Packages that depend on nuke