From 102af7b7ddde4aef09d595715f0f0e4afa1e7d52 Mon Sep 17 00:00:00 2001 From: Greg Littlefield Date: Fri, 17 Nov 2023 15:07:55 -0700 Subject: [PATCH] Clean up unnecessary LHS types (ReactElement, non-final variables) --- lib/src/component/_deprecated/resize_sensor.dart | 6 +++--- lib/src/component/resize_sensor.dart | 6 +++--- .../component/_deprecated/resize_sensor_test.dart | 4 ++-- test/over_react/component/resize_sensor_test.dart | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/src/component/_deprecated/resize_sensor.dart b/lib/src/component/_deprecated/resize_sensor.dart index 07632126f..2b1e0404b 100644 --- a/lib/src/component/_deprecated/resize_sensor.dart +++ b/lib/src/component/_deprecated/resize_sensor.dart @@ -235,7 +235,7 @@ class ResizeSensorComponent extends UiComponent2 with SafeAni @override render() { - ReactElement? expandSensor = (Dom.div() + var expandSensor = (Dom.div() ..className = 'resize-sensor-expand' ..onScroll = _handleSensorScroll ..style = props.shrink! ? shrinkBaseStyle : baseStyle @@ -244,7 +244,7 @@ class ResizeSensorComponent extends UiComponent2 with SafeAni (Dom.div()..style = expandSensorChildStyle)() ); - ReactElement? collapseSensor = (Dom.div() + var collapseSensor = (Dom.div() ..className = 'resize-sensor-collapse' ..onScroll = _handleSensorScroll ..style = props.shrink! ? shrinkBaseStyle : baseStyle @@ -253,7 +253,7 @@ class ResizeSensorComponent extends UiComponent2 with SafeAni (Dom.div()..style = collapseSensorChildStyle)() ); - ReactElement? resizeSensor = (Dom.div() + var resizeSensor = (Dom.div() ..className = 'resize-sensor' ..style = props.shrink! ? shrinkBaseStyle : baseStyle ..key = 'resizeSensor' diff --git a/lib/src/component/resize_sensor.dart b/lib/src/component/resize_sensor.dart index eb7f862a2..8042a905a 100644 --- a/lib/src/component/resize_sensor.dart +++ b/lib/src/component/resize_sensor.dart @@ -206,7 +206,7 @@ class ResizeSensorComponent extends UiComponent2 with SafeAni @override render() { // FIXME null-safety why was this changed from `var` to `ReactElement?`? - ReactElement? expandSensor = (Dom.div() + var expandSensor = (Dom.div() ..className = 'resize-sensor-expand' ..onScroll = _handleSensorScroll ..style = props.shrink! ? shrinkBaseStyle : baseStyle @@ -215,7 +215,7 @@ class ResizeSensorComponent extends UiComponent2 with SafeAni (Dom.div()..style = expandSensorChildStyle)() ); - ReactElement? collapseSensor = (Dom.div() + var collapseSensor = (Dom.div() ..className = 'resize-sensor-collapse' ..onScroll = _handleSensorScroll ..style = props.shrink! ? shrinkBaseStyle : baseStyle @@ -224,7 +224,7 @@ class ResizeSensorComponent extends UiComponent2 with SafeAni (Dom.div()..style = collapseSensorChildStyle)() ); - ReactElement? resizeSensor = (Dom.div() + var resizeSensor = (Dom.div() ..className = 'resize-sensor' ..style = props.shrink! ? shrinkBaseStyle : baseStyle ..key = 'resizeSensor' diff --git a/test/over_react/component/_deprecated/resize_sensor_test.dart b/test/over_react/component/_deprecated/resize_sensor_test.dart index 433b04de2..2f0a78c84 100644 --- a/test/over_react/component/_deprecated/resize_sensor_test.dart +++ b/test/over_react/component/_deprecated/resize_sensor_test.dart @@ -58,13 +58,13 @@ void main() { Map? resizeSensorProps }) { // Create component hierarchy. - ReactElement? sensor = (ResizeSensor() + var sensor = (ResizeSensor() ..addProps(resizeSensorProps) ..onInitialize = onInitialize ..onResize = onResize ..ref = resizeSensorRef )(); - ReactElement? container = (Dom.div() + var container = (Dom.div() ..className = 'container' ..style = { 'position': 'absolute', diff --git a/test/over_react/component/resize_sensor_test.dart b/test/over_react/component/resize_sensor_test.dart index 4997fc78e..ac5e94f27 100644 --- a/test/over_react/component/resize_sensor_test.dart +++ b/test/over_react/component/resize_sensor_test.dart @@ -56,13 +56,13 @@ void main() { Map? resizeSensorProps }) { // Create component hierarchy. - ReactElement? sensor = (ResizeSensor() + var sensor = (ResizeSensor() ..addProps(resizeSensorProps) ..onInitialize = onInitialize ..onResize = onResize ..ref = resizeSensorRef )(); - ReactElement? container = (Dom.div() + var container = (Dom.div() ..className = 'container' ..style = { 'position': 'absolute',