putPosit<K> method
Put new key
Implementation
Future<bool> putPosit<K>(
{required dynamic key,
bool force = false,
bool closeDrawer = true,
K? params}) async {
if (_interface != null) {
if (!force && !await _interface!.onPut()) {
return false;
}
}
if (force || stack.isEmpty || stack.last.key != key) {
_onPut(stack.isNotEmpty ? stack.last.key : null, key);
if (_drawerKey.currentState != null &&
_drawerKey.currentState!.isDrawerOpen &&
closeDrawer) {
Navigator.pop(drawerContext!);
}
final _position = FullPosit.byPosit(
floatingAction: _getFloating(key: key),
actions: _getActions(key: key),
bottom: _getBottom(key: key),
posit: screenList[key]!,
params: params);
stack.add(_position);
_fragment.sink.add(stack.last);
return true;
}
return false;
}