inkwell function

void inkwell(
  1. BuildContext context, {
  2. Widget? transfer,
  3. String? link,
})

Implementation

void inkwell(BuildContext context, {Widget? transfer, String? link}) async {
  if (transfer != null) {
    Navigator.push(
      context,
      MaterialPageRoute(builder: (context) => transfer),
    );
  }
  if (link != null) {
    Uri uri = Uri.parse(link);
    if (!await launchUrl(uri)) {
      throw Exception('Could not launch $uri');
    }
  }
}