mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 03:02:22 +01:00
24 lines
554 B
Dart
24 lines
554 B
Dart
import 'dart:convert';
|
|
import 'dart:io';
|
|
|
|
extension ProcessExtension on Process {
|
|
Stream<String> get stdOutput => this.stdout.expand((event) => utf8.decode(event, allowMalformed: true).split("\n"));
|
|
|
|
Stream<String> get stdError => this.stderr.expand((event) => utf8.decode(event, allowMalformed: true).split("\n"));
|
|
}
|
|
|
|
extension StringExtension on String {
|
|
bool get isBlankOrEmpty {
|
|
if(isEmpty) {
|
|
return true;
|
|
}
|
|
|
|
for(var char in this.split("")) {
|
|
if(char != " ") {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return true;
|
|
}
|
|
} |