Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
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
Navaron Bracke
2023-10-22 19:50:32 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e9128f9acf553e839ac8e8dc887c5b4220ad9688
e9128f9a
1 parent
2dfd5cf1
convert encryption type to enhanced enum
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
lib/src/enums/encryption_type.dart
lib/src/enums/encryption_type.dart
View file @
e9128f9
/// Wifi encryption type constants.
enum
EncryptionType
{
/// Unknown encryption type.
///
/// Constant Value: 0
none
,
none
(
0
),
/// Not encrypted.
///
/// Constant Value: 1
open
,
open
(
1
),
/// WPA level encryption.
///
/// Constant Value: 2
wpa
,
wpa
(
2
),
/// WEP level encryption.
///
/// Constant Value: 3
wep
,
wep
(
3
);
const
EncryptionType
(
this
.
rawValue
);
factory
EncryptionType
.
fromRawValue
(
int
value
)
{
switch
(
value
)
{
case
1
:
return
EncryptionType
.
open
;
case
2
:
return
EncryptionType
.
wpa
;
case
3
:
return
EncryptionType
.
wep
;
case
0
:
default
:
return
EncryptionType
.
none
;
}
}
/// The raw value for the encryption type.
final
int
rawValue
;
}
...
...
Please
register
or
login
to post a comment