log_symbols

log_symbols

Dart package to use modern and beautiful symbols in the terminal. Suitable with almost all terminal packages.

Pub Version Coverage Status License

Install

# recommened install
dart pub add log_symbols --dev

Usage

Import log_symbols into your file.

import 'package:log_symbols/log_symbols.dart';

void main() {
    print('${LogSymbols().success()} Log Symbols working...'); // remove this after work
}

That's all. Now you can start using other symbols!

import 'package:log_symbols/log_symbols.dart';
import 'package:my_audio/my_audio.dart';

void playAudio(String url) {
    final Audio play = Audio.play(url);
    play.then(() => print('${LogSymbols().play()} Succesfully played song.'));
}

With other packages

log_symbols can also be used with other packages.

import 'package:log_symbols/log_symbols.dart';
import 'package:ansi_styles/ansi_styles.dart';

bool isUsernameValid(String username) {
    if (username.includes('@') || username.includes(' ') || username.includes('%') /* ... */) {
        print(AnsiStyles.red('${LogSymbols().error()} Username is invalid'));
        return false;
    } else {
        print(AnsiStyles.green('${LogSymbols().success()} Username is valid'));
        return true;
    }
}

Example

See example for see usage example

Changelog

See changelog for more information.