This document covers the unique aspects, limitations, and unexpected behaviors when working with PocketBase's embedded JavaScript engine (Goja). These are critical differences from standard Node.js or browser JavaScript environments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:core'; | |
| /// Démo d’égalité, hashCode et comparaison d’entités. | |
| /// | |
| /// Points clés: | |
| /// - L’égalité logique (operator ==) est basée sur l’ID en minuscules. | |
| /// - Le hashCode est cohérent avec == (utilise le même critère). | |
| /// - compareTo (Comparable<MyEntity>) illustre un ordre de tri. | |
| /// | |
| /// Subtilités: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| import 'package:provider/provider.dart'; | |
| class MyBudgetModel { | |
| final Set<String> activeCategories; | |
| MyBudgetModel(this.activeCategories); | |
| } | |
| class MyBudgetController extends ChangeNotifier { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import argparse | |
| import json | |
| import os | |
| import platform | |
| import sys | |
| import urllib.request | |
| import zipfile | |
| from pathlib import Path |
- ALWAYS write code, comments, and documentation strictly in English, but mirror the user's language for conversational responses and explanations or paths/files where localizations is intended (e.g.
*.fr-FR.md). - ALWAYS prefer conventions over configurations
- ALWAYS start by analyzing the
README.mdto understand context,llms.txtto understand structure,CONTRIBUTING.mdto adopt project's conventions andMakefileto discover local tools. - ALWAYS outline a step-by-step plan or pseudo-code strategy before generating the final implementation.
- ALWAYS minimize code volume by strictly adhering to KISS principles and systematically prioritizing the reuse of existing logic or native features over duplication or adding new dependencies.
- ALWAYS prefer use of local commands (
make install,make test,make analyze,npm *) and other user-documented commands. Contribute if you need anything else for re-use. Stick to the specific libraries and frameworks versions already defined in dependency files
Ce document présente toutes les fonctionnalités et améliorations majeures apparues dans Dart entre les versions 3.5 (août 2024) et 3.8 (mai 2025).
La fonctionnalité principale de Dart 3.6 est l'introduction des séparateurs de chiffres pour améliorer la lisibilité des nombres.
Copyright :
- https://medium.com/@sharma-deepak/write-flutter-like-google-895d6066c6fe
- https://medium.com/@sharma-deepak/write-flutter-like-google-part-2-d73d29a7007a
There are countless Flutter coding conventions floating around. From the popular “Flutter Clean Architecture” to community-driven style guides, developers have been following external conventions for years. I was one of them.
For the past 5 years, I followed community best practices, enforced strict linting rules, and structured my Flutter apps according to popular Medium articles and YouTube tutorials. My code was “clean,” and my architecture was “proper.”
- Flutter app, with provider for dependency management.
- Always run flutter analyze to fix all errors, when there is errors, just run
dart fix --applybefore trying to manipulate the code by yourself - Always ensure your code is fully tested, with flutter test() or widgetTest(), add be generous with goldenTest and screen captures also
- Always prefer type-safe alternative to
dynamic,lateand other risky behaviors - Do not cast with
askeyword, but always prefer pattern matching to safely cast and test types - Never use the
dynamickeyword, norlate, but preferObject?which is safer - Always use flutter theme extension to allow UI customization, for every group of UI widgets you build, add a theme extension and refer to hit using context to customize the widgets.
NewerOlder