'Flutter onPressed link instagram profile url with http

How can i use my api instagram link field, when I click it, it will open the instagram page or any url?

now my widget variable giving this error
The argument type 'Null Function(dynamic)' can't be assigned to the parameter type 'void Function()'.

  IconButton(
               icon: FaIcon(FontAwesomeIcons.facebook),
               onPressed: (widget.company.social_instagram.toString()) { print("Pressed"); }
           ),


Solution 1:[1]

import 'package:url_launcher/url_launcher.dart';
IconButton(
               icon: FaIcon(FontAwesomeIcons.facebook),
               onPressed: () { 
               print(Uri.parse(widget.company.social_instagram.toString()));
               launchUrl(Uri.parse(widget.company.social_instagram.toString()));
               print("Pressed"); 
}
           ),

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1