From f6fe41f10bf2ea84fc857ca19b023a39cb80ab46 Mon Sep 17 00:00:00 2001 From: xster Date: Thu, 15 Feb 2018 14:00:32 -0800 Subject: [PATCH] Small glow overscroll dartdoc addition (#14579) * Small glow overscroll dartdoc addition * Directly specify [MaterialApp] * review --- packages/flutter/lib/src/material/theme_data.dart | 2 +- packages/flutter/lib/src/widgets/overscroll_indicator.dart | 2 ++ packages/flutter/lib/src/widgets/scroll_physics.dart | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/material/theme_data.dart b/packages/flutter/lib/src/material/theme_data.dart index 8b8c5083d1..8ef4910172 100644 --- a/packages/flutter/lib/src/material/theme_data.dart +++ b/packages/flutter/lib/src/material/theme_data.dart @@ -306,7 +306,7 @@ class ThemeData { /// icons placed on top of the primary color (e.g. toolbar text). final Brightness primaryColorBrightness; - /// The foreground color for widgets (knobs, text, etc) + /// The foreground color for widgets (knobs, text, overscroll edge effect, etc). final Color accentColor; /// The brightness of the [accentColor]. Used to determine the color of text diff --git a/packages/flutter/lib/src/widgets/overscroll_indicator.dart b/packages/flutter/lib/src/widgets/overscroll_indicator.dart index bc1ee99707..897eae9708 100644 --- a/packages/flutter/lib/src/widgets/overscroll_indicator.dart +++ b/packages/flutter/lib/src/widgets/overscroll_indicator.dart @@ -30,6 +30,8 @@ import 'ticker_provider.dart'; /// /// Created automatically by [ScrollBehavior.buildViewportChrome] on platforms /// (e.g., Android) that commonly use this type of overscroll indication. +/// +/// In a [MaterialApp], the edge glow color is the [ThemeData.accentColor]. class GlowingOverscrollIndicator extends StatefulWidget { /// Creates a visual indication that a scroll view has overscrolled. /// diff --git a/packages/flutter/lib/src/widgets/scroll_physics.dart b/packages/flutter/lib/src/widgets/scroll_physics.dart index 0a58ed46a8..cd74df225f 100644 --- a/packages/flutter/lib/src/widgets/scroll_physics.dart +++ b/packages/flutter/lib/src/widgets/scroll_physics.dart @@ -362,7 +362,8 @@ class BouncingScrollPhysics extends ScrollPhysics { /// behavior. /// * [GlowingOverscrollIndicator], which is used by [ScrollConfiguration] to /// provide the glowing effect that is usually found with this clamping effect -/// on Android. +/// on Android. When using a [MaterialApp], the [GlowingOverscrollIndicator]'s +/// glow color is specified to use [ThemeData.accentColor]. class ClampingScrollPhysics extends ScrollPhysics { /// Creates scroll physics that prevent the scroll offset from exceeding the /// bounds of the content..