Aller au contenu principal
ProduitsOutils de bureauTASTECADConsultation de plansTASTEFILESGestion de fichiersTASTEFTPTransfert de fichiersTASTESSHEspace de travail à distanceTASTEZIPCompression et extractionTASTEWINMGestion de fichiersOutils pour développeursTASTECODEEnvironnement de développement intégré pour RustTASTESTUDIOEnvironnement intégré de développement et de testTASTEETLIntégration de données (ETL)ServeursTASTEREMOTEServeur de bureau à distanceTASTEGEOServeur géospatialTASTEMAILEspace de travail e-mailInvestissementTASTESTOCKApplication de bureau de trading automatique d'actionsCommencerTéléchargementsDocumentationAcheterTous les produits
Marketplace
Actualités
TechActualitésL’actu dev du jourDocs développeursLangages de programmationRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartFrameworks front-end webNext.jsReactVue.js · NuxtSvelteKitAngularFrameworks serveurSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressFrameworks d'applications et de bureauTauriFlutterReact NativeElectronAlgorithmesBases des algorithmesAlgorithmes essentielsAlgorithmes avancésAlgorithmes pratiques
CommunautéProjetsJournaux de développementPromptsProblèmes d’outils d’IAVitrineGuide de la communauté
CollaborerTransfert techniqueRéalisation de site webRéalisation d'application de bureauChaîne de publication et de paiementPartenaire commercialContact
ServicesBureau à distancePaquets d'installation sur mesure
TASTEDEV
Produits

Outils de bureau

TASTECADDes plans complexes, ouverts en toute légèretéTASTEFILESSeulement les fichiers utiles, au plus viteTASTEFTPLe chemin le plus net pour vos fichiersTASTESSHEntre vos serveurs et vous, un lien plus solideTASTEZIPCompresser plus vite, extraire en toute sécuritéTASTEWINMUn gestionnaire de fichiers à deux volets, pensé pour le clavier

Outils pour développeurs

TASTECODEModifier, compiler, déboguer et tester vos apps Rust dans une seule fenêtreTASTESTUDIODe l’édition aux tests à distance et aux corrections IA approuvéesTASTEETLDéplacer les données, les valeurs sous les yeux

Serveurs

TASTEREMOTEUn bureau à distance hébergé sur votre propre serveurTASTEGEOUn serveur géospatial compatible GeoServer, reconstruit en RustTASTEMAILReprenez la maîtrise de vos e-mails

Investissement

TASTESTOCKDu trading automatique d'actions selon vos règles : quand, et quoi

Commencer

TéléchargementsDernières versions de chaque produitDocsUtiliser chaque produitAcheterAbonnements et licences perpétuellesTous les produitsTous les produits en un coup d’œil
Tous les produits
MarketplaceActualités
Tech

Actualités

L’actu dev du jourAnnonces officielles : langages, frameworks, GitHub et IADocs développeursGuides des langages, frameworks et algorithmes

Langages de programmation

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Frameworks front-end webNext.jsReactVue.js · NuxtSvelteKitAngular
Frameworks serveurSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
Frameworks d'applications et de bureauTauriFlutterReact NativeElectron

Algorithmes

Bases des algorithmesAnalyse de complexité · Tri · Recherche · Structures de données de base · Arbres et tasAlgorithmes essentielsParcours de graphe · Plus courts chemins et arbres couvrants · Programmation dynamique · Algorithmes gloutons · Diviser pour régner · Backtracking (retour sur trace)Algorithmes avancésAlgorithmes sur les chaînes · Mathématiques et théorie des nombres · Manipulation de bits · Arbres de segments · Union-FindAlgorithmes pratiquesStratégie pour les entretiens de codage · Cache LRU · Limitation de débit · Hachage cohérent
Toute la documentation de développement
Communauté
ProjetsDécouvrir les créateurs et leurs travauxJournaux de développementDécisions et enseignementsPromptsInstructions réutilisablesProblèmes d’outils d’IAProblèmes et contournements de Claude, Codex, GeminiVitrineRéalisations terminéesGuide de la communautéConstruire en toute transparence
Collaborer
Transfert techniqueApplications natives en Rust et eguiRéalisation de site web10 langues, comptes, documentation et téléchargementsRéalisation d'application de bureauRust et egui, sans WebViewChaîne de publication et de paiementSignature, MSI, deb, rpm, AppImage, empreintesPartenaire commercialRecommandez-nous, touchez 30 %ContactDéveloppement, partenariats, investissement
Services
Bureau à distanceAccédez à votre ordinateur depuis le navigateurPaquets d'installation sur mesureSeulement l'utile, réglages préchargés
Acheter
FR
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Se connecter
Se connecter
TASTEDEV

Des petits outils à un meilleur développement.

support@tastedev.netSoutenir TASTEDEV
ProduitsGamme de produitsAcheterDocsTéléchargementsMarketplaceAssistance
CommunautéProjetsJournaux de développementPromptsProblèmes d’outils d’IAVitrine
RèglesÀ proposPolitique de confidentialitéConditions d'utilisationConditions d’abonnementRemboursementRègles de la communauté
CompteSe connecterS'inscrire
Visiteurs
Aujourd’hui
Hier
Vues au total
Société
GXSOFT
Représentant
CHOI YOUNG GU
Numéro d’enregistrement
853-44-00368
Adresse
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Téléphone
+82-10-4404-1523
E-mail
whitecalvin@tastedev.net
Responsable de la confidentialité
CHOI YOUNG GU

© 2026 TASTEDEVLes informations produit s'appuient sur des sources de développement vérifiées.Publié · en amélioration

Documentation Flutter
Flutter
Getting Started with FlutterProject StructureCore ConceptsData and StateTestingBuilding and Deployment
Discussions

Guide Flutter · 3/6

Core Concepts

Ce chapitre n'est disponible qu'en anglais pour le moment.

The starting point for understanding Flutter is that everything is a widget. Text, buttons, padding, alignment, whole screens and the app itself are all widgets, and you build UIs by composing small widgets into larger ones. This chapter covers the two kinds of widgets, the build method, layout, the design libraries and navigation.

Widgets and the widget tree

A widget is a lightweight, immutable description of how part of the UI should look. When state changes, Flutter builds a new widget tree, compares it with the previous one and repaints only what actually changed, so creating widgets often is cheap.

Flutter does not use the platform's native UI controls. Its own rendering engine draws every pixel, which keeps the UI consistent across platforms and makes custom designs and animations straightforward.

StatelessWidget and StatefulWidget

A StatelessWidget renders purely from the values it receives in its constructor; it has no data of its own that changes.

class Greeting extends StatelessWidget {
  const Greeting({super.key, required this.name});

  final String name;

  @override
  Widget build(BuildContext context) {
    return Text('Hello, $name', style: Theme.of(context).textTheme.headlineSmall);
  }
}

A StatefulWidget holds state that changes over time. It is split into the widget class and a State class, and every state change must happen inside setState so Flutter knows to rebuild.

class Counter extends StatefulWidget {
  const Counter({super.key});

  @override
  State<Counter> createState() => _CounterState();
}

class _CounterState extends State<Counter> {
  int _count = 0;

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisSize: MainAxisSize.min,
      children: [
        Text('Pressed $_count times'),
        FilledButton(
          onPressed: () => setState(() => _count++),
          child: const Text('Add'),
        ),
      ],
    );
  }
}

The State object survives when its widget is rebuilt. Do one-time setup in initState and release controllers and subscriptions in dispose.

The build method and BuildContext

build returns the widgets that describe the UI, and it may run many times as state changes. Keep it cheap: no network calls or heavy computation, just turn data you already have into widgets.

BuildContext is the widget's location in the tree. Use it to look up information from ancestors, as in Theme.of(context), MediaQuery.sizeOf(context) or Navigator.of(context). Marking widgets that never change as const lets Flutter skip rebuilding them.

Layout widgets

Des questions sur ce chapitre ?
Chapitre précédentProject StructureChapitre suivantData and State

Layout in Flutter is done with widgets too:

WidgetPurpose
Row, ColumnLay out children horizontally or vertically
Expanded, FlexibleShare remaining space inside a Row or Column
Stack, PositionedOverlap widgets
Padding, SizedBox, Center, AlignSpacing, size and alignment
ContainerPadding, background, border and size in one
ListView, GridViewScrollable lists and grids

The core rule is: constraints go down, sizes go up, and the parent sets the position. A parent tells its child the minimum and maximum size allowed, the child picks a size within that range, and the parent decides where to place it.

Widget buildProfile() {
  return Padding(
    padding: const EdgeInsets.all(16),
    child: Row(
      children: [
        const CircleAvatar(radius: 24, child: Icon(Icons.person)),
        const SizedBox(width: 12),
        Expanded(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: const [
              Text('Jane Doe', style: TextStyle(fontWeight: FontWeight.bold)),
              Text('Flutter developer'),
            ],
          ),
        ),
        IconButton(onPressed: () {}, icon: const Icon(Icons.more_vert)),
      ],
    ),
  );
}

For long lists, use ListView.builder so only the visible items are built.

Material and Cupertino

Flutter ships two design libraries. Material follows Google's Material Design (Material 3 by default) with MaterialApp, Scaffold, AppBar, FilledButton and more. Cupertino provides iOS-style widgets such as CupertinoApp, CupertinoButton and CupertinoNavigationBar.

MaterialApp(
  title: 'Todos',
  theme: ThemeData(
    colorScheme: ColorScheme.fromSeed(seedColor: Colors.indigo),
  ),
  darkTheme: ThemeData(
    colorScheme: ColorScheme.fromSeed(seedColor: Colors.indigo, brightness: Brightness.dark),
  ),
  home: Scaffold(
    appBar: AppBar(title: const Text('Todos')),
    body: const Center(child: Text('Nothing to do yet')),
    floatingActionButton: FloatingActionButton(
      onPressed: () {},
      child: const Icon(Icons.add),
    ),
  ),
);

You can mix both libraries in one app, and adaptive constructors such as Switch.adaptive change their look to match the platform.

Navigation

Basic navigation is handled by Navigator, a stack of routes: push adds a screen on top and pop returns to the previous one.

// Go to the detail screen
Navigator.of(context).push(
  MaterialPageRoute(builder: (context) => const DetailScreen()),
);

// Go back
Navigator.of(context).pop();

For URL-based routing, deep links and browser address bar support, many apps use the go_router package maintained by the Flutter team.

Summary

  • Everything on screen is a widget, and UIs are built by composing widgets.
  • Use StatelessWidget when nothing changes, and StatefulWidget with setState when it does.
  • build runs often, so keep it light and mark unchanging widgets const.
  • Combine layout widgets such as Row, Column, Stack and Expanded with Material or Cupertino widgets.
  • Hot reload lets you refine widgets and see the result immediately.

0 commentaire

Meilleurs commentairesPlus récents d'abord

Se connecter · Connectez-vous pour laisser un commentaire.