-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
860 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:flutter/foundation.dart'; | ||
import 'package:meta/meta.dart'; | ||
|
||
@internal | ||
bool get kUnderDevelop => | ||
kDebugMode || Platform.environment.containsKey("FLUTTER_TEST"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## 2.1.0 | ||
|
||
* Add user groups getter. | ||
|
||
## 2.0.0 | ||
|
||
* Mark `SuperuserInterface` final | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import 'dart:io'; | ||
|
||
/// Indicate any errors encountered when fetching properties | ||
/// in [SuperuserInterface]. | ||
class SuperuserProcessError extends Error implements OSError { | ||
/// Error code returned from native library. | ||
@override | ||
final int errorCode; | ||
|
||
/// Message to explain [errorCode]. | ||
@override | ||
final String message; | ||
|
||
/// Create [SuperuserProcessError] with given [errorCode]. | ||
/// | ||
/// Optionally, provide a [message] for further explaination | ||
/// of error. | ||
SuperuserProcessError(this.errorCode, [this.message = ""]); | ||
|
||
@override | ||
String toString() { | ||
StringBuffer buf = StringBuffer(); | ||
|
||
buf.write("SuperuserProcessError: "); | ||
|
||
if (message.isNotEmpty) { | ||
buf | ||
..write(message) | ||
..write(" (error code: $errorCode)"); | ||
} else { | ||
buf.write("process return with error code $errorCode"); | ||
} | ||
|
||
return buf.toString(); | ||
} | ||
} |
Oops, something went wrong.