setTrailingWidget method

void setTrailingWidget(
  1. Widget widget
)

Sets the trailing widget of the current route.

This will appear on the end of the route's title.

Implementation

void setTrailingWidget(Widget widget) {
  WidgetsBinding.instance.addPostFrameCallback((_) {
    setState(() {
      _trailing = widget;
    });
  });
}