text stringlengths 6 13.6M | id stringlengths 13 176 | metadata dict | __index_level_0__ int64 0 1.69k |
|---|---|---|---|
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/android_devs/lib/canvas.dart/0 | {
"file_path": "website/examples/get-started/flutter-for/android_devs/lib/canvas.dart",
"repo_id": "website",
"token_count": 606
} | 1,271 |
import 'dart:developer' as developer;
import 'package:flutter/material.dart';
void main() {
runApp(const SampleApp());
}
class SampleApp extends StatelessWidget {
const SampleApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return const Ma... | website/examples/get-started/flutter-for/ios_devs/lib/listview_builder.dart/0 | {
"file_path": "website/examples/get-started/flutter-for/ios_devs/lib/listview_builder.dart",
"repo_id": "website",
"token_count": 577
} | 1,272 |
import 'package:flutter/cupertino.dart';
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 CupertinoApp(
home: HomePage(),
);
}
}
class Hom... | website/examples/get-started/flutter-for/ios_devs/lib/text_button.dart/0 | {
"file_path": "website/examples/get-started/flutter-for/ios_devs/lib/text_button.dart",
"repo_id": "website",
"token_count": 324
} | 1,273 |
import 'package:flutter/material.dart';
// #docregion Navigator
class NavigationApp extends StatelessWidget {
// This widget is the root of your application.
const NavigationApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
//...
routes: <String, WidgetBuilde... | website/examples/get-started/flutter-for/react_native_devs/lib/navigation.dart/0 | {
"file_path": "website/examples/get-started/flutter-for/react_native_devs/lib/navigation.dart",
"repo_id": "website",
"token_count": 1360
} | 1,274 |
{
"helloWorld": "Hello World!",
"@helloWorld": {
"description": "The conventional newborn programmer greeting"
},
"hello": "Hello {userName}",
"@hello": {
"description": "A message with a single parameter",
"placeholders": {
"userName": {
"type": "String",
"example": "Bob"
... | website/examples/internationalization/gen_l10n_example/lib/l10n/app_en.arb/0 | {
"file_path": "website/examples/internationalization/gen_l10n_example/lib/l10n/app_en.arb",
"repo_id": "website",
"token_count": 492
} | 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';
class GridListDemo extends StatelessWidget {
const GridListDemo({super.key, required this.type});
final GridList... | website/examples/layout/gallery/lib/grid_list_demo.dart/0 | {
"file_path": "website/examples/layout/gallery/lib/grid_list_demo.dart",
"repo_id": "website",
"token_count": 2297
} | 1,276 |
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'src/passing_callbacks.dart' as callbacks;
import 'src/performance.dart' as performance;
import 'src/provider.dart';
import 'src/set_state.dart' as set_state;
// #docregion main
void main() {
runApp(
ChangeNotifierProvider(
... | website/examples/state_mgmt/simple/lib/main.dart/0 | {
"file_path": "website/examples/state_mgmt/simple/lib/main.dart",
"repo_id": "website",
"token_count": 719
} | 1,277 |
import 'package:flutter/material.dart';
void main() {
runApp(
const MaterialApp(
home: AppHome(),
),
);
}
class AppHome extends StatelessWidget {
const AppHome({super.key});
@override
Widget build(BuildContext context) {
return Material(
child: Center(
child: TextButton(
... | website/examples/testing/code_debugging/lib/dump_app.dart/0 | {
"file_path": "website/examples/testing/code_debugging/lib/dump_app.dart",
"repo_id": "website",
"token_count": 210
} | 1,278 |
// ignore_for_file: equal_elements_in_set
import 'package:flutter/material.dart';
void main() {
// #docregion Syntax
print(<Widget>{
// this is the syntax for a Set<Widget> literal
const SizedBox(),
const SizedBox(),
}.length);
// #enddocregion Syntax
// #docregion SyntaxExplain
print(<Widget... | website/examples/testing/debugging/lib/main.dart/0 | {
"file_path": "website/examples/testing/debugging/lib/main.dart",
"repo_id": "website",
"token_count": 194
} | 1,279 |
# adaptive_app_demos
This project contains demo code for adaptive app development techniques from
https://github.com/gskinnerTeam/flutter-adaptive-demo.
Additional example code in this project was moved from
code snippets originally seen in
[Building adaptive apps](https://docs.flutter.dev/ui/layout/responsive/build... | website/examples/ui/layout/adaptive_app_demos/README.md/0 | {
"file_path": "website/examples/ui/layout/adaptive_app_demos/README.md",
"repo_id": "website",
"token_count": 128
} | 1,280 |
import 'package:flutter/material.dart';
import '../global/device_type.dart';
class OkCancelDialog extends StatelessWidget {
const OkCancelDialog({super.key, required this.message});
final String message;
@override
Widget build(BuildContext context) {
return Dialog(
child: ConstrainedBox(
co... | website/examples/ui/layout/adaptive_app_demos/lib/widgets/ok_cancel_dialog.dart/0 | {
"file_path": "website/examples/ui/layout/adaptive_app_demos/lib/widgets/ok_cancel_dialog.dart",
"repo_id": "website",
"token_count": 854
} | 1,281 |
import 'package:flutter/material.dart';
// #docregion Toggle
void showOversizedImages() {
debugInvertOversizedImages = true;
}
// #enddocregion Toggle
// #docregion ResizedImage
class ResizedImage extends StatelessWidget {
const ResizedImage({super.key});
@override
Widget build(BuildContext context) {
re... | website/examples/visual_debugging/lib/oversized_images.dart/0 | {
"file_path": "website/examples/visual_debugging/lib/oversized_images.dart",
"repo_id": "website",
"token_count": 158
} | 1,282 |
- platform: 'Android SDK'
chipsets: 'x64, Arm32, Arm64'
supported: '21 to 34'
besteffort: '19 to 20'
unsupported: '18 and earlier'
- platform: 'iOS'
chipsets: 'Arm64'
supported: '17'
besteffort: '12 to 16'
unsupported: '11 and earlier'
- platform: 'macOS'
chipsets: 'x64, Arm64'
supported: '<abbr tit... | website/src/_data/platforms.yml/0 | {
"file_path": "website/src/_data/platforms.yml",
"repo_id": "website",
"token_count": 659
} | 1,283 |
{{site.alert.note}}
The Flutter SDK contains the `dart` command alongside the `flutter` command
so that you can more easily run Dart command-line programs.
Downloading the Flutter SDK also downloads the compatible version of Dart,
but if you've downloaded the Dart SDK separately,
make sure that the Flutter ... | website/src/_includes/docs/dart-tool-win.md/0 | {
"file_path": "website/src/_includes/docs/dart-tool-win.md",
"repo_id": "website",
"token_count": 642
} | 1,284 |
{{site.alert.important}}
Perform this guide in sequence. Skipping steps can cause errors.
{{site.alert.end}}
| website/src/_includes/docs/install/admonitions/install-in-order.md/0 | {
"file_path": "website/src/_includes/docs/install/admonitions/install-in-order.md",
"repo_id": "website",
"token_count": 31
} | 1,285 |
{% assign os = include.os %}
{% assign target = include.target %}
{% include docs/install/admonitions/install-in-order.md %}
## Verify system requirements
To install and run Flutter,
your {{os}} environment must meet the following hardware
and software requirements.
### Hardware requirements
Your {{os}} Flutter de... | website/src/_includes/docs/install/reqs/linux/base.md/0 | {
"file_path": "website/src/_includes/docs/install/reqs/linux/base.md",
"repo_id": "website",
"token_count": 1296
} | 1,286 |
{% if include.target == 'desktop' -%}
* [Visual Studio 2022][] to debug and compile native C++ Windows code.
Make sure to install the **Desktop development with C++** workload.
This enables building Windows app including all of its default components.
**Visual Studio** is an IDE separate from **[Visual Studio _C... | website/src/_includes/docs/install/reqs/windows/software.md/0 | {
"file_path": "website/src/_includes/docs/install/reqs/windows/software.md",
"repo_id": "website",
"token_count": 453
} | 1,287 |
{% if page.diff2html -%}
{% comment %}Get from CDN for now{% endcomment -%}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/styles/github.min.css" integrity="sha512-7QTQ5Qsc/IL1k8UU2bkNFjpKTfwnvGuPYE6fzm6yeneWTEGiA3zspgjcTsSgln9m0cn3MgyE7EnDNkF1bB/uCw==" crossorigin="anonymous" r... | website/src/_includes/head-diff2html.html/0 | {
"file_path": "website/src/_includes/head-diff2html.html",
"repo_id": "website",
"token_count": 1065
} | 1,288 |
---
layout: default
toc: false
sitemap: false
---
{% assign url = page.url | regex_replace: '/index$|/index.html$|/$' -%}
{% assign path_parts = url | split: '/' -%}
{% assign topics = site.data.sidenav -%}
{% comment %}
- path_parts[0] == '' because page.url always starts with '/'
{% endcomment -%}
{% for path_pa... | website/src/_layouts/toc.html/0 | {
"file_path": "website/src/_layouts/toc.html",
"repo_id": "website",
"token_count": 333
} | 1,289 |
module RegexReplaceFilter
# From https://github.com/Shopify/liquid/issues/202#issuecomment-19112872
def regex_replace(input, regex, replacement = '')
input.to_s.gsub(Regexp.new(regex), replacement.to_s)
end
end
Liquid::Template.register_filter(RegexReplaceFilter)
| website/src/_plugins/regex_replace_filter.rb/0 | {
"file_path": "website/src/_plugins/regex_replace_filter.rb",
"repo_id": "website",
"token_count": 96
} | 1,290 |
@use '../vendor/bootstrap';
.site-nextprev-nav, // Nav with both links
.site-nextprev-nav__single // Nav with single link
{
clear: both;
ul {
$spacer-base: bootstrap.bs-spacer(3);
list-style-type: none;
margin: 0;
padding: 0;
li {
display: flex;
margin-bottom: $spacer-base;
... | website/src/_sass/components/_next-prev-nav.scss/0 | {
"file_path": "website/src/_sass/components/_next-prev-nav.scss",
"repo_id": "website",
"token_count": 482
} | 1,291 |
---
title: Debug your add-to-app module
short-title: Debugging
description: How to run, debug, and hot reload your add-to-app Flutter module.
---
Once you've integrated the Flutter module to your project and used Flutter's
platform APIs to run the Flutter engine and/or UI,
you can then build and run your Android or iO... | website/src/add-to-app/debugging.md/0 | {
"file_path": "website/src/add-to-app/debugging.md",
"repo_id": "website",
"token_count": 938
} | 1,292 |
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="567.27px" height="159px" viewBox="0 0 567.27 159" e... | website/src/assets/images/branding/flutter/logo+text/horizontal/white.svg/0 | {
"file_path": "website/src/assets/images/branding/flutter/logo+text/horizontal/white.svg",
"repo_id": "website",
"token_count": 4122
} | 1,293 |
{% assign id = include.ref-os | downcase -%}
{% assign jsonurl = 'https://storage.googleapis.com/flutter_infra_release/releases/releases_{{id}}.json' %}
{% assign os = include.ref-os -%}
{% assign sdk = include.sdk -%}
{% if id == 'windows' -%}
{% assign shell = 'Powershell' -%}
{% assign prompt = 'C:\>' -%}
... | website/src/community/china/_os-settings.md/0 | {
"file_path": "website/src/community/china/_os-settings.md",
"repo_id": "website",
"token_count": 1626
} | 1,294 |
---
title: Create a download button
description: How to implement a download button.
js:
- defer: true
url: https://old-dartpad-3ce3f.web.app/inject_embed.dart.js
---
<?code-excerpt path-base="cookbook/effects/download_button"?>
Apps are filled with buttons that execute long-running behaviors.
For example, a bu... | website/src/cookbook/effects/download-button.md/0 | {
"file_path": "website/src/cookbook/effects/download-button.md",
"repo_id": "website",
"token_count": 9113
} | 1,295 |
---
title: Build a form with validation
description: How to build a form that validates input.
js:
- defer: true
url: https://old-dartpad-3ce3f.web.app/inject_embed.dart.js
---
<?code-excerpt path-base="cookbook/forms/validation"?>
Apps often require users to enter information into a text field.
For example, yo... | website/src/cookbook/forms/validation.md/0 | {
"file_path": "website/src/cookbook/forms/validation.md",
"repo_id": "website",
"token_count": 2851
} | 1,296 |
---
title: Set up universal links for iOS
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 w... | website/src/cookbook/navigation/set-up-universal-links.md/0 | {
"file_path": "website/src/cookbook/navigation/set-up-universal-links.md",
"repo_id": "website",
"token_count": 2341
} | 1,297 |
---
title: Play and pause a video
description: How to use the video_player plugin.
js:
- defer: true
url: https://old-dartpad-3ce3f.web.app/inject_embed.dart.js
---
<?code-excerpt path-base="cookbook/plugins/play_video/"?>
Playing videos is a common task in app development,
and Flutter apps are no exception. To... | website/src/cookbook/plugins/play-video.md/0 | {
"file_path": "website/src/cookbook/plugins/play-video.md",
"repo_id": "website",
"token_count": 3700
} | 1,298 |
---
layout: toc
title: Data & backend
description: Content covering data and backend development in Flutter apps.
---
| website/src/data-and-backend/index.md/0 | {
"file_path": "website/src/data-and-backend/index.md",
"repo_id": "website",
"token_count": 29
} | 1,299 |
---
title: Build and release a Linux app to the Snap Store
description: How to prepare for and release a Linux app to the Snap store.
short-title: Linux
---
During a typical development cycle,
you test an app using `flutter run` at the command line,
or by using the **Run** and **Debug**
options in your IDE. By default... | website/src/deployment/linux.md/0 | {
"file_path": "website/src/deployment/linux.md",
"repo_id": "website",
"token_count": 3515
} | 1,300 |
---
title: Flutter for UIKit developers
description: Learn how to apply iOS and UIKit developer knowledge when building Flutter apps.
---
<?code-excerpt path-base="get-started/flutter-for/ios_devs"?>
iOS developers with experience using UIKit
who want to write mobile apps using Flutter
should review this guide.
It ex... | website/src/get-started/flutter-for/uikit-devs.md/0 | {
"file_path": "website/src/get-started/flutter-for/uikit-devs.md",
"repo_id": "website",
"token_count": 20032
} | 1,301 |
## Get the Flutter SDK {#get-sdk}
{% include docs/china-notice.md %}
To install the Flutter SDK on your Linux system,
use one of the following methods.
### Method 1: Install Flutter using snapd
This offers the most direct method to install
the Flutter SDK on your Linux system.
To learn about using snapd, check [In... | website/src/get-started/install/_deprecated/_get-sdk-linux.md/0 | {
"file_path": "website/src/get-started/install/_deprecated/_get-sdk-linux.md",
"repo_id": "website",
"token_count": 1010
} | 1,302 |
---
title: Flutter and Dart team job openings
description: Open job listings for the Flutter and Dart teams.
---
The Flutter and Dart teams aren't currently hiring.
Thanks for your interest!
{% comment %}
We are hiring on the Flutter and Dart teams!
The following jobs are open:
## Software Engineering
* [Android En... | website/src/jobs/index.md/0 | {
"file_path": "website/src/jobs/index.md",
"repo_id": "website",
"token_count": 122
} | 1,303 |
---
title: Shader compilation jank
short-title: Shader jank
description: What is shader jank and how to minimize it.
---
{% include docs/performance.md %}
If the animations on your mobile app appear to be janky,
but only on the first run,
this is likely due to shader compilation.
Flutter's long term solution to
shade... | website/src/perf/shader.md/0 | {
"file_path": "website/src/perf/shader.md",
"repo_id": "website",
"token_count": 2041
} | 1,304 |
---
title: "Restore state on Android"
description: "How to restore the state of your Android app after it's been killed by the OS."
---
When a user runs a mobile app and then selects another
app to run, the first app is moved to the background,
or _backgrounded_. The operating system (both iOS and Android)
might kill... | website/src/platform-integration/android/restore-state-android.md/0 | {
"file_path": "website/src/platform-integration/android/restore-state-android.md",
"repo_id": "website",
"token_count": 2222
} | 1,305 |
---
title: "Restore state on iOS"
description: "How to restore the state of your iOS app after it's been killed by the OS."
---
When a user runs a mobile app and then selects another
app to run, the first app is moved to the background,
or _backgrounded_. The operating system (both iOS and Android)
often kill the bac... | website/src/platform-integration/ios/restore-state-ios.md/0 | {
"file_path": "website/src/platform-integration/ios/restore-state-ios.md",
"repo_id": "website",
"token_count": 296
} | 1,306 |
---
title: Web FAQ
description: Some gotchas and differences when writing or running web apps in Flutter.
---
### What scenarios are ideal for Flutter on the web?
Not every web page makes sense in Flutter, but we think Flutter is particularly
suited for app-centric experiences:
* Progressive Web Apps
* Single Page A... | website/src/platform-integration/web/faq.md/0 | {
"file_path": "website/src/platform-integration/web/faq.md",
"repo_id": "website",
"token_count": 1775
} | 1,307 |
---
title: External windows in Flutter Windows apps
description: Special considerations for adding external windows to Flutter apps
---
# Windows lifecycle
## Who is affected
Windows applications built against Flutter versions after 3.13 that open non-Flutter windows.
## Overview
When adding a non-Flutter window ... | website/src/platform-integration/windows/extern_win.md/0 | {
"file_path": "website/src/platform-integration/windows/extern_win.md",
"repo_id": "website",
"token_count": 427
} | 1,308 |
---
title: Deprecated API removed after v2.10
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
2.10 stable release have been removed.
All affec... | website/src/release/breaking-changes/2-10-deprecations.md/0 | {
"file_path": "website/src/release/breaking-changes/2-10-deprecations.md",
"repo_id": "website",
"token_count": 5699
} | 1,309 |
---
title: FlutterMain.setIsRunningInRobolectricTest on Android removed
description: >
The test-only FlutterMain.setIsRunningInRobolectricTest API on the
Android engine is consolidated into the FlutterInjector.
---
## Summary
If you write Java JUnit tests (such as Robolectric tests)
against the Flutter engin... | website/src/release/breaking-changes/android-setIsRunningInRobolectricTest-removed.md/0 | {
"file_path": "website/src/release/breaking-changes/android-setIsRunningInRobolectricTest-removed.md",
"repo_id": "website",
"token_count": 971
} | 1,310 |
---
title: Added BuildContext parameter to TextEditingController.buildTextSpan
description: >
A BuildContext parameter is added to TextEditingController.buildTextSpan so
inheritors that override buildTextSpan can access inherited widgets.
---
## Summary
A `BuildContext` parameter was added to `TextEditingControll... | website/src/release/breaking-changes/buildtextspan-buildcontext.md/0 | {
"file_path": "website/src/release/breaking-changes/buildtextspan-buildcontext.md",
"repo_id": "website",
"token_count": 1469
} | 1,311 |
---
title: Added missing `dispose()` for some disposable objects in Flutter
description: >
'dispose()' might fail because of double disposal.
---
## Summary
Missing calls to 'dispose()' are added for some disposable objects.
For example, ContextMenuController did not dispose OverlayEntry,
and EditableTextState did... | website/src/release/breaking-changes/dispose.md/0 | {
"file_path": "website/src/release/breaking-changes/dispose.md",
"repo_id": "website",
"token_count": 496
} | 1,312 |
---
title: Adding ImageProvider.loadBuffer
description: >
ImageProviders must now be implemented using the
new loadBuffer API instead of the existing load API.
---
## Summary
* `ImageProvider` now has a method called `loadBuffer` that functions
similarly to `load`, except that it decodes from an `ui.ImmutableB... | website/src/release/breaking-changes/image-provider-load-buffer.md/0 | {
"file_path": "website/src/release/breaking-changes/image-provider-load-buffer.md",
"repo_id": "website",
"token_count": 1244
} | 1,313 |
---
title: MouseTracker no longer attaches annotations
description: >
MouseTracker no longer relies on annotation attachment to
perform the mounted-exit check; therefore,
all three related methods are removed.
---
## Summary
Removed `MouseTracker`'s methods `attachAnnotation`,
`detachAnnotation`, and `isAnnota... | website/src/release/breaking-changes/mouse-tracker-no-longer-attaches-annotations.md/0 | {
"file_path": "website/src/release/breaking-changes/mouse-tracker-no-longer-attaches-annotations.md",
"repo_id": "website",
"token_count": 1510
} | 1,314 |
---
title: Notable Rendering and Layout Changes after v3.7
description: Non-API related breaking changes made after Flutter v3.7.
---
## Changes
This section lists the notable non-API breaking changes.
### (Only Affects Tests) `FlutterTest` is now the default test font
The `FlutterTest` font replaced `Ahem` as the ... | website/src/release/breaking-changes/rendering-changes.md/0 | {
"file_path": "website/src/release/breaking-changes/rendering-changes.md",
"repo_id": "website",
"token_count": 1037
} | 1,315 |
---
title: TestWidgetsFlutterBinding.clock change
description: The Clock implementation now comes from package:clock.
---
## Summary
The `TestWidgetsFlutterBinding.clock` now comes from
`package:clock` and not `package:quiver`.
## Context
The `flutter_test` package is removing its dependency on
the heavier weight `... | website/src/release/breaking-changes/test-widgets-flutter-binding-clock.md/0 | {
"file_path": "website/src/release/breaking-changes/test-widgets-flutter-binding-clock.md",
"repo_id": "website",
"token_count": 1009
} | 1,316 |
---
title: "\"Zone mismatch\" message"
description: >
When Flutter's bindings are initialized in a different zone
than the Zone used for `runApp`, a warning is printed to the console.
---
## Summary
Starting with Flutter 3.10, the framework detects mismatches
when using Zones and reports them to the console in de... | website/src/release/breaking-changes/zone-errors.md/0 | {
"file_path": "website/src/release/breaking-changes/zone-errors.md",
"repo_id": "website",
"token_count": 1457
} | 1,317 |
---
title: Flutter 1.7.8 release notes
short-title: 1.7.8 release notes
description: Release notes for Flutter 1.7.8.
---
The 1.7.8 release is a follow-on to the 1.5.4 stable release in May,
providing 1289 merged PRs and closing 184 issues.
The major themes of this release are:
* Support for 32-bit and 64-bit bundl... | website/src/release/release-notes/release-notes-1.7.8.md/0 | {
"file_path": "website/src/release/release-notes/release-notes-1.7.8.md",
"repo_id": "website",
"token_count": 10508
} | 1,318 |
---
title: What's new
description: >-
A list of what's new on docs.flutter.dev and related documentation sites.
---
This page contains current and recent announcements
of what's new on the Flutter website and blog.
Find past what's new information on the
[what's new archive][] page.
You might also check out the
Flut... | website/src/release/whats-new.md/0 | {
"file_path": "website/src/release/whats-new.md",
"repo_id": "website",
"token_count": 891
} | 1,319 |
---
title: Security
description: >
An overview of the Flutter's team philosophy and processes for security.
---
The Flutter team takes the security of Flutter and the applications
created with it seriously. This page describes how to report any
vulnerabilities you might find, and lists best practices to minimize
the... | website/src/security/index.md/0 | {
"file_path": "website/src/security/index.md",
"repo_id": "website",
"token_count": 1181
} | 1,320 |
```nocode
flutter: SemanticsNode#0
flutter: │ Rect.fromLTRB(0.0, 0.0, 800.0, 600.0)
flutter: │
flutter: └─SemanticsNode#1
flutter: │ Rect.fromLTRB(0.0, 0.0, 800.0, 600.0)
flutter: │ textDirection: ltr
flutter: │
flutter: └─SemanticsNode#2
flutter: │ Rect.fromLTRB(0.0, 0.0, 800.0, 600.0)
flutter: ... | website/src/testing/trees/semantic-tree.md/0 | {
"file_path": "website/src/testing/trees/semantic-tree.md",
"repo_id": "website",
"token_count": 480
} | 1,321 |
---
title: Using the Debug console
description: Learn how to use the DevTools console.
---
The DevTools Debug console allows you to watch an
application's standard output (`stdout`),
evaluate expressions for a paused or running
app in debug mode, and analyze inbound and outbound
references for objects.
{{site.alert.n... | website/src/tools/devtools/console.md/0 | {
"file_path": "website/src/tools/devtools/console.md",
"repo_id": "website",
"token_count": 686
} | 1,322 |
---
short-title: 2.13.1 release notes
description: Release notes for Dart and Flutter DevTools version 2.13.1.
toc: false
---
{% include_relative release-notes-2.13.1-src.md %}
| website/src/tools/devtools/release-notes/release-notes-2.13.1.md/0 | {
"file_path": "website/src/tools/devtools/release-notes/release-notes-2.13.1.md",
"repo_id": "website",
"token_count": 61
} | 1,323 |
---
short-title: 2.21.1 release notes
description: Release notes for Dart and Flutter DevTools version 2.21.1.
toc: false
---
{% include_relative release-notes-2.21.1-src.md %}
| website/src/tools/devtools/release-notes/release-notes-2.21.1.md/0 | {
"file_path": "website/src/tools/devtools/release-notes/release-notes-2.21.1.md",
"repo_id": "website",
"token_count": 61
} | 1,324 |
---
short-title: 2.28.2 release notes
description: Release notes for Dart and Flutter DevTools version 2.28.2.
toc: false
---
{% include_relative release-notes-2.28.2-src.md %}
| website/src/tools/devtools/release-notes/release-notes-2.28.2.md/0 | {
"file_path": "website/src/tools/devtools/release-notes/release-notes-2.28.2.md",
"repo_id": "website",
"token_count": 61
} | 1,325 |
---
short-title: 2.33.0 release notes
description: Release notes for Dart and Flutter DevTools version 2.33.0.
toc: false
---
{% include_relative release-notes-2.33.0-src.md %}
| website/src/tools/devtools/release-notes/release-notes-2.33.0.md/0 | {
"file_path": "website/src/tools/devtools/release-notes/release-notes-2.33.0.md",
"repo_id": "website",
"token_count": 61
} | 1,326 |
---
title: Flutter SDK overview
short-title: Flutter SDK
description: Flutter libraries and command-line tools.
---
The Flutter SDK has the packages and command-line tools that you need to develop
Flutter apps across platforms. To get the Flutter SDK, see [Install][].
## What's in the Flutter SDK
The following is av... | website/src/tools/sdk.md/0 | {
"file_path": "website/src/tools/sdk.md",
"repo_id": "website",
"token_count": 450
} | 1,327 |
---
layout: toc
title: Design & theming
description: Content covering designing Flutter apps.
sitemap: false
---
| website/src/ui/design/index.md/0 | {
"file_path": "website/src/ui/design/index.md",
"repo_id": "website",
"token_count": 32
} | 1,328 |
---
layout: toc
title: Responsive & adaptive design
short-title: Adaptive design
description: >
Content covering making Flutter apps adaptive to
different device features and layouts.
sitemap: false
---
| website/src/ui/layout/responsive/index.md/0 | {
"file_path": "website/src/ui/layout/responsive/index.md",
"repo_id": "website",
"token_count": 53
} | 1,329 |
---
title: Layout widgets
short-title: Layout
description: A catalog of Flutter's widgets for building layouts.
---
{% include docs/catalogpage.html category="Layout" %}
| website/src/ui/widgets/layout.md/0 | {
"file_path": "website/src/ui/widgets/layout.md",
"repo_id": "website",
"token_count": 47
} | 1,330 |
// 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:async';
import 'dart:io';
import 'package:args/command_runner.dart';
import 'package:path/path.dart' as path;
import '../utils.dart';
final ... | website/tool/flutter_site/lib/src/commands/refresh_excerpts.dart/0 | {
"file_path": "website/tool/flutter_site/lib/src/commands/refresh_excerpts.dart",
"repo_id": "website",
"token_count": 2359
} | 1,331 |
#import "GeneratedPluginRegistrant.h"
| codelabs/adaptive_app/step_03/ios/Runner/Runner-Bridging-Header.h/0 | {
"file_path": "codelabs/adaptive_app/step_03/ios/Runner/Runner-Bridging-Header.h",
"repo_id": "codelabs",
"token_count": 13
} | 0 |
#include "../../Flutter/Flutter-Debug.xcconfig"
#include "Warnings.xcconfig"
| codelabs/adaptive_app/step_03/macos/Runner/Configs/Debug.xcconfig/0 | {
"file_path": "codelabs/adaptive_app/step_03/macos/Runner/Configs/Debug.xcconfig",
"repo_id": "codelabs",
"token_count": 32
} | 1 |
import 'package:adaptive_app/main.dart';
import 'package:adaptive_app/src/app_state.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:googleapis/youtube/v3.dart';
import 'package:provider/provider.dart';
class FakeFlutterDevPlaylists extends ChangeNotifier
... | codelabs/adaptive_app/step_05/test/widget_test.dart/0 | {
"file_path": "codelabs/adaptive_app/step_05/test/widget_test.dart",
"repo_id": "codelabs",
"token_count": 280
} | 2 |
.dockerignore
Dockerfile
build/
.dart_tool/
.git/
.github/
.gitignore
.idea/
.packages
| codelabs/adaptive_app/step_06/yt_cors_proxy/.dockerignore/0 | {
"file_path": "codelabs/adaptive_app/step_06/yt_cors_proxy/.dockerignore",
"repo_id": "codelabs",
"token_count": 38
} | 3 |
include: package:lints/recommended.yaml
linter:
rules:
avoid_print: false
directives_ordering: true
prefer_single_quotes: true
sort_pub_dependencies: true
# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
| codelabs/adaptive_app/step_07/yt_cors_proxy/analysis_options.yaml/0 | {
"file_path": "codelabs/adaptive_app/step_07/yt_cors_proxy/analysis_options.yaml",
"repo_id": "codelabs",
"token_count": 94
} | 4 |
#import "GeneratedPluginRegistrant.h"
| codelabs/animated-responsive-layout/step_03/ios/Runner/Runner-Bridging-Header.h/0 | {
"file_path": "codelabs/animated-responsive-layout/step_03/ios/Runner/Runner-Bridging-Header.h",
"repo_id": "codelabs",
"token_count": 13
} | 5 |
#include "../../Flutter/Flutter-Debug.xcconfig"
#include "Warnings.xcconfig"
| codelabs/animated-responsive-layout/step_03/macos/Runner/Configs/Debug.xcconfig/0 | {
"file_path": "codelabs/animated-responsive-layout/step_03/macos/Runner/Configs/Debug.xcconfig",
"repo_id": "codelabs",
"token_count": 32
} | 6 |
#include "Generated.xcconfig"
| codelabs/animated-responsive-layout/step_05/ios/Flutter/Release.xcconfig/0 | {
"file_path": "codelabs/animated-responsive-layout/step_05/ios/Flutter/Release.xcconfig",
"repo_id": "codelabs",
"token_count": 12
} | 7 |
name: animated_responsive_layout
description: "A new Flutter project."
publish_to: 'none'
version: 0.1.0
environment:
sdk: '>=3.3.0-279.2.beta <4.0.0'
dependencies:
flutter:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^3.0.0
flutter:
uses-material-design: true
asset... | codelabs/animated-responsive-layout/step_06/pubspec.yaml/0 | {
"file_path": "codelabs/animated-responsive-layout/step_06/pubspec.yaml",
"repo_id": "codelabs",
"token_count": 243
} | 8 |
// 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/animation.dart';
class BarAnimation extends ReverseAnimation {
BarAnimation({required AnimationController parent})
: super... | codelabs/animated-responsive-layout/step_07/lib/animations.dart/0 | {
"file_path": "codelabs/animated-responsive-layout/step_07/lib/animations.dart",
"repo_id": "codelabs",
"token_count": 1110
} | 9 |
include: ../../analysis_options.yaml
| codelabs/animated-responsive-layout/step_08/analysis_options.yaml/0 | {
"file_path": "codelabs/animated-responsive-layout/step_08/analysis_options.yaml",
"repo_id": "codelabs",
"token_count": 12
} | 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';
import '../models/data.dart' as data;
import 'email_widget.dart';
class ReplyListView extends StatelessWidget {
... | codelabs/animated-responsive-layout/step_08/lib/widgets/reply_list_view.dart/0 | {
"file_path": "codelabs/animated-responsive-layout/step_08/lib/widgets/reply_list_view.dart",
"repo_id": "codelabs",
"token_count": 437
} | 11 |
#include "../../Flutter/Flutter-Debug.xcconfig"
#include "Warnings.xcconfig"
| codelabs/animated-responsive-layout/step_08/macos/Runner/Configs/Debug.xcconfig/0 | {
"file_path": "codelabs/animated-responsive-layout/step_08/macos/Runner/Configs/Debug.xcconfig",
"repo_id": "codelabs",
"token_count": 32
} | 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:async';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import '../../classes/cl... | codelabs/boring_to_beautiful/final/lib/src/shared/playback/bloc/playback_bloc.dart/0 | {
"file_path": "codelabs/boring_to_beautiful/final/lib/src/shared/playback/bloc/playback_bloc.dart",
"repo_id": "codelabs",
"token_count": 1503
} | 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.
import 'package:flutter/material.dart';
class CenterRow extends StatelessWidget {
const CenterRow({
super.key,
required this.child,
});
fin... | codelabs/boring_to_beautiful/final/lib/src/shared/views/center_row.dart/0 | {
"file_path": "codelabs/boring_to_beautiful/final/lib/src/shared/views/center_row.dart",
"repo_id": "codelabs",
"token_count": 208
} | 14 |
//
// Generated file. Do not edit.
//
// clang-format off
#include "generated_plugin_registrant.h"
#include <desktop_window/desktop_window_plugin.h>
#include <dynamic_color/dynamic_color_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr... | codelabs/boring_to_beautiful/final/linux/flutter/generated_plugin_registrant.cc/0 | {
"file_path": "codelabs/boring_to_beautiful/final/linux/flutter/generated_plugin_registrant.cc",
"repo_id": "codelabs",
"token_count": 352
} | 15 |
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
| codelabs/boring_to_beautiful/step_01/android/gradle.properties/0 | {
"file_path": "codelabs/boring_to_beautiful/step_01/android/gradle.properties",
"repo_id": "codelabs",
"token_count": 30
} | 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 'dart:math';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import '../../../shared/providers/artists.dart';
i... | codelabs/boring_to_beautiful/step_01/lib/src/features/artists/view/artists_screen.dart/0 | {
"file_path": "codelabs/boring_to_beautiful/step_01/lib/src/features/artists/view/artists_screen.dart",
"repo_id": "codelabs",
"token_count": 658
} | 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.
class Event {
const Event({
required this.date,
required this.title,
required this.location,
required this.link,
});
final String da... | codelabs/boring_to_beautiful/step_01/lib/src/shared/classes/event.dart/0 | {
"file_path": "codelabs/boring_to_beautiful/step_01/lib/src/shared/classes/event.dart",
"repo_id": "codelabs",
"token_count": 116
} | 18 |
// 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:material_color_utilities/material_color_utilities.dart';
class NoAnimationPag... | codelabs/boring_to_beautiful/step_01/lib/src/shared/providers/theme.dart/0 | {
"file_path": "codelabs/boring_to_beautiful/step_01/lib/src/shared/providers/theme.dart",
"repo_id": "codelabs",
"token_count": 2258
} | 19 |
// 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 OutlinedCard extends StatefulWidget {
const OutlinedCard({
super.key,
required this.child,
thi... | codelabs/boring_to_beautiful/step_01/lib/src/shared/views/outlined_card.dart/0 | {
"file_path": "codelabs/boring_to_beautiful/step_01/lib/src/shared/views/outlined_card.dart",
"repo_id": "codelabs",
"token_count": 286
} | 20 |
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
| codelabs/boring_to_beautiful/step_03/android/gradle.properties/0 | {
"file_path": "codelabs/boring_to_beautiful/step_03/android/gradle.properties",
"repo_id": "codelabs",
"token_count": 30
} | 21 |
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
| codelabs/boring_to_beautiful/step_05/android/gradle.properties/0 | {
"file_path": "codelabs/boring_to_beautiful/step_05/android/gradle.properties",
"repo_id": "codelabs",
"token_count": 30
} | 22 |
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
| codelabs/boring_to_beautiful/step_07/android/gradle.properties/0 | {
"file_path": "codelabs/boring_to_beautiful/step_07/android/gradle.properties",
"repo_id": "codelabs",
"token_count": 30
} | 23 |
package com.example.brick_breaker
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity()
| codelabs/brick_breaker/step_05/android/app/src/main/kotlin/com/example/brick_breaker/MainActivity.kt/0 | {
"file_path": "codelabs/brick_breaker/step_05/android/app/src/main/kotlin/com/example/brick_breaker/MainActivity.kt",
"repo_id": "codelabs",
"token_count": 36
} | 24 |
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
| codelabs/brick_breaker/step_06/android/gradle.properties/0 | {
"file_path": "codelabs/brick_breaker/step_06/android/gradle.properties",
"repo_id": "codelabs",
"token_count": 30
} | 25 |
const gameWidth = 820.0;
const gameHeight = 1600.0;
const ballRadius = gameWidth * 0.02;
| codelabs/brick_breaker/step_06/lib/src/config.dart/0 | {
"file_path": "codelabs/brick_breaker/step_06/lib/src/config.dart",
"repo_id": "codelabs",
"token_count": 31
} | 26 |
#include "../../Flutter/Flutter-Release.xcconfig"
#include "Warnings.xcconfig"
| codelabs/brick_breaker/step_06/macos/Runner/Configs/Release.xcconfig/0 | {
"file_path": "codelabs/brick_breaker/step_06/macos/Runner/Configs/Release.xcconfig",
"repo_id": "codelabs",
"token_count": 32
} | 27 |
import 'dart:async';
import 'dart:math' as math;
import 'package:flame/components.dart';
import 'package:flame/events.dart';
import 'package:flame/game.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'components/components.dart';
import 'config.dart';
class BrickBreaker ... | codelabs/brick_breaker/step_07/lib/src/brick_breaker.dart/0 | {
"file_path": "codelabs/brick_breaker/step_07/lib/src/brick_breaker.dart",
"repo_id": "codelabs",
"token_count": 663
} | 28 |
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
| codelabs/dart-patterns-and-records/step_03/android/gradle.properties/0 | {
"file_path": "codelabs/dart-patterns-and-records/step_03/android/gradle.properties",
"repo_id": "codelabs",
"token_count": 30
} | 29 |
name: patterns_codelab
description: A new Flutter project.
publish_to: 'none'
version: 0.1.0
environment:
sdk: ^3.2.0
dependencies:
flutter:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^3.0.1
flutter:
uses-material-design: true
| codelabs/dart-patterns-and-records/step_03/pubspec.yaml/0 | {
"file_path": "codelabs/dart-patterns-and-records/step_03/pubspec.yaml",
"repo_id": "codelabs",
"token_count": 119
} | 30 |
#include "Generated.xcconfig"
| codelabs/dart-patterns-and-records/step_05/ios/Flutter/Debug.xcconfig/0 | {
"file_path": "codelabs/dart-patterns-and-records/step_05/ios/Flutter/Debug.xcconfig",
"repo_id": "codelabs",
"token_count": 12
} | 31 |
#include "ephemeral/Flutter-Generated.xcconfig"
| codelabs/dart-patterns-and-records/step_06_a/macos/Flutter/Flutter-Release.xcconfig/0 | {
"file_path": "codelabs/dart-patterns-and-records/step_06_a/macos/Flutter/Flutter-Release.xcconfig",
"repo_id": "codelabs",
"token_count": 19
} | 32 |
#include "../../Flutter/Flutter-Debug.xcconfig"
#include "Warnings.xcconfig"
| codelabs/dart-patterns-and-records/step_06_b/macos/Runner/Configs/Debug.xcconfig/0 | {
"file_path": "codelabs/dart-patterns-and-records/step_06_b/macos/Runner/Configs/Debug.xcconfig",
"repo_id": "codelabs",
"token_count": 32
} | 33 |
// Copyright 2023 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 'data.dart';
void main() {
runApp(const DocumentApp());
}
class DocumentApp extends StatelessWidget {
... | codelabs/dart-patterns-and-records/step_07_a/lib/main.dart/0 | {
"file_path": "codelabs/dart-patterns-and-records/step_07_a/lib/main.dart",
"repo_id": "codelabs",
"token_count": 418
} | 34 |
#include "Generated.xcconfig"
| codelabs/dart-patterns-and-records/step_11_a/ios/Flutter/Debug.xcconfig/0 | {
"file_path": "codelabs/dart-patterns-and-records/step_11_a/ios/Flutter/Debug.xcconfig",
"repo_id": "codelabs",
"token_count": 12
} | 35 |
#include "ephemeral/Flutter-Generated.xcconfig"
| codelabs/dart-patterns-and-records/step_11_b/macos/Flutter/Flutter-Release.xcconfig/0 | {
"file_path": "codelabs/dart-patterns-and-records/step_11_b/macos/Flutter/Flutter-Release.xcconfig",
"repo_id": "codelabs",
"token_count": 19
} | 36 |
#include "../../Flutter/Flutter-Debug.xcconfig"
#include "Warnings.xcconfig"
| codelabs/dart-patterns-and-records/step_12/macos/Runner/Configs/Debug.xcconfig/0 | {
"file_path": "codelabs/dart-patterns-and-records/step_12/macos/Runner/Configs/Debug.xcconfig",
"repo_id": "codelabs",
"token_count": 32
} | 37 |
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() => runApp(MaterialApp.router(routerConfig: router));
/// This handles '/' and '/details'.
final router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (_, __) => Scaffold(
appBar: AppBar(title: ... | codelabs/deeplink_cookbook/lib/main.dart/0 | {
"file_path": "codelabs/deeplink_cookbook/lib/main.dart",
"repo_id": "codelabs",
"token_count": 260
} | 38 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.