BloomEvent.fake constructor

BloomEvent.fake(
  1. String type, {
  2. String? value,
})

Creates a generic synthetic BloomEvent with type and optional value for VM unit testing.

final form = Form(
  on: {'submit': (e) => e.preventDefault()},
);
form.on?['submit']?.call(BloomEvent.fake('submit'));

Implementation

factory BloomEvent.fake(String type, {String? value}) =>
    BloomEvent(type: type, value: value);