I have a table called Items
with a column called Name
. How can I do a query to get only items that start with a certain letter?
For example if I wanted all items that start with words R2. I tried the code below but its wrong :
Future<List<Item>> getFilteredItems() => (select(items)..where((t) => t.Name.like('R2'))).get();
What is the proper to write the query?
like
? E.g. sqlitetutorial.net/sqlite-like =>'R2%'
. If yes, what keeps you from using it?