restructure light slider widget
This commit is contained in:
@@ -68,8 +68,7 @@ class _IblRotationSliderWidgetState extends State<LightSliderWidget> {
|
||||
lightDir.x,
|
||||
lightDir.y,
|
||||
lightDir.z,
|
||||
castShadows,
|
||||
async: false);
|
||||
castShadows);
|
||||
|
||||
setState(() {});
|
||||
}
|
||||
@@ -83,8 +82,14 @@ class _IblRotationSliderWidgetState extends State<LightSliderWidget> {
|
||||
data: ThemeData(platform: TargetPlatform.android),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(color: Colors.white.withOpacity(0.5)),
|
||||
child: Column(children: [
|
||||
Slider(
|
||||
child: SliderTheme(
|
||||
data: SliderThemeData(
|
||||
showValueIndicator: ShowValueIndicator.always,
|
||||
valueIndicatorTextStyle: TextStyle(color: Colors.black)),
|
||||
child: Column(mainAxisSize: MainAxisSize.min, children: [
|
||||
Row(children: [
|
||||
Expanded(
|
||||
child: Slider(
|
||||
label: "POSX",
|
||||
value: lightPos.x,
|
||||
min: -10.0,
|
||||
@@ -92,8 +97,9 @@ class _IblRotationSliderWidgetState extends State<LightSliderWidget> {
|
||||
onChanged: (value) {
|
||||
lightPos.x = value;
|
||||
_set();
|
||||
}),
|
||||
Slider(
|
||||
})),
|
||||
Expanded(
|
||||
child: Slider(
|
||||
label: "POSY",
|
||||
value: lightPos.y,
|
||||
min: -10.0,
|
||||
@@ -101,8 +107,9 @@ class _IblRotationSliderWidgetState extends State<LightSliderWidget> {
|
||||
onChanged: (value) {
|
||||
lightPos.y = value;
|
||||
_set();
|
||||
}),
|
||||
Slider(
|
||||
})),
|
||||
Expanded(
|
||||
child: Slider(
|
||||
label: "POSZ",
|
||||
value: lightPos.z,
|
||||
min: -10.0,
|
||||
@@ -110,8 +117,11 @@ class _IblRotationSliderWidgetState extends State<LightSliderWidget> {
|
||||
onChanged: (value) {
|
||||
lightPos.z = value;
|
||||
_set();
|
||||
}),
|
||||
Slider(
|
||||
}))
|
||||
]),
|
||||
Row(children: [
|
||||
Expanded(
|
||||
child: Slider(
|
||||
label: "DIRX",
|
||||
value: lightDir.x,
|
||||
min: -10.0,
|
||||
@@ -119,8 +129,9 @@ class _IblRotationSliderWidgetState extends State<LightSliderWidget> {
|
||||
onChanged: (value) {
|
||||
lightDir.x = value;
|
||||
_set();
|
||||
}),
|
||||
Slider(
|
||||
})),
|
||||
Expanded(
|
||||
child: Slider(
|
||||
label: "DIRY",
|
||||
value: lightDir.y,
|
||||
min: -10.0,
|
||||
@@ -128,8 +139,9 @@ class _IblRotationSliderWidgetState extends State<LightSliderWidget> {
|
||||
onChanged: (value) {
|
||||
lightDir.y = value;
|
||||
_set();
|
||||
}),
|
||||
Slider(
|
||||
})),
|
||||
Expanded(
|
||||
child: Slider(
|
||||
label: "DIRZ",
|
||||
value: lightDir.z,
|
||||
min: -10.0,
|
||||
@@ -137,7 +149,8 @@ class _IblRotationSliderWidgetState extends State<LightSliderWidget> {
|
||||
onChanged: (value) {
|
||||
lightDir.z = value;
|
||||
_set();
|
||||
}),
|
||||
}))
|
||||
]),
|
||||
Slider(
|
||||
label: "Color",
|
||||
value: color,
|
||||
@@ -177,6 +190,6 @@ class _IblRotationSliderWidgetState extends State<LightSliderWidget> {
|
||||
_set();
|
||||
})
|
||||
])
|
||||
])));
|
||||
]))));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user