1
onTap: () async {
  final url = products[index].url;

  if (!await canLaunch(url)) {
    await launch(url);
  } else {
    throw 'Could not launch $url';
  }

错误 :

I/UrlLauncher(20613): component name for https://www.crucial.in/products/memory/desktop-dram is {com.android.chrome/com.google.android.apps.chrome.IntentDispatcher}
E/flutter (20613): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Could not launch https://www.crucial.in/products/memory/desktop-dram
E/flutter (20613): #0      HomeScreen.build.<anonymous closure>.<anonymous closure>
package:crucial/screens/home_screen.dart:52
E/flutter (20613): <asynchronous suspension>
4

0 回答 0