flutterx_live_data 1.0.0-dev copy "flutterx_live_data: ^1.0.0-dev" to clipboard
flutterx_live_data: ^1.0.0-dev copied to clipboard

outdated

A new Flutter project.

flutterx_live_data #

LiveData flutter implementation.

Install #

Add a line like this to your package's pubspec.yaml (and run dart pub get):

dependencies:
  flutterx_live_data: ^1.0.0-dev

Import #

Import the library like this:

import 'package:flutterx_live_data/flutterx_live_data.dart';

Usage #

The most easy example of usage of this library is:

import 'package:flutterx_live_data/flutterx_live_data.dart';

class TestWidget extends StatefulWidget {
  const TestWidget({Key? key}) : super(key: key);

  @override
  State<TestWidget> createState() => _TestWidgetState();
}

class _TestWidgetState extends State<TestWidget> {
  final MutableLiveData<int> myCounter = MutableLiveData(initialValue: 0);

  @override
  Widget build(BuildContext context) => Scaffold(
      body: Center(
          child: LiveDataBuilder<int>(data: myCounter, builder: (context, value) => Text('pressed $value times'))),
      floatingActionButton: FloatingActionButton(onPressed: () => myCounter.value++));
}

But it can do much more, please check the documentation in the desired source file of this library

13
likes
0
points
792
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter project.

Repository (GitLab)
View/report issues

License

unknown (license)

Dependencies

flutter, flutterx_utils

More

Packages that depend on flutterx_live_data