<p>Hello guys,font-size: 1rem;]( font-size: 1rem;](In the errors, probably you must be seeing the below two errors.</p> <p>color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre-wrap;](line-height: 19px; white-space: pre;]( { color: #ce9178;]("resource": color: #ce9178;]("/C:/Users/seven/Documents/GitHub/Grocery-App/f_groceries/lib/item_screen.dart", color: #ce9178;]("owner": color: #ce9178;]("dart", color: #ce9178;]("code": color: #ce9178;]("strong_mode_invalid_cast_new_expr", color: #ce9178;]("severity": color: #b5cea8;](8, color: #ce9178;]("message": color: #ce9178;]("The constructor returns type 'dynamic' that isn't of expected type 'Widget'.", color: #ce9178;]("source": color: #ce9178;]("dart", color: #ce9178;]("startLineNumber": color: #b5cea8;](1484, color: #ce9178;]("startColumn": color: #b5cea8;](22, color: #ce9178;]("endLineNumber": color: #b5cea8;](1484, color: #ce9178;]("endColumn": color: #b5cea8;](507, color: #ce9178;]("tags": []}</p> <p>{ color: #ce9178;]("resource": color: #ce9178;]("/C:/Users/seven/Documents/GitHub/Grocery-App/f_groceries/lib/item_screen.dart", color: #ce9178;]("owner": color: #ce9178;]("dart", color: #ce9178;]("code": color: #ce9178;]("ambiguous_import", color: #ce9178;]("severity": color: #b5cea8;](8, color: #ce9178;]("message": color: #ce9178;]("The name 'RangeSlider' is defined in the libraries 'package:flutter/src/material/range_slider.dart' and 'package:flutter_range_slider/src/flutter_range_slider.dart'. Try using 'as prefix' for one of the import directives, or hiding the name from all but one of the imports.", color: #ce9178;]("source": color: #ce9178;]("dart", color: #ce9178;]("startLineNumber": color: #b5cea8;](1484, color: #ce9178;]("startColumn": color: #b5cea8;](26, color: #ce9178;]("endLineNumber": color: #b5cea8;](1484, color: #ce9178;]("endColumn": color: #b5cea8;](37, color: #ce9178;]("tags": []} In order to fix this, we need to use 'as prefix' in the imports section. Let me be more specific. Probably you will be having this code in your imports section. color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;](color: #569cd6;](import color: #ce9178;]('package:flutter_range_slider/flutter_range_slider.dart'; and you need to change that as below. color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;](color: #569cd6;](import color: #ce9178;]('package:flutter_range_slider/flutter_range_slider.dart' color: #569cd6;](as rngslider; And then you need to call the widgets as below, color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;](rngslider.RangeSlider this type of calling should be done in all the places where you want the above import to be used. Hopefully your issue will be resolved now. Thanks,Srikanth</p>
Error: The name 'RangeSlider' is defined in the libraries 'package:flutter/src/material/range_slider.dart' and 'package:flutter_range_slider/src/flutter_range_slider.dart'.
This Errors is posted by seven.srikanth at 7/14/2019 10:03:40 AM
Check out our other latest articles
Safearea widget - How to avoid visual overlap with Notch on flutter mobile app?How to convert row of widgets into column of widgets in flutter based on screen size?
How to run Flutter programs from GitHub?
How to get screen orientation in flutter?
NavigationRail example in flutter
Tags: The constructor returns type dynamic that isn't of expected type Widget; The name RangeSlider is defined in the libraries;
Check out our other latest articles
Safearea widget - How to avoid visual overlap with Notch on flutter mobile app?How to convert row of widgets into column of widgets in flutter based on screen size?
How to run Flutter programs from GitHub?
How to get screen orientation in flutter?
NavigationRail example in flutter