Widle-Studio/Grocery-App

rangeslider

ialsaud opened this issue · 9 comments

running the app as-is shows the following error, please support.

$ flutter run
Using hardware rendering with device sdk gphone x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on sdk gphone x86 in debug mode...
                                                                        
Compiler message:                                                       
lib/item_screen.dart:1484:26: Error: 'RangeSlider' is imported from both 'package:flutter/src/material/range_slider.dart' and 'package:flutter_range_slider/src/flutter_range_slider.dart'.
              child: new RangeSlider(                                   
                         ^^^^^^^^^^^                                    
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.                                                           
                                                                        
FAILURE: Build failed with an exception.                                
                                                                        
* Where:                                                                
Script '/...../flutter/packages/flutter_tools/gradle/flutter.gradle' line: 780
                                                                        
* What went wrong:                                                      
Execution failed for task ':app:compileFlutterBuildDebug'.              
> Process 'command '/...../flutter/bin/flutter'' finished with non-zero exit value 1
                                                                        
* Try:                                                                  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
                                                                        
* Get more help at https://help.gradle.org                              
                                                                        
BUILD FAILED in 7s                                                      
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                         7.7s
Gradle task assembleDebug failed with exit code 1

any solution to this?

No solution unfortunately

I found the solution just put as _Rangeslider End of range slider import and use same reference for Rangeslider new object.

import 'package:flutter_range_slider/flutter_range_slider.dart' as _RangeSlider;

and

child: new _RangeSlider.RangeSlider( min: min, max: max, lowerValue: lowerValue, upperValue: upperValue, divisions: divisions, showValueIndicator: showValueIndicator, valueIndicatorMaxDecimals: valueIndicatorMaxDecimals, onChanged: (double lower, double upper) { // call callback(lower, upper); }, )

Fix worked for me 👍

Please help Do you make direct application cloning works directly?

I have created a PR which will resolve this issue.

Resolved!