Created
May 19, 2022 10:10
-
-
Save Zujaj/34aa582884aa1f920de5b4d612b65e5f to your computer and use it in GitHub Desktop.
The PreviousColor ChangeNotifier class.
This file contains 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/material.dart'; | |
/// A [ChangeNotifier] that holds the previous hex color value. | |
class PreviousColor with ChangeNotifier { | |
/// Holds the Hex Color Value. | |
String value = ''; | |
PreviousColor(this.value); | |
void updateValue(String newValue) { | |
value = newValue; | |
notifyListeners(); | |
} | |
@override | |
String toString() => 'PreviousColor(value:$value)'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment