text
stringlengths
6
13.6M
id
stringlengths
13
176
metadata
dict
__index_level_0__
int64
0
1.69k
// ignore_for_file: unused_field import 'package:flutter/material.dart'; // #docregion BubblePainterEmpty @immutable class BubbleBackground extends StatelessWidget { const BubbleBackground({ super.key, required this.colors, this.child, }); final List<Color> colors; final Widget? child; @overri...
website/examples/cookbook/effects/gradient_bubbles/lib/bubble_painter_empty.dart/0
{ "file_path": "website/examples/cookbook/effects/gradient_bubbles/lib/bubble_painter_empty.dart", "repo_id": "website", "token_count": 306 }
1,254
import 'package:flutter/material.dart'; // #docregion GlobalKey @immutable class LocationListItem extends StatelessWidget { final GlobalKey _backgroundImageKey = GlobalKey(); Widget _buildParallaxBackground(BuildContext context) { return Flow( delegate: ParallaxFlowDelegate( scrollable: Scrollab...
website/examples/cookbook/effects/parallax_scrolling/lib/excerpt5.dart/0
{ "file_path": "website/examples/cookbook/effects/parallax_scrolling/lib/excerpt5.dart", "repo_id": "website", "token_count": 2714 }
1,255
// ignore_for_file: unused_element import 'dart:math'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import './excerpt1.dart'; import './excerpt3.dart'; // #docregion AnimationController class _TypingIndicatorState extends State<TypingIndicator> with TickerProviderStateMixin { ...
website/examples/cookbook/effects/typing_indicator/lib/excerpt4.dart/0
{ "file_path": "website/examples/cookbook/effects/typing_indicator/lib/excerpt4.dart", "repo_id": "website", "token_count": 2405 }
1,256
import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return const MaterialApp( title: 'Retrieve Text Input', home: MyCustomForm(), ); } } // Define a cu...
website/examples/cookbook/forms/text_field_changes/lib/main.dart/0
{ "file_path": "website/examples/cookbook/forms/text_field_changes/lib/main.dart", "repo_id": "website", "token_count": 822 }
1,257
// File generated by FlutterFire CLI. // ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform; /// Default [FirebaseOpti...
website/examples/cookbook/games/firestore_multiplayer/lib/firebase_options.dart/0
{ "file_path": "website/examples/cookbook/games/firestore_multiplayer/lib/firebase_options.dart", "repo_id": "website", "token_count": 1001 }
1,258
import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { const title = 'Basic List'; return MaterialApp( title: title, home: Scaffold( appBar: AppBar(...
website/examples/cookbook/lists/basic_list/lib/main.dart/0
{ "file_path": "website/examples/cookbook/lists/basic_list/lib/main.dart", "repo_id": "website", "token_count": 454 }
1,259
import 'package:flutter/material.dart'; class FirstScreen extends StatelessWidget { const FirstScreen({super.key}); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('First Screen'), ), body: Center( child: ElevatedButton( ...
website/examples/cookbook/navigation/named_routes/lib/main_original.dart/0
{ "file_path": "website/examples/cookbook/navigation/named_routes/lib/main_original.dart", "repo_id": "website", "token_count": 408 }
1,260
import 'dart:io'; import 'package:flutter/widgets.dart'; import 'package:google_mobile_ads/google_mobile_ads.dart'; class MyBannerAdWidget extends StatefulWidget { /// The requested size of the banner. Defaults to [AdSize.banner]. final AdSize adSize; /// The AdMob ad unit to show. /// /// TODO: replace th...
website/examples/cookbook/plugins/google_mobile_ads/lib/my_banner_ad.dart/0
{ "file_path": "website/examples/cookbook/plugins/google_mobile_ads/lib/my_banner_ad.dart", "repo_id": "website", "token_count": 991 }
1,261
name: introduction description: A new Flutter project. publish_to: none # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: sdk: ^3.3.0 dependencies: flutter: sdk: flutter integration_test: sdk: flutter flutter_test: sdk: flutter dev_dependencies: example_utils: ...
website/examples/cookbook/testing/integration/introduction/pubspec.yaml/0
{ "file_path": "website/examples/cookbook/testing/integration/introduction/pubspec.yaml", "repo_id": "website", "token_count": 154 }
1,262
// Mocks generated by Mockito 5.4.4 from annotations // in mocking/test/fetch_album_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'dart:convert' as _i4; import 'dart:typed_data' as _i6; import 'package:http/http.dart' a...
website/examples/cookbook/testing/unit/mocking/test/fetch_album_test.mocks.dart/0
{ "file_path": "website/examples/cookbook/testing/unit/mocking/test/fetch_album_test.mocks.dart", "repo_id": "website", "token_count": 3600 }
1,263
name: finders description: A new Flutter project. environment: sdk: ^3.3.0 dependencies: flutter: sdk: flutter dev_dependencies: example_utils: path: ../../../../example_utils flutter_test: sdk: flutter flutter: uses-material-design: true
website/examples/cookbook/testing/widget/tap_drag/pubspec.yaml/0
{ "file_path": "website/examples/cookbook/testing/widget/tap_drag/pubspec.yaml", "repo_id": "website", "token_count": 105 }
1,264
// GENERATED CODE - DO NOT MODIFY BY HAND part of 'address.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** Address _$AddressFromJson(Map<String, dynamic> json) => Address( ...
website/examples/development/data-and-backend/json/lib/nested/address.g.dart/0
{ "file_path": "website/examples/development/data-and-backend/json/lib/nested/address.g.dart", "repo_id": "website", "token_count": 154 }
1,265
// ignore_for_file: avoid_print // #docregion UseApi import 'generated_pigeon.dart'; Future<void> onClick() async { SearchRequest request = SearchRequest(query: 'test'); Api api = SomeApi(); SearchReply reply = await api.search(request); print('reply: ${reply.result}'); } // #enddocregion UseApi class SomeAp...
website/examples/development/platform_integration/lib/use_pigeon.dart/0
{ "file_path": "website/examples/development/platform_integration/lib/use_pigeon.dart", "repo_id": "website", "token_count": 113 }
1,266
import 'package:flutter/material.dart'; // TapboxA manages its own state. //------------------------- TapboxA ---------------------------------- class TapboxA extends StatefulWidget { const TapboxA({super.key}); @override State<TapboxA> createState() => _TapboxAState(); } class _TapboxAState extends State<Ta...
website/examples/development/ui/interactive/lib/self_managed.dart/0
{ "file_path": "website/examples/development/ui/interactive/lib/self_managed.dart", "repo_id": "website", "token_count": 558 }
1,267
import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; void main() { runApp(const SampleApp()); } class SampleApp extends StatelessWidget { const SampleApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( title: 'Sampl...
website/examples/get-started/flutter-for/android_devs/lib/async.dart/0
{ "file_path": "website/examples/get-started/flutter-for/android_devs/lib/async.dart", "repo_id": "website", "token_count": 598 }
1,268
import 'package:flutter/material.dart'; void main() => runApp(const MaterialApp(home: DemoApp())); class DemoApp extends StatelessWidget { const DemoApp({super.key}); @override Widget build(BuildContext context) => const Scaffold(body: Signature()); } class Signature extends StatefulWidget { const Signature...
website/examples/get-started/flutter-for/ios_devs/lib/canvas.dart/0
{ "file_path": "website/examples/get-started/flutter-for/ios_devs/lib/canvas.dart", "repo_id": "website", "token_count": 669 }
1,269
import 'package:flutter/material.dart'; class MyWidget extends StatelessWidget { const MyWidget({super.key}); // #docregion CustomFont @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Sample App'), ), body: const Center( c...
website/examples/get-started/flutter-for/ios_devs/lib/text.dart/0
{ "file_path": "website/examples/get-started/flutter-for/ios_devs/lib/text.dart", "repo_id": "website", "token_count": 200 }
1,270
// ignore_for_file: avoid_print, unused_local_variable, prefer_typing_uninitialized_variables // #docregion Main /// Dart void main() {} // #enddocregion Main void printCode() { // #docregion Print /// Dart print('Hello world!'); // #enddocregion Print } void variableCode() { // #docregion Variables /// ...
website/examples/get-started/flutter-for/react_native_devs/lib/main.dart/0
{ "file_path": "website/examples/get-started/flutter-for/react_native_devs/lib/main.dart", "repo_id": "website", "token_count": 318 }
1,271
import 'package:flutter/material.dart'; void main() { runApp(const MaterialApp(home: DemoApp())); } class DemoApp extends StatelessWidget { const DemoApp({super.key}); @override Widget build(BuildContext context) => const Scaffold(body: Signature()); } class Signature extends StatefulWidget { const Signat...
website/examples/get-started/flutter-for/xamarin_devs/lib/draw.dart/0
{ "file_path": "website/examples/get-started/flutter-for/xamarin_devs/lib/draw.dart", "repo_id": "website", "token_count": 606 }
1,272
import 'package:flutter/material.dart'; // #docregion Localization import 'package:flutter_localizations/flutter_localizations.dart'; class MyWidget extends StatelessWidget { const MyWidget({super.key}); @override Widget build(BuildContext context) { return const MaterialApp( localizationsDelegates: <...
website/examples/get-started/flutter-for/xamarin_devs/lib/strings.dart/0
{ "file_path": "website/examples/get-started/flutter-for/xamarin_devs/lib/strings.dart", "repo_id": "website", "token_count": 548 }
1,273
// ignore_for_file: unused_local_variable import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; void examples(BuildContext context) { // #docregion MaterialAppExample const MaterialApp( title: 'Localizations Sample App', localizationsDelegates: AppLocalizati...
website/examples/internationalization/gen_l10n_example/lib/examples.dart/0
{ "file_path": "website/examples/internationalization/gen_l10n_example/lib/examples.dart", "repo_id": "website", "token_count": 1338 }
1,274
import 'package:flutter_test/flutter_test.dart'; import 'package:intl_example/main.dart'; void main() { testWidgets('Test localized strings in demo app', (tester) async { // Build our app and trigger a frame. await tester.pumpWidget(const Demo()); // // Set the app's locale to English await tester....
website/examples/internationalization/intl_example/test/widget_test.dart/0
{ "file_path": "website/examples/internationalization/intl_example/test/widget_test.dart", "repo_id": "website", "token_count": 276 }
1,275
// Copyright 2019 The Flutter team. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; const double _colorItemHeight = 48; class _Palette { const _Palette({ required this.name, required this.pr...
website/examples/layout/gallery/lib/colors_demo.dart/0
{ "file_path": "website/examples/layout/gallery/lib/colors_demo.dart", "repo_id": "website", "token_count": 2477 }
1,276
import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart' show debugPaintSizeEnabled; void main() { debugPaintSizeEnabled = false; // Set to true for visual layout. runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildCon...
website/examples/layout/pavlova/lib/main.dart/0
{ "file_path": "website/examples/layout/pavlova/lib/main.dart", "repo_id": "website", "token_count": 2189 }
1,277
import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart' show debugPaintSizeEnabled; void main() { debugPaintSizeEnabled = true; // Remove to suppress visual layout runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildCo...
website/examples/layout/sizing/lib/main.dart/0
{ "file_path": "website/examples/layout/sizing/lib/main.dart", "repo_id": "website", "token_count": 902 }
1,278
import 'dart:developer'; void someFunction(double offset) { debugger(when: offset > 30); // ... }
website/examples/testing/code_debugging/lib/debugger.dart/0
{ "file_path": "website/examples/testing/code_debugging/lib/debugger.dart", "repo_id": "website", "token_count": 35 }
1,279
name: assets_and_images description: An example project showing how to declare and load assets. publish_to: none environment: sdk: ^3.3.0 dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.6 dev_dependencies: example_utils: path: ../../example_utils flutter_test: sdk: flutter flutte...
website/examples/ui/assets_and_images/pubspec.yaml/0
{ "file_path": "website/examples/ui/assets_and_images/pubspec.yaml", "repo_id": "website", "token_count": 165 }
1,280
import 'dart:io' show Platform; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; Widget layoutBuilderWidget() { // #docregion LayoutBuilder Widget foo = LayoutBuilder(builder: (context, constraints) { bool useVerticalLayout = constraints.m...
website/examples/ui/layout/adaptive_app_demos/lib/widgets/extra_widget_excerpts.dart/0
{ "file_path": "website/examples/ui/layout/adaptive_app_demos/lib/widgets/extra_widget_excerpts.dart", "repo_id": "website", "token_count": 1630 }
1,281
import 'package:flutter/rendering.dart'; void showLayoutGuidelines() { debugPaintSizeEnabled = true; }
website/examples/visual_debugging/lib/layout_guidelines.dart/0
{ "file_path": "website/examples/visual_debugging/lib/layout_guidelines.dart", "repo_id": "website", "token_count": 35 }
1,282
- group: 'China Flutter User Group' mirror: 'flutter-io.cn' urls: pubhosted: 'https://pub.flutter-io.cn' flutterstorage: 'https://storage.flutter-io.cn' issues: 'https://github.com/cfug/flutter.cn/issues/new/choose' group: https://github.com/cfug - group: 'Shanghai Jiao Tong University *nix User Gro...
website/src/_data/mirrors.yml/0
{ "file_path": "website/src/_data/mirrors.yml", "repo_id": "website", "token_count": 365 }
1,283
{% assign path_base = page.url %} {% assign dirs = include.pages | where_exp: "item", "item.url contains path_base" | where_exp: "item", "item.url != path_base" | group_by_exp: "item", "item.url | remove: path_base | split: '/' | first" | sort: "name" %} {% for dir in dirs %} {% assi...
website/src/_includes/docs/cookbook-toc.md/0
{ "file_path": "website/src/_includes/docs/cookbook-toc.md", "repo_id": "website", "token_count": 252 }
1,284
<details markdown="1"> <summary><b>How to install Chrome from the command line</b></summary> ```terminal $ wget https://dl-ssl.google.com/linux/linux_signing_key.pub -O /tmp/google.pub $ gpg --no-default-keyring \ --keyring /etc/apt/keyrings/google-chrome.gpg \ --import /tmp/google.pub $ echo 'deb [ar...
website/src/_includes/docs/install/accordions/install-chrome-from-cli.md/0
{ "file_path": "website/src/_includes/docs/install/accordions/install-chrome-from-cli.md", "repo_id": "website", "token_count": 217 }
1,285
When you run the current version of `flutter doctor`, it might list a different version of one of these packages. If it does, install the version it recommends.
website/src/_includes/docs/install/reqs/flutter-sdk/flutter-doctor-precedence.md/0
{ "file_path": "website/src/_includes/docs/install/reqs/flutter-sdk/flutter-doctor-precedence.md", "repo_id": "website", "token_count": 37 }
1,286
{% assign terminal=include.terminal %} ### Update your Windows PATH variable {:.no_toc} {% include docs/help-link.md location='win-path' section='#unable-to-find-the-flutter-command' %} To run Flutter commands in {{terminal}}, add Flutter to the `PATH` environment variable. This section presumes that you installed t...
website/src/_includes/docs/install/reqs/windows/set-path.md/0
{ "file_path": "website/src/_includes/docs/install/reqs/windows/set-path.md", "repo_id": "website", "token_count": 467 }
1,287
<footer class="site-footer"> <div class="container-fluid"> <div class="row"> <div class="col-md-12 site-footer__wrapper"> <div class="site-footer__logo"> <img src="/assets/images/branding/flutter/logo/flutter-mono-81x100.png" alt="Flutter Logo" width="81" height="100"> </div> ...
website/src/_includes/footer.html/0
{ "file_path": "website/src/_includes/footer.html", "repo_id": "website", "token_count": 666 }
1,288
--- layout: base --- <div class="container"> <div class="row"> <main class="col-12"> {{content}} </main> </div> </div>
website/src/_layouts/landing.html/0
{ "file_path": "website/src/_layouts/landing.html", "repo_id": "website", "token_count": 61 }
1,289
require 'cgi' require_relative 'dart_site_util' module DartSite # Base class used by some Liquid Block plugins to render code that gets # prettified by https://github.com/google/code-prettify. # # The following markup syntax can be used to apply a CSS class to a span # of code: # # `[[foo]]some code[[...
website/src/_plugins/prettify_core.rb/0
{ "file_path": "website/src/_plugins/prettify_core.rb", "repo_id": "website", "token_count": 1314 }
1,290
// A big button centered on top of an image. // // The container is typically a <div> element. The div has only 2 children: // an <img> element (the background) and a <a class="btn"> button. // // The image should be very bright and slightly blurred so that the button // stands out. .juicy-button-container { position...
website/src/_sass/components/_juicy-button.scss/0
{ "file_path": "website/src/_sass/components/_juicy-button.scss", "repo_id": "website", "token_count": 352 }
1,291
--- title: Integrate a Flutter module into your Android project short-title: Integrate Flutter description: Learn how to integrate a Flutter module into your existing Android project. --- Flutter can be embedded into your existing Android application piecemeal, as a source code Gradle subproject or as AARs. The integ...
website/src/add-to-app/android/project-setup.md/0
{ "file_path": "website/src/add-to-app/android/project-setup.md", "repo_id": "website", "token_count": 5079 }
1,292
The owl.jpeg image is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. It was originally created by Trebol-a and has been modified for this site. https://creativecommons.org/licenses/by-sa/3.0/deed.en https://commons.wikimedia.org/wiki/User:Trebol-a https://commons.wikimedia.org/wiki/Fi...
website/src/assets/images/docs/LICENSE/0
{ "file_path": "website/src/assets/images/docs/LICENSE", "repo_id": "website", "token_count": 116 }
1,293
{% assign id = include.ref-os | downcase -%} {% assign mainpath = include.filepath -%} {%- case id %} {% when 'windows','macos' %} {%- assign file-format = 'zip' %} {% else %} {%- assign file-format = 'tar.xz' %} {% endcase %} {%- if id == 'chromeos' %} {% assign plat = 'linux' %} {%- else %} {% assign plat = id %} {%...
website/src/community/china/_download-urls.md/0
{ "file_path": "website/src/community/china/_download-urls.md", "repo_id": "website", "token_count": 326 }
1,294
--- title: Use themes to share colors and font styles short-title: Themes description: How to share colors and font styles throughout an app using Themes. js: - defer: true url: https://old-dartpad-3ce3f.web.app/inject_embed.dart.js --- <?code-excerpt path-base="cookbook/design/themes"?> {{site.alert.note}} T...
website/src/cookbook/design/themes.md/0
{ "file_path": "website/src/cookbook/design/themes.md", "repo_id": "website", "token_count": 3430 }
1,295
--- title: Create and style a text field description: How to implement a text field. js: - defer: true url: https://old-dartpad-3ce3f.web.app/inject_embed.dart.js --- <?code-excerpt path-base="cookbook/forms/text_input/"?> Text fields allow users to type text into an app. They are used to build forms, send mess...
website/src/cookbook/forms/text-input.md/0
{ "file_path": "website/src/cookbook/forms/text-input.md", "repo_id": "website", "token_count": 1379 }
1,296
--- title: Place a floating app bar above a list description: How to place a floating app bar above a list. js: - defer: true url: https://old-dartpad-3ce3f.web.app/inject_embed.dart.js --- <?code-excerpt path-base="cookbook/lists/floating_app_bar/"?> To make it easier for users to view a list of items, you mig...
website/src/cookbook/lists/floating-app-bar.md/0
{ "file_path": "website/src/cookbook/lists/floating-app-bar.md", "repo_id": "website", "token_count": 2624 }
1,297
--- title: Set up app links for Android description: How set up universal links for an iOS application built with Flutter js: - defer: true url: https://old-dartpad-3ce3f.web.app/inject_embed.dart.js --- <?code-excerpt path-base="codelabs/deeplink_cookbook"?> Deep linking is a mechanism for launching an app wit...
website/src/cookbook/navigation/set-up-app-links.md/0
{ "file_path": "website/src/cookbook/navigation/set-up-app-links.md", "repo_id": "website", "token_count": 2352 }
1,298
--- title: Take a picture using the camera description: How to use a camera plugin on mobile. --- <?code-excerpt path-base="cookbook/plugins/picture_using_camera/"?> Many apps require working with the device's cameras to take photos and videos. Flutter provides the [`camera`][] plugin for this purpose. The `camera` ...
website/src/cookbook/plugins/picture-using-camera.md/0
{ "file_path": "website/src/cookbook/plugins/picture-using-camera.md", "repo_id": "website", "token_count": 3913 }
1,299
--- title: Google APIs description: How to use Google APIs with Flutter. --- <?code-excerpt path-base="googleapis/"?> The [Google APIs package][] exposes dozens of Google services that you can use from Dart projects. This page describes how to use APIs that interact with end-user data by using Google authentication....
website/src/data-and-backend/google-apis.md/0
{ "file_path": "website/src/data-and-backend/google-apis.md", "repo_id": "website", "token_count": 2006 }
1,300
--- title: Build and release an iOS app description: How to release a Flutter app to the App Store. short-title: iOS --- This guide provides a step-by-step walkthrough of releasing a Flutter app to the [App Store][appstore] and [TestFlight][]. ## Preliminaries Xcode is required to build and release your app. You mus...
website/src/deployment/ios.md/0
{ "file_path": "website/src/deployment/ios.md", "repo_id": "website", "token_count": 5030 }
1,301
--- title: Flutter for SwiftUI Developers description: Learn how to apply SwiftUI developer knowledge when building Flutter apps. --- <?code-excerpt path-base="get-started/flutter-for/ios_devs"?> {% assign sample_path = "blob/main/examples/get-started/flutter-for/ios_devs" %} SwiftUI developers who want to write mob...
website/src/get-started/flutter-for/swiftui-devs.md/0
{ "file_path": "website/src/get-started/flutter-for/swiftui-devs.md", "repo_id": "website", "token_count": 14863 }
1,302
## Get the Flutter SDK {#get-sdk} {% include docs/china-notice.md %} 1. Install the core development tools needed for Flutter: ```terminal $ sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev ``` This downloads the compiler toolchain needed to compile apps for ChromeOS. 1. Downl...
website/src/get-started/install/_deprecated/_get-sdk-chromeos.md/0
{ "file_path": "website/src/get-started/install/_deprecated/_get-sdk-chromeos.md", "repo_id": "website", "token_count": 512 }
1,303
--- title: Start building Flutter native desktop apps on Linux description: Configure your system to develop Flutter desktop apps on Linux. short-title: Make Linux desktop apps target: desktop config: LinuxDesktop devos: Linux next: title: Create a test app path: /get-started/test-drive --- {% include docs/install...
website/src/get-started/install/linux/desktop.md/0
{ "file_path": "website/src/get-started/install/linux/desktop.md", "repo_id": "website", "token_count": 258 }
1,304
--- title: <Job Title> toc: false --- {% comment %} 1. Make a copy of this document within the `src/jobs` directory 2. Name it something representative of the role 3. Remove the leading underscore (_) to allow the document to be published 4. Specify the full job title in the front matter 5. Update the sections with a ...
website/src/jobs/_template.md/0
{ "file_path": "website/src/jobs/_template.md", "repo_id": "website", "token_count": 568 }
1,305
--- title: Improving rendering performance description: How to measure and evaluate your app's rendering performance. --- {% include docs/performance.md %} Rendering animations in your app is one of the most cited topics of interest when it comes to measuring performance. Thanks in part to Flutter's Skia engine and i...
website/src/perf/rendering-performance.md/0
{ "file_path": "website/src/perf/rendering-performance.md", "repo_id": "website", "token_count": 641 }
1,306
--- title: Hosting native Android views in your Flutter app with Platform Views short-title: Android platform-views description: Learn how to host native Android views in your Flutter app with Platform Views. --- <?code-excerpt path-base="development/platform_integration"?> Platform views allow you to embed native vi...
website/src/platform-integration/android/platform-views.md/0
{ "file_path": "website/src/platform-integration/android/platform-views.md", "repo_id": "website", "token_count": 4186 }
1,307
--- title: Hosting native iOS views in your Flutter app with Platform Views short-title: iOS platform-views description: Learn how to host native iOS views in your Flutter app with Platform Views. --- <?code-excerpt path-base="development/platform_integration"?> Platform views allow you to embed native views in a Flu...
website/src/platform-integration/ios/platform-views.md/0
{ "file_path": "website/src/platform-integration/ios/platform-views.md", "repo_id": "website", "token_count": 4131 }
1,308
--- title: Building a web application with Flutter description: Instructions for creating a Flutter app for the web. short-title: Web development --- This page covers the following steps for getting started with web support: * Configure the `flutter` tool for web support. * Create a new project with web support. * Ru...
website/src/platform-integration/web/building.md/0
{ "file_path": "website/src/platform-integration/web/building.md", "repo_id": "website", "token_count": 1452 }
1,309
--- title: Building Windows apps with Flutter description: Platform-specific considerations for building for Windows with Flutter. toc: true short-title: Windows development --- This page discusses considerations unique to building Windows apps with Flutter, including shell integration and distribution of Windows apps...
website/src/platform-integration/windows/building.md/0
{ "file_path": "website/src/platform-integration/windows/building.md", "repo_id": "website", "token_count": 3168 }
1,310
--- title: Deprecated API removed after v1.22 description: > After reaching end of life, the following deprecated APIs were removed from Flutter. --- ## Summary In accordance with Flutter's [Deprecation Policy][], deprecated APIs that reached end of life after the 1.22 stable release have been removed. This is t...
website/src/release/breaking-changes/1-22-deprecations.md/0
{ "file_path": "website/src/release/breaking-changes/1-22-deprecations.md", "repo_id": "website", "token_count": 7626 }
1,311
--- title: Android Predictive Back description: >- The ability to control back navigation at the time that a back gesture is received has been replaced with an ahead-of-time navigation API in order to support Android 14's Predictive Back feature. --- ## Summary To support Android 14's Predictive Back feature, a...
website/src/release/breaking-changes/android-predictive-back.md/0
{ "file_path": "website/src/release/breaking-changes/android-predictive-back.md", "repo_id": "website", "token_count": 3352 }
1,312
--- title: Bottom Navigation Title To Label description: > Deprecated BottomNavigationBarItem's title (a Widget) in favor of label (a String). --- ## Summary `BottomNavigationBarItem.title` gives a deprecation warning, or no longer exists when referenced in code. ## Context `BottomNavigationBarItem`s `title` p...
website/src/release/breaking-changes/bottom-navigation-title-to-label.md/0
{ "file_path": "website/src/release/breaking-changes/bottom-navigation-title-to-label.md", "repo_id": "website", "token_count": 571 }
1,313
--- title: Dialogs' Default BorderRadius description: The default BorderRadius of Dialog widgets is changing. --- ## Summary Instances of `Dialog`, as well as `SimpleDialog`, `AlertDialog`, and `showTimePicker`, now have a default shape of a `RoundedRectangleBorder` with a `BorderRadius` of 4.0 pixels. This matches t...
website/src/release/breaking-changes/dialog-border-radius.md/0
{ "file_path": "website/src/release/breaking-changes/dialog-border-radius.md", "repo_id": "website", "token_count": 940 }
1,314
--- title: ImageCache and ImageProvider changes description: > ImageCache requires implementers to override containsKey, and ImageProvider has marked resolve as @nonVirtual. --- ## Summary `ImageCache` now has a method called `containsKey`. `ImageProvider` subclasses should not override `resolve`, but instead sho...
website/src/release/breaking-changes/image-cache-and-provider.md/0
{ "file_path": "website/src/release/breaking-changes/image-cache-and-provider.md", "repo_id": "website", "token_count": 1165 }
1,315
--- title: MouseTracker moved to rendering description: MouseTracker and related symbols moved to the rendering package. --- ## Summary [`MouseTracker`][] and related symbols are moved from the `gestures` package, resulting in error messages such as undefined classes or methods. Import them from `rendering` package i...
website/src/release/breaking-changes/mouse-tracker-moved-to-rendering.md/0
{ "file_path": "website/src/release/breaking-changes/mouse-tracker-moved-to-rendering.md", "repo_id": "website", "token_count": 777 }
1,316
--- title: The RenderEditable needs to be laid out before hit testing description: > The hit testing of RenderEditable requires additional information that is only available after the layout. --- ## Summary Instances of `RenderEditable` must be laid out before processing hit testing. Trying to hit-test a `RenderE...
website/src/release/breaking-changes/rendereditable-layout-before-hit-test.md/0
{ "file_path": "website/src/release/breaking-changes/rendereditable-layout-before-hit-test.md", "repo_id": "website", "token_count": 1235 }
1,317
--- title: TestTextInput state reset description: TestTextInput state is now reset between tests. --- ## Summary The state of a `TestTextInput` instance, a stub for the system's onscreen keyboard, is now reset between tests. ## Context The Flutter test framework uses a class called `TestTextInput` to track and mani...
website/src/release/breaking-changes/test-text-input.md/0
{ "file_path": "website/src/release/breaking-changes/test-text-input.md", "repo_id": "website", "token_count": 611 }
1,318
--- title: Migrate a Windows project to set version information description: How to update a Windows project to set version information --- Flutter 3.3 added support for setting the Windows app's version from the `pubspec.yaml` file or through the `--build-name` and `--build-number` build arguments. For more informati...
website/src/release/breaking-changes/windows-version-information.md/0
{ "file_path": "website/src/release/breaking-changes/windows-version-information.md", "repo_id": "website", "token_count": 545 }
1,319
--- title: Flutter 1.5.4 release notes short-title: 1.5.4 release notes description: Release notes for Flutter 1.5.4. --- In addition to continuing to focus on quality and stability since the 1.2 release, the Flutter 1.5.4 stable release adds a set of new features as we approach the Google I/O conference. Further, [Ap...
website/src/release/release-notes/release-notes-1.5.4.md/0
{ "file_path": "website/src/release/release-notes/release-notes-1.5.4.md", "repo_id": "website", "token_count": 7920 }
1,320
--- title: Upgrading Flutter short-title: Upgrading description: How to upgrade Flutter. --- No matter which one of the Flutter release channels you follow, you can use the `flutter` command to upgrade your Flutter SDK or the packages that your app depends on. ## Upgrading the Flutter SDK To update the Flutter SDK u...
website/src/release/upgrade.md/0
{ "file_path": "website/src/release/upgrade.md", "repo_id": "website", "token_count": 1171 }
1,321
--- title: Search flutter.dev short-title: Search description: The search page for flutter.dev. toc: false --- Want results from additional Flutter-related sites, like api.flutter.dev and dart.dev? <a href="/search-all">Search more sites.</a> <div class="d-flex searchbar"> <script async src="https://cse.google.com/...
website/src/search.html/0
{ "file_path": "website/src/search.html", "repo_id": "website", "token_count": 138 }
1,322
```nocode flutter: RenderView#02c80 flutter: │ debug mode enabled - macos flutter: │ view size: Size(800.0, 600.0) (in physical pixels) flutter: │ device pixel ratio: 1.0 (physical pixels per logical pixel) flutter: │ configuration: Size(800.0, 600.0) at 1.0x (in logical pixels) flutter: │ flutter: └─child: Rende...
website/src/testing/trees/render-tree.md/0
{ "file_path": "website/src/testing/trees/render-tree.md", "repo_id": "website", "token_count": 35317 }
1,323
--- title: Install and run DevTools from the command line description: Learn how to install and use DevTools from the command line. --- To run Dart DevTools from the CLI, you must have `dart` on your path. Then you can run the following command to launch DevTools: ``` dart devtools ``` To upgrade DevTools, upgrade y...
website/src/tools/devtools/cli.md/0
{ "file_path": "website/src/tools/devtools/cli.md", "repo_id": "website", "token_count": 623 }
1,324
# DevTools 2.13.1 release notes The 2.13.1 release of the Dart and Flutter DevTools includes the following changes among other general improvements. To learn more about DevTools, check out the [DevTools overview](https://docs.flutter.dev/tools/devtools/overview). ## General updates * This release included a lot of c...
website/src/tools/devtools/release-notes/release-notes-2.13.1-src.md/0
{ "file_path": "website/src/tools/devtools/release-notes/release-notes-2.13.1-src.md", "repo_id": "website", "token_count": 703 }
1,325
# DevTools 2.21.1 release notes The 2.21.1 release of the Dart and Flutter DevTools includes the following changes among other general improvements. To learn more about DevTools, check out the [DevTools overview](https://docs.flutter.dev/tools/devtools/overview). ## Performance updates * Replace the DevTools timelin...
website/src/tools/devtools/release-notes/release-notes-2.21.1-src.md/0
{ "file_path": "website/src/tools/devtools/release-notes/release-notes-2.21.1-src.md", "repo_id": "website", "token_count": 911 }
1,326
# DevTools 2.28.2 release notes The 2.28.2 release of the Dart and Flutter DevTools includes the following changes among other general improvements. To learn more about DevTools, check out the [DevTools overview](https://docs.flutter.dev/tools/devtools/overview). This was a cherry-pick release on top of DevTools 2.28...
website/src/tools/devtools/release-notes/release-notes-2.28.2-src.md/0
{ "file_path": "website/src/tools/devtools/release-notes/release-notes-2.28.2-src.md", "repo_id": "website", "token_count": 278 }
1,327
# DevTools 2.33.0 release notes The 2.33.0 release of the Dart and Flutter DevTools includes the following changes among other general improvements. To learn more about DevTools, check out the [DevTools overview](/tools/devtools/overview). ## General updates * Improved overall usability by making the DevTools UI mor...
website/src/tools/devtools/release-notes/release-notes-2.33.0-src.md/0
{ "file_path": "website/src/tools/devtools/release-notes/release-notes-2.33.0-src.md", "repo_id": "website", "token_count": 1014 }
1,328
--- title: "Flutter and the pubspec file" description: "Describes the Flutter-only fields in the pubspec file." --- {{site.alert.note}} This page is primarily aimed at folks who write Flutter apps. If you write packages or plugins, (perhaps you want to create a federated plugin), you should check out the [D...
website/src/tools/pubspec.md/0
{ "file_path": "website/src/tools/pubspec.md", "repo_id": "website", "token_count": 1824 }
1,329
--- layout: toc title: Custom drawing and graphics short-title: Drawing & graphics description: > Content covering how to create custom graphics and use your own shaders in Flutter apps. sitemap: false ---
website/src/ui/design/graphics/index.md/0
{ "file_path": "website/src/ui/design/graphics/index.md", "repo_id": "website", "token_count": 57 }
1,330
--- title: Building adaptive apps description: Some considerations and instructions on how to build adaptive apps to run on a variety of platforms. --- <?code-excerpt path-base="ui/layout/adaptive_app_demos"?> ## Overview Flutter provides new opportunities to build apps that can run on mobile, desktop, and the web f...
website/src/ui/layout/responsive/building-adaptive-apps.md/0
{ "file_path": "website/src/ui/layout/responsive/building-adaptive-apps.md", "repo_id": "website", "token_count": 12408 }
1,331
--- title: Interaction model widgets short-title: Interaction description: > A catalog of Flutter's widgets supporting user interaction and navigation. --- {% include docs/catalogpage.html category="Interaction Models" %}
website/src/ui/widgets/interaction.md/0
{ "file_path": "website/src/ui/widgets/interaction.md", "repo_id": "website", "token_count": 58 }
1,332
// Copyright 2024 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:io'; import 'package:args/command_runner.dart'; import 'package:path/path.dart' as path; import '../utils.dart'; final class FormatDartComm...
website/tool/flutter_site/lib/src/commands/format_dart.dart/0
{ "file_path": "website/tool/flutter_site/lib/src/commands/format_dart.dart", "repo_id": "website", "token_count": 703 }
1,333
// Copyright 2022 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:io' show Platform; import 'package:flutter/foundation.dart' show kIsWeb; import 'package:flutter/material.dart'; void main() { runApp(const...
codelabs/adaptive_app/step_03/lib/main.dart/0
{ "file_path": "codelabs/adaptive_app/step_03/lib/main.dart", "repo_id": "codelabs", "token_count": 1699 }
0
// Copyright 2022 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:collection'; import 'package:flutter/foundation.dart'; import 'package:googleapis/youtube/v3.dart'; import 'package:http/http.dart' as http; ...
codelabs/adaptive_app/step_04/lib/src/app_state.dart/0
{ "file_path": "codelabs/adaptive_app/step_04/lib/src/app_state.dart", "repo_id": "codelabs", "token_count": 1037 }
1
#import "GeneratedPluginRegistrant.h"
codelabs/adaptive_app/step_05/ios/Runner/Runner-Bridging-Header.h/0
{ "file_path": "codelabs/adaptive_app/step_05/ios/Runner/Runner-Bridging-Header.h", "repo_id": "codelabs", "token_count": 13 }
2
#import "GeneratedPluginRegistrant.h"
codelabs/adaptive_app/step_07/ios/Runner/Runner-Bridging-Header.h/0
{ "file_path": "codelabs/adaptive_app/step_07/ios/Runner/Runner-Bridging-Header.h", "repo_id": "codelabs", "token_count": 13 }
3
name: yt_cors_proxy description: A YouTube CORS Proxy Server. version: 1.0.0 environment: sdk: ^3.3.0-279.2.beta dependencies: http: ^1.2.0 shelf: ^1.4.0 shelf_cors_headers: ^0.1.5 dev_dependencies: lints: ^3.0.0
codelabs/adaptive_app/step_07/yt_cors_proxy/pubspec.yaml/0
{ "file_path": "codelabs/adaptive_app/step_07/yt_cors_proxy/pubspec.yaml", "repo_id": "codelabs", "token_count": 107 }
4
import 'package:flutter/material.dart'; void main() { runApp(const MainApp()); } class MainApp extends StatelessWidget { const MainApp({super.key}); @override Widget build(BuildContext context) { return const MaterialApp( home: Scaffold( body: Center( child: Text('Hello World!'), ...
codelabs/animated-responsive-layout/step_03/lib/main.dart/0
{ "file_path": "codelabs/animated-responsive-layout/step_03/lib/main.dart", "repo_id": "codelabs", "token_count": 143 }
5
org.gradle.jvmargs=-Xmx4G android.useAndroidX=true android.enableJetifier=true
codelabs/animated-responsive-layout/step_05/android/gradle.properties/0
{ "file_path": "codelabs/animated-responsive-layout/step_05/android/gradle.properties", "repo_id": "codelabs", "token_count": 30 }
6
#import "GeneratedPluginRegistrant.h"
codelabs/animated-responsive-layout/step_05/ios/Runner/Runner-Bridging-Header.h/0
{ "file_path": "codelabs/animated-responsive-layout/step_05/ios/Runner/Runner-Bridging-Header.h", "repo_id": "codelabs", "token_count": 13 }
7
// Copyright 2022 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; import 'models/data.dart' as data; import 'models/models.dart'; import 'widgets/disappearing_bottom_navigation_bar...
codelabs/animated-responsive-layout/step_06/lib/main.dart/0
{ "file_path": "codelabs/animated-responsive-layout/step_06/lib/main.dart", "repo_id": "codelabs", "token_count": 1302 }
8
package com.example.animated_responsive_layout import io.flutter.embedding.android.FlutterActivity class MainActivity: FlutterActivity()
codelabs/animated-responsive-layout/step_07/android/app/src/main/kotlin/com/example/animated_responsive_layout/MainActivity.kt/0
{ "file_path": "codelabs/animated-responsive-layout/step_07/android/app/src/main/kotlin/com/example/animated_responsive_layout/MainActivity.kt", "repo_id": "codelabs", "token_count": 38 }
9
// Copyright 2022 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; import 'animations.dart'; import 'models/data.dart' as data; import 'models/models.dart'; import 'widgets/animated...
codelabs/animated-responsive-layout/step_07/lib/main.dart/0
{ "file_path": "codelabs/animated-responsive-layout/step_07/lib/main.dart", "repo_id": "codelabs", "token_count": 1767 }
10
// Copyright 2022 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; class StarButton extends StatefulWidget { const StarButton({super.key}); @override State<StarButton> create...
codelabs/animated-responsive-layout/step_08/lib/widgets/star_button.dart/0
{ "file_path": "codelabs/animated-responsive-layout/step_08/lib/widgets/star_button.dart", "repo_id": "codelabs", "token_count": 481 }
11
// Copyright 2022 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:math'; import 'package:flutter/material.dart'; import '../../../shared/classes/classes.dart'; import '../../../shared/extensions.dart'; impor...
codelabs/boring_to_beautiful/final/lib/src/features/artists/view/artist_card.dart/0
{ "file_path": "codelabs/boring_to_beautiful/final/lib/src/features/artists/view/artist_card.dart", "repo_id": "codelabs", "token_count": 1859 }
12
// Copyright 2022 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:math'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import '../../../shared/classes/classes.dart'; imp...
codelabs/boring_to_beautiful/final/lib/src/features/playlists/view/playlist_screen.dart/0
{ "file_path": "codelabs/boring_to_beautiful/final/lib/src/features/playlists/view/playlist_screen.dart", "repo_id": "codelabs", "token_count": 2765 }
13
// Copyright 2022 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. part of 'playback_bloc.dart'; @Freezed() class PlaybackEvent with _$PlaybackEvent { const factory PlaybackEvent.togglePlayPause() = TogglePlayPause; c...
codelabs/boring_to_beautiful/final/lib/src/shared/playback/bloc/playback_event.dart/0
{ "file_path": "codelabs/boring_to_beautiful/final/lib/src/shared/playback/bloc/playback_event.dart", "repo_id": "codelabs", "token_count": 239 }
14
// Copyright 2022 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; import '../classes/classes.dart'; import '../providers/providers....
codelabs/boring_to_beautiful/final/lib/src/shared/views/events.dart/0
{ "file_path": "codelabs/boring_to_beautiful/final/lib/src/shared/views/events.dart", "repo_id": "codelabs", "token_count": 2268 }
15
// Copyright 2022 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import './classes.dart'; class News { const News({ required this.title, required this.author, required this.blurb, required this.image, ...
codelabs/boring_to_beautiful/step_01/lib/src/shared/classes/news.dart/0
{ "file_path": "codelabs/boring_to_beautiful/step_01/lib/src/shared/classes/news.dart", "repo_id": "codelabs", "token_count": 130 }
16
// Copyright 2022 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; import 'image_clipper.dart'; class AdaptiveImageCard extends StatelessWidget { const AdaptiveImageCard({ su...
codelabs/boring_to_beautiful/step_01/lib/src/shared/views/adaptive_image_card.dart/0
{ "file_path": "codelabs/boring_to_beautiful/step_01/lib/src/shared/views/adaptive_image_card.dart", "repo_id": "codelabs", "token_count": 965 }
17
// Copyright 2022 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:go_router/go_router.dart' as go; import 'package:u...
codelabs/boring_to_beautiful/step_01/lib/src/shared/views/root_layout.dart/0
{ "file_path": "codelabs/boring_to_beautiful/step_01/lib/src/shared/views/root_layout.dart", "repo_id": "codelabs", "token_count": 1070 }
18
#import "GeneratedPluginRegistrant.h"
codelabs/brick_breaker/step_04/ios/Runner/Runner-Bridging-Header.h/0
{ "file_path": "codelabs/brick_breaker/step_04/ios/Runner/Runner-Bridging-Header.h", "repo_id": "codelabs", "token_count": 13 }
19