use<R> function Null safety

R use<R>(
  1. Hook<R> hook

Registers a Hook and returns its value.

use must be called within the build method of either HookWidget or StatefulHookWidget. All calls of use must be made outside of conditional checks and always in the same order.

See Hook for more explanations.


// ignore: deprecated_member_use, deprecated_member_use_from_same_package
R use<R>(Hook<R> hook) => Hook.use(hook);