-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type 'Null' is not a subtype of type 'double' in type cast #172
Comments
Yes facing the same issue |
To ensure all scenarios are accounted for, including the one in the example where 'mobile' is specified along with two values, it would be necessary to set a default value. This adjustment will help cover cases that the current condition in your case misses. |
|
This was a tough call with a long history and limitations of Dart's type capabilities. What's remaining is the confusion between typed null / <double?> non-nullable and the value's nullability. |
Hi, same problem here, any suggestions? Thank you for your great job! |
Still waiting |
|
The following _TypeError was thrown building ConditionalRouteWidget(dirty, dependencies: [InheritedResponsiveBreakpoints, _ModalScopeStatus]):
type 'Null' is not a subtype of type 'double' in type cast
The relevant error-causing widget was:
ConditionalRouteWidget ConditionalRouteWidget:file:///C:/Users/waqas.khursheed/Desktop/FlutterMinimalWebsite/lib/main_advanced.dart:41:18
When the exception was thrown, this was the stack:
#0 new ResponsiveValue (package:responsive_framework/src/responsive_value.dart:47:61)
#1 MyApp.build... (package:minimal/main_advanced.dart:53:32)
#2 ConditionalRouteWidget.build (package:minimal/utils/conditional_route_widget.dart:26:21)
#3 StatelessElement.build (package:flutter/src/widgets/framework.dart:5550:49)
#4 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5480:15)
#5 Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
#6 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5462:5)
#7 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5456:5)
... Normal element mounting (182 frames)
#189 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4335:16)
#190 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6893:36)
#191 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6905:32)
... Normal element mounting (492 frames)
#683 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4335:16)
#684 Element.updateChild (package:flutter/src/widgets/framework.dart:3846:18)
#685 _RawViewElement._updateChild (package:flutter/src/widgets/view.dart:291:16)
#686 _RawViewElement.mount (package:flutter/src/widgets/view.dart:314:5)
... Normal element mounting (7 frames)
#693 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4335:16)
#694 Element.updateChild (package:flutter/src/widgets/framework.dart:3846:18)
#695 RootElement._rebuild (package:flutter/src/widgets/binding.dart:1354:16)
#696 RootElement.mount (package:flutter/src/widgets/binding.dart:1323:5)
#697 RootWidget.attach. (package:flutter/src/widgets/binding.dart:1276:18)
#698 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2844:19)
#699 RootWidget.attach (package:flutter/src/widgets/binding.dart:1275:13)
#700 WidgetsBinding.attachToBuildOwner (package:flutter/src/widgets/binding.dart:1088:27)
#701 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:1070:5)
#702 WidgetsBinding.scheduleAttachRootWidget. (package:flutter/src/widgets/binding.dart:1056:7)
#706 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
(elided 3 frames from class _Timer and dart:async-patch)
The text was updated successfully, but these errors were encountered: