fix flutter error report correct local widget (#41224)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<<skip until matching line>>
|
||||
══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
|
||||
The following assertion was thrown during layout:
|
||||
A RenderFlex overflowed by 2844 pixels on the right\.
|
||||
|
||||
The relevant error-causing widget was:
|
||||
Row
|
||||
file:\/\/\/.+print_correct_local_widget_test\.dart:[0-9]+:[0-9]+
|
||||
|
||||
The overflowing RenderFlex has an orientation of Axis.horizontal\.
|
||||
@@ -0,0 +1,44 @@
|
||||
// Copyright 2019 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Rendering Error', (WidgetTester tester) async {
|
||||
// This should fail with user created widget = Row.
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
home: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('RenderFlex OverFlow'),
|
||||
),
|
||||
body: Container(
|
||||
width: 400.0,
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Icon(Icons.message),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: const <Widget>[
|
||||
Text('Title'),
|
||||
Text(
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed'
|
||||
'do eiusmod tempor incididunt ut labore et dolore magna '
|
||||
'aliqua. Ut enim ad minim veniam, quis nostrud '
|
||||
'exercitation ullamco laboris nisi ut aliquip ex ea '
|
||||
'commodo consequat.'
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -9,7 +9,7 @@ more information in this error message to help you determine and fix the underly
|
||||
In either case, please report this assertion by filing a bug on GitHub:
|
||||
https:\/\/github\.com\/flutter\/flutter\/issues\/new\?template=BUG\.md
|
||||
|
||||
User-created ancestor of the error-causing widget was:
|
||||
The relevant error-causing widget was:
|
||||
CustomScrollView
|
||||
file:\/\/\/.+print_user_created_ancestor_test\.dart:[0-9]+:7
|
||||
|
||||
|
||||
Reference in New Issue
Block a user