toString method
A string representation of this object.
Some classes have a default textual representation,
often paired with a static parse function (like int.parse).
These classes will provide the textual representation as
their string representation.
Other classes have no meaningful textual representation
that a program will care about.
Such classes will typically override toString to provide
useful information when inspecting the object,
mainly for debugging or logging.
Implementation
@override
String toString() {
final hint = switch (module) {
'fts3' || 'fts4' =>
'The SQLite builds bundled by package:sqlite3 only support FTS5. Use '
'@Fts5 instead, the SQLite of the system (the sqflite plugin on '
'Android, or `hooks: user_defines: sqlite3: source: system` in '
'the pubspec.yaml on other platforms) or a custom build of SQLite '
'enabling SQLITE_ENABLE_FTS3.',
'fts5' =>
'Use the SQLite bundled by package:sqlite3, which supports FTS5: on '
'Android, whose SQLite of the sqflite plugin lacks it, by passing '
'databaseFactoryFfi to databaseFactory() of the database builder, '
'with an absolute path of the database; on other platforms by '
'removing `hooks: user_defines: sqlite3: source: system` from the '
'pubspec.yaml.',
_ => 'Use a SQLite build supporting it.',
};
return 'MissingSqliteModuleException: The SQLite library lacks the module '
'$module. $hint\nCaused by: $cause';
}