submitEmail method

Future<void> submitEmail(
  1. String email
)

Inline email request answered: identifies the visitor by email.

Implementation

Future<void> submitEmail(String email) async {
  final e = email.trim();
  if (e.isEmpty) return;
  _send(ClientFrame.identify(email: e));
  _emit(_state.copyWith(visitorEmail: e, needsEmail: false));
  await _persist(_stored.copyWith(email: e));
  _addLocalNotice('emailSaved');
  await _sendDraft();
}