Flutter Firebase Storage not woriking: no default bucket

Solution 1:

The solution was rather simple: I needed to add the storageBucket in my FirebaseOptions so my main looks like this:

Future main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
    options: kIsWeb || Platform.isAndroid
        ? FirebaseOptions(
            apiKey: "my-app-key",
            appId: "my-app-id",
            messagingSenderId: "my-messaging-sender-id",
            projectId: "my-project-id",
            storageBucket: "myapp.appspot.com",
          )
        : null,
  );
  runApp(
    const App(),
  );
}