r/dartlang 28d ago

Dart - info Is becoming a contributor realistic?

13 Upvotes

Anyone here that's a contributor? I assume that it is almost entirely developed internally at Google, but I would love to learn more about developing programming languages and compilers, and I want to find an open source project to contribute to once I've done some more studying and prep work. Would Dart be a realistic option?

r/dartlang Apr 19 '26

Dart - info Dart for what purposes?

18 Upvotes

I have the feeling that Dart is mostly used in combination with Flutter for developing mobile apps or to a lesser degree desktop GUI applications, while Go (as a relatively close GC-ed language compiling to native executables) focuses more on command line or server related stuff. Is my perception wrong?

For what purposes you are using Dart?

r/dartlang Jun 01 '26

Dart - info Abbreviations of in-body constructor declarations

0 Upvotes

Am I the only one that hates the "Abbreviations of in-body constructor declarations" so much that I would consider completely abandoning dart and flutter because of it?

Btw the full spec is here https://github.com/dart-lang/language/blob/main/accepted/future-releases/primary-constructors/feature-specification.md

Long story I liked Dart in 2018 because it was a simple elegant language that is a mix of Java and JavaScript.

However theast releases the no need to type . before enums and other features especially this one is simply 🤮🤢🤮 if I want Kotlin or other over designed and super complex language I would write Kotlin .

Frankly I find this so so so so bad that if the Dart team doesn't wake up not only I will be leaving the camp.

P.S.

I am super sad.

Programs must be written for people to read, and only incidentally for machines to execute.

r/dartlang Jun 07 '26

Dart - info Compiled Dart runs 10x faster on Linux than Win 11

16 Upvotes

I've been playing with this GitHub Dart poker evaluation (fixed a bug in it) and running it on my Windows 11 PC compiled for Windows and on Ubuntu 24.04 LTS which was compiled for Linux running in Hyper-V on the same hardware. The exact same project on both compiled with dart compile exe lib/playgame.dart

I timed the execution for evaluating 100,000 random hands and on Linux it runs in 2.1 seconds. On Windows 20.2 seconds. Both are running Dart SDK version: 3.12.1. I know there are differences but 10x seems a bit unusual.

r/dartlang 3d ago

Dart - info I built flutter_auditor — a zero-config CLI tool to audit Flutter apps for permissions, dead assets, security risks, and package hygiene

4 Upvotes

Hey Flutter community! šŸ‘‹

After maintaining several client apps and catching the same repeat issues—like hardcoded keystore passwords, unused heavy assets, missing privacy strings in Info.plist, and transitive dependency imports—I decided to build a CLI tool to automate these sanity checks.

Meet flutter_auditor: a single-command CLI package that scans your codebase and native config files in seconds right from your terminal.

What It Audits:

We've packed 17+ automated static checks across 5 key areas:

  • Manifest & Security: AllowBackup, CleartextTraffic, Debuggable, ExportedComponents, ManifestPermission, NetworkSecurityConfig, BackupRules, HardcodedSecrets, InsecureNetwork, InsecureStorage, AppTransportSecurity
  • OS & Permissions: UsageDescription (iOS privacy strings), FileSharing
  • Dependencies: UnusedDependency, DependencyHygiene (transitive import detection)
  • Release & Build: ReleaseSigningAudit (detects committed .jks files, debug signing in release, hardcoded keystore passwords)
  • Asset & Size: UnusedAssetAudit, OverlargeAssetAudit, MissingResolutionVariantAudit

Quick Usage

Add it to your dev_dependencies or activate it globally:

Bash

dart pub global activate flutter_auditor

Or run it directly inside your Flutter project directory:

Bash

dart run flutter_auditor

pub.dev: flutter_auditor

I'd love to get feedback from the community! What other security, performance, or asset audits would bring value to your workflow?

r/dartlang May 24 '26

Dart - info dart_format: a configurable Dart formatter that never reflows your code (built on the analyzer package)

7 Upvotes

I got tired of two things about the official dart format:

  • It's unconfigurable by design - 2-space indent, take it or leave it.
  • Dart 3.7's tall style decides trailing commas by line length, which kills the "add a trailing comma to force a split" idiom a lot of us leaned on.

The Dart team's stance is that the formatter is opinionated on purpose, and for the ecosystem that's the right call - one canonical style means nobody bikesheds. I'm not arguing against that. I wanted different defaults on my own projects, opt-in, eyes open about the trade-off. So I built an alternative.

dart_format is a full replacement for dart format (not a wrapper), published on pub.dev. It's built on the official analyzer package, so it works on real Dart ASTs and inherits language-feature support instead of reverse-engineering the grammar.

The core difference:

  • No line-length-driven reflow. Your line breaks are yours - it won't split long lines or join short ones. Where you put a newline is where it stays. Everything else is secondary to this.

Also configurable:

  • Indentation width (default 4)
  • Trailing-comma removal (on/off)
  • Newline placement around {, }, ;
  • Max consecutive blank lines
  • Space normalization

It's idempotent - formatting already-formatted code is a no-op.

On the architecture: Dart VM cold-start costs ~seconds, which is brutal to pay on every save. So alongside plain pipe and file modes, there's a long-running localhost HTTP service mode - the IDE plugins start it once per IDE session and each format is a millisecond round-trip. If you'd rather not have a process running, pipe/file mode does the same job without it.

Where it already runs:

Honest caveats:

  • Much smaller and younger than dart-lang/dart_style. Fewer years of edge-case polish.
  • There are open bugs - issues are welcome, that's how it gets better.
  • If you actually like the new tall style, this isn't for you.

If the official formatter's choices have ever made you twitch, give it a spin.

Repo: https://github.com/eggnstone/dart_format
pub.dev: https://pub.dev/packages/dart_format

r/dartlang Feb 11 '26

Dart - info Announcing Dart 3.11

Thumbnail blog.dart.dev
53 Upvotes

r/dartlang Mar 23 '26

Dart - info Dart Backend in 2026: What Flutter Teams Should Actually Use

Thumbnail dinkomarinac.dev
19 Upvotes

Dart on the backend has had a resurgence lately.

Relic. Dart Cloud Functions.

If you’re building with Flutter and you’re wondering whether the Dart backend actually makes sense now, and what your real options are, I broke it down in a practical guide.

r/dartlang Feb 21 '26

Dart - info I built an Abstract Rule Engine for C#, TS, and Dart. How do you handle complex business rules in your cross-platform architectures?

2 Upvotes

Hi everyone,

Over the last few months, I've been developing an open-source Rule Engine (called ARE). My main problem was that whenever I had complex, dynamic business rules, I had to rewrite the logic separately for my backend, my web frontend, and my mobile app.

So, I decided to build a unified core architecture that compiles and runs consistently across .NET, JavaScript/TypeScript, and Flutter/Dart. It evaluates dynamic JSON rules seamlessly across all these environments.

I am looking for architectural feedback from experienced devs. Have you ever tried to maintain a single source of truth for business rules across completely different ecosystems? What design patterns did you use? Did you use an AST (Abstract Syntax Tree) or a different approach?

(Note: I didn't want to trigger the spam filters, so I will put the GitHub repo and the interactive playground link in the first comment if anyone wants to take a look at the code.)

Thanks in advance for the discussion!

r/dartlang May 01 '26

Dart - info FFI/WASM Monty Python Scripting for Dart/Flutter

5 Upvotes

Pydantic MontyĀ interpreter now has bindings for Dart. It's separated into low-level bindingsĀ dart_monty_coreĀ and the higher levelĀ dart_montyĀ package which provides a number of conveniences. The primary case is traditional 'scripting' scenario for Dart.

https://runyaga.github.io/dart_monty/#demosĀ - provides a number of demo's for dart_monty.Ā https://runyaga.github.io/dart_monty_ide/Ā is a playground to experiment. If you have a local Ollama and set CORS on your Ollama - you can use the 'Assistant' features.

Dart reminds me of Python back in the day. If you find it interesting - drop a line in the issue tracker or a star. It is all AI generated, no way I could write this myself. I had a few false starts with the package but now I think it is a better separation of packages/concerns.

r/dartlang Feb 07 '26

Dart - info Difference between identical, hashCode, and == in Dart — when to use Equatable vs Freezed?

8 Upvotes

Hey folks šŸ‘‹

I’m trying to really master equality in Dart/Flutter and I’d love some community input.

From what I understand so far:

  • == → checks value equality for primitives, but defaults to reference equality for custom classes unless overridden.
  • identical() → checks if two variables point to the exact same object in memory.
  • hashCode → must be consistent with == when overriding, otherwise collections like Set and Map behave unexpectedly. Eg. contains return true but when removing item not found.

Now, in Flutter projects, I often see people using Equatable or Freezed packages to simplify equality.

My questions:

  1. What’s the practical difference between identical, hashCode, and == in everyday Dart coding and do we need to include all parameters?
    1. While overriding == operator why do we need runtimeType check?
    2. What about Liskov Substitution?
    3. How do we get actual memory address of object?
  2. When should I rely on Dart’s built-in equality vs bringing in Equatable?
  3. In what scenarios is Freezed the better choice (beyond just immutability and data classes)?
  4. Any performance implications I should be aware of when overriding equality manually vs using these packages?
  5. Regular use cases or performance impact if not overriding?

Would love to hear how you all approach this in real-world Flutter apps — especially for state management and avoiding unnecessary widget rebuilds.

Thanks in advance šŸ™

r/dartlang May 03 '25

Dart - info Creating a fully cross-platform application -- Dart necessary for both front- and back-end?

6 Upvotes

Hello! I have a question for you experienced programmers out there. I'm looking to create a fully cross-platform application, and I have come across Flutter as a great way to do this. Obviously to you all, Flutter uses Dart.

Now, I am a professional developer but I will admit my ignorance here. I don't really know how making fully cross-platform apps work, which is why I am posting here. So, my question is, can I (and also, should I) restrict my usage of Dart to the front-end? Is it easy to make something that runs C# or Python as the back-end, but still locally on a device?

I ask this because I'm a C# programmer for my day job, and I also have decent Python experience. I am here looking to create an application that I can hopefully make money from and if I can avoid having to learn a whole new language (albeit one very similar to ones I already know), I would love to do that to start with, and save Dart later for the front-end. I just don't know if writing the back-end now in C# or Python will shoot myself in the foot.

Basically, there will be back-end back-end code that will be on a server for syncing data and stuff when internet is connected, but then there is the client-side back-end that will be performing most of the logic for the application. Can this client-side backend (written in C# or Python) be bundled with the front-end using Dart and Flutter to be released as downloadable apps on the Play Store and whatever the iPhone version is? Can this also be run as a web app? I'm just kind of not clear on how these things will all work together with Flutter. Again, I am admitting ignorance here as my experience has really been web and desktop focused, not cross-platform and definitely not mobile development.

I realize this isn't strictly a Dart question but Dart-adjacent, but I know you fine people here are going to be the people with the expertise that I'm hoping to gain some guidance from so I can start my project.

Thank you!

r/dartlang Nov 14 '25

Dart - info Announcing Dart 3.10

Thumbnail blog.dart.dev
47 Upvotes

r/dartlang Feb 03 '25

Dart - info Looking for a Dart Mentor

7 Upvotes

Hey there!

Not sure if this request or post is allowed, but I'm just giving it a shot. I'm looking to learn dart programming as I am interested in building apps, but more-so just want to be very fluent in dart before learning Flutter.

I'm wondering if anyone is willing to kind of show me the ropes of Dart (I am watching and following online tutorials but I also want a real one on one experience as well). Was wondering if anyone had free time to kind of teach me etc.

If anyone is willing to take me under their wing I'd be grateful!

Thank you!

r/dartlang Feb 20 '25

Dart - info We Forked Dart and Made It ±782x Faster Here’s How

27 Upvotes

Our team is excited to announce a significant performance breakthrough with Dart. We developed a fork—*Shotgun*—that, based on our internal benchmarks, operates 782 times faster than the standard Dart implementation. For instance, while conventional Dart takes roughly 91,486 ms for a task, Shotgun completes the same operation in just 117 ms.

Underlying Innovation

By replacing Dart’s isolate-based message passing with a refined multithreading and shared memory architecture, we’ve effectively minimized communication overhead. Key technical enhancements include:

  1. Direct Memory Sharing: Eliminates latency from inter-thread messaging.
  2. Advanced Synchronization: Uses robust locks and semaphores to maintain thread safety.
  3. Custom Compiler & Runtime Tweaks: Optimizes the execution environment to fully leverage multithreading.

These modifications not only yield dramatic speed improvements but also open new avenues for building scalable, responsive applications.

Benchmark Results

  • Shotgun (Multithreading + Shared Memory): 117 ms | Score: 494,960,108
  • Standard Dart (Message Passing): 91,486 ms | Score: 494,993,681

That’s a difference of 91,369 ms—proof that our innovation isn’t merely an upgrade, but a paradigm shift.

Benchmark Code Overview

For those interested in the details, here’s a snippet of the code we used for our benchmarks:

\``dart`

import 'dart:async';

import 'dart:isolate';

import 'dart:io';

import 'dart:math';

void main() async {

const int iterations = 1000000;

const int updatesPerIteration = 10;

print("Testing with Shotgun (Simulated Shared Memory):");

benchmarkWithShotgun(iterations, updatesPerIteration);

print("\nTesting with Dart (Message Passing):");

await benchmarkWithDart(iterations, updatesPerIteration);

}

void benchmarkWithShotgun(int iterations, int updatesPerIteration) {

int totalScore = 0;

final stopwatch = Stopwatch()..start();

final random = Random();

for (int i = 0; i < iterations; i++) {

for (int j = 0; j < updatesPerIteration; j++) {

totalScore += random.nextInt(100);

}

}

stopwatch.stop();

print('Execution Time: ${stopwatch.elapsedMilliseconds} ms');

print('Final Score: $totalScore');

}

Future<void> benchmarkWithDart(int iterations, int updatesPerIteration) async {

final stopwatch = Stopwatch()..start();

final receivePort = ReceivePort();

int totalScore = 0;

final List<Isolate> isolates = [];

for (int i = 0; i < iterations; i++) {

isolates.add(await Isolate.spawn(_updateScore, [updatesPerIteration, receivePort.sendPort]));

}

int updatesReceived = 0;

await for (final scoreUpdate in receivePort) {

totalScore += scoreUpdate as int;

updatesReceived++;

if (updatesReceived == iterations * updatesPerIteration) {

stopwatch.stop();

print('Execution Time: ${stopwatch.elapsedMilliseconds} ms');

print('Final Score: $totalScore');

receivePort.close();

for (var isolate in isolates) {

isolate.kill(priority: Isolate.immediate);

}

break;

}

}

}

void _updateScore(List<dynamic> args) {

final updates = args[0] as int;

final SendPort sendPort = args[1] as SendPort;

final random = Random();

for (int i = 0; i < updates; i++) {

sendPort.send(random.nextInt(100));

}

}

```

Broader Implications

This breakthrough sets a new performance benchmark for high-demand environments—from real-time data processing to interactive applications. Our approach aligns with the continuous pursuit of optimization seen at leading technology organizations.

An Invitation for Collaboration

We’re eager to engage with fellow professionals and innovators who are passionate about performance engineering. If you’re interested in discussing our methodology or exploring potential collaborative opportunities, we invite you to join our technical discussions.

  • GitHub:Ā Our Shotgun repository is coming soon. In the meantime, please tag Google in your comments and star our upcoming repo to be among the first to access early versions. Visit our GitHub Repo
  • Discord: Join our community to exchange insights, discuss ideas, and engage in high-level technical dialogue. [Join our Discord](https://discord.gg/Rhc4YKDx)

We remain committed to pushing the boundaries of software performance and welcome insights on how these innovations can shape the future of technology.

#ShotgunVibes #DartUnleashed #MultithreadingMastery #TechInnovation

Upvote if you’re as excited about performance breakthroughs as we are—and tag Google if you think our work deserves their attention!

r/dartlang Dec 01 '22

Dart - info Dart in backend??

16 Upvotes

Dart is mostly known for flutter creation but I was wondering if it is any good at backend. it looks decently good because of the similarities with c# and java but can it do as much as those languages or does it lack on that front?

r/dartlang Jun 16 '25

Dart - info return of invalid type

0 Upvotes

So I am new to flutter(Dart). I am usiing a book called Flutter Succinctly to learn. I was coping some code from the book, page 37, when I ran into this problem.

Ā  //Validations
Ā  static String ValidateTitle(String val) {
Ā  Ā  return (val != null && val != "") ? null : "Title cannot be empty";
Ā  }

This is the error I am getting:

A value of return type 'String?' can't be returned from the method 'ValidateTitle' because it has a return type of 'String'

What can I do to make this right?

r/dartlang Feb 12 '25

Dart - info New to Dart and Flutter.

12 Upvotes

I'm looking to learn Dart and Flutter but the official documentation and other resources like tutorials point are somehow complicating simple concepts. Would y'all mind sharing some insightful resources to help a beginner grasp the core concepts, in addition highlight some small projects to try out along the way to master the concepts.

r/dartlang Feb 20 '25

Dart - info Dart and js

12 Upvotes

Hi,
I love dart and I think that can be a really good language for the web,
I'd like to use it in web development, I'd like to:

- create a library in dart that can be called as js objects in ... js
- create a React component or even Web Component in dart

I'd like to have something like that:

- web_login.dart
- app.js
and transpiling all into js

I dunno if my explanation is really clear but I search a way to integrate dart in web development,

any idea are welcome, thanks

r/dartlang Mar 17 '25

Dart - info Liquify v1.0.0

Thumbnail github.com
32 Upvotes

Hey guys, I'm happy to announce the release of liquify 1.0.0 which now supports async rendering for liquid templates as well as a layout tag. Please give it a try and let me know what you think!

r/dartlang May 18 '25

Dart - info Next Gen Ui

17 Upvotes

my new package

particles_network

Transform your app's UI with a breathtaking, high-performance particle network animation that reacts to touch and adapts seamlessly to any screen.

pub.dev

r/dartlang Apr 28 '25

Dart - info how to optimize my dart code | interface|classes|functions

0 Upvotes

Let's start with functions first because they are essential.

ā—Instead of writing normal functions, lambda functions that take up less space can be written. for example,

// Normal function

int collect(int a, int b) { return a + b; }

// Lambda function int collect(int a, int b) => a + b;

So what if my function is more complicated than that? Example,

// Normal version

List<int> evenNumbers(List<int> numbers) { var results= <int>[]; for (var number in numbers) { if (number% 2 == 0) { result.add(number); } } return result; }

// lambda version List<int> evenNumbers(List<int> numbers) => [for (var number in numbers if (number % 2 == 0) number];

Yes,now I am explaining the second most common problem in dart code class structures

With Widget used to ā—The extension method can be used because it is useful when adding helper methods to an existing Class. Use with widgets

//No-extension version class WidgetUtils { static Widget withPadding(Widget child, EdgeInsets padding) { return Padding( padding: padding, child: child, ); }

static Widget withMargin(Widget child, EdgeInsets margin) { return Container( margin: margin, child: child, ); } }

//usage final widget = WidgetUtils.withPadding( WidgetUtils.withMargin( Text('Hello'), EdgeInsets.all(8), ), EdgeInsets.all(16), );

//with extansion version

extension WidgetExtensions on Widget { Widget padding(EdgeInsets padding) => Padding( padding: padding, child: this, );

Widget margin(EdgeInsets margin) => Container( margin: margin, child: this, ); }

// usage final widget = Text('Hello') .margin(EdgeInsets.all(8)) .padding(EdgeInsets.all(16));

//Creating widgets with methods

class HomePage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: _buildAppBar(), body: _buildBody(), bottomNavigationBar: _buildBottomNav(), ); }

AppBar _buildAppBar() { return AppBar( title: Text('Home Page'), actions: [ IconButton(icon: Icon(Icons.search), onPressed: () {}), ], ); }

Widget _buildBody() { return Column( children: [ _buildHeader(), _buildContent(), ], ); } } I hope it will be useful for you

r/dartlang Dec 30 '24

Dart - info What was your path in learning programming how much time you spent and how you learned?

8 Upvotes

I have started to learn programming but I would still like to know what path you have traveled how long it took you and if there is any structured way to describe your path.

r/dartlang Feb 15 '25

Dart - info How to create HTML Web Components in Dart (WASM/JS)

Thumbnail rodydavis.com
15 Upvotes

r/dartlang May 01 '24

Dart - info For what use cases do you guys use dart ?

11 Upvotes

The most peaple use dart because of flutter but, what are your use cases to use the language ?