Created
March 5, 2020 09:48
-
-
Save xinthink/273367c3be45f2e06f0617a2f5325e68 to your computer and use it in GitHub Desktop.
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
abstract class NoteCommand { | |
final String id; | |
final String uid; | |
/// Defines an reversible action to a note, provides the note [id], and the current user's [uid]. | |
const NoteCommand({ | |
@required this.id, | |
@required this.uid, | |
}); | |
/// Returns message about the result of the action. | |
String get message => ''; | |
/// Executes this command. | |
Future<void> execute(); | |
/// Undo this command. | |
Future<void> revert(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment