パッケージ、リポジトリ、アプリカテゴリを検索

GitHub リポジトリmvitlov/cli_spin

cli_spin

同期および非同期操作の両方に対して洗練されたターミナルスピンナーを表示することで、ユーザー体験を向上させるDartパッケージです。

cli_spin のプロジェクト画像
スター
9
フォーク
0
最終プッシュ(UTC)
2023/10/18
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

A Dart package that enhances the user experience by displaying a sleek terminal spinner for both sync and async operations.

preview

Features

  • 80+ predefined spinners accessible via CliSpinners
  • Easily change color of spinners and/or text with use of CliSpinnerColor helper
  • Define your own character sets (frames) and intervals for your custom spinners
  • Custom spinner text (w/ separate suffix and prefix options)
  • Start/stop methods
  • Stop and persist the spinner with custom text and symbol
  • Predefiend success, fail, warn and info methods (cross-platform compatible)

Getting started

TODO: List prerequisites and provide or point to information on how to start using the package.

Usage example

import 'dart:async';
import 'package:cli_spin/cli_spin.dart';

void main() {
  // Instantiate spinner
  final spinner = CliSpin(
    text: 'Loading data...',
    spinner: CliSpinners.line,
  ).start(); // Chaining methods

  Timer(Duration(milliseconds: 1000), () {
    // Change spinner color
    spinner.color = CliSpinnerColor.yellow; 
    
    // Change spinner text
    spinner.text = 'Still loading, please wait...';

    Timer(Duration(milliseconds: 1000), () {
      // Alias for `stopAndPersist(...)` method
      spinner.success('Data loaded successfully.');
    });
  });
}

Additional information

Inspired by the ora library written in Javascript.

Marin Vitlov GitHub avatar
GitHub 作者

Marin Vitlov ↗

Flutter ❤️

ABOUT YOU SE & Co. KGZagreb公式サイト ↗
言語Dart

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 5 件

  • ansi_strip^0.1.1+1
  • string_width^0.1.5
  • lints開発用^2.0.0
  • mocktail開発用^1.0.1
  • test開発用^1.21.0

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗