Created
June 17, 2022 12:20
-
-
Save Albert221/c62ad9f782c7021690f9bf585ce8fd5c to your computer and use it in GitHub Desktop.
NeverChangingValueListenable<T> for Flutter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/foundation.dart'; | |
class NeverChangingValueListenable<T> implements ValueListenable<T> { | |
const NeverChangingValueListenable(this.value); | |
@override | |
final T value; | |
@override | |
void addListener(VoidCallback listener) {} | |
@override | |
void removeListener(VoidCallback listener) {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment