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
055958a1
Commit
055958a1
authored
Jan 20, 2021
by
Dmitry Belogub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement equality for Permission
parent
eb7ef50a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
permission_handler_platform_interface/lib/permission_handler_platform_interface.dart
+1
-0
permission_handler_platform_interface/lib/src/permissions.dart
+15
-0
No files found.
permission_handler_platform_interface/lib/permission_handler_platform_interface.dart
View file @
055958a1
library
permission_handler_platform_interface
;
import
'dart:async'
;
import
'package:meta/meta.dart'
;
import
'package:plugin_platform_interface/plugin_platform_interface.dart'
;
import
'src/method_channel/method_channel_permission_handler.dart'
;
...
...
permission_handler_platform_interface/lib/src/permissions.dart
View file @
055958a1
...
...
@@ -8,6 +8,7 @@ class PermissionWithService extends Permission {
}
/// Defines the permissions which can be checked and requested.
@immutable
class
Permission
{
const
Permission
.
_
(
this
.
value
);
factory
Permission
.
byValue
(
int
value
)
=>
values
[
value
];
...
...
@@ -146,4 +147,18 @@ class Permission {
@override
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