FloatyStateChannel<S>.overlay constructor

FloatyStateChannel<S>.overlay({
  1. required Map<String, dynamic> toJson(
    1. S state
    ),
  2. required S fromJson(
    1. Map<String, dynamic> json
    ),
  3. required S initialState,
})

Creates a state channel for the overlay side.

Functionally identical to the unnamed constructor — the named variant exists for semantic symmetry with FloatyActionRouter.overlay().

Implementation

factory FloatyStateChannel.overlay({
  required Map<String, dynamic> Function(S state) toJson,
  required S Function(Map<String, dynamic> json) fromJson,
  required S initialState,
}) = FloatyStateChannel<S>;