Getting this error for build failure:
error build: ../../../development/flutter/.pub-cache/hosted/pub.dev/bubble_bottom_bar-2.0.0/lib/bubble_bottom_bar.dart:195:14: Error: ‘Badge’ is imported from both ‘package:badges/src/badge.dart’ and ‘package:flutter/src/material/badge.dart’.
Using code from https://codecanyon.net/item/flyweb-for-web-to-app-convertor-flutter-admin-panel-v10/26840230
Can anyone suggest where and what needs to be edited to get this issue resolved.
Have tried updating the Flutter with following commands
Flutter clean
Flutter pub get
Have also reinstalled pods for ios and still failing to build on Flutter build ios
2
Answers
Badge
is coming from bothmaterial
andbadge
package. Flutter material provide by default.If you wish to use the package one, you can do
Now to use it, call
badge.Badge(...
.The
Badge
is being imported from both material.dart and badges.dart which is a dependency of the bubble_bottom_bar. The following worked for me:In the
bubble_bottom_bar.dart
, I modified the library and changed the import of material.dart as follows: