Skip to content

Commit 54d2383

Browse files
committed
[tizen_rpc_port] Fix dart format drift
1 parent daf5626 commit 54d2383

7 files changed

Lines changed: 32 additions & 37 deletions

File tree

packages/tizen_rpc_port/example/client/integration_test/tizen_rpc_port_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ void main() {
111111
parcel.writeInt64(value);
112112
expect(parcel.readInt64(), value);
113113
});
114-
115114
});
116115

117116
group('writeByte / readByte', () {
@@ -150,7 +149,6 @@ void main() {
150149
parcel.writeArrayCount(42);
151150
expect(parcel.readArrayCount(), 42);
152151
});
153-
154152
});
155153

156154
group('write / read (burst byte array)', () {

packages/tizen_rpc_port/example/client/lib/main.dart

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,32 +171,36 @@ class _MyAppState extends State<MyApp> {
171171
children: <Widget>[
172172
TextButton(
173173
style: ButtonStyle(
174-
minimumSize:
175-
MaterialStateProperty.all(const Size.fromHeight(100)),
174+
minimumSize: MaterialStateProperty.all(
175+
const Size.fromHeight(100),
176+
),
176177
),
177178
onPressed: _connect,
178179
child: const Text('Connect'),
179180
),
180181
TextButton(
181182
style: ButtonStyle(
182-
minimumSize:
183-
MaterialStateProperty.all(const Size.fromHeight(100)),
183+
minimumSize: MaterialStateProperty.all(
184+
const Size.fromHeight(100),
185+
),
184186
),
185187
onPressed: _connect2,
186188
child: const Text('Connect2'),
187189
),
188190
TextButton(
189191
style: ButtonStyle(
190-
minimumSize:
191-
MaterialStateProperty.all(const Size.fromHeight(100)),
192+
minimumSize: MaterialStateProperty.all(
193+
const Size.fromHeight(100),
194+
),
192195
),
193196
onPressed: _isConnected ? _send : null,
194197
child: const Text('Send'),
195198
),
196199
TextButton(
197200
style: ButtonStyle(
198-
minimumSize:
199-
MaterialStateProperty.all(const Size.fromHeight(100)),
201+
minimumSize: MaterialStateProperty.all(
202+
const Size.fromHeight(100),
203+
),
200204
),
201205
onPressed: _isConnected2 ? _send2 : null,
202206
child: const Text('Send2'),

packages/tizen_rpc_port/example/client/lib/message_client.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ typedef NotifyCallback = void Function(String, String);
5858

5959
class _NotifyCallback extends _Delegate {
6060
_NotifyCallback(NotifyCallback callback, {bool once = false})
61-
: super(_DelegateId.notifyCallback.id, once, callback);
61+
: super(_DelegateId.notifyCallback.id, once, callback);
6262

6363
@override
6464
Future<void> onReceivedEvent(Parcel parcel) async {

packages/tizen_rpc_port/example/server/lib/message_server.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ abstract class ServiceBase {
7373

7474
class NotifyCallback extends _Delegate {
7575
NotifyCallback(this._port, this.service, {bool once = false})
76-
: super(_DelegateId.notifyCallback.id, once);
76+
: super(_DelegateId.notifyCallback.id, once);
7777

7878
final Port? _port;
7979

@@ -110,8 +110,8 @@ typedef _MethodHandler = Future<void> Function(ServiceBase, Port, Parcel);
110110

111111
class Message extends StubBase {
112112
Message({required ServiceBuilder serviceBuilder})
113-
: _serviceBuilder = serviceBuilder,
114-
super('Message') {
113+
: _serviceBuilder = serviceBuilder,
114+
super('Message') {
115115
_methodHandlers[_MethodId.register.id] = _onRegisterMethod;
116116
_methodHandlers[_MethodId.unregister.id] = _onUnregisterMethod;
117117
_methodHandlers[_MethodId.send.id] = _onSendMethod;

packages/tizen_rpc_port/lib/src/parcel.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ class Parcel {
157157

158158
static final Finalizer<rpc_port_parcel_h> _finalizer =
159159
Finalizer<rpc_port_parcel_h>((rpc_port_parcel_h handle) {
160-
tizen.rpc_port_parcel_destroy(handle);
161-
});
160+
tizen.rpc_port_parcel_destroy(handle);
161+
});
162162

163163
/// Gets a byte array backed by the raw data of this parcel.
164164
Uint8List asRaw() {

packages/tizen_rpc_port/lib/src/proxy_base.dart

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ abstract class ProxyBase {
6161
Completer<void> _connectCompleter = Completer<void>();
6262
Completer<void> _disconnectCompleter = Completer<void>();
6363

64-
static const MethodChannel _channel = MethodChannel(
65-
'tizen/rpc_port_proxy',
66-
);
64+
static const MethodChannel _channel = MethodChannel('tizen/rpc_port_proxy');
6765

6866
Stream<dynamic>? _stream;
6967
static final Set<int> _activeConnections = <int>{};
@@ -92,30 +90,25 @@ abstract class ProxyBase {
9290
throw StateError('Proxy $appid/$portName already connected');
9391
}
9492

95-
await _channel.invokeMethod(
96-
'init',
97-
<String, Object>{
98-
'handle': _handle.address,
99-
'portName': portName,
100-
},
101-
);
93+
await _channel.invokeMethod('init', <String, Object>{
94+
'handle': _handle.address,
95+
'portName': portName,
96+
});
10297

10398
final EventChannel eventChannel = EventChannel(
10499
'tizen/rpc_port_proxy/$portName/${_handle.address}',
105100
);
106101

107-
_stream = eventChannel.receiveBroadcastStream(
108-
<String, Object>{
109-
'handle': _handle.address,
110-
'appid': appid,
111-
'portName': portName,
112-
},
113-
);
102+
_stream = eventChannel.receiveBroadcastStream(<String, Object>{
103+
'handle': _handle.address,
104+
'appid': appid,
105+
'portName': portName,
106+
});
114107

115108
_activeConnections.add(_handle.address);
116109
_streamSubscription = _stream!.listen((dynamic data) async {
117-
final Map<String, dynamic> map =
118-
(data as Map<dynamic, dynamic>).cast<String, dynamic>();
110+
final Map<String, dynamic> map = (data as Map<dynamic, dynamic>)
111+
.cast<String, dynamic>();
119112
final int handle = map['handle'] as int;
120113
if (handle != _handle.address) {
121114
return;

packages/tizen_rpc_port/lib/src/stub_base.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ abstract class StubBase {
8787
<String, Object>{'handle': _handle.address},
8888
);
8989
_streamSubscription = stream.listen((dynamic data) async {
90-
final Map<String, dynamic> map =
91-
(data as Map<dynamic, dynamic>).cast<String, dynamic>();
90+
final Map<String, dynamic> map = (data as Map<dynamic, dynamic>)
91+
.cast<String, dynamic>();
9292
final int handle = map['handle'] as int;
9393
if (handle != _handle.address) {
9494
return;

0 commit comments

Comments
 (0)