buildStack method Null safety
- List<
Destination> destinations
Builds navigation stack of pages from list of Destination
Implementation
@visibleForTesting
Future<List<DBPage>> buildStack(
final List<Destination> destinations,
) async {
final List<DBPage> stack = <DBPage>[];
for (final Destination destination in destinations) {
final DBPage? newPage = await getPage(destination);
if (newPage != null) {
stack.add(newPage);
}
}
return stack;
}