简体   繁体   中英

bottom navigation bar pub.dev packages doesn't work with me Flutter

I've tried to use different packages from pub.dev for navigation bar such as this one https://pub.dev/packages/curved_navigation_bar . but ALL of the packages give me an error when I import them although I've been working on this project for a while now and I used various packages they're all working fine.

Does anyone know what the problem is or if the problem from the packages or from my project?

these are some more of the packages I tried to use https://pub.dev/packages/awesome_bottom_navigation https://pub.dev/packages/persistent_bottom_nav_bar_v2

this my pubspec.yaml

name: flame description: A new Flutter project.

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

build suffix. version: 1.0.0+1

environment: sdk: '>=2.18.0 <3.0.0'

dependencies: flutter: sdk: flutter

cupertino_icons: ^1.0.2 firebase_core: ^1.21.1 fl_country_code_picker: ^0.0.1 flutter_easyloading: ^3.0.5 flutter_contacts: url_launcher:

#Firebase packages will be down here font_awesome_flutter: ^10.1.0 image_picker: ^0.8.5+3 firebase_database: ^9.1.3 permission_handler: ^10.0.0 getwidget: ^3.0.1 http: ^0.13.5 uuid: ^3.0.6 flutter_launcher_icons: ^0.10.0 google_maps_flutter: ^2.2.0 fab_circular_menu: ^1.0.2 flutter_google_places: ^0.3.0 google_place: ^0.4.7 geocode: ^1.0.2 dio: ^4.0.6 location: ^4.4.0 get: ^4.6.1 firebase_auth: ^3.8.0 modal_bottom_sheet: ^2.1.2 flutter_bloc: #search_place_autocomplete: ^0.1.1 flutter_riverpod: lottie: ^1.4.2 geolocator: ^9.0.1 flutter_polyline_points: ^1.0.0 google_maps_webservice: ^0.0.20-nullsafety.5 flutter_svg: ^1.1.5 jiffy: ^5.0.0 shared_preferences: ^2.0.15 firebase_storage: ^10.3.8 cloud_firestore: ^3.4.7 fluttertoast: ^8.0.9 custom_marker: ^1.0.0 contacts_service: ^0.6.3 flutter_local_notifications: ^9.2.0 firebase_messaging: ^13.0.3 workmanager: ^0.5.0 push: ^0.1.3 awesome_notifications: ^0.6.21 awesome_bottom_navigation: ^0.0.4 curved_navigation_bar:

intl: ^0.17.0 flutter_sms: ^2.3.3

dev_dependencies: flutter_test: sdk: flutter

flutter_lints: ^2.0.0

flutter_icons: android: true ios: true image_path: "assets/filledLogoBackgroundWhite.png"

uses-material-design: true

this: assets: - assets/

hope you are fine,

You need to add more info about the problem, because here we don't understand where the problem exactly is, more explanation will be useful.

First package you mentioned and it works fine! screeenshot , source code screenshot

The problem was that pubsepc.lock does not add the new dependency when adding it to pubspec.yaml

I pressed the download icon in the top right corner of the pubspec.yaml, the ctrl+s and writing flutter pub get in the terminal wasn't enough.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM