v0.5.0tap_builder
インタラクティブな領域を構築するためのシンプルなウィジェット。
113いいね 906030日間ダウンロード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 ↗