This won't work, as the print(bucketNames) will be called before the Stream.listen() adds all the keys to the list. (Dart has async IO almost everywhere). Dart's Stream has a method to collect all items from a stream into a list:
https://api.dartlang.org/apidocs/channels/stable/#dart-async.Stream@id_toList

So this example could be:
````
client.listBuckets().toList().then((bucketNames) {
  print(bucketNames);
});
````
The benefits of using Stream is that the client can opt to use toList() easily, while it may process the keys one-by-one.