v0.17.0
jaspr v0.17.0
-
BREAKING Removed
currentStatefromGlobalKey, useGlobalStateKeyinstead. -
Added
GlobalStateKey<T extends State>to access the state of a component usingcurrentState.// Use any State type as the type parameter. final GlobalStateKey<MyComponentState> myComponentKey = GlobalStateKey(); /* ... */ // Access the state from the key. MyComponentState? state = myComponentKey.currentState;
-
Added
GlobalNodeKey<T extends Node>to access native dom nodes usingcurrentNode.import 'package:universal_web/web.dart'; // Use any Node type (from package:universal_web) as the type parameter. final GlobalNodeKey<HTMLFormElement> myFormKey = GlobalNodeKey(); /* ... */ // Access the dom node from the key. HTMLFormElement? node = myFormKey.currentNode;
-
Migrated all web imports from
package:webtopackage:universal_web. -
Added
prefersColorSchemeparameter toMediaQuery.