Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Nicolas Lopez
2020-09-14 17:10:47 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d16be160ce54f93a1fd495dea3efd25dd1fcd17d
d16be160
1 parent
b9e4e7b3
LogExtensions
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
lib/src/utils/extensions/dynamic_extensions.dart
lib/src/utils/regex/get_utils.dart
lib/src/utils/extensions/dynamic_extensions.dart
View file @
d16be16
import
'dart:developer'
;
import
'../../../utils.dart'
;
import
'../regex/get_utils.dart'
;
extension
GetDynamicUtils
on
dynamic
{
...
...
@@ -7,4 +10,10 @@ extension GetDynamicUtils on dynamic {
bool
get
isNull
=>
GetUtils
.
isNull
(
this
);
bool
get
isNullOrBlank
=>
GetUtils
.
isNullOrBlank
(
this
);
void
logError
({
String
info
=
''
})
=>
GetUtils
.
log
(
'Error:
${this.runtimeType}
'
,
this
,
info
);
void
logInfo
({
String
info
=
''
})
=>
GetUtils
.
log
(
'Info:
${this.runtimeType}
'
,
this
,
info
);
}
...
...
lib/src/utils/regex/get_utils.dart
View file @
d16be16
...
...
@@ -484,4 +484,7 @@ class GetUtils {
static
bool
hasMatch
(
String
value
,
String
pattern
)
{
return
(
value
==
null
)
?
false
:
RegExp
(
pattern
).
hasMatch
(
value
);
}
static
void
log
(
String
prefix
,
dynamic
value
,
String
info
)
=>
print
(
'
$prefix
$value
$info
'
);
}
...
...
Please
register
or
login
to post a comment