v4.1.0
console
콘솔 애플리케이션에 필요한 일반적인 기능을 제공하는 라이브러리로, 색상 형식 지정, 키보드 입력 및 진행률 표시줄이 포함됩니다.
70좋아요 18.3만30일 다운로드120Pub 점수
AndroidiOSmacOSWindowsLinux
콘솔 라이브러리
^2.1.0^1.16.8^1.11.0아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A high-level console library.
This library does not work in browsers (for a hopefully obvious reason).
import "package:console/console.dart";
void main() {
// Initialize the Console. Throws an exception if advanced terminal features are not supported.
Console.init();
// Use the library...
}
You can test the output produced by this library (and thus your own project that uses this library). Here is an example:
import "package:test/test.dart";
import "package:console/console.dart";
void main() {
final output = new BufferConsoleAdapter();
setUpAll(() => Console.adapter = output);
// Clear output between test runs
setUp(() => output.clear());
group('base functions', () {
test('centerCursor', () {
Console.centerCursor();
expect(output.toString(), '${Console.ANSI_ESCAPE}10;40H');
});
});
}