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

screwdriver 표지
패키지 상세v5.12.0

screwdriver

개발을 간편하고 빠르게 하기 위해 유용한 확장 및 보조 함수를 제공하는 Dart 패키지입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
1천
좋아요
114
Pub 점수
160

패키지 설치

flutter pub add screwdriver

패키지 개요

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

Screwdriver는 여러 플랫폼에서 개발을 간소화하고 가속화하기 위해 유용한 확장 기능과 보조 함수를 제공하는 Dart 패키지입니다. 문자열 조작, 날짜 처리, null 안전성과 같은 일반적인 작업을 위한 유틸리티 메서드를 제공하여 반복 코드를 줄입니다. 개발자 생산성을 최우선으로 고려해 설계되어 Flutter 및 Dart 프로젝트의 가독성과 일관성을 향상시킵니다. Android, iOS, Web, macOS, Windows, Linux를 지원하여 크로스플랫폼 애플리케이션에 적합합니다.

사용 사례

  • 빠른 문자열 및 날짜 유틸리티
  • 반복 코드 줄이기
  • 크로스 플랫폼 개발
  • 널 안전성 향상
  • 코드 가독성 향상
  • 프로토타이핑 가속화

주요 기능

  • 풍부한 Dart 확장 세트
  • 널 안전한 유틸리티 함수
  • 크로스 플랫폼 호환성
  • 최소 의존성 오버헤드
  • pub를 통한 간편한 통합
  • 잘 문서화된 헬퍼

적합한 대상

  • 생산성 향상을 원하는 플러터 개발자
  • 유용한 코드를 표준화하려는 팀
  • 빠른 개발이 필요한 프로젝트
  • Dart 전용 또는 다중 플랫폼 앱
  • 깔끔하고 간결한 구문을 중시하는 개발자

고려 사항

  • 팀 간에 사용될 경우 미세한 API 변경 사항이 발생할 수 있습니다
  • 기능 향상에 국한되며, 완전한 프레임워크는 아님
  • 버전을 업그레이드할 때는 신중한 검토가 필요합니다
  • 복잡한 비즈니스 로직에 적합하지 않음
  • 기존의 코딩 표준과 함께 사용하는 것이 가장 좋습니다

원본 README

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

banner

Screwdriver

A dart package aiming to provide useful extensions and helper functions to ease and speed up development.

Tests Code Quality Codecov Pub Version Docs

  • 📋 Well Documented
  • ⚔️ Fully Tested
  • 👌 Follows Code Quality Guidelines
  • 🦾 Production Ready
  • collection included for extra extensions.

Stats

Check out EXTENSIONS.md for a complete list of all the available extensions.

Extensions:                    322
Extension Types:               4
Helper Classes:                5
Helper Functions & Getters:    29
Typedefs:                      10
Mixins:                        2

Last Updated: Fri, Aug 28, 2026 - 04:14 PM

Stats auto generated using Github Workflow.


To checkout all the available extensions, helper functions & classes, see documentation.

Installation

  1. Add as a dependency in your project's pub spec.yaml.
dependencies:
  screwdriver: <latest_version>

Note: Screwdriver exports collection package as well. So, you don't need to add collection as a dependency in your project.

  1. Import library into your code.
import 'package:screwdriver/screwdriver.dart';
  1. Use this import for using IO extensions.
import 'package:screwdriver/screwdriver_io.dart';

A Glimpse of Screwdriver

String
'hello'.capitalized; // Hello
'   '.isBlankl // true;
'45'.toIntOrNull(); // 45
'html'.wrap('<','>'); // <html>
'1010111010001'.isBinary; // true
'test@example.com'.isEmail; // true
'abcd'.reversed; // dcba
'This is a test'.words; // ['this', 'is', 'a', 'test']
'{"name":"John"}'.parseJson(); // map: {name:John}
'#hello'.removePrefix('#'); // hello
Map
final Map<String, dynamic> map = {
  'name': 'John',
  'age': 24,
};

for(final (key, value) in map.records) {
  print('$key: $value');
}
Int
20.isDivisibleBy(5); // true
0.asBool; // false
6.twoDigits; // '06'
2020.isLeapYear; // true
10.repeat((count) => print(count));
DateTime & Duration
now().isMonday;
final DateTime fiveDaysAgo = 5.daysAgo;
final Duration nineMinutes = 9.minutes;
45.minutes.isInHours; // false
15.daysAgo < 5.days.ago; // true
20.minutes.ago >= 50.minutes.ago; // true
now().previousDay; // yesterday
10.days.ago.isBetween(15.days.ago, now()); // true
Double and Bool
randomDouble(max: 50); // random double value between 0 and 50
56.0.isWhole; // true
true.toggled; // false
false.toInt(); // 0

Scope Functions
final User user = User(name: 'John').apply((user){
  user.age = 24;
  user.email = 'john@doe.com';
});
final String age = user.run((u)=> (u.age + 20).toString());
Collections
users << User(name: 'John'); // appends user to users list
users.firstOrNull;
users.drop(5);
users.takeLast(3);
user.all((u) => u.age > 18); // returns bool
cars.groupBy((car) => car.color);
cars.count((car) => car.isPorsche);
cars.random();
cars.maxBy((car) => car.price);
cars.intersect(otherCars);
{'name': 'John'} << Pair('email','john@doe.com');
Future
postDelayed(2000,(){
  print('after 2 seconds');
});
IO
file.onModified(() => print('file modified'));
file.clear(); // flushes all the data of file
file.isEmpty;
file.appendString('hello');
file << 'some text';
file1 + file2; // appends file2 content at the end of file1
Some More
check(divider != 0);
runCaching((){
  count / 0;
});
TODO('find a way to implement this properly'); // throws UnimplementedError on invocation
Triple(45,true, 'Hello World');
user.takeIf((u) => u.age > 18)?.allowAccess();
person.takeUnless((p) => p > 18)?.areTeenagers();
final DateTime date = tomorrow;
yesterday.isInDecember;

Check out EXTENSIONS.md for a complete list of all the available extensions.

Checkout documentation for more details.

Features and bugs

Please file feature requests and bugs at the issue tracker.

Liked Screwdriver?

Show some love and support by starring the repository.

Or You can

Buy Me A Coffee

License

Copyright (c) 2020, Birju Vachhani
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
   contributors may be used to endorse or promote products derived from
   this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

카테고리

의존성

의존성 목록 7 개

소스 저장소

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

아직 데이터가 없습니다.