패키지, 저장소 및 앱 카테고리 검색

패키지 상세v3.0.1

humanizer

다트 값들을 인간 친화적인 표현으로 변환하는 라이브러리입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
8.9천
좋아요
54
Pub 점수
155

패키지 설치

flutter pub add humanizer

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Humanizer는 값들을 인간이 읽기 쉬운 형식으로 변환하는 Dart 라이브러리로, 데이터를 더 접근 가능하고 사용자 친화적으로 만듭니다. 숫자, 날짜, 문자열을 자연어 표현으로 변환할 수 있으며, 타임스탬프를 '2분 전'이나 숫자를 '1.2K'로 바꾸는 등의 기능을 지원합니다. 다양한 플랫폼의 앱에서 UI 명확성을 향상시키는 데 이상적이며, 로컬라이제이션을 간소화하고 직관적인 방식으로 정보를 제공함으로써 사용자 경험을 강화합니다. 패키지는 가볍고 Flutter 프로젝트와 원활하게 통합됩니다.

사용 사례

  • 사용자 인터페이스에서 타임스탬프 형식 지정
  • 큰 숫자를 읽기 쉬운 형식으로 변환하기
  • 숫자 데이터의 접근성 향상
  • 로그 가독성 향상
  • 앱에서 날짜 표시 간소화

주요 기능

  • 숫자를 K/M/B 표기법으로 변환합니다
  • 지금 시점 기준으로 날짜를 형식화합니다
  • 복수 및 문법 지원
  • 문자열의 케이스 변환을 제공합니다
  • Flutter와의 간편한 통합

적합한 대상

  • Flutter 개발자
  • 로컬라이즈된 텍스트가 필요한 앱
  • 데이터 시각화 도구
  • 사용자 친화적인 대시보드
  • 접근성 중심 애플리케이션

고려 사항

  • 텍스트 서식 지정 유틸리티에 제한됨
  • 복잡한 국제화를 처리하지 않음
  • 경계 사례에 대한 수동 처리가 필요합니다
  • 영어 이외의 로케일에 대한 내장 지원 없음
  • 일관된 입력 형식에 의존함

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Humanizer

pub package

All Contributors

What?

A Dart library to convert values into human-friendly representations.

Why?

When writing user interfaces we often want to present data we have in a raw format in a way that makes sense to the end user, but doing so is often non-trivial. This library aims to make such conversions easy and flexible.

Where?

Firstly, install the humanizer package, then you can import Humanizer into your Dart code as follows:

import 'package:humanizer/humanizer.dart';

How?

This library has a broad API surface, and in fact has multiple API layers as discussed here. The following table gives a high level overview of the various features, with links to deeper discussion:

Feature Description
Approximate time Converts a Duration to a human-friendly approximation.
Cardinal numbers Converts an integral value to cardinal form (one, two, three etc).
Ordinal numbers Converts an integral value to ordinal form (1st / first, 2nd / second etc).
Plurality Alters the plurality of an input word.
String casing Converts input strings to Sentence case or Title Case.
String truncation Intelligently truncates input strings.
Symbols Converts programming symbol names into human-friendly representations.
Units of measurement Provides types to represent common units of measurement and the ability to convert those types to a human-readable form.

Note that whilst this library is locale-aware, it currently only includes an English implementation.

Who?

Thanks goes to these wonderful people (emoji key):


Kent Boogaart

💻

Arun Prakash

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Special thanks to these inspirational open source libraries:

카테고리

의존성

의존성 목록 4 개

소스 저장소

이 패키지를 사용하는 프로젝트