When the user scrolls to the edge of a list or TabView, an animated blue circle appears on the ending edge.
What is this called, and how do I change the colour of it?
Cheers.
The scrollbar-color property is used to set the color of an element's scrollbar. It can be used to control both the scrollbar track and scrollbar thumb colors separately.
You can use RawScrollbar instead and set the thumbColor to whatever color you like. Show activity on this post. Scroll bar uses the highlight color.. so just add ur desired scrollbar color in the highlightColor inside Theme in MaterialApp and you are done.
The scrollbar-color CSS property sets the color of the scrollbar track and thumb. The track refers to the background of the scrollbar, which is generally fixed regardless of the scrolling position. The thumb refers to the moving part of the scrollbar, which usually floats on top of the track.
The hexadecimal color code #ebd78d is a medium light shade of yellow. In the RGB color model #ebd78d is comprised of 92.16% red, 84.31% green and 55.29% blue.
Note: The overflow property only works for block elements with a specified height. Note: In OS X Lion (on Mac), scrollbars are hidden by default and only shown when being used (even though "overflow:scroll" is set). By default, the overflow is visible, meaning that it is not clipped and it renders outside the element's box:
The first color is for the “thumb” or the moveable part of the scrollbar which appears on top. The second color is for the “track” or the fixed portion of the scrollbar. This combines the new spec syntax and the WebKit prefixed stuff. This browser support data is from Caniuse, which has more detail.
scrollbar-color accepts the following values: auto is the default value and will render the standard scrollbar colors for the user agent. dark will tell the user agent to use darker scrollbars to match the current color scheme. light will tell the user agent to use lighter scrollbars to match the current color scheme.
CSS Overflow. The overflow property specifies whether to clip the content or to add scrollbars when the content of an element is too big to fit in the specified area. The overflow property has the following values: visible - Default.
This is the android scroll physics (ClampingScrollPhysics).
From the source code and docs:
glow color is specified to use [ThemeData.accentColor].
That been said, when you create your App
, the best practice is to specify a custom theme, istead of appling colors manually.
Example:
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'My App',
theme: ThemeData(
brightness: Brightness.light,
primarySwatch: Colors.grey,
primaryColor: Colors.grey[50],
primaryColorBrightness: Brightness.light,
//this is what you want
accentColor: Colors.orangeAccent[400],
accentColorBrightness: Brightness.light,
),
home: Home(),
);
}
}
I like to use this tool to define the primary and secondary (called accent color in flutter) and having a preview of the widgets.
Note: On IOs the physics is different, letting the user scroll beyond the bounds of the content, but then bounce the content back to the edge of those bounds (BouncingScrollPhysics).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With