Showing
2 changed files
with
6 additions
and
3 deletions
| 1 | -import 'package:flutter/material.dart'; | 1 | +import 'package:meta/meta.dart'; |
| 2 | +import '../../get_core/get_core.dart'; | ||
| 2 | 3 | ||
| 3 | /// Special callable class to keep the contract of a regular method, and avoid | 4 | /// Special callable class to keep the contract of a regular method, and avoid |
| 4 | /// overrides if you extend the class that uses it, as Dart has no final | 5 | /// overrides if you extend the class that uses it, as Dart has no final |
| 5 | /// methods. | 6 | /// methods. |
| 6 | /// Used in [DisposableInterface] to avoid the danger of overriding onStart. | 7 | /// Used in [DisposableInterface] to avoid the danger of overriding onStart. |
| 7 | class _InternalFinalCallback<T> { | 8 | class _InternalFinalCallback<T> { |
| 8 | - ValueGetter<T> _callback; | 9 | + ValueUpdater<T> _callback; |
| 9 | 10 | ||
| 10 | - _InternalFinalCallback({ValueGetter<T> callback}) : _callback = callback; | 11 | + _InternalFinalCallback({ValueUpdater<T> callback}) : _callback = callback; |
| 11 | 12 | ||
| 12 | T call() => _callback.call(); | 13 | T call() => _callback.call(); |
| 13 | } | 14 | } |
-
Please register or login to post a comment