Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
permission_handler
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songyanzhi
permission_handler
Commits
4e47bced
Unverified
Commit
4e47bced
authored
Apr 13, 2021
by
Maurits van Beusekom
Committed by
GitHub
Apr 13, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #489 from timekone/develop
Implement the equality operator for Permission class
parents
63565a5c
055958a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
permission_handler_platform_interface/lib/src/permissions.dart
+15
-0
No files found.
permission_handler_platform_interface/lib/src/permissions.dart
View file @
4e47bced
...
@@ -11,6 +11,7 @@ class PermissionWithService extends Permission {
...
@@ -11,6 +11,7 @@ class PermissionWithService extends Permission {
}
}
/// Defines the permissions which can be checked and requested.
/// Defines the permissions which can be checked and requested.
@immutable
class
Permission
{
class
Permission
{
const
Permission
.
_
(
this
.
value
);
const
Permission
.
_
(
this
.
value
);
factory
Permission
.
byValue
(
int
value
)
=>
values
[
value
];
factory
Permission
.
byValue
(
int
value
)
=>
values
[
value
];
...
@@ -163,4 +164,18 @@ class Permission {
...
@@ -163,4 +164,18 @@ class Permission {
@override
@override
String
toString
()
=>
'Permission.
${_names[value]}
'
;
String
toString
()
=>
'Permission.
${_names[value]}
'
;
@override
bool
operator
==(
Object
other
)
{
if
(
identical
(
this
,
other
))
{
return
true
;
}
if
(
other
.
runtimeType
!=
runtimeType
)
{
return
false
;
}
return
other
is
Permission
&&
other
.
value
==
value
;
}
@override
int
get
hashCode
=>
value
.
hashCode
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment