fpdart
dart_style
fpdart | dart_style | |
---|---|---|
15 | 14 | |
493 | 632 | |
- | 0.9% | |
6.6 | 9.2 | |
27 days ago | 3 days ago | |
Dart | Dart | |
MIT License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
fpdart
-
Fpdart v1 – Functional programming in dart
Really cool, might import it and give it a shot!
https://github.com/SandroMaglione/fpdart/blob/main/examples/...
-
Flutter Exception Handling with try/catch and the Result type (updated to Dart 3 and sealed classes)
use a 3rd party package like fpdart, which offers ergonomic APIs like Either and TaskEither
-
Throwing exception
By the way, I highly recommend checking out fpdart. It has most stuff that dartz has but also provides docstrings and is well-tested
-
The Registers of Rust
If you use something like fpdart, you have the more functional Either type (called Result in Rust).
https://pub.dev/packages/fpdart#eitherlibsrceitherdart
-
The Record type is coming to Dart/Flutter!
I’ve been using Either and friends from fpdart and very happy with the way it helps clean up the code.
-
Wouldn't it be nice if we could return after a null coalescence/ternary else operator?
You can get a lot of this by mixing in some uses of https://pub.dev/packages/fpdart. It's not whole-ly integrated, but the boundaries aren't too intolerable.
- fpdart v0.3.0 is out (Functional programming in Dart and Flutter)
-
Flutter Dartz
I find https://pub.dev/packages/fpdart to be a better documented and tested and modernly maintained functional implementation, and includes tools to connect futures with either or option.
-
How much of your workflow relies on packages?
Use fpdart instead have better support.
- fpdart v0.0.9 out now - Functional Programming for dart and Flutter
dart_style
-
Why is Prettier rock solid?
> Oh I'm curious why you're rewriting it?
The primary driver is that we're moving to a fairly different formatting style: https://github.com/dart-lang/dart_style/issues/1253
The formatter works sort of like a compiler in that it parses the code, translates it to an internal representation, does optimization on that IR, and then outputs final code. The main difference is that the "final code" is also source code, and the "optimization" is line splitting.
The old IR grew organically over time and got increasingly difficult to work with. It baked certain formatting choices directly into the IR (mainly indentation) which line splitting then had no control over. For example, given a function call like:
someLongFunctionName(some + long + argument + expression, [firstElement, anotherElement, aThirdElement]);
-
The Record type is coming to Dart/Flutter!
in your analysis_options.yaml. The formatter doesn't understand the new syntax yet, though.
-
Linter actually that important for a lot of minor things?
Sorry, perhaps im not quite familiar with the GitHub issues you’re chatting about, but a quick search shows the Dart team actually made a very similar argument about laptops and diffs as the first reply in a thread about the 80 character max: https://github.com/dart-lang/dart_style/issues/833
-
What is the best flutter formatter?
Nope, but there is a proposal to set line length in pubspec.yaml: https://github.com/dart-lang/dart_style/issues/918
- Imagine that someone passed a law—literally a criminal offense—if you formatted your code longer than 80 columns. You were forced to comply. Do you honestly believe that your engineering productivity or overall quality of life as a human on Earth would be measurably negatively impacted?
-
Custom Formatting in VS Code
The standard Dart extension only supports formatting using the SDK-supplied formatter (dart_style) which (by design) is not configurable (although it can be turned on/off with the dart.enableSdkFormatter setting).
-
10 Best Visual Studio Code Extensions for Flutter Development
Flutter itself provides formatting choices, however, it only formats Dart files and it doesn’t re-order the code. Flutter formats the code based on these formatting rules.
- Flutter’s take on the 2-space indent code style
-
Anyone else seeing dartfmt hanging VSCode lately?
There are some other possibilities - such as complex code being slow to format (for example I hit https://github.com/dart-lang/dart_style/issues/1022 and originally thought it was a repro for this issue), or that the server is busy doing its initial synchronous scan of the workspace, though those should be temporary and the format should eventually complete so it's probably not what most people are reporting here.
What are some alternatives?
dartz - Functional programming in Dart
dart-code-metrics - Software analytics tool that helps developers analyse and improve software quality.
theme_tailor - Code generator for Flutter's theme extension classes.
Dart-Code - Dart and Flutter support for VS Code
http-mock-adapter - A simple to use mocking package for Dio intended to be used in tests.
flutter-examples - This repository contains the Syncfusion Flutter UI widgets examples and the guide to use them.
chat-app-flutter - A simple chat application in flutter made with stream.
markdownlint - A Node.js style checker and lint tool for Markdown/CommonMark files.
language - Design of the Dart language
pub-dev - The pub.dev website
flutter_dynamic_forms - A collection of flutter and dart libraries allowing you to consume complex external forms at runtime.
sdk - The Dart SDK, including the VM, dart2js, core libraries, and more.