property 0.0.3 copy "property: ^0.0.3" to clipboard
property: ^0.0.3 copied to clipboard

Package for stream property pattern builder is a solution when you need easy support for updating widgets values without setState using streams.

Property #

[Property] is a solution when you need easy support for updating widgets values without setState using streams

Usage #

import 'package:property/property.dart';

final Property<int> _counter = Property(0);

void _incrementCounter() {
    _counter.value++;
}

Scaffold(
    appBar: AppBar(
    title: Text(widget.title),
    ),
    body: Center(
    child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
        const Text(
            'You have pushed the button this many times:',
        ),
        PropertyBuilder(
            property: _counter,
            builder: (context, value) => Text(
            value.toString(),
            style: const TextStyle(
                fontSize: 20,
                fontWeight: FontWeight.bold,
            ),
            ),
        ),
        ],
    ),
    ),
    floatingActionButton: FloatingActionButton(
    onPressed: _incrementCounter,
    tooltip: 'Increment',
    child: const Icon(Icons.add),
    ),
);

Example project #

Example usage in /example folder.

1
likes
160
pub points
24%
popularity

Publisher

verified publisherbomsamdi.com

Package for stream property pattern builder is a solution when you need easy support for updating widgets values without setState using streams.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on property