-
Notifications
You must be signed in to change notification settings - Fork 157
Closed
Description
======== Exception caught by widgets library =======================================================
The following _TypeError was thrown building ResponsiveWrapper(dirty, state: _ResponsiveWrapperState#c9032):
type 'Color' is not a subtype of type 'Widget'
The relevant error-causing widget was:
ResponsiveWrapper file:///Users/huteri/flutter/.pub-cache/hosted/pub.dartlang.org/responsive_framework-0.0.14/lib/responsive_wrapper.dart:119:12
When the exception was thrown, this was the stack:
#0 _ResponsiveWrapperState.build (package:responsive_framework/responsive_wrapper.dart:484:5)
#1 StatefulElement.build (package:flutter/src/widgets/framework.dart:4744:28)
#2 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4627:15)
#3 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#4 Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
...
====================================================================================================
/// First frame initialization default background color.
/// Because layout initialization is delayed by 1 frame,
/// a solid background color is displayed instead.
/// Default white.
final Color backgroundColor;
Used here as widget instead of color
return (screenWidth ==
0) // Initialization check. Window measurements not available until postFrameCallback.
? (widget.backgroundColor ??
Container(
color: Color(
0xFFFFFFFF))) // First frame empty background color or default white.
: InheritedResponsiveWrapper(
Metadata
Metadata
Assignees
Labels
No labels