createScope function
Creates an effects scope.
An effect scope is used to group and manage side effects in a structured way.
The detached parameter determines if the scope is detached from its parent.
Implementation
public.Scope createScope([bool detached = false]) => impl.Scope(detached);