Value listenable test - Assists in testing ValueListenable objects (ex: ValueNotifier).

Related tags

Templates dart
Overview

value_listenable_test

Assists in testing ValueListenable objects (ex: ValueNotifier).

install

Added in your pubspec.yaml as dev dependency:

dev_dependencies:
  value_listenable_test: any

Examples

Listen the emits of ValueListenable:

 test('valueListenable Matcher', () {
     final counter = ValueNotifier(0);
     expect(counter, emitValues([2, 3, 5]));
     counter.value = 2;
     counter.value = 3;
     counter.value = 5;
   });

Also, you can use the test abstraction called valueListenableTest:

valueListenableTest(
  'Counter emits [1] when update method is called',
  build: () => Counter(),
  act: (notifier) => notifier.update(1),
  expect: () => [1],
);

That`s it!

You might also like...

Integration Test Preview allows tests on multiple screen sizes in a single e2e test run.

Integration Test Preview allows tests on multiple screen sizes in a single e2e test run.

Integration Test Preview has pre-configured methods that allow for faster test deployment for end to end (e2e) test coverage (using Android and iOS pl

Aug 23, 2022

Flutter package to create list of radio button, by providing a list of objects it can be a String list or list of Map.

Flutter package to create list of radio button, by providing a list of objects it can be a String list or list of Map.

Custom Radio Group List Flutter package to create list of radio button, by providing a list of objects it can be a String list or list of Map. Feature

Nov 30, 2021

A package of pre-built `TextInputFormatter` objects

text_formatters A package of pre-built TextInputFormatter objects to use with Flutter's TextField or TextFormField widgets. Formatters UppercaseInputF

Jul 24, 2020

FIDL(Flutter Interface Definition Language) is a language for transfer objects cross platforms.

FIDL(Flutter Interface Definition Language) is a language for transfer objects cross platforms.

Flutter Interface Definition Language (FIDL) README in English(TODO) FIDL 即 Flutter 接口定义语言,类似于AIDL(Android Interface Definition Language)。您可以利用它定义不同平台

Dec 7, 2022

A cached Flutter ImageProvider for Firebase Cloud Storage image objects

🔥 Firebase Image Provider A cached Flutter ImageProvider for Firebase Cloud Sto

Nov 2, 2022

An all-in-one Fllutter package for state management, reactive objects, animations, effects, timed widgets etc.

An all-in-one Fllutter package for state management, reactive objects, animations, effects, timed widgets etc.

Frideos An all-in-one package for state management, streams and BLoC pattern, animations and timed widgets, effects. Contents 1. State management Gett

Dec 23, 2022

User onboarding library with smooth animation of objects and background colors

User onboarding library with smooth animation of objects and background colors

SlidingTutorial Cleveroad introduces Sliding Tutorial Library for Flutter Hey guys, hope you haven’t started developing a tutorial for your Flutter ap

Dec 31, 2022

A highly customizable Flutter widget to render and interact with JSON objects.

A highly customizable Flutter widget to render and interact with JSON objects.

The spreadsheet with superpowers ✨ ! JSON Data Explorer A highly customizable widget to render and interact with JSON objects. Features Expand and col

Dec 21, 2022
The Integration Test Helper has pre-configured methods that allow for faster test deployment for end to end (e2e) test coverage.

The Integration Test Helper has pre-configured methods that allow for faster test deployment for end to end (e2e) test coverage (using Android and iOS

The Mobile Applications Community 2 Apr 7, 2022
Simple and complete Flutter hooks testing utilities that encourage good testing practices.

Flutter Hooks Testing Library Simple and complete Flutter hooks testing utilities that encourage good testing practices. Inspired by react-hooks-testi

Daichi Furiya 24 Dec 2, 2022
Music player application for android. It's uses MVVM architecture and Provider & ValueNotifier state management.

music-player-flutter Flutter music player application which is my personal project published to play store. Project structures are as following,

null 30 Jul 10, 2022
Parasite - Exploring ChangeNotifier and ValueNotifier

Parasite An ultra lightweight state management utility highly inspired by Provid

Boris Kayi 1 Jan 14, 2022
ValueNotifier, but outside Flutter and with some extra perks

Welcome to state_notifier~ This package is a recommended solution for managing state when using Provider or Riverpod. Long story short, instead of ext

Remi Rousselet 290 Dec 24, 2022
A simple test testing swagger_dart_code_generator 2.2.5+1

m_work_swagger_test_2 A simple test testing swagger_dart_code_generator 2.2.5+1 Was created like this: Create an ordinary Flutter project in AS2020.3.

Roar Grønmo 0 Nov 15, 2021
A test driver for Flutter to do QA testing without sharing app source code.

Autopilot A test driver for Flutter to do QA testing without sharing app source code. It exposes a JSON API using an HTTP server running inside the ap

Ajin Asokan 70 Dec 30, 2022
Flutter bloc cubit test knowdge - Flutter bloc cubit test knowdge

Flutter Bloc Simple Api This project is using weather api for featch data and di

Waruna Kaushalya 0 Jan 3, 2022
Integration test - Copy of the official Flutter integration test plugin

integration_test This package enables self-driving testing of Flutter code on de

null 0 Jan 5, 2022