flutter_xlider
flutter_xlider copied to clipboard
Unable to place Slider in Dialog
trafficstars
Problem:
The App throws an exception when the Slider should be shown inside an Dialog.
Exception:
https://pastebin.com/yy3Uqt6j
flutter doctor -v
flutter doctor -v
[✓] Flutter (Channel stable, 1.20.3, on Mac OS X 10.15.6 19G2021, locale en-GB)
• Flutter version 1.20.3 at /Users/niklas/personal/dev/flutter
• Framework revision 216dee60c0 (3 weeks ago), 2020-09-01 12:24:47 -0700
• Engine revision d1bc06f032
• Dart version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
• Android SDK at /Users/niklas/Library/Android/sdk
• Platform android-30, build-tools 30.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.7)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.7, Build version 11E801a
• CocoaPods version 1.9.3
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 49.0.2
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.49.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.14.1
[✓] Connected device (1 available)
• iPhone 11 (mobile) • EB2F22AE-46AF-456E-9BC2-ADF2423F82C3 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-7 (simulator)
Code:
(There may be one ')' to much..)
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text("Filteroptionen Auswählen"),
content: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
// Altersgruppe
ExpansionTile(
title: Text("Gruppengröße"),
children: [
FlutterSlider(
values: [
getLowerBound() / 2,
getUpperBound() / 2,
],
min: getLowerBound(),
max: getUpperBound(),
onDragCompleted: (handlerIndex, lowerValue, upperValue) {
setState(() {
_lowerAlterValue = lowerValue;
_upperAlterValue = upperValue;
});
},
),
),
],
),
],
),
);
},
);