[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"extension:v3:en:dart":3},{"resolvedFromAlias":4,"canonicalExt":5,"ext":5,"name":6,"category":7,"categoryName":8,"updatedAt":9,"popularity":10,"summary":11,"howToOs":12,"quickAnswer":18,"answerIntro":19,"whatIs":20,"description":21,"furtherReading":22,"openInstructions":41,"commonIssues":53,"securityNotes":72,"faq":76,"aliases":89,"mimeTypes":90,"relatedExtensions":92,"breadcrumbs":140,"categoryAnchor":150,"categoryFuturePath":151,"metaDescription":152,"availableHowToOs":153,"openOnDeviceLinks":154,"cannotOpenReasons":170,"cannotOpenFixes":171,"convertOptions":172,"securityAffiliateMessaging":173,"securityAffiliates":174},false,"dart","Dart source code","code","Code","2026-06-12T09:06:39.863Z",65,".dart files contain source code written in the Dart programming language. You open them in a code editor/IDE or work with them using the Dart SDK tools.",[13,14,15,16,17],"windows","mac","linux","ios","android","To open .DART files on Windows, open the .dart file with a code editor (it is plain text).","To open a .dart file, use a text editor or an IDE (it is plain text Dart source code). For checking or diagnosing issues, use the Dart SDK tools such as \"dart analyze\" on the file or its project.","A .dart file is a plain-text source file for the Dart programming language. Its contents follow the Dart language grammar and semantics defined by the Dart language specification. Tooling in the Dart SDK can parse and analyze .dart files (for example, static analysis via \"dart analyze\").","Dart is a programming language, and .dart is its common source-file extension. These files are meant to be read and edited by developers, then processed by Dart tooling as part of an application or library.\n\nBecause .dart is source code, it is typically used inside a project rather than as a standalone “document.” The language has an official specification that defines how source code is written and interpreted.\n\nIn practice, you’ll most often interact with .dart files through an editor/IDE for reading and editing, and through the Dart SDK for tasks like analysis. The Dart SDK documentation explicitly shows analyzing a Dart file as a supported operation (e.g., \"dart analyze \u003CDART_FILE>\").",[23,26,29,32,35,38],{"title":24,"url":25},"Dart (programming language) — Wikipedia","https://en.wikipedia.org/wiki/Dart_%28programming_language%29",{"title":27,"url":28},"Dart Programming Language Specification (Draft PDF) — spec.dart.dev","https://spec.dart.dev/DartLangSpecDraft.pdf",{"title":30,"url":31},"Dart Programming Language Specification v2.10 (PDF) — dart.dev","https://dart.dev/resources/language/spec/versions/DartLangSpec-v2.10.pdf",{"title":33,"url":34},"dart analyze — Dart SDK tool documentation","https://dart.dev/tools/dart-analyze",{"title":36,"url":37},"dartMimeType constant (dds/dap) — pub.dev documentation","https://pub.dev/documentation/dds/latest/dap/dartMimeType-constant.html",{"title":39,"url":40},"Shared MIME-info Database specification — freedesktop.org","https://specifications.freedesktop.org/shared-mime-info-spec/latest-single/",{"windows":42,"macos":45,"linux":47,"ios":50,"android":52},[43,44],"Open the .dart file with a code editor (it is plain text).","If you have the Dart SDK installed, open a terminal in the file’s folder (or project folder) and run: dart analyze \u003Cyour_file.dart> to check for issues.",[43,46],"If you have the Dart SDK installed, use Terminal to run: dart analyze \u003Cyour_file.dart> (or run it from the project root).",[48,49],"Open the .dart file with a text editor or code editor (it is plain text).","Use the Dart SDK tools from a terminal (for example: dart analyze \u003Cyour_file.dart> or run analysis from the project directory).",[51],"Open it in a text/code editor app that can view plain-text files; for development or analysis, transfer the file to a desktop system with the Dart SDK.",[51],[54,60,66],{"title":55,"description":56,"steps":57},"File opens in the wrong app (or as an unknown file type)","Some systems don’t automatically associate .dart with a code editor, so double-clicking may open the file in an unrelated program or prompt you to choose an app.",[58,59],"Open the file from within your preferred code editor (use File → Open).","Optionally set your OS file association so .dart defaults to that editor for future opens.",{"title":61,"description":62,"steps":63},"Analysis errors when running Dart tools","If the file contains syntax/type issues or depends on other files/packages in a project, Dart’s analyzer can report errors—especially when analyzing a single file outside its expected project context.",[64,65],"If the .dart file belongs to a project, run analysis from the project root instead of only the single file (use dart analyze).","Consult the analyzer output to locate the exact line/column reported and fix the indicated Dart syntax or type issue.",{"title":67,"description":68,"steps":69},"Text looks garbled due to encoding or line-ending differences",".dart files are plain text; if the file was created on a different system or saved with an unexpected encoding, it may display incorrectly in some editors.",[70,71],"Reopen the file in an editor that lets you choose encoding and try UTF-8.","Convert line endings (CRLF/LF) using your editor’s line-ending setting if formatting looks off.",[73,74,75],".dart files are source code (plain text). Opening them in a text editor is generally low risk, but running or executing code derived from an untrusted .dart file can be unsafe because it may perform harmful actions when executed in an application context.","Be cautious with editor/IDE extensions or tooling that automatically executes scripts, runs build steps, or fetches dependencies when you open a project containing .dart files.","Static analysis (for example, using the Dart SDK’s \"dart analyze\") is a safer first step than attempting to run or integrate unknown Dart code.",[77,80,83,86],{"question":78,"answer":79},"What is a .dart file used for?","It’s a Dart programming language source file used to write Dart code. It’s commonly part of a Dart project and is edited in a code editor/IDE and processed by Dart SDK tools.",{"question":81,"answer":82},"Is .dart a binary format?","No. A .dart file is plain text source code written according to the Dart language specification.",{"question":84,"answer":85},"What MIME type is used for Dart source files?","A commonly used MIME type string for Dart source is text/x-dart.",{"question":87,"answer":88},"How can I check a .dart file for problems?","If you have the Dart SDK, you can run the analyzer. The Dart documentation shows using: dart analyze \u003CDART_FILE>.",[],[91],"text/x-dart",[93,99,104,110,116,122,128,134],{"ext":94,"name":95,"category":7,"categoryName":8,"popularity":96,"summary":97,"howToOs":98},"php","PHP script (PHP source code)",85,".php files typically contain PHP source code used on web servers to generate dynamic web pages and API responses. You can open them in a code editor, but they are usually executed by a web server (often via PHP-FPM) rather than “run” like a normal desktop app.",[13,14,15,16,17],{"ext":100,"name":101,"category":7,"categoryName":8,"popularity":96,"summary":102,"howToOs":103},"sql","SQL script (Structured Query Language)",".sql files contain SQL statements (queries, schema definitions, and data changes) that can be run by a database tool or opened as plain text for review and editing.",[13,14,15,16,17],{"ext":105,"name":106,"category":7,"categoryName":8,"popularity":107,"summary":108,"howToOs":109},"cs","C# source code file",80,".cs files contain C# source code used to build .NET applications and libraries. They are plain-text files typically edited in code editors and IDEs such as Visual Studio Code with C# tooling.",[13,14,15,16,17],{"ext":111,"name":112,"category":7,"categoryName":8,"popularity":113,"summary":114,"howToOs":115},"go","Go source file",78,".go files contain source code written in the Go (Golang) programming language. You can open them in code editors (for reading/editing) or build/run them with the Go toolchain.",[13,14,15,16,17],{"ext":117,"name":118,"category":7,"categoryName":8,"popularity":119,"summary":120,"howToOs":121},"tsx","TypeScript JSX (TSX) source file",75,".tsx is a TypeScript source code file that contains JSX syntax, commonly used with React-style UI components. You open it in a code editor (for viewing/editing) and build it with TypeScript tooling (for running in apps).",[13,14,15,16,17],{"ext":123,"name":124,"category":7,"categoryName":8,"popularity":125,"summary":126,"howToOs":127},"kt","Kotlin source file",72,".kt files contain Kotlin source code used to build Kotlin applications (including Android apps) and libraries. You typically open them in a code editor or IDE such as IntelliJ IDEA or Android Studio.",[13,14,15,16,17],{"ext":129,"name":130,"category":7,"categoryName":8,"popularity":131,"summary":132,"howToOs":133},"swift","Swift Source Code",70,".swift is a Swift programming language source file used to write apps and other software. You open it in code editors and IDEs such as Xcode or other text/code editors.",[13,14,15,16,17],{"ext":135,"name":136,"category":7,"categoryName":8,"popularity":137,"summary":138,"howToOs":139},"proto","Protocol Buffers schema (Protocol Buffers definition file)",60,".proto files define data structures and services for Google’s Protocol Buffers. They are plain-text schemas that you open in a text editor/IDE or compile with the Protocol Buffers compiler (protoc) to generate code.",[13,14,15,16,17],[141,144,147],{"label":142,"to":143},"Home","/",{"label":145,"to":146},"File Extension Index","/file-extension",{"label":148,"to":149},".DART","/file-extension/dart","category-code","/category/code","Learn what .DART files are, how to open them on every platform, common fixes, and security best practices.",[13,14,15,16,17],[155,158,161,164,167],{"os":13,"label":156,"to":157},"Open .DART on Windows","/how-to/open-dart-on-windows",{"os":14,"label":159,"to":160},"Open .DART on Mac","/how-to/open-dart-on-mac",{"os":15,"label":162,"to":163},"Open .DART on Linux","/how-to/open-dart-on-linux",{"os":16,"label":165,"to":166},"Open .DART on iOS","/how-to/open-dart-on-ios",{"os":17,"label":168,"to":169},"Open .DART on Android","/how-to/open-dart-on-android",[55,61,67],[58,59],[],"code_runtime",[175,179],{"name":176,"description":177,"affiliateUrl":178},"Avast","Avast offers free and premium antivirus software that protects against viruses, malware, ransomware, and phishing. Scan files before opening them to ensure safety.","https://www.avast.com/lp-aff-consumer-store?expid=inf601",{"name":180,"description":181,"affiliateUrl":182},"Norton","Norton 360 delivers comprehensive antivirus protection, VPN, and identity theft monitoring. Scan files for threats before opening to keep your device secure.","http://buy.norton.com/aff_home?utm_campaign=en-ww_nor_n36_aff_nas_nau_nah_cj_nad_low:_sec_nat_mktc_norton_360"]