You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert(items!.isNotEmpty, 'Items list must contain at least one item.',),
My question is: why do we do need this? I have a case where the items come from the database and there is a high chance it might be empty so my code will be throwing whenever it returns an empty list from the database.
The text was updated successfully, but these errors were encountered:
In all constructors there is this assertion:
My question is: why do we do need this? I have a case where the items come from the database and there is a high chance it might be empty so my code will be throwing whenever it returns an empty list from the database.
The text was updated successfully, but these errors were encountered: