Home > OS >  smooth_compass show the default compass image for a second in flutter
smooth_compass show the default compass image for a second in flutter

Time:02-03

I am adding a compass to my flutter project and I usedthis package. but when I changed the compass image to my own, it shows the default image for a second. here is my code

 SmoothCompass(
          rotationSpeed: 200,
          height: 300,
          width: 300,
          compassAsset: Image.asset(
            "assets/images/compass1.png",
            height: 200,
            width: 200,
          ),
        )

CodePudding user response:

Fixed: this was the issue in compass package previous version this issue is now resolved in the latest version check it out smooth_compass: ^2.0.4

  1. remove previous version from pubspec.yaml.
  2. execute flutter clean & flutter pub get
  3. execute flutter pub add smooth_compass
  4. now run your flutter app
  • Related