creator_watcher 0.0.1 icon indicating copy to clipboard operation
creator_watcher: ^0.0.1 copied to clipboard

discontinued

A widget wrap creator's watcher which is simple to use especially for emitter.

Creator Watcher #

A widget wrap creator's watcher which is simple to use especially for emitter.

Install #

flutter pub add creator_watcher

Getting started #

This widget can be used to wrap creator's watch widget, make it easy to use and provides some default widget to display extra status of emitter.

Creator Watcher #

import 'package:creator/creator.dart';
import 'package:creator_watcher/creator_watcher.dart';
import 'package:flutter/material.dart';

final exampleCreator = Creator<String>.value(
  'Hello creator',
  name: 'exampleCreator',
);

void main() {
  runApp(MaterialApp(
    home: CreatorWatcher<String>(
      builder: (context, content) => Text(content),
      creator: exampleCreator,
    ),
  ));
}

Emitter Watcher #

import 'package:creator/creator.dart';
import 'package:creator_watcher/creator_watcher.dart';
import 'package:flutter/material.dart';

final exampleEmitter = Emitter<String>(
  (ref, emit) async {
    await Future.delayed(const Duration(seconds: 1));
    emit('Hello emitter');
  },
  name: 'exampleEmitter',
);

void main() {
  runApp(MaterialApp(
    home: EmitterWatcher<String>(
      builder: (context, content) => Text(content),
      emitter: exampleEmitter,
    ),
  ));
}

1
likes
0
pub points
50%
popularity

Publisher

verified publisher iconcals.xyz

A widget wrap creator's watcher which is simple to use especially for emitter.

Repository (GitHub)
View/report issues

License

Icon for licenses.unknown (LICENSE)

Dependencies

creator, flutter

More

Packages that depend on creator_watcher