Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
rk0cc committed Jul 13, 2024
1 parent efbb25e commit 3cb7ab3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 4 additions & 2 deletions superuser/lib/mock.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/// values when performing debugs or testing.
library mock;

import 'package:superuser_interfaces/superuser_interfaces.dart' show SuperuserInterface;
import 'package:superuser_interfaces/superuser_interfaces.dart'
show SuperuserInterface;

export 'package:superuser_interfaces/superuser_interfaces.dart' show MockSuperuser;
export 'package:superuser_interfaces/superuser_interfaces.dart'
show MockSuperuser;
2 changes: 1 addition & 1 deletion superuser/lib/src/instance.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ abstract final class SuperuserInstance {
///
/// If [suInterface] is `null`, it binds platform specified
/// [SuperuserInterface] automatically.
///
///
/// When this invoked in neither Windows, macOS or Linux platform,
/// it throws [UnsupportedError].
void bindInstance(SuperuserInterface? suInterface) {
Expand Down
11 changes: 6 additions & 5 deletions superuser/lib/superuser.dart
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
/// Fundamental library for fetching superuser status.
///
///
/// It only offers [Superuser] class to access superuser conditions
/// as well as username who run current Flutter program.
library superuser;

export 'package:superuser_interfaces/superuser_interfaces.dart'
show SuperuserInterface;

import 'package:superuser_interfaces/superuser_interfaces.dart' show MockSuperuser;
import 'package:superuser_interfaces/superuser_interfaces.dart'
show MockSuperuser;

import 'src/instance.dart';

/// A wrapper class that extract status of superuser as well as username.
///
///
/// By default, [Superuser] will load instance for specific platform automatically.
/// If mock data is required, please attach [MockSuperuser] into [bindInstance]
/// before calling any getters in [Superuser].
Expand All @@ -24,11 +25,11 @@ abstract final class Superuser {
static bool get isSuperuser => SuperuserInstance.instance.isSuperuser;

/// Determine this program is running with superuser role.
///
///
/// If this getter called in UNIX platforms (macOS or Linux),
/// it is an alias getter of [isSuperuser] since `root` is one and only
/// user can be represented as superuser.
///
///
/// For Windows platform, it consider this process has been elevated
/// or not.
static bool get isActivated => SuperuserInstance.instance.isActivated;
Expand Down

0 comments on commit 3cb7ab3

Please sign in to comment.