-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
Description
Observed behavior:
The decoration of "Ink" widgets that are positioned outside of a ListView is being painted.
Expected behaviour:
The decoration is cropped in the same way all the other contents are.
Minimal example:
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Column(
children: <Widget>[
SizedBox(height: 500, child: Container(color:Colors.black45)),
Expanded(
child: ListView(
children: <Widget>[
InkItem(),
InkItem(),
InkItem(),
InkItem(),
InkItem(),
InkItem(),
InkItem(),
InkItem(),
],
),
)
],
),
),
);
}
}
class InkItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Ink(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
color: Colors.black12,
),
child: SizedBox(height: 100, child: Center(child: Text("Item"))),
);
}
}
Metadata
Metadata
Assignees
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.