Possible to add flutter packages in custom function.
Example:
I want to import this package below package inside custom function
import 'package:cron/cron.dart';
int postCurrentLocationUsingAPI(double? amount) {
         var cron = new Cron();
         cron.schedule(new Schedule.parse('*/3  '), () async {
         print('every three minutes');
 });