Last active
November 21, 2021 18:22
-
-
Save blaugold/afb84087dffbdee53516a8ef5dbbe8c1 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
class NoteSearchResult { | |
NoteSearchResult({required this.id, required this.title}); | |
/// This method creates a NoteSearchResult from a query result. | |
static NoteSearchResult fromResult(Result result) => NoteSearchResult( | |
// The Result type has typed getters, to extract values from a result. | |
id: result.string('id')!, | |
title: result.string('title')!, | |
); | |
final String id; | |
final String title; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment