I have a very frustrating problem in which two different packages define same function name showModalBottomSheet
I was(am) using this awesome flutter package https://pub.dev/documentation/country_code_picker which has a transitive dependency modal_bottom_sheet that defines showModalBottomSheet.
After upgrading to last flutter version 3.7 I cannot run my app because flutter material defines itself another showModalBottomSheet function. This creates compilation errors because doesn't know which one to use from the 2 different imports.
Error (Xcode): ../../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib/src/bottom_sheets/bar_bottom_sheet.dart:102:13: Error: 'ModalBottomSheetRoute' is imported from both 'package:flutter/src/material/bottom_sheet.dart' and 'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
Is there a way to to configure pubspec and say it to ingore https://pub.dev/packages/modal_bottom_sheet from all the transitive dependencies ?
That way I avoid the issue and the app will run fine.
PS: I looked into other Newer libraries for country picker but they did not support all the features of the existing ones so best and shortest solution would be to ignore(not install) the package above