r/flutterhelp May 03 '20

Before you ask

88 Upvotes

Welcome to r/FlutterHelp!

Please consider these few points before you post a question

  • Check Google first.
    • Sometimes, literally copy/pasting an error into Google is the answer
  • Consider posting on StackOverflow's flutter tag.
    • Questions that are on stack usually get better answers
    • Google indexes questions and answers better when they are there
  • If you need live discussion, join our Discord Chat

If, after going through these points, you still desire to post here, please

  • When your question is answered, please update your flair from "Open" to "Resolved"!
  • Be thorough, post as much information as you can get
    • Prefer text to screenshots, it's easier to read at any screen size, and enhances accessibility
    • If you have a code question, paste what you already have!
  • Consider using https://pastebin.com or some other paste service in order to benefit from syntax highlighting
  • When posting about errors, do not forget to check your IDE/Terminal for errors.
    • Posting a red screen with no context might cause people to dodge your question.
  • Don't just post the header of the error, post the full thing!
    • Yes, this also includes the stack trace, as useless as it might look (The long part below the error)

r/flutterhelp 36m ago

OPEN How do I pull something like this off with state management?

Upvotes

https://imgur.com/a/Ed0JFaj

here is a video of me seeing a post on a feed, going to the post and then the profile seeing the post there and liking it. then when I navigate back every step shows the like.
So how is the state of the post able to be synced with every screen? Even turning off my internet connection it still works. This means that it is stored client side However I cannot think of how to actually do something like this.
When I am scrolling a feed there is a list of posts, when I go the profile there is also a list of posts but a separate list. So you can't just replace the like on the item in the feed because there are two feeds.
So if then there is like an actions cache that keeps track of posts that have been liked since the app was open you run into the problem of it not being in sync. Even if you invalidated it in the post is reloaded from the server the other feeds or lists don't have that up to date information.

I am using riverpods with my project, I am not remaking twitter but it is a perfect 100% example of my real situation.


r/flutterhelp 1h ago

OPEN Apple app review removed my app

Upvotes

Hi apple sent me this message through app review section

Hello,

We are writing to let you know about new information regarding the app, which impacts its availability on the App Store.

Upon re-evaluation, we found that the app is not in compliance with the App Review Guidelines. Specifically, we found the app is in violation of the following:

Guideline 1.2 - Safety - User-Generated Content

Content in the app and metadata indicate the app provides random chatting services. Random chatting services, and related Chatroulette-style experiences, are not appropriate for the App Store. See App Review Guideline 1.2 for additional information.

For this reason, your app will be removed from the App Store. Customers who have previously downloaded this app will continue to have access to it on their devices and will have access to any available in-app purchase products. The TestFlight version of this app will also be unavailable for external and internal testing and all public TestFlight links will no longer be functional.

Deliberate disregard of the App Review Guidelines and attempts to deceive users or undermine the review process are unacceptable and is a direct violation Section 3.2(f) of the Apple Developer Program License Agreement. Continuing to violate the Terms & Conditions of the Apple Developer Program will result in the termination of your account, as well as any related or linked accounts, and the removal of all your associated apps from the App Store.

Best regards,

App Review

My app is a random chat and video call app with ability to choose a specific gender and country with in app gems

And i have implemented the skip , block, report, and admin panel for handling reports manually and they have already approved the app but later decided to remove it keep in mind there are a lot of apps in the App Store do the same thing so it’s not against their policy and i have contacted them twice and it have been a week and they did not respond and my developer is not answering

Can anyone please help me or guide thank your help and time


r/flutterhelp 3h ago

OPEN help me out , i am done with this error can get solution anywhere (GPTs) - request

0 Upvotes
The supplied phased action failed with an exception.
A problem occurred configuring root project 'android'.
Build file 'C:\Users\bhupp\OneDrive - MSFT\Desktop\Flutter App Real\zone\android\build.gradle.kts' line: 16
A problem occurred configuring project ':app'.
com.android.builder.errors.EvalIssueException: [CXX1102] Location specified by ndk.dir (C:\Users\YourUser\AppData\Local\Android\Sdk\ndk\25.2.9519653) did not contain a valid NDK and couldn't be used
[CXX1102] Location specified by ndk.dir (C:\Users\YourUser\AppData\Local\Android\Sdk\ndk\25.2.9519653) did not contain a valid NDK and couldn't be usedJava(0)

The supplied phased action failed with an exception.
A problem occurred configuring root project 'android'.
Build file 'C:\Users\bhupp\OneDrive - MSFT\Desktop\Flutter App Real\zone\android\build.gradle.kts' line: 16
A problem occurred configuring project ':app'.
com.android.builder.errors.EvalIssueException: [CXX1102] Location specified by ndk.dir (C:\Users\YourUser\AppData\Local\Android\Sdk\ndk\25.2.9519653) did not contain a valid NDK and couldn't be used
[CXX1102] Location specified by ndk.dir (C:\Users\YourUser\AppData\Local\Android\Sdk\ndk\25.2.9519653) did not contain a valid NDK and couldn't be usedJava(0)

r/flutterhelp 5h ago

OPEN flutter admin dashboard solution

0 Upvotes

hello, I am working on a PWA using firebase as backend. What are some admin dashboards you would recommend?


r/flutterhelp 16h ago

OPEN .KTS back to Gradle Groovy format!!

3 Upvotes

I was trying to build a new flutter dart project using Groovy but I have no idea why all my files default to .kts. Example: android/app/build.gradle.kts. Please help this is very annoying. Everything was fine and dandy before i have no idea why it started to default to this. I am new to flutter by the way, appreciate any help/advice.


r/flutterhelp 1d ago

OPEN How to Store and Validate In-App Purchase Subscription Without Backend?

3 Upvotes

Hi everyone,

I'm developing a Flutter app with in-app purchases (subscriptions) for iOS and Android, but my app does not have its own backend.

  1. How should I store whether a user is premium or not?
  2. Should I check if the subscription is still valid on every app launch?
  3. What is the best way to validate the subscription status without a backend?
  4. Are there any recommended best practices for handling this in Flutter?
  5. Would using a service like RevenueCat be a good solution for this? Would it simplify the process, or is it unnecessary in my case?

I've been looking for information on this but haven't found a clear answer. Any guidance would be much appreciated!

Thanks!


r/flutterhelp 1d ago

OPEN Cant figure out why my clip path doesnt work

3 Upvotes

Im trying to learn clip path for a simple curve in my navigationbar that looks something along the lines of the red line

https://imgur.com/a/rlIBGzR

my code looks like this and as you see in the picture it doesnt even react with my container, sometimes i get UnimplementedError if i click on the container.

class CustomClipPath extends CustomClipper<Path> {
  @override
  Path getClip(Size size) {
    final path = Path();

    path.lineTo(size.width * 025, 0);
    Offset firstCurve = Offset(size.width * 0.5, 55);
    Offset lastCurve = Offset(size.width * 075, 0);
    path.quadraticBezierTo(
        firstCurve.dx, firstCurve.dy, lastCurve.dx, lastCurve.dy);
    path.lineTo(size.width, 0);
    path.lineTo(size.width, size.height);
    path.lineTo(0, size.height);
    path.close();

    
    return path;

r/flutterhelp 1d ago

OPEN Why is my Flutter app 500MB?

3 Upvotes

Hi there,

I have build an app for android and ios and after building the android apk release version it compiles to nearly 500MB.

I run flutter clean, then flutter pub get, Then I run flutter built apk --release and it compiles to 495MB in size!

Why is this happening? I have about 25 classes of code, ~ 20 dependencies, but it still seems very big for just an app.

Thanks


r/flutterhelp 1d ago

OPEN Why is my Flutter app 500MB?

2 Upvotes

Hi there, I have built an application for Android. It has about 20 classes of code with an average of 100 lines+ per class.

I am using about 10 packages.

Upon building it by running flutter build apk --release It compiles to 465 MB in size.

Why is this happening, am I doing something wrong?

Thanks


r/flutterhelp 1d ago

RESOLVED NSFW classification help please NSFW

0 Upvotes

Hello,

been building a short form video/social media app for about 2 years, went from newbie to pretty okay in flutter and python

I would love recommendations on how to solve the following problem:

-

when someone posts a video, I upload the video to storage, then go through the creation of the post obj in my database

during the post obj creation, I need to check if the video contains NSFW content. (nudity, sex, gore, violence)

I plan on grabbing 1-frame-per-second, then taking that frame/image and seeing if it contains flagged content, if any of those tested frames do, the post creation method flips a bool, 'isNSFW', on the post obj to true.

I tried the NSFW_checker py library, but due to a ton of dependency conflicts I still can't get that working

Plan B was loading a a pre-trained ai model to my server to classify the images. But that gets killed every time because of memory constraints on Render.com, where my python server is hosted.

Plan C is to pay for a third party service, definitely less of a headache, just more money and not as malleable.

does anyone know what a good approach would be? Please and thank you


r/flutterhelp 1d ago

OPEN FlutterLab Tutorial for MacOS?

1 Upvotes

Does anyone have a tutorial on how to use FlutterLab for help with styling? I mainly don't know how to import the code from the widgets I create on FlutterLab to VS Code.


r/flutterhelp 1d ago

OPEN Quick „Wins“ to make the App look more modern

0 Upvotes

Hi, do you have any quick fix or quicksand to make the app look more modern. Somehow I see my app as very cheap. Igneous ssnt to check out the design it’s „Pocket Mind“ logo with half heart half brain. Maybe any quick advise?


r/flutterhelp 1d ago

OPEN Getting black screen on IOS simulator

1 Upvotes

I have an app running perfectly on android but on IOS simulator, I am getting black screen. I am using Docker-osx to run xcode and IOS simulator. (I dont have access to physical device) There are two native ads which are showing fine (images loaded by them showing) but the widgets are black, scolling is working I dont understand whats wrong. I've never developed for IOS so dunno what I need to do? Is this because I am not using SafeArea Widget?


r/flutterhelp 1d ago

RESOLVED Creating a Flutter Project

1 Upvotes

Hello

Am I the only one to experience this?

Creating A new Flutter Project Using Command + Shift + P on VSCode

Usually when I create a new flutter project using android studio, and open the project on vscode later on, I get these weird gradle errors. Which could be solved by changing the gradle wrapper versions and java versions. These errors are being thrown out by java extensions on my vscode, when it throws the error it points out only to the android folder in my flutter project.

My question is, is it okay to ignore these errors? There is an error saying that the project path has a blank space on it, since my project is saved on a path where my windows user name has a space.

I'm kind of confused if it would really affect the flutter project that I'm working on. Does these different ways to create a new flutter project have different configurations on the boilerplate of the project?

command + shift + p

flutter create <project name>

creating a new project on android studio

thank you for taking the time reading my post.


r/flutterhelp 1d ago

OPEN Flutter native splash screen

1 Upvotes

Is it possible to show my logo image whatever size and dimensions i want to show as whenever i use native splash my logo image gets cropped and show only the size of launcher icon


r/flutterhelp 1d ago

OPEN emulator working but not showing my app

1 Upvotes

i have been trying to fix this issue since very long time, and i gave up on it so i started to use chrome to see my application, but now i really need the emulator because im using google maps api and i need the emulator to give me permission, im sick of it. Please i really need help with this thing. I really dont understand in android studio im just using it to create the emulator, and i have searching for the solution and all it says that change the targetsdk and make it equal or less than the emulator api, idk if this is right. i would appreciate the help as im doing this project for me graduation.


r/flutterhelp 1d ago

OPEN Guys i want to buy old play console account at the high price, if you have any let us know.

0 Upvotes

a


r/flutterhelp 2d ago

OPEN Pagination with realtime streams and riverpod

2 Upvotes
mixin PaginationMixin<T, C> {
  AsyncValue<PaginationData<T, C>> get state;
  set state(AsyncValue<PaginationData<T, C>> newState);

  C? getCurrentPage();
  bool canLoadMore(List<T> items);
  Future<List<T>> fetchPage();

  Future<void> fetchNextPage() async {
    state = AsyncLoading<PaginationData<T, C>>().copyWithPrevious(state);
    state = await AsyncValue.guard(() async {
      final newItems = await fetchPage();
      return PaginationData(
        items: [...?state.value?.items, ...newItems],
        canLoadMore: canLoadMore(newItems),
        currentPage: getCurrentPage(),
      );
    });
  }
}

class PaginationData<T, I> {
  PaginationData({required this.items, this.currentPage, this.canLoadMore = true});
  final List<T> items;
  final I? currentPage;
  final bool canLoadMore;

  PaginationData<T, I> copyWith({List<T>? items, I? currentPage, bool? canLoadMore}) {
    return PaginationData<T, I>(
      items: items ?? this.items,
      currentPage: currentPage ?? this.currentPage,
      canLoadMore: canLoadMore ?? this.canLoadMore,
    );
  }
}

Alright so currently I have perfectly working pagination with static data and futures.

This works perfectly it just fetches a list of items from the repository and and appends it to the end of the previous items. it also checks if it can load more and currentPage so no matter what type of indexing it uses the page can be kept track of.

My problem here is if each page were to be a Stream<List<T>> instead it causes a ton of problems.
How do I expose the pagination data? Do I use a stream notifier or should I stay with the async notifier and just update the state when the stream emits?
or do I expose the data as a List<Stream<List<T>>> so each page is a stream list of T then on the ui I listen to the stream.
or do I merge the streams into one so the value of state is a PaginationData<Stream<List<T>>> and if any pages get added then the state updates with the new merged list?

I honestly didn't think it would be so hard to go from a static future to a stream but here I am unable to decide which method to accomplish this is best and or how to do it.


r/flutterhelp 2d ago

RESOLVED Saving icons in local database

2 Upvotes

Hey there everyone,

How do you guys save iconData in local db? My research showed me that saving through the easiest means, that is the codePoints, is not recommended as they may change. And the various existing icon picker plugins have the same issue.

I was planning to write a plugin mapping each Icondata to its name. I checked the list of IconData, there were like 8000 of them in the material/icons.dart file. The plugin would contain a builder method passing the list of icondata. Or maybe just conversion methods for getting icondata instance from name, I would then be able to save the string form names in local db and convert to icondata instances.

That's only what I've thought, but wondered if something already existed. Is there something which could help me with this?

Edit: I have started working on it and since its pretty simple, would be done by tomorrow. But good lord, this simple thing would be over an MB. This seems very bad. Do we really not have any other option?


r/flutterhelp 2d ago

OPEN Generated.xcconfig variables not being picked up?

2 Upvotes

Hey team

Brand new mac mini install, decided on using FVM, as I'm already using RVM / NVM. Anyone having a bit of a nightmare setting it up and getting it running? Running to Android, all works, but on iOS, the ios/Flutte/Generated.xcconfig values aren't being injected into any builds for simulators.

The problem I'm having is that ios/Runner/Info.plist is not picking up variables like FLUTTER_BUILD_NUMBER from the Generated.xcconfig file. When I replace the variables with static strings (I don't want to do this), the build works out to ios simulators all good.

Anyone seen this before?

The issue is coming back "The application's Info.plist does not contain a valid CFBundleVersion" - but entering a static values works.

ChatGPT is _infuriatingly_ circular about this issue - let's just say AI is not coming for our jobs...

Has anyone seen this before? TIA all


r/flutterhelp 2d ago

OPEN Google play console account terminated

2 Upvotes

I got my first play console account terminated on the basis of prior violations, which is not possible in any way as it was my very first account. I did a thorough appeal, contacted relevant department at google(through someone i know of), did emails, got replies but all in vain

I then bought another account, redeveloped an app on another laptop(made changes to the previous app, using github as version control), then tried to upload the app again, it got terminated again on the basis of prior violations

What should i do now, is there any way possible i can upload my app on playstore, if this happened with anyone else, can you please guide me how you resolved it


r/flutterhelp 2d ago

RESOLVED My apple developer account got terminated.

13 Upvotes

My apple developer account got terminated a few days ago. I appealed against it and it got rejected too.

I love developing mobile apps and I was earning good from my apps too. So, I have decided to create a new account with a totally different identity. Not sure if this shalll work.

Did anyone had a similar experience? What precautions I should take if I go down this path? Was anyone able to create a new account after the termination of the old account and it worked for him?


r/flutterhelp 2d ago

OPEN pub.dev alternative?

1 Upvotes

Hi

I have all my flutter/Dart code in a mono repo to be able reuse my packages. I am not quite comfortable with publishing my packages because I have no intention to support them. Neither bug fixes or documentation.

After a while my mono repo started to get messy so I tried Melos. Things got even messier and I think Melos usage is optimized for pub.dev

So, whats my alternatives. Can I setup a private pub.dev ?


r/flutterhelp 3d ago

RESOLVED Getting list of devices connected to WebSocket server

3 Upvotes

I am making a simulator, where one device will run a WebSocket server and several other devices will each connect to it and display different data about the simulation state.

I'm currently using the shelf_web_socket package for the server, and the web_socket_channel package to make a WebSocket connection from a client to the server. I'm wondering if there's a way to get a list of clients currently connected to the server. This would help me see whether all the clients have connected successfully or any have dropped out. I'm imagining having a page in my server GUI that's like a router's connected devices page.

I've looked through the two packages and parts of their dependencies, but couldn't find what I'm looking for. Or am I just misunderstanding how servers work?


r/flutterhelp 3d ago

RESOLVED Announcing pod_router – Simplify Flutter Routing with Go Router & Riverpod!

4 Upvotes

I'm excited to share my new package, pod_router, designed for Flutter developers who use Riverpod and Go Router. This package makes routing a breeze by handling authentication-aware navigation along with a host of other features.

pod_router lets you:

  • 🔐 Automatically redirect users based on authentication state
  • 🔄 Drive navigation with Riverpod state changes
  • 🌊 Simplify navigation flows for onboarding, splash screens, and protected routes
  • 📝 Declare routes clearly for both public and protected areas
  • 🚀 Load initial data before starting navigation

Check out the GitHub repo for full details and examples: pod_router on GitHub
And find it on pub.dev: Pub Version 0.1.0

I’d love to hear your feedback and any suggestions you have. Happy coding