putAndReplace<K> method
Put key and replace current
Implementation
Future<bool> putAndReplace<K>(
{@required dynamic key,
bool force = true,
K? params,
bool closeDrawer = true}) async {
if (_interface != null) {
if (!force && !await _interface!.onPut()) {
return false;
}
}
_onPut(stack.isNotEmpty ? stack.last.key : null, key);
stack.removeLast();
return await putPosit(
closeDrawer: closeDrawer, params: params, force: force, key: key);
}