Posts

Republishing the existing packages with the new one

 Sometimes, you're using third party packages/plugins and the author is not updating the package anymore to be compatible with the latest flutter packages.. But you're using that package in a whole lots of your project and you don't want to use a similar packages, here is what you should do. Download the source code from the provided git repo or go to your project and browse the package if the git repo is not available anymore. Open pubspec.yaml file and change the name Find the old name in all files and replace it with a new name. Close the IDE and reopen it. Try to build the example project to device to make sure that the new name is working. Call dart pub publish --dry-run to check whether there are errors with the new name Finally dart pub publish to publish a new package

Downgrading flutter package

 flutter pub clean to clean the build Inside the pubspec.yaml file, go to your package name and remove caret ' ^ ' which tells to use the specific version only.

Publishing packages to pub.dev

 https://dart.dev/tools/pub/publishing dart pub publish --dry-run dart pub publish

Enabling the windows, macos support in flutter

flutter upgrade to upgrade the flutter to the latest version flutter config --enable-windows-desktop  flutter config --enable-macos-desktop  flutter config --enable-linux-desktop flutter create --platforms=windows,macos,linux

Appstore Flutter common errors

OneSignal module not found Add the following in the PodFile just before post_install do |installer| line target 'OneSignalNotificationServiceExtension' do  use_frameworks! pod 'OneSignal', '>= 2.9.3', '< 3.0'  end

Appstore upload tips

Upload Error ERROR ITMS-90208: "Invalid Bundle. The bundle Runner.app/Frameworks/App.framework does not support the minimum OS Version specified in the Info.plist." Basically, setting the version from 8 to 9 in ios/Flutter/AppFrameworkInfo.plist's MinimumOSVersion did the trick. XCode > Runner > Deployment Target > 9.0 Project > iOS > Flutter > App.Framework > info.plist > MinimumOSVersion > 9 Project > iOS > Flutter > Flutter.Framework > info.plist > MinimumOSVersion > 9

Cleaning flutter builds

Clear the flutter build cache flutter clean Clear all the plugins in pubspec.yaml flutter pub cache repair