搜索插件、代码仓与 APP 分类

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 ↗