v0.5.0tap_builder
상호작용 영역을 만들기 위한 간단한 위젯입니다.
113좋아요 9.1천30일 다운로드140Pub 점수
AndroidiOSWebmacOSWindowsLinux
상호작용 영역을 만들기 위한 간단한 위젯입니다.
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A simple widget for building interactive areas. It is an alternative to the material's Inkwell that allows customizing the visual effects.
@override
Widget build(BuildContext context) {
return TapBuilder(
onTap: () {},
builder: (context, state, isFocused) => AnimatedContainer(
padding: EdgeInsets.symmetric(
vertical: 10,
horizontal: 20,
),
duration: const Duration(milliseconds: 500),
decoration: BoxDecoration(
border: Border.all(
color: Colors.white.withOpacity(isFocused ? 0.2 : 0.0),
width: 2,
),
color: () {
switch (state) {
case TapState.disabled:
return Colors.grey;
case TapState.hover:
return Colors.blue;
case TapState.inactive:
return Colors.amberAccent;
case TapState.pressed:
return Colors.red;
}
}(),
),
child: Text('Button'),
),
);
}
의존성 목록 3 개
{"sdk":"flutter"}^1.0.0{"sdk":"flutter"}사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗