File tree Expand file tree Collapse file tree 8 files changed +7
-8
lines changed Expand file tree Collapse file tree 8 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ analyzer:
45
45
library_prefixes : ignore
46
46
unused_field : ignore
47
47
avoid_init_to_null : ignore
48
- prefer_is_empty : ignore
49
48
unused_element : ignore
50
49
curly_braces_in_flow_control_structures : ignore
51
50
unnecessary_null_in_if_null_operators : ignore
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ class Checks {
85
85
* List of Objects and Socket: [{socket: socket1}, socket2]
86
86
*/
87
87
List <SIPUASocketInterface > copy = < SIPUASocketInterface > [];
88
- if (sockets is List && sockets! .length > 0 ) {
88
+ if (sockets is List && sockets! .isNotEmpty ) {
89
89
for (SIPUASocketInterface socket in sockets) {
90
90
copy.add (socket);
91
91
}
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ class NameAddrHeader {
89
89
90
90
@override
91
91
String toString () {
92
- String body = (_display_name != null && _display_name! .length > 0 )
92
+ String body = (_display_name != null && _display_name! .isNotEmpty )
93
93
? '"${_quote (_display_name !)}" '
94
94
: '' ;
95
95
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ class DTMF extends EventManager {
120
120
if (request.body != null ) {
121
121
List <String > body = request.body! .split ('\n ' );
122
122
123
- if (body.length >= 1 ) {
123
+ if (body.isNotEmpty ) {
124
124
if (body[0 ].contains (RegExp (reg_tone))) {
125
125
_tone = body[0 ].replaceAll (reg_tone, '\$ 2' );
126
126
}
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ class SocketTransport {
46
46
_recovery_options = recovery_options;
47
47
48
48
// We must recieve at least 1 socket
49
- if (sockets! .length == 0 ) {
49
+ if (sockets! .isEmpty ) {
50
50
throw Exceptions .TypeError (
51
51
'invalid argument: Must recieve atleast 1 web socket' );
52
52
}
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ class SIPUATcpSocket extends SIPUASocketInterface {
166
166
void _onMessage (dynamic data) {
167
167
logger.d ('Received TcpSocket data' );
168
168
if (data != null ) {
169
- if (data.toString ().trim ().length > 0 ) {
169
+ if (data.toString ().trim ().isNotEmpty ) {
170
170
ondata !(data);
171
171
} else {
172
172
logger.d ('Received and ignored empty packet' );
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ class SIPUAWebSocket extends SIPUASocketInterface {
175
175
void _onMessage (dynamic data) {
176
176
logger.d ('Received WebSocket message' );
177
177
if (data != null ) {
178
- if (data.toString ().trim ().length > 0 ) {
178
+ if (data.toString ().trim ().isNotEmpty ) {
179
179
ondata !(data);
180
180
} else {
181
181
logger.d ('Received and ignored empty packet' );
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ class URI {
181
181
});
182
182
});
183
183
184
- if (headers.length > 0 ) {
184
+ if (headers.isNotEmpty ) {
185
185
uri += '?${headers .join ('&' )}' ;
186
186
}
187
187
You can’t perform that action at this time.
0 commit comments