flutter_reactive_value 1.0.3 copy "flutter_reactive_value: ^1.0.3" to clipboard
flutter_reactive_value: ^1.0.3 copied to clipboard

outdated

Simple reactive state management for Flutter.

example/lib/main.dart

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

void main() async {
  runApp(
    const MaterialApp(
      title: "Application",
      home: HomeView(),
    ),
  );
}

final counter = ValueNotifier<int>(0);

class HomeView extends StatelessWidget {
  const HomeView({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Text(
          '${counter.reactiveValue(context)}',
          style: const TextStyle(fontSize: 20),
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          counter.value++;
        },
        tooltip: 'Increment',
        child: const Icon(Icons.plus_one_outlined),
      ),
    );
  }
}
8
likes
0
points
23
downloads

Publisher

unverified uploader

Weekly Downloads

Simple reactive state management for Flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_reactive_value