On Click

Getting started

To install, onpen pubspec.yaml file and add to dependencies

dependencies:
  ...
  on_click ^1.1.4

Or open terminal and write following command

flutter pub add on_click

Usage

After installing import package

import 'package:on_click/on_click.dart';
Container(
  height: 100,
  width: 250,             
  color: Colors.amber,
  child:const Text('Click here'),
).onClick(() { 
  print('Clicked');
})

to use multiple functions simultaneously

Container(
  height: 100,
  width: 250,             
  color: Colors.amber,
  child:const Text('Click here'),
).onClick(() { 
  print('Clicked');
  
}).onDoubleClick((){
  print("Double click");
})