aloisdeniel / Tap_builder
Licence: mit
A simple widget for building interactive areas.
Stars: ✭ 96
Programming Languages
dart
5743 projects
tap_builder
A simple widget for building interactive areas. It is an alternative to the material's Inkwell
that allows customizing the visual effects.
Quickstart
@override
Widget build(BuildContext context) {
return TapBuilder(
onTap: () {},
builder: (context, state) => AnimatedContainer(
padding: EdgeInsets.symmetric(
vertical: 10,
horizontal: 20,
),
duration: const Duration(milliseconds: 500),
decoration: BoxDecoration(
color: () {
switch (state) {
case TapState.disabled:
return Colors.grey;
case TapState.focused:
return Colors.lightBlue;
case TapState.hover:
return Colors.blue;
case TapState.inactive:
return Colors.amberAccent;
case TapState.pressed:
return Colors.red;
}
}(),
),
child: Text('Button'),
),
);
}
Example
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].