2020-09-15 00:01:59 +02:00
|
|
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
|
|
|
|
|
|
class Ref<T> {
|
2020-09-16 01:27:01 +02:00
|
|
|
T current;
|
|
|
|
Ref(this.current);
|
2020-09-15 00:01:59 +02:00
|
|
|
}
|
|
|
|
|
2020-09-16 01:27:01 +02:00
|
|
|
/// see React's useRef
|
2020-09-15 00:01:59 +02:00
|
|
|
Ref<T> useRef<T>(T initialValue) => useMemoized(() => Ref(initialValue));
|