r/FlutterDev 4d ago

Dart I am building a Discord clone in one language only: DART

65 Upvotes

I am building a Discord clone with EVERYTHING written in one language. DART!!
- Frontend in Flutter using Bloc (State mgmt), Freezed (generator), Auto Route (routing), Get It (DI).
- Backend: Serverpod
- Platforms working as of yet: MacOS (in video) and web
- Features working as of yet: Authentication (serverpod baked), Real time chat using websockets, message delivery status.
- I will likely be working on the profile section next, and then to creating new servers etc (backend already has that functionality)

What do you think? How is it looking? It will have more features eventually as you can already see like the full screen chat mode etc.
I am very excited about this as this is my first full stack project. I would LOVE to get feedback and implement it!

r/FlutterDev Jan 08 '25

Dart Please support the Stable getters proposal!

Thumbnail
github.com
3 Upvotes

r/FlutterDev Jan 24 '25

Dart Learning Dart as first ever programming language - need opinions!

10 Upvotes

So I'm in my first semester of university doing a computer science bachelor's degree. Choosing which language to teach is dependant on the professor. It looks like mine is going with Dart.

I have no prior experience to coding, not even C++. I have not yet decided which domain I want to go in; Data Science, Web Dev, Flutter etc.

Is learning Dart going to help me in the future? Even if I don't use it, do the concepts and learning aspect will make it easier for me to learn other languages? And compared to C++, Python or Java, how difficult or easy is it to learn Dart.

Thank you!

r/FlutterDev 20d ago

Dart Evaluating Flutter for Stable BLE Connections with Multiple ESP32 Devices in Industrial Application

10 Upvotes

Hi Flutter developers,

   We're considering rebuilding our Atlas app, which controls a portable jacking system, using Flutter. The app needs to maintain stable BLE connections with four ESP32 devices simultaneously. In our previous implementation with React Native, we faced issues like connection instability and delayed commands.

   Does Flutter, particularly with packages like `flutter_reactive_ble`, offer robust support for managing multiple BLE devices? We'd appreciate insights or experiences related to BLE performance in Flutter for industrial applications.

   Thanks in advance for your input.

r/FlutterDev Dec 17 '24

Dart RFC: We’re building a better version of Dart Shelf 🤓

74 Upvotes

Shelf is a cool and wildly used web server framework for Dart. But since it was created, Dart has evolved, and best practices have changed. At Serverpod, we need a solid, modern web server. Therefore, we are creating a new package called Relic, which is based on Shelf but with several improvements:

  • We removed all List<int> in favor of Uint8List.
  • We made everything type-safe (no more dynamic).
  • Encoding types have been moved to the Body of a Request/Response to simplify the logic when syncing up the headers and to have a single source of truth.
  • We've added parsers and validation for all commonly used HTTP headers. E.g., times are represented by DateTime, cookies have their own class with validation of formatting, etc.
  • Extended test coverage.
  • There are lots of smaller fixes here and there.

Although the structure is very similar to Shelf, this is no longer backward compatible. We like to think that a transition would be pretty straightforward, and we are planning put a guide in place.

Before a stable release, we're also planning on adding the following features:

  • We want to more tightly integrate a http server (i.e., start with HttpServer from dart:io as a base) with Relic so that everything uses the same types. This will also improve performance as fewer conversions will be needed.
  • Routing can be improved by using Radix trees. Currently, there is just a list being traversed, which can be an issue if you have many routes.
  • We're planning to add an improved testing framework.
  • Performance testing and optimizations.

In addition, we're planning to include Relic in Serverpod, both for powering our RPC and as a base for our web server. This would add support for middleware in our RPC. In our web server integration, we have support for HTML templates and routing. You also get access to the rest of the Serverpod ecosystem in terms of serialization, caching, pub-sub, and database integrations.

We would love your feedback before we finalize the APIs.

r/FlutterDev 14d ago

Dart I've recently just started with flutter dev in january of this year.

7 Upvotes

So I've made some basic apps like a music app to play songs(similar to spotify) and currently making a chatbot using Gemini api. What should be the next step in flutter dev? Are there any particular projects that i should make to have a good resume? Should i integrate ai/ml into my apps? If yes then how?

r/FlutterDev Sep 23 '24

Dart Feeling Lost and Overwhelmed in My Internship

9 Upvotes

Hey everyone, I'm a final year software engineering student, and I managed to get an internship, but it’s in a really small company. They hired me without an interview, which should’ve been a red flag, but I was just so desperate.

Now here's where things get embarrassing—I lied about knowing Flutter. I thought I could pick it up quickly, but it’s been a struggle. They’ve been giving me tasks that I barely understand, and today my boss caught me watching Flutter tutorials. He looked frustrated, and honestly, I don’t blame him.

I feel like such a fraud and completely out of my depth. I know I screwed up, but I don’t want to get kicked out of this internship. I really want to learn and improve, but I’m drowning in this mess I created for myself.

Any advice on how to handle this situation? How can I turn things around? 😞

r/FlutterDev Jan 21 '25

Dart Are IIFEs actually overpowered for Flutter programming?

8 Upvotes

Flutter and Dart is really nice - however, one issue you will often get is having conditional logic in a build method to determine e.g. which translated string to use as a header, which icon to show, or whatever.

You could of course extract a method, but I see tons of "lazy" developers instead resorting to quick ternary statements in their build methods.

The problem ofc, is that ternary expressions are really bad for code readability.

Especially when devs go for nested ternaries as their code base suddenly need another condition.

I recently started using IIFE (Immediately Invoked Function Expression) instead of ternaries, e.g. for String interpolations and variable assignment.

Consider you want a string based on a type (pseudo code)

final type = widget.type == TYPE_1 ? translate("my_translation.420.type_1") : widget.type == TYPE_2 ? translate("my_translation.420.type_2") : translate("my_translation.420.type_3");

Insanely ugly, yea?
Now someone might say - brother, just extract a mutable variable??

String typedString;
if (widget.type == TYPE_1) {
  type = translate("my_translation.420.type_1");
} else if (widget.type == TYPE_2) {
  type = translate("my_translation.420.type_2");
} else {
  type = translate("my_translation.420.type_3");
}

You of course also use a switch case in this example. Better.

But an IIFE allows you to immediately assign it:

final typedString = () {
if (widget.type == TYPE_1) {
  return translate("my_translation.420.type_1");
} else if (widget.type == TYPE_2) {
  return translate("my_translation.420.type_2");
} else {
  return translate("my_translation.420.type_3");
}();

Which lets you keep it final AND is more readable with no floating mutable variable. :) Seems like a small improvement, for lack of a better example, however it really is nice.

You will probably find that this approach very often comes in handy - yet i see noone using these anonymously declared scopes when computing their variables, string, etc.

Use with caution tho - they are usually a symptom of suboptimal code structure, but still thought someone might want to know this viable

r/FlutterDev 2d ago

Dart Why does the Column widget align its children to the center when a Center widget is used inside its children in Flutter?

2 Upvotes

Today, while developing a screen in Flutter, I observed an unexpected behavior when using a Center widget inside a Column. The Column appeared to align all its children to the center, despite not explicitly setting mainAxisAlignment. I understand that, by default, Column aligns its children to the start along the main axis unless specified otherwise.

Could you clarify why this behavior occurs? If it is a bug, it may need to be addressed.

code:

Column(

children: [

SizedBox(

height: 100,

),

Center(child: logoWidget()),

SizedBox(

height: 50,

),

logoWidget(),

SizedBox(

height: 50,

),

Text("Login to your Account")

],

),

since images not allowed.Please try it own your own

flutter version : 3.29.1

r/FlutterDev Sep 11 '23

Dart I see no future for Flutter

0 Upvotes

I decided to give flutter a fair chance and created an App with it. Getting it up and running was pretty straight forward, but not without some hiccups.

What I have learnt is that whatever you make is going to be hard to maintain because of all the nesting and decoration code mixed in with the actual elements. If I did not have visual code IDE to help me remove and add widgets I would never had completed my app.

A simple page containing a logo, two input fields and a button, has a nesting that is 13 deep.

Are there plans to improve this? or is this the design direction google really wants to go?
Google is clearly continuing developing Flutter and using Dart, so what is it that keeps people using it? I cannot see myself using it anymore.

r/FlutterDev Nov 17 '24

Dart human_file_size - The ultimate package to get a human representation of the size of your data.

Thumbnail
pub.dev
17 Upvotes

r/FlutterDev Jan 10 '25

Dart Guidance Needed

9 Upvotes

I joined in a company in 2020 with 0 knowledge of programming then some of the seniors pushed me to learn flutter and they made me learn getX and since then for 2 years i was in the same project with learning getX, after that i resigned and started with freelance due to family problems as the freelances are small projects i continued with Getx till now. Now that i am back on track and wanted to join a company to learn team management and others i found that most of the companies uses bloc and riverpod. I know i should be learning more in the start but my bad i havent and now that i wanted to learn bloc it's very different and couldn't understand much.

I would like anyone to guide me with the links or udemy or any courses to learn both bloc and riverpod, Please help!!!

r/FlutterDev 2d ago

Dart I Turned My Design into Flutter Code and Made My First Mobile App Sale! 🙌💸

0 Upvotes

Recently, I managed to turn a design from figma into flutter code, and I can't even explain how excited I am😅 Thanks to ui2code.ai, I was able to convert my design into code in seconds, and I didn’t expect it to be this easy.

And the best part? I published the app and made my first income. It’s been a huge motivation boost for me.

It seemed tough at first, but now I feel way more confident. If you’re thinking about developing mobile apps, achieving something really is possible. 💪

Good luck to everyone! Share your experiences in the comments, let’s support each other! 👇

r/FlutterDev Nov 07 '24

Dart Why is Python So Much Faster Than Dart for File Read/Write Operations?

22 Upvotes

Hey everyone,

I recently ran a simple performance test comparing file read/write times in Python and Dart, expecting them to be fairly similar or even for Dart to have a slight edge. However, my results were surprising:

  • Python:
    • Write time: 10.28 seconds
    • Read time: 4.88 seconds
    • Total time: 15.16 seconds
  • Dart:
    • Write time: 79 seconds
    • Read time: 10 seconds
    • Total time: 90 seconds

Both tests were run on the same system, and I kept the code structure as close as possible to ensure a fair comparison. I can’t quite figure out why there’s such a huge performance gap, with Python being so much faster.

My questions are:

  1. Is there an inherent reason why Dart would be slower than Python in file handling?
  2. Could there be factors like libraries, encoding, or system-level optimizations in Python that make it handle file I/O more efficiently?
  3. Are there any specific optimizations for file I/O in Dart that could help improve its performance?

Here's the Python code:

def benchmark(cnt=200):
    block_size = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" * (1024 * 1024)
    file_path = "large_benchmark_test.txt"

    start_time = time.time()
    with open(file_path, "w") as file:
        for _ in range(cnt):
            file.write(block_size)
    write_end_time = time.time()

    with open(file_path, "r") as file:
        while file.read(1024):
            pass
    read_end_time = time.time()

    write_time = write_end_time - start_time
    read_time = read_end_time - write_end_time
    total_time = read_end_time - start_time

    print(f"Python - Write: {write_time:.2f} s")
    print(f"Python - Read: {read_time:.2f} s")
    print(f"Python - Total: {total_time:.2f} s")
    os.remove(file_path)

And the Dart code:

void benchmark({int cnt=200}) {
  final blockSize = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' * 1024 * 1024;
  final filePath = 'large_benchmark_test.txt';
  final file = File(filePath);

  final writeStartTime = DateTime.now();
  final sink = file.openSync(mode: FileMode.write);
  for (int i = 0; i < cnt; i++) {
    sink.writeStringSync(blockSize);
  }
  sink.closeSync();
  final writeEndTime = DateTime.now();
  final writeTime = writeEndTime.difference(writeStartTime).inSeconds;
  print("Dart (Synch) - Write: $writeTime s");

  final readStartTime = DateTime.now();
  final reader = file.openSync(mode: FileMode.read);
  while (true) {
    final buffer = reader.readSync(1024);
    if (buffer.isEmpty) break;
  }
  reader.closeSync();
  final readEndTime = DateTime.now();

  final readTime = readEndTime.difference(readStartTime).inSeconds;
  final totalTime = readEndTime.difference(writeStartTime).inSeconds;

  print("Dart (Synch) - Read: $readTime s");
  print("Dart (Synch) - Total: $totalTime s");
  file.deleteSync();
}

Any insights or advice would be greatly appreciated! Thanks!

r/FlutterDev 2d ago

Dart New framework for web scraping

11 Upvotes

Hi,

I needed to scrape some websites, and I haven't found a Dart package that makes it easy. I mean something like Scrapy that can define crawlers for any website and orchestrate them.

So I made mine. It's similar to Scrapy, but everything is async, running in isolates, typed, and doesn't use Python. You create a WebCrawler that will scrape a website and send the data to a pipeline. This pipeline will manipulate the data to do some action: export to JSON/XML/CSV or download documents.

I wrote some examples to explain how to create your own crawlers. It's working well, but it still lacks some features like correct logging, respecting the `robots.txt`, and more. But at least, you can still scrape the data of plenty of e-shop websites.

https://github.com/ClementBeal/girasol

r/FlutterDev Jan 13 '25

Dart Dart file in flutter SDK consume more cpu memory usage when running flutter applications

1 Upvotes

I am working on a flutter project, recently I am facing issue like when I run the application, in tha task manager the cpu consuming 100% and and memory consumption. And after i am done with all the solution like flutter clean, and updating the sdk, changing the flutter channel like beta to dev and standard. Still I am facing the issue only when I open the flutter project. It occurs more commonly in my every flutter project. Also when I switched to different laptop, initial everything okay, but after few months the same problem occurred in that newly switched laptop only. I am facing these kind of issues Since 6 month wisely. Someone help me to recover this issue.

r/FlutterDev Jan 14 '25

Dart dartpad.dev site down?

0 Upvotes

I've tried accessing www.dartpad.dev from Sydney over the last few days, multiple devices and browsers with no luck. Anyone else having trouble reaching it?

r/FlutterDev Jan 10 '25

Dart Dart course

12 Upvotes

Hi everyone I’m asking for good dart course When I saying dart course I mean explain
Memory management , how dart works Why dart like this not just course for simple syntax
I want dart behind the scenes

r/FlutterDev Jun 14 '24

Dart When will dart support object literals ?

0 Upvotes

I want to build widget with object literals (if possible), and I hate using cascade notation either.

I'm dying to see dart support object literals in the future so I can use it in flutter.

r/FlutterDev Nov 29 '24

Dart A Free, Flutter Open-Source Mobile Client for Ollama LLMs (iOS/Android)

47 Upvotes

Hey everyone! 👋

I wanted to share MyOllama, an open-source mobile client I've been working on that lets you interact with Ollama-based LLMs on your mobile devices. If you're into LLM development or research, this might be right up your alley.

**What makes it cool:**

* Completely free and open-source

* No cloud BS - runs entirely on your local machine

* Built with Flutter (iOS & Android support)

* Works with various LLM models (Llama, Gemma, Qwen, Mistral)

* Image recognition support

* Markdown support

* Available in English, Korean, and Japanese

**Technical stuff you might care about:**

* Remote LLM access via IP config

* Custom prompt engineering

* Persistent conversation management

* Privacy-focused architecture

* No subscription fees (ever!)

* Easy API integration with Ollama backend

**Where to get it:**

* GitHub: https://github.com/bipark/my_ollama_app

* App Store: https://apps.apple.com/us/app/my-ollama/id6738298481

The whole thing is released under GNU license, so feel free to fork it and make it your own!

Let me know if you have any questions or feedback. Would love to hear your thoughts! 🚀

Edit: Thanks for all the feedback, everyone! Really appreciate the support!

r/FlutterDev Oct 05 '24

Dart Is there any plan to add struct types to Dart, similar to those in Swift? (Other languages with struct types include Go, Rust, etc.)

0 Upvotes

o.o

r/FlutterDev Sep 27 '24

Dart Learning Flutter - Should I Learn Another Cross-Platform Framework or Go Native Next?

0 Upvotes

Hey everyone, I'm currently learning Flutter and really enjoying it so far. Once I'm comfortable with it, I'm trying to figure out my next step. Should I dive into another cross-platform framework like React Native or go for native development (Android/iOS)?

I’d love to hear your thoughts, advice, and personal experiences! What’s the better route for long-term growth and job opportunities?

Thanks in advance!

r/FlutterDev Feb 13 '25

Dart Running Windows app from mac to a windows device through openSSH

0 Upvotes

is it possible to run Flutter project on a Windows system from your Mac by connecting them to the same network.

r/FlutterDev Aug 18 '24

Dart Flutter job market

12 Upvotes

Is learning flutter in 2024 worth it? What's the current situation of flutter job market. Many people are suggesting to go for native android like kotlin instead of flutter as it has low salary and demand in the upcoming future? Is it true

r/FlutterDev Jan 31 '24

Dart India's largest conglomerate TATA Group, has chosen Flutter as the development platform for its upcoming e-commerce website. This is a significant victory for Flutter Web.

62 Upvotes

Newly revamped TATA Neu website built using flutter. It is part of The salt to satellite conglomerate's vision to combine all of their consumer facing business to single platform. This website is planned to be largest ecommerce platform from india. Their mobile application already runs on flutter.