findHistoryInContext function

History findHistoryInContext (
  1. Map<String, dynamic> context

findHistoryInContext finds the History instance that gets added to context by a HistoryProvider


History findHistoryInContext(Map<String, dynamic> context) {
  final dynamic history = context[historyContextKey];
  assert(history != null, 'no history found in context');
  assert(history is History,
      'value for historyContextKey found in context is not of type History');
  return history as History;