Skip to content

Commit

Permalink
Clean up unnecessary LHS types (ReactElement, non-final variables)
Browse files Browse the repository at this point in the history
  • Loading branch information
greglittlefield-wf committed Nov 17, 2023
1 parent e514c58 commit 102af7b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions lib/src/component/_deprecated/resize_sensor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class ResizeSensorComponent extends UiComponent2<ResizeSensorProps> with SafeAni

@override
render() {
ReactElement? expandSensor = (Dom.div()
var expandSensor = (Dom.div()
..className = 'resize-sensor-expand'
..onScroll = _handleSensorScroll
..style = props.shrink! ? shrinkBaseStyle : baseStyle
Expand All @@ -244,7 +244,7 @@ class ResizeSensorComponent extends UiComponent2<ResizeSensorProps> 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
Expand All @@ -253,7 +253,7 @@ class ResizeSensorComponent extends UiComponent2<ResizeSensorProps> with SafeAni
(Dom.div()..style = collapseSensorChildStyle)()
);

ReactElement? resizeSensor = (Dom.div()
var resizeSensor = (Dom.div()
..className = 'resize-sensor'
..style = props.shrink! ? shrinkBaseStyle : baseStyle
..key = 'resizeSensor'
Expand Down
6 changes: 3 additions & 3 deletions lib/src/component/resize_sensor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class ResizeSensorComponent extends UiComponent2<ResizeSensorProps> 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
Expand All @@ -215,7 +215,7 @@ class ResizeSensorComponent extends UiComponent2<ResizeSensorProps> 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
Expand All @@ -224,7 +224,7 @@ class ResizeSensorComponent extends UiComponent2<ResizeSensorProps> with SafeAni
(Dom.div()..style = collapseSensorChildStyle)()
);

ReactElement? resizeSensor = (Dom.div()
var resizeSensor = (Dom.div()
..className = 'resize-sensor'
..style = props.shrink! ? shrinkBaseStyle : baseStyle
..key = 'resizeSensor'
Expand Down
4 changes: 2 additions & 2 deletions test/over_react/component/_deprecated/resize_sensor_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions test/over_react/component/resize_sensor_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 102af7b

Please sign in to comment.