Skip to content

Commit 35297ff

Browse files
Format
1 parent e1e3f7f commit 35297ff

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

example/suspense/suspense.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ external ReactClass jsLazy(Promise Function() factory);
1818
// Only intended for testing purposes, Please do not copy/paste this into repo.
1919
// This will most likely be added to the PUBLIC api in the future,
2020
// but needs more testing and Typing decisions to be made first.
21-
ReactJsComponentFactoryProxy lazy(Future<ReactComponentFactoryProxy> Function() factory) => ReactJsComponentFactoryProxy(
21+
ReactJsComponentFactoryProxy lazy(Future<ReactComponentFactoryProxy> Function() factory) =>
22+
ReactJsComponentFactoryProxy(
2223
jsLazy(
2324
allowInterop(
2425
() => futureToPromise(

lib/react.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ typedef ComponentRegistrar2 = ReactDartComponentFactoryProxy2 Function(
5555
Component2BridgeFactory bridgeFactory,
5656
});
5757

58-
typedef FunctionComponentRegistrar = ReactDartFunctionComponentFactoryProxy Function(DartFunctionComponent componentFactory,
59-
{String displayName});
58+
typedef FunctionComponentRegistrar = ReactDartFunctionComponentFactoryProxy
59+
Function(DartFunctionComponent componentFactory, {String displayName});
6060

6161
/// Fragment component that allows the wrapping of children without the necessity of using
6262
/// an element that adds an additional layer to the DOM (div, span, etc).
@@ -1162,8 +1162,7 @@ abstract class Component2 implements Component {
11621162
// Other deprecated and unsupported members
11631163
// ******************************************************************************************************************
11641164

1165-
UnsupportedError _unsupportedError(String memberName) =>
1166-
UnsupportedError('Component2 drops support for $memberName');
1165+
UnsupportedError _unsupportedError(String memberName) => UnsupportedError('Component2 drops support for $memberName');
11671166

11681167
/// Do not use.
11691168
///

lib/react_client/component_factory.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ class ReactDartComponentFactoryProxy<TComponent extends Component> extends React
8787
/// into [generateExtendedJsProps] upon [ReactElement] creation.
8888
final Map defaultProps;
8989

90-
ReactDartComponentFactoryProxy(this.reactClass)
91-
: defaultProps = reactClass.dartDefaultProps;
90+
ReactDartComponentFactoryProxy(this.reactClass) : defaultProps = reactClass.dartDefaultProps;
9291

9392
@override
9493
ReactClass get type => reactClass;
@@ -181,8 +180,7 @@ class ReactDartComponentFactoryProxy2<TComponent extends Component2> extends Rea
181180
@override
182181
final Map defaultProps;
183182

184-
ReactDartComponentFactoryProxy2(this.reactClass)
185-
: defaultProps = JsBackedMap.fromJs(reactClass.defaultProps);
183+
ReactDartComponentFactoryProxy2(this.reactClass) : defaultProps = JsBackedMap.fromJs(reactClass.defaultProps);
186184

187185
@override
188186
ReactClass get type => reactClass;

lib/src/react_client/factory_util.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@JS()
22
library react_client_factory_utils;
33

4-
54
import 'package:js/js.dart';
65

76
import 'package:react/react_client/component_factory.dart';
@@ -56,7 +55,7 @@ void convertRefValue2(
5655
// Use _CallbackRef<Null> to check arity, since parameters could be non-dynamic, and thus
5756
// would fail the `is _CallbackRef<dynamic>` check.
5857
// See https://github.com/dart-lang/sdk/issues/34593 for more information on arity checks.
59-
// ignore: prefer_void_to_null
58+
// ignore: prefer_void_to_null
6059
} else if (ref is CallbackRef<Null> && convertCallbackRefValue) {
6160
args[refKey] = allowInterop((dynamic instance) {
6261
// Call as dynamic to perform dynamic dispatch, since we can't cast to _CallbackRef<dynamic>,

test/react_suspense_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ external ReactClass jsLazy(Promise Function() factory);
2222
// Only intended for testing purposes, Please do not copy/paste this into repo.
2323
// This will most likely be added to the PUBLIC api in the future,
2424
// but needs more testing and Typing decisions to be made first.
25-
ReactJsComponentFactoryProxy lazy(Future<ReactComponentFactoryProxy> Function() factory) => ReactJsComponentFactoryProxy(
25+
ReactJsComponentFactoryProxy lazy(Future<ReactComponentFactoryProxy> Function() factory) =>
26+
ReactJsComponentFactoryProxy(
2627
jsLazy(
2728
allowInterop(
2829
() => futureToPromise(

0 commit comments

Comments
 (0)