So because the Iterable is a parent class of List, we can return an Iterable instead of a List (in any function that returns a List), but later on, at runtime, when the List become in use, the runtime interpreter will complain that it cannot know what is an Iterable (in the context of its use instead of List), is it like this or I miss understood?
it depends on where you use the returned iterable/list. if you create a variable without a type, it will take any returned type. Otherwise, when you create a typed variable, then it will shout an error if the type does not match. same goes to the arguments in a function. hope this helps.
This was very well explained! Thanks
So glad to find your flutter channel! Like the way you present
Bro which font are u using
So because the Iterable is a parent class of List, we can return an Iterable instead of a List (in any function that returns a List), but later on, at runtime, when the List become in use, the runtime interpreter will complain that it cannot know what is an Iterable (in the context of its use instead of List), is it like this or I miss understood?
it depends on where you use the returned iterable/list. if you create a variable without a type, it will take any returned type. Otherwise, when you create a typed variable, then it will shout an error if the type does not match. same goes to the arguments in a function. hope this helps.
hi brother i have a question i m having a error can u help me please how can i contact u