firebase / FirebaseUI-Flutter

Apache License 2.0
92 stars 79 forks source link

πŸ› Error: A value of type 'int?' can't be returned from a function with return type 'int' because 'int?' is nullable and 'int' isn't. #248

Closed salar-dev closed 5 months ago

salar-dev commented 6 months ago

Is there an existing issue for this?

What plugin is this bug for?

Firebase UI Firestore

What platform(s) does this bug affect?

iOS

List of dependencies used.

flutter pub deps -s list
  

Steps to reproduce

../../../../.pub-cache/hosted/pub.dev/firebase_ui_firestore-1.6.0/lib/src/table_builder.dart:874:71: Error: A value of type 'int?' can't be returned from a function with return type 'int' because 'int?' is nullable and 'int' isn't.

Expected Behavior

Shod Build Without any error

Actual Behavior

When Build App on ios I get this error ../../../../.pub-cache/hosted/pub.dev/firebase_ui_firestore-1.6.0/lib/src/table_builder.dart:874:71: Error: A value of type 'int?' can't be returned from a function with return type 'int' because 'int?' is nullable and 'int' isn't.

Additional Information

Flutter (Channel stable, 3.16.5, on macOS 14.1.1 23B81 darwin-arm64, locale en-IQ) β€’ Flutter version 3.16.5 on channel stable at /Users/salardev/development/flutter β€’ Upstream repository https://github.com/flutter/flutter.git β€’ Framework revision 78666c8dc5 (2 weeks ago), 2023-12-19 16:14:14 -0800 β€’ Engine revision 3f3e560236 β€’ Dart version 3.2.3 β€’ DevTools version 2.28.4

[βœ“] Android toolchain - develop for Android devices (Android SDK version 34.0.0) β€’ Android SDK at /Users/salardev/Library/Android/sdk β€’ Platform android-34, build-tools 34.0.0 β€’ Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java β€’ Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231) β€’ All Android licenses accepted.

[βœ“] Xcode - develop for iOS and macOS (Xcode 15.0.1) β€’ Xcode at /Applications/Xcode.app/Contents/Developer β€’ Build 15A507 β€’ CocoaPods version 1.14.2

[βœ“] Chrome - develop for the web β€’ Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[βœ“] Android Studio (version 2022.3) β€’ Android Studio at /Applications/Android Studio.app/Contents β€’ Flutter plugin can be installed from: πŸ”¨ https://plugins.jetbrains.com/plugin/9212-flutter β€’ Dart plugin can be installed from: πŸ”¨ https://plugins.jetbrains.com/plugin/6351-dart β€’ Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[βœ“] VS Code (version 1.85.1) β€’ VS Code at /Applications/Visual Studio Code.app/Contents β€’ Flutter extension version 3.80.0

[βœ“] Connected device (4 available) β€’ iPhone (mobile) β€’ 00008020-001A21392ED8003A β€’ ios β€’ iOS 17.1.1 21B91 β€’ iPhone 15 Pro Max (mobile) β€’ 655CBA25-15C1-4728-8CF4-9FF65CC2BFB0 β€’ ios β€’ com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator) β€’ macOS (desktop) β€’ macos β€’ darwin-arm64 β€’ macOS 14.1.1 23B81 darwin-arm64 β€’ Chrome (web) β€’ chrome β€’ web-javascript β€’ Google Chrome 120.0.6099.199

[βœ“] Network resources β€’ All expected network resources are available.

β€’ No issues found!

muhammadayed commented 6 months ago

any update related this issue ?

lesnitsky commented 6 months ago

This was fixed in #246, just not yet released. You could install the latest firebase_ui_firestore with the fix from the repo:

dependencies:
  firebase_ui_firestore:
    git:
      url: https://github.com/firebase/FirebaseUI-Flutter.git
      path: packages/firebase_ui_firestore
muhammadayed commented 6 months ago

thanks alot, working fine now

danagbemava-nc commented 5 months ago

Closing this since this issue has already been fixed.

Until the fix is released on pub.dev, anyone who runs into this issue can use https://github.com/firebase/FirebaseUI-Flutter/issues/248#issuecomment-1879270120

BirjuVachhani commented 5 months ago

When will this be published on pub.dev? I am using this in package and I can't use the git source there.

lesnitsky commented 5 months ago

It is now available on pub.