-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: desktopRunning on desktopRunning on desktopc: crashStack traces logged to the consoleStack traces logged to the consolef: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 1.22Found to occur in 1.22Found to occur in 1.22frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specifically
Description
Steps to reproduce
- Run the following app in windows desktop:
- Minimize the APP Window,will trigger an assert below:
════════ Exception caught by rendering library ═════════════════════════════════════════════════════
The following assertion was thrown during paint():
'package:flutter/src/material/slider_theme.dart': Failed assertion: line 1456 pos 12: 'parentBox.size.width >= overlayWidth': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=BUG.md
The relevant error-causing widget was:
Slider file:///D:/My%20Documents/Desktop/flutter_app_demo/lib/main.dart:37:18
When the exception was thrown, this was the stack:
#2 BaseSliderTrackShape.getPreferredRect (package:flutter/src/material/slider_theme.dart:1456:12)
#3 _RenderSlider.paint (package:flutter/src/material/slider.dart:1377:52)
#4 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2323:7)
#5 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:191:13)
#6 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:133:15)
...
The following RenderObject was being processed when the exception was fired: _RenderSlider#12477
... parentData: <none> (can use size)
... constraints: BoxConstraints(w=0.0, h=0.0)
... size: Size(0.0, 0.0)
RenderObject: _RenderSlider#12477
parentData: <none> (can use size)
constraints: BoxConstraints(w=0.0, h=0.0)
size: Size(0.0, 0.0)
════════════════════════════════════════════════════════════════════════════════════════════════════
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
double value = 0.5;
_onChange(newValue) {
setState(() {
print('$newValue');
value = newValue;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Directionality(
textDirection: TextDirection.ltr,
child: Center(
child: RepaintBoundary(
child: Slider(
value: value,
onChanged: _onChange,
),
),
),
));
}
}
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: desktopRunning on desktopRunning on desktopc: crashStack traces logged to the consoleStack traces logged to the consolef: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 1.22Found to occur in 1.22Found to occur in 1.22frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specifically