-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Closed
Copy link
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listcustomer: money (g3)f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
Description
When AppBar overlaps a reversed scrollable, it incorrectly reports the initial state as not being scrolled under.
Repro:
import 'dart:math';
import 'package:flutter/material.dart';
void main() => runApp(const ScrolledUnder());
class ScrolledUnder extends StatelessWidget {
const ScrolledUnder({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
backgroundColor: MaterialStateColor.resolveWith((states) {
if (states.contains(MaterialState.scrolledUnder)) {
return Colors.red;
}
return Colors.blue;
}),
title: Text('reverse scrolled under'),
),
body: ListView.builder(
itemBuilder: (context, index) => Container(
height: 200,
color: Color((Random().nextDouble() * 0xFFFFFF).toInt())
.withOpacity(1.0),
),
reverse: true,
),
),
);
}
}@Piinks would love your input, clues for how to fix this
Internal issue: b/226060628
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listcustomer: money (g3)f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.