Comments (5)
@frrahat
I think it is occuring because the app background is white and then you are trying to add variants of white color which won't be noticeable, as white on white will be indistinguishable.
I added backgroundColor
to Scaffold
which then seems to render the white variant as shown below:
home: Scaffold(
backgroundColor: Colors.yellow,
body: Column(
children: [
ListTile(
See if above helps in your case or not.
from flutter.
@frrahat, according to fluter docs : tileColor
- defines the background color of ListTile when [selected] is false.
If you want see changes you should set enabled: false
. By default enabled
is true;
To see changes, add this line for every ListTile widget, and donβt forget hot restart:
ListTile(
title: Text('ListTile with white12 background'),
tileColor: Colors.white12,
// add this
enabled: false,
),
from flutter.
@frrahat
Check above and see if it helps in your case further or not.
from flutter.
Hi @storm265 @darshankawar this doesn't solve the issue. I set ListTile.enabled: false for all the ListTile items and just makes the LitTile items looks disabled as per the documentation: https://api.flutter.dev/flutter/material/ListTile/enabled.html
bool enabled
final
Whether this list tile is interactive.
If false, this list tile is styled with the disabled color from the current Theme and the onTap and onLongPress callbacks are inoperative.
Sharing the output in the screenshot below:
Did I understand the suggestion correclty?
Also, FYI, I found this issue for variations for Colors.white
so far. Other colors like Colors.black*
works fine without setting any extra attribute.
Tried with Colors.black* and that works as expected:
Code with Colors.black*
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Scaffold(
body: Column(
children: [
SizedBox(height: 50),
ListTile(
textColor: Colors.white,
title: const Text('ListTile with black87 background'),
tileColor: Colors.black87,
),
ListTile(
textColor: Colors.white,
title: const Text('ListTile with black45 background'),
tileColor: Colors.black45,
),
ListTile(
textColor: Colors.white,
title: const Text('ListTile with black26 background'),
tileColor: Colors.black26,
),
ListTile(
textColor: Colors.white,
title: const Text('ListTile with black background'),
tileColor: Colors.black,
),
],
),
),
),
);
}
from flutter.
That kind of makes sense. Thank you @darshankawar . We can close the issue.
from flutter.
Related Issues (20)
- Inconsistent Height Rendering for Korean Letters in Text Widgets HOT 1
- Crash on Google Sign-In on iOS HOT 1
- Flutter for web crashes on older machines, iPhone, iPads HOT 6
- [Impeller] Commands with no vertex buffer but non-zero vertex counts are incorrectly dropped.
- `showSemanticsDebugger` to `true` is not working on Android or web HOT 2
- [et] no-op builds when a target is specified take ~10 to 15 seconds instead of < 0.1 seconds with Ninja directly. HOT 3
- [et] Allow specifying job counts on RBE jobs. HOT 1
- win-1 marked as dead. HOT 1
- mac-29 lost external connection phone device. HOT 1
- [Impeller] create explicit skia variants for benchmarks
- [iOS] App crashes on start with following error "/Runner.app/Frameworks/shared_preferences_foundation.framework/shared_preferences_foundation (built for iOS 17.0 which is newer than running OS)" HOT 3
- flutter-devicelab-mac-3 is quarantined `Not enough free disk space on /. 204739.1mib < 204800.0mib` HOT 6
- [Flutter 3.19.6][iOS] autocorrect highlight stuck on screen HOT 1
- linux-16, 19, 22 & 51 are dead. HOT 1
- linux-52 is dead. HOT 1
- mac-26 lost external connection phone device.
- migration of flutter Gradle plugin for declarative style is not working for flutter module in android HOT 8
- Flutter needs to route fuchsia.sysmem2.Allocator (pt 2) HOT 1
- [tool_crash] ProcessException: No such file or directory Command: /usr/bin/brave-browser, OS error code: 2
- [in_app_purchase]: Proposal to include expiry date of purchased subscription HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter.