onDidChangeDependencies method

  1. @override
void onDidChangeDependencies()
override

Can be overridden to update the scrollbar when the parents widget dependencies change.

Implementation

@override
void onDidChangeDependencies() {
  final ThemeData theme = Theme.of(context);
  _colorScheme = theme.colorScheme;
  _scrollbarTheme = ScrollbarTheme.of(context);
  switch (theme.platform) {
    case TargetPlatform.android:
      _useAndroidScrollbar = true;
    case TargetPlatform.iOS:
    case TargetPlatform.linux:
    case TargetPlatform.fuchsia:
    case TargetPlatform.macOS:
    case TargetPlatform.windows:
      _useAndroidScrollbar = false;
  }
}