You have to mark both list to final. You can still add and remove elements from your lists but you cannot re-initialize them.
You can
list.add('c')
You can't
list = ['apple']
In your case the correct code would look like this:
class Test extends StatelessWidget { Final List<String> list = ['a', 'b']; Final List<int> _ids = [];