text stringlengths 6 13.6M | id stringlengths 13 176 | metadata dict | __index_level_0__ int64 0 1.69k |
|---|---|---|---|
import 'package:flutter/material.dart';
// #docregion Starter
// Define a custom Form widget.
class MyCustomForm extends StatefulWidget {
const MyCustomForm({super.key});
@override
State<MyCustomForm> createState() => _MyCustomFormState();
}
// Define a corresponding State class.
// This class holds the data r... | website/examples/cookbook/forms/retrieve_input/lib/starter.dart/0 | {
"file_path": "website/examples/cookbook/forms/retrieve_input/lib/starter.dart",
"repo_id": "website",
"token_count": 242
} | 1,371 |
import 'dart:async';
import 'package:games_services/games_services.dart';
import 'package:logging/logging.dart';
/// Allows awarding achievements and leaderboard scores,
/// and also showing the platforms' UI overlays for achievements
/// and leaderboards.
///
/// A facade of `package:games_services`.
class GamesServ... | website/examples/cookbook/games/achievements_leaderboards/lib/games_services_controller.dart/0 | {
"file_path": "website/examples/cookbook/games/achievements_leaderboards/lib/games_services_controller.dart",
"repo_id": "website",
"token_count": 1220
} | 1,372 |
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
// MyApp is a StatefulWidget. This allows updating the state of the
// widget when an item is removed.
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
MyAppState createState() {
return MyAppState();
... | website/examples/cookbook/gestures/dismissible/lib/step2.dart/0 | {
"file_path": "website/examples/cookbook/gestures/dismissible/lib/step2.dart",
"repo_id": "website",
"token_count": 851
} | 1,373 |
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 = 'Horizontal List';
return MaterialApp(
title: title,
home: Scaffold(
appBar: Ap... | website/examples/cookbook/lists/horizontal_list/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/lists/horizontal_list/lib/main.dart",
"repo_id": "website",
"token_count": 717
} | 1,374 |
import 'package:flutter/material.dart';
void main() => runApp(const HeroApp());
class HeroApp extends StatelessWidget {
const HeroApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Transition Demo',
home: MainScreen(),
);
}
}
class MainScre... | website/examples/cookbook/navigation/hero_animations/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/navigation/hero_animations/lib/main.dart",
"repo_id": "website",
"token_count": 684
} | 1,375 |
name: background_parsing
description: Background parsing
environment:
sdk: ^3.3.0
dependencies:
flutter:
sdk: flutter
http: ^1.2.0
dev_dependencies:
example_utils:
path: ../../../example_utils
flutter:
uses-material-design: true
| website/examples/cookbook/networking/background_parsing/pubspec.yaml/0 | {
"file_path": "website/examples/cookbook/networking/background_parsing/pubspec.yaml",
"repo_id": "website",
"token_count": 97
} | 1,376 |
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
Future<Album> fetchAlbum() async {
final response = await http.get(
Uri.parse('https://jsonplaceholder.typicode.com/albums/1'),
);
if (response.statusCode == 200) {
// If the ser... | website/examples/cookbook/networking/update_data/lib/main_step5.dart/0 | {
"file_path": "website/examples/cookbook/networking/update_data/lib/main_step5.dart",
"repo_id": "website",
"token_count": 1485
} | 1,377 |
class Dog {
final int id;
final String name;
final int age;
const Dog({
required this.id,
required this.name,
required this.age,
});
}
| website/examples/cookbook/persistence/sqlite/lib/step2.dart/0 | {
"file_path": "website/examples/cookbook/persistence/sqlite/lib/step2.dart",
"repo_id": "website",
"token_count": 59
} | 1,378 |
name: play_video
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
video_player: ^2.8.2
dev_dependencies:
example_utils:
path: ../../../example_utils
flutter_test:
... | website/examples/cookbook/plugins/play_video/pubspec.yaml/0 | {
"file_path": "website/examples/cookbook/plugins/play_video/pubspec.yaml",
"repo_id": "website",
"token_count": 147
} | 1,379 |
import 'package:counter_app/counter.dart';
import 'package:test/test.dart';
void main() {
group('Test start, increment, decrement', () {
test('value should start at 0', () {
expect(Counter().value, 0);
});
test('value should be incremented', () {
final counter = Counter();
counter.inc... | website/examples/cookbook/testing/unit/counter_app/test/group.dart/0 | {
"file_path": "website/examples/cookbook/testing/unit/counter_app/test/group.dart",
"repo_id": "website",
"token_count": 196
} | 1,380 |
// Used to generate `generated_pigeon.dart` with:
// ignore_for_file: one_member_abstracts
// dart run pigeon --input lib/pigeon_source.dart --dart_out lib/generated_pigeon.dart
// #docregion Search
import 'package:pigeon/pigeon.dart';
class SearchRequest {
final String query;
SearchRequest({required this.query}... | website/examples/development/platform_integration/lib/pigeon_source.dart/0 | {
"file_path": "website/examples/development/platform_integration/lib/pigeon_source.dart",
"repo_id": "website",
"token_count": 173
} | 1,381 |
// ignore_for_file: avoid_print
// #docregion Const
const foo = 1;
int get bar => foo; // ...or provide a getter.
void onClick() {
print(foo);
print(bar);
}
// #enddocregion Const
| website/examples/development/tools/lib/hot-reload/getter.dart/0 | {
"file_path": "website/examples/development/tools/lib/hot-reload/getter.dart",
"repo_id": "website",
"token_count": 66
} | 1,382 |
name: codelab_web
description: Sample codelab for web
publish_to: none
version: 1.0.0+1
environment:
sdk: ^3.3.0
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.6
dev_dependencies:
example_utils:
path: ../../example_utils
integration_test:
sdk: flutter
flutter_test:
sdk: flutte... | website/examples/get-started/codelab_web/pubspec.yaml/0 | {
"file_path": "website/examples/get-started/codelab_web/pubspec.yaml",
"repo_id": "website",
"token_count": 139
} | 1,383 |
import 'dart:async';
import 'dart:convert';
import 'dart:isolate';
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) ... | website/examples/get-started/flutter-for/ios_devs/lib/isolates.dart/0 | {
"file_path": "website/examples/get-started/flutter-for/ios_devs/lib/isolates.dart",
"repo_id": "website",
"token_count": 1086
} | 1,384 |
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
void main() {
runApp(
const MaterialApp(
home: Scaffold(
body: Center(
child: ElevatedButton(
onPressed: _incrementCounter,
child: Text('Incre... | website/examples/get-started/flutter-for/ios_devs/lib/shared_prefs.dart/0 | {
"file_path": "website/examples/get-started/flutter-for/ios_devs/lib/shared_prefs.dart",
"repo_id": "website",
"token_count": 244
} | 1,385 |
// ignore_for_file: avoid_print
import 'dart:convert';
// #docregion ImportDartIO
import 'dart:io';
// #enddocregion ImportDartIO
// #docregion PackageImport
import 'package:flutter/material.dart';
// #enddocregion PackageImport
// #docregion SharedPrefs
import 'package:shared_preferences/shared_preferences.dart';
//... | website/examples/get-started/flutter-for/react_native_devs/lib/examples.dart/0 | {
"file_path": "website/examples/get-started/flutter-for/react_native_devs/lib/examples.dart",
"repo_id": "website",
"token_count": 4740
} | 1,386 |
import 'dart:async';
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 const Mate... | website/examples/get-started/flutter-for/xamarin_devs/lib/loading.dart/0 | {
"file_path": "website/examples/get-started/flutter-for/xamarin_devs/lib/loading.dart",
"repo_id": "website",
"token_count": 655
} | 1,387 |
// Copyright 2020 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';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@overr... | website/examples/integration_test/lib/main.dart/0 | {
"file_path": "website/examples/integration_test/lib/main.dart",
"repo_id": "website",
"token_count": 746
} | 1,388 |
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'nn_intl.dart';
void main() {
runApp(
// #docregion MaterialApp
const MaterialApp(
localizationsDelegates: [
GlobalWidgetsLocalizations.delegate,
GlobalMaterialLocalization... | website/examples/internationalization/add_language/lib/main.dart/0 | {
"file_path": "website/examples/internationalization/add_language/lib/main.dart",
"repo_id": "website",
"token_count": 636
} | 1,389 |
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
// This is a library that provides messages for a en locale. All the
// messages from the main program should be duplicated here with the same
// function name.
// Ignore issues from commonly used lints in this file.
// ignore_for_file:unn... | website/examples/internationalization/intl_example/lib/l10n/messages_en.dart/0 | {
"file_path": "website/examples/internationalization/intl_example/lib/l10n/messages_en.dart",
"repo_id": "website",
"token_count": 333
} | 1,390 |
// Basic Flutter widget test. Learn more at https://docs.flutter.dev/testing.
import 'package:flutter_test/flutter_test.dart';
import 'package:layout/main.dart';
void main() {
testWidgets('Codelab smoke test', (tester) async {
await tester.pumpWidget(const MyApp());
expect(find.text('Hello World'), findsOne... | website/examples/layout/base/test/widget_test.dart/0 | {
"file_path": "website/examples/layout/base/test/widget_test.dart",
"repo_id": "website",
"token_count": 116
} | 1,391 |
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(BuildCont... | website/examples/layout/container/lib/main.dart/0 | {
"file_path": "website/examples/layout/container/lib/main.dart",
"repo_id": "website",
"token_count": 645
} | 1,392 |
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: "367f9ea16bfae1ca451b9cc27c1366870b187ae2"
channel: "stable"
project_type: app
# Tracks m... | website/examples/testing/code_debugging/.metadata/0 | {
"file_path": "website/examples/testing/code_debugging/.metadata",
"repo_id": "website",
"token_count": 352
} | 1,393 |
import 'package:flutter/material.dart';
class ProblemWidget extends StatelessWidget {
const ProblemWidget({super.key});
@override
// #docregion Problem
Widget build(BuildContext context) {
return Row(
children: [
const Icon(Icons.message),
Column(
mainAxisSize: MainAxisSize... | website/examples/testing/common_errors/lib/renderflex_overflow.dart/0 | {
"file_path": "website/examples/testing/common_errors/lib/renderflex_overflow.dart",
"repo_id": "website",
"token_count": 592
} | 1,394 |
name: errors
description: An error handling example.
publish_to: none
environment:
sdk: ^3.3.0
dependencies:
flutter:
sdk: flutter
firebase_core: ^2.25.4
dev_dependencies:
example_utils:
path: ../../example_utils
integration_test:
sdk: flutter
flutter_test:
sdk: flutter
flutter:
uses-... | website/examples/testing/errors/pubspec.yaml/0 | {
"file_path": "website/examples/testing/errors/pubspec.yaml",
"repo_id": "website",
"token_count": 136
} | 1,395 |
name: focus
description: Sample focus system code.
publish_to: none
environment:
sdk: ^3.3.0
dependencies:
flutter:
sdk: flutter
dev_dependencies:
example_utils:
path: ../../../example_utils
flutter:
uses-material-design: true
| website/examples/ui/advanced/focus/pubspec.yaml/0 | {
"file_path": "website/examples/ui/advanced/focus/pubspec.yaml",
"repo_id": "website",
"token_count": 95
} | 1,396 |
// ignore_for_file: non_constant_identifier_names
/// Shows 3 types of layout:
/// - A vertical for narrow screens
/// - Wide for wide screens
/// - A mixed mode
library;
import 'package:flextras/flextras.dart';
import 'package:flutter/material.dart';
import '../global/device_type.dart';
import '../widgets/scroll_vi... | website/examples/ui/layout/adaptive_app_demos/lib/pages/adaptive_reflow_page.dart/0 | {
"file_path": "website/examples/ui/layout/adaptive_app_demos/lib/pages/adaptive_reflow_page.dart",
"repo_id": "website",
"token_count": 1175
} | 1,397 |
import 'package:flutter/material.dart';
class Product {
const Product({required this.name});
final String name;
}
typedef CartChangedCallback = Function(Product product, bool inCart);
class ShoppingListItem extends StatelessWidget {
ShoppingListItem({
required this.product,
required this.inCart,
r... | website/examples/ui/widgets_intro/lib/main_shoppinglist.dart/0 | {
"file_path": "website/examples/ui/widgets_intro/lib/main_shoppinglist.dart",
"repo_id": "website",
"token_count": 1162
} | 1,398 |
[
{
"name": "Basics",
"description": "Widgets you absolutely need to know before building your first Flutter app.",
"priority": "high",
"id": "basics"
},
{
"name": "Material components",
"description": "Visual, behavioral, and motion-rich widgets implementing the <a href=\"https://m3.mater... | website/src/_data/catalog/index.json/0 | {
"file_path": "website/src/_data/catalog/index.json",
"repo_id": "website",
"token_count": 1892
} | 1,399 |
<!-- Material 3 Catalog Page -->
{% for section in site.data.catalog.index %}
{% if section.name == include.category %}
{% assign category = section %}
{% break %}
{% endif %}
{% endfor %}
<div class="catalog">
<div class="category-description">
<p>{{category.description}}</p>
<... | website/src/_includes/docs/catalogpage-material.html/0 | {
"file_path": "website/src/_includes/docs/catalogpage-material.html",
"repo_id": "website",
"token_count": 1051
} | 1,400 |
{% assign os=include.os %}
{% assign target = include.target %}
{% assign terminal=include.terminal %}
{% case target %}
{% when 'mobile-ios' %}
{% assign v-target = 'iOS' %}
{% when 'mobile-android','mobile' %}
{% assign v-target = 'Android' %}
{% else %}
{% assign v-target = target %}
{% endcase %}
## Insta... | website/src/_includes/docs/install/flutter-sdk.md/0 | {
"file_path": "website/src/_includes/docs/install/flutter-sdk.md",
"repo_id": "website",
"token_count": 546
} | 1,401 |
{% if include.target == 'desktop' -%}
36.0 | 56.0 |
{% elsif include.target == 'mobile-ios' -%}
36.0 | 56.0 |
{% elsif include.target == 'mobile-android' -%}
10.0 | 18.0 |
{% elsif include.target == 'web' -%}
2.5 | 2.5 |
{% else -%}
44.0 | 70.0 |
{% endif -%}
{:.table.table-striped}
| website/src/_includes/docs/install/reqs/macos/storage.md/0 | {
"file_path": "website/src/_includes/docs/install/reqs/macos/storage.md",
"repo_id": "website",
"token_count": 136
} | 1,402 |
{{site.alert.note}}
To learn how to use the **Performance View**
(part of Flutter DevTools)
for debugging performance issues,
see [Using the Performance view][].
{{site.alert.end}}
[Using the Performance view]: /tools/devtools/performance
| website/src/_includes/docs/performance.md/0 | {
"file_path": "website/src/_includes/docs/performance.md",
"repo_id": "website",
"token_count": 70
} | 1,403 |
{% for entry in include.children -%}
{% if entry.permalink -%}
{% if include.active_entries and forloop.index == include.active_entries[3] -%}
{% assign isActive = true -%}
{% assign class = 'nav-link active' -%}
{% else -%}
{% assign isActive = false -%}
{% assign class = 'nav-link' -%}
{% end... | website/src/_includes/sidenav-level-4.html/0 | {
"file_path": "website/src/_includes/sidenav-level-4.html",
"repo_id": "website",
"token_count": 287
} | 1,404 |
module DartSite
class Util
def self.get_indentation_string(s)
s.match(/^[ \t]*/)[0]
end
# String to string transformation.
def self.trim_min_leading_space(code)
lines = code.split(/\n/);
non_blank_lines = lines.reject { |s| s.match(/^\s*$/) }
# Length of leading spaces to b... | website/src/_plugins/dart_site_util.rb/0 | {
"file_path": "website/src/_plugins/dart_site_util.rb",
"repo_id": "website",
"token_count": 731
} | 1,405 |
@use '../base/variables' as *;
@use '../vendor/bootstrap';
// Material design icons
@mixin md-icon-content($icon-name, $width: '', $bottom: true) {
font-family: $site-font-family-icon;
content: $icon-name;
@if $width != '' {
max-width: $width; // Improves UX by minimizing flicker due to delay in font renderi... | website/src/_sass/components/_content.scss/0 | {
"file_path": "website/src/_sass/components/_content.scss",
"repo_id": "website",
"token_count": 1234
} | 1,406 |
---
title: Add a Flutter Fragment to an Android app
short-title: Add a Flutter Fragment
description: Learn how to add a Flutter Fragment to your existing Android app.
---
<img src='/assets/images/docs/development/add-to-app/android/add-flutter-fragment/add-flutter-fragment_header.png'
class="mw-100" alt="Add Flutter F... | website/src/add-to-app/android/add-flutter-fragment.md/0 | {
"file_path": "website/src/add-to-app/android/add-flutter-fragment.md",
"repo_id": "website",
"token_count": 6857
} | 1,407 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 27.7.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="2in"
height="2.2in"
viewBox="0 0 191.99386 211.19325"
xml:space="preserve"
sodipodi:doc... | website/src/assets/images/docs/brand-svg/macos.svg/0 | {
"file_path": "website/src/assets/images/docs/brand-svg/macos.svg",
"repo_id": "website",
"token_count": 1118
} | 1,408 |
---
title: Design
description: A catalog of recipes for designing your Flutter app.
---
{% include docs/cookbook-group-index.md %}
| website/src/cookbook/design/index.md/0 | {
"file_path": "website/src/cookbook/design/index.md",
"repo_id": "website",
"token_count": 39
} | 1,409 |
---
title: Create a typing indicator
description: How to implement a typing indicator.
js:
- defer: true
url: https://old-dartpad-3ce3f.web.app/inject_embed.dart.js
---
<?code-excerpt path-base="cookbook/effects/typing_indicator"?>
Modern chat apps display indicators when other users
are actively typing respons... | website/src/cookbook/effects/typing-indicator.md/0 | {
"file_path": "website/src/cookbook/effects/typing-indicator.md",
"repo_id": "website",
"token_count": 11577
} | 1,410 |
---
title: Display images from the internet
description: How to display images from the internet.
js:
- defer: true
url: https://old-dartpad-3ce3f.web.app/inject_embed.dart.js
---
<?code-excerpt path-base="cookbook/images/network_image"?>
Displaying images is fundamental for most mobile apps.
Flutter provides t... | website/src/cookbook/images/network-image.md/0 | {
"file_path": "website/src/cookbook/images/network-image.md",
"repo_id": "website",
"token_count": 735
} | 1,411 |
---
title: Navigate with named routes
description: How to implement named routes for navigating between screens.
js:
- defer: true
url: https://old-dartpad-3ce3f.web.app/inject_embed.dart.js
---
<?code-excerpt path-base="cookbook/navigation/named_routes"?>
{{site.alert.note}}
Named routes are no longer recomm... | website/src/cookbook/navigation/named-routes.md/0 | {
"file_path": "website/src/cookbook/navigation/named-routes.md",
"repo_id": "website",
"token_count": 2438
} | 1,412 |
---
title: Store key-value data on disk
description: >-
Learn how to use the shared_preferences package to store key-value data.
---
<?code-excerpt path-base="cookbook/persistence/key_value/"?>
If you have a relatively small collection of key-values
to save, you can use the [`shared_preferences`][] plugin.
Normall... | website/src/cookbook/persistence/key-value.md/0 | {
"file_path": "website/src/cookbook/persistence/key-value.md",
"repo_id": "website",
"token_count": 1921
} | 1,413 |
---
title: An introduction to widget testing
description: Learn more about widget testing in Flutter.
short-title: Introduction
---
<?code-excerpt path-base="cookbook/testing/widget/introduction/"?>
{% assign api = site.api | append: '/flutter' -%}
In the [introduction to unit testing][] recipe,
you learned how to t... | website/src/cookbook/testing/widget/introduction.md/0 | {
"file_path": "website/src/cookbook/testing/widget/introduction.md",
"repo_id": "website",
"token_count": 3185
} | 1,414 |
---
title: Simple app state management
description: A simple form of state management.
prev:
title: Ephemeral versus app state
path: /development/data-and-backend/state-mgmt/ephemeral-vs-app
next:
title: List of approaches
path: /development/data-and-backend/state-mgmt/options
---
<?code-excerpt path-base="sta... | website/src/data-and-backend/state-mgmt/simple.md/0 | {
"file_path": "website/src/data-and-backend/state-mgmt/simple.md",
"repo_id": "website",
"token_count": 4933
} | 1,415 |
---
title: Set up an editor
description: Configuring an IDE for Flutter.
prev:
title: Install
path: /get-started/install
next:
title: Test drive
path: /get-started/test-drive
toc: false
---
You can build apps with Flutter using any text editor or
integrated development environment (IDE)
combined with Flutter's... | website/src/get-started/editor.md/0 | {
"file_path": "website/src/get-started/editor.md",
"repo_id": "website",
"token_count": 1674
} | 1,416 |
---
title: Get started
description: Get started developing your first app with Flutter!
# This is a placeholder page (Firebase redirects this page's URL to another);
# it is necessary to allow breadcrumbs to work.
---
| website/src/get-started/index.md/0 | {
"file_path": "website/src/get-started/index.md",
"repo_id": "website",
"token_count": 54
} | 1,417 |
---
title: Choose your first type of app
description: Configure your system to develop Flutter on ChromeOS.
short-title: ChromeOS
target-list: [Android, Web]
---
{% assign os = 'chromeos' -%}
{% assign recommend = 'Android' %}
{% capture rec-target -%}
[{{recommend}}](/get-started/install/{{os | downcase}}/{{recommend... | website/src/get-started/install/chromeos/index.md/0 | {
"file_path": "website/src/get-started/install/chromeos/index.md",
"repo_id": "website",
"token_count": 584
} | 1,418 |
---
title: Start building Flutter web apps on Windows
description: Configure your system to develop Flutter web apps on Windows.
short-title: Make web apps
target: web
config: WindowsWeb
devos: Windows
next:
title: Create a test app
path: /get-started/test-drive
---
{% include docs/install/reqs/windows/base.md
... | website/src/get-started/install/windows/web.md/0 | {
"file_path": "website/src/get-started/install/windows/web.md",
"repo_id": "website",
"token_count": 253
} | 1,419 |
---
title: Performance FAQ
description: Frequently asked questions about Flutter performance
---
This page collects some frequently asked questions
about evaluating and debugging Flutter's performance.
* Which performance dashboards have metrics that are related to Flutter?
* [Flutter dashboard on appspot][]
* [F... | website/src/perf/faq.md/0 | {
"file_path": "website/src/perf/faq.md",
"repo_id": "website",
"token_count": 1751
} | 1,420 |
---
title: Add Android devtools for Flutter from Web on ChromeOS start
description: Configure your ChromeOS system to develop Flutter mobile apps for Android.
short-title: Starting from Web on ChromeOS
---
To add Android as a Flutter app target for ChromeOS, follow this procedure.
## Install Android Studio
1. Alloca... | website/src/platform-integration/android/install-android/install-android-from-web-on-chromeos.md/0 | {
"file_path": "website/src/platform-integration/android/install-android/install-android-from-web-on-chromeos.md",
"repo_id": "website",
"token_count": 417
} | 1,421 |
---
title: Add iOS devtools to Flutter from macOS start
description: Configure your system to develop Flutter mobile apps on iOS.
short-title: Starting from macOS
---
To add iOS as a Flutter app target for macOS, follow this procedure.
This procedure presumes you installed [Xcode][] {{site.appnow.xcode}}
when your Fl... | website/src/platform-integration/ios/install-ios/install-ios-from-macos.md/0 | {
"file_path": "website/src/platform-integration/ios/install-ios/install-ios-from-macos.md",
"repo_id": "website",
"token_count": 195
} | 1,422 |
---
title: Add macOS devtools to Flutter from Android start
description: Configure your system to develop Flutter mobile apps also on macOS.
short-title: Starting from Android
---
To add macOS desktop as a Flutter app target, follow this procedure.
## Install Xcode
1. Allocate a minimum of 26 GB of storage for Xcode... | website/src/platform-integration/macos/install-macos/install-macos-from-android.md/0 | {
"file_path": "website/src/platform-integration/macos/install-macos/install-macos-from-android.md",
"repo_id": "website",
"token_count": 233
} | 1,423 |
---
title: Add Web devtools to Flutter from macOS start
description: Configure your system to develop Flutter web apps on macOS.
short-title: Starting from macOS desktop
---
To add Web as a Flutter app target for macOS desktop, follow this procedure.
## Configure Chrome as the web DevTools tools
{% include docs/inst... | website/src/platform-integration/web/install-web/install-web-from-macos-desktop.md/0 | {
"file_path": "website/src/platform-integration/web/install-web/install-web-from-macos-desktop.md",
"repo_id": "website",
"token_count": 141
} | 1,424 |
---
title: User surveys
description: Why users see a survey announcement, how the data is used, and how to disable.
---
## Why do I see a survey announcement?
If you have not opted-out of Flutter's
[analytics and crash reporting](/reference/crash-reporting),
you may receive a survey announcement in your IDE.
We ru... | website/src/reference/user-surveys.md/0 | {
"file_path": "website/src/reference/user-surveys.md",
"repo_id": "website",
"token_count": 340
} | 1,425 |
---
title: Adding TextInputClient.currentAutofillScope property
description: >
A new getter TextInputClient.currentAutofillScope was
added to the TextInputClient interface for autofill support.
---
## Summary
A new getter, `TextInputClient.currentAutofillScope`, was added to the
`TextInputClient` interface; all `... | website/src/release/breaking-changes/add-currentAutofillScope-to-TextInputClient.md/0 | {
"file_path": "website/src/release/breaking-changes/add-currentAutofillScope-to-TextInputClient.md",
"repo_id": "website",
"token_count": 920
} | 1,426 |
---
title: CupertinoTabBar requires Localizations parent
description: >
In order to provide locale appropriate semantics, the
CupertinoTabBar requires a Localizations parent.
---
## Summary
Instances of `CupertinoTabBar` must have a
`Localizations`parent in order to provide a localized
`Semantics` hint. Trying to... | website/src/release/breaking-changes/cupertino-tab-bar-localizations.md/0 | {
"file_path": "website/src/release/breaking-changes/cupertino-tab-bar-localizations.md",
"repo_id": "website",
"token_count": 1900
} | 1,427 |
---
title: The forgetChild() method must call super
description: >
Any element subclasses that override forgetChild are required to call super.
---
## Summary
A recent global key duplication detection refactor now requires
`Element` subclasses that override the `forgetChild()` to call `super()`.
## Context
When... | website/src/release/breaking-changes/forgetchild-call-super.md/0 | {
"file_path": "website/src/release/breaking-changes/forgetchild-call-super.md",
"repo_id": "website",
"token_count": 694
} | 1,428 |
---
title: Material Chip button semantics
description: Interactive Material Chips are now semantically marked as buttons.
---
## Summary
Flutter now applies the semantic label of `button` to
all interactive [Material Chips][] for accessibility purposes.
## Context
Interactive Material Chips (namely [`ActionChip`][]... | website/src/release/breaking-changes/material-chip-button-semantics.md/0 | {
"file_path": "website/src/release/breaking-changes/material-chip-button-semantics.md",
"repo_id": "website",
"token_count": 1558
} | 1,429 |
---
title: Using HTML slots to render platform views in the web
description: >
iframes in Flutter web used to reload, because of
the way some DOM operations were made.
A change in the way Flutter web apps render platform views
makes them stable (preventing iframe reloads, and other problems
with video tags or... | website/src/release/breaking-changes/platform-views-using-html-slots-web.md/0 | {
"file_path": "website/src/release/breaking-changes/platform-views-using-html-slots-web.md",
"repo_id": "website",
"token_count": 2074
} | 1,430 |
---
title: Deprecated Splash Screen API Migration
description: How to migrate from Manifest/Activity defined splash screen.
---
Prior to Flutter 2.5, Flutter apps could add a splash
screen by defining it within the metadata of their application manifest file
(`AndroidManifest.xml`), by implementing [`provideSplashScre... | website/src/release/breaking-changes/splash-screen-migration.md/0 | {
"file_path": "website/src/release/breaking-changes/splash-screen-migration.md",
"repo_id": "website",
"token_count": 1080
} | 1,431 |
---
title: The window singleton is deprecated
description: >
In preparation for supporting multiple views and
multiple windows the window singleton has been deprecated.
---
## Summary
In preparation for supporting multiple views and multiple windows, the `window`
singleton has been deprecated. Code previously re... | website/src/release/breaking-changes/window-singleton.md/0 | {
"file_path": "website/src/release/breaking-changes/window-singleton.md",
"repo_id": "website",
"token_count": 4416
} | 1,432 |
---
title: Flutter 1.12.13 release notes
short-title: 1.12.13 release notes
description: Release notes for Flutter 1.12.13.
---
Welcome to Flutter 1.12, our biggest stable release so far!
In this release, we've merged 1,905 Pull Requests
from 188 contributors, including both Googlers and
non-Google contributors! Pleas... | website/src/release/release-notes/release-notes-1.12.13.md/0 | {
"file_path": "website/src/release/release-notes/release-notes-1.12.13.md",
"repo_id": "website",
"token_count": 48456
} | 1,433 |
---
title: Inside Flutter
description: Learn about Flutter's inner workings from one of the founding engineers.
---
This document describes the inner workings of the Flutter toolkit that make
Flutter's API possible. Because Flutter widgets are built using aggressive
composition, user interfaces built with Flutter have... | website/src/resources/inside-flutter.md/0 | {
"file_path": "website/src/resources/inside-flutter.md",
"repo_id": "website",
"token_count": 8078
} | 1,434 |
---
title: Testing Flutter apps
description:
Learn more about the different types of testing and how to write them.
---
The more features your app has, the harder it is to test manually.
Automated tests help ensure that your app performs correctly before
you publish it, while retaining your feature and bug fix velo... | website/src/testing/overview.md/0 | {
"file_path": "website/src/testing/overview.md",
"repo_id": "website",
"token_count": 1459
} | 1,435 |
---
title: Using the Performance view
description: Learn how to use the DevTools performance view.
---
{{site.alert.note}}
The DevTools performance view works for Flutter mobile and desktop apps.
For web apps, Flutter adds timeline events to the
performance panel of Chrome DevTools instead.
To learn about prof... | website/src/tools/devtools/performance.md/0 | {
"file_path": "website/src/tools/devtools/performance.md",
"repo_id": "website",
"token_count": 2962
} | 1,436 |
---
short-title: 2.11.2 release notes
description: Release notes for Dart and Flutter DevTools version 2.11.2.
toc: false
---
{% include_relative release-notes-2.11.2-src.md %}
| website/src/tools/devtools/release-notes/release-notes-2.11.2.md/0 | {
"file_path": "website/src/tools/devtools/release-notes/release-notes-2.11.2.md",
"repo_id": "website",
"token_count": 61
} | 1,437 |
---
short-title: 2.18.0 release notes
description: Release notes for Dart and Flutter DevTools version 2.18.0.
toc: false
---
{% include_relative release-notes-2.18.0-src.md %}
| website/src/tools/devtools/release-notes/release-notes-2.18.0.md/0 | {
"file_path": "website/src/tools/devtools/release-notes/release-notes-2.18.0.md",
"repo_id": "website",
"token_count": 61
} | 1,438 |
---
short-title: 2.26.1 release notes
description: Release notes for Dart and Flutter DevTools version 2.26.1.
toc: false
---
{% include_relative release-notes-2.26.1-src.md %}
| website/src/tools/devtools/release-notes/release-notes-2.26.1.md/0 | {
"file_path": "website/src/tools/devtools/release-notes/release-notes-2.26.1.md",
"repo_id": "website",
"token_count": 61
} | 1,439 |
---
short-title: 2.30.0 release notes
description: Release notes for Dart and Flutter DevTools version 2.30.0.
toc: false
---
{% include_relative release-notes-2.30.0-src.md %}
| website/src/tools/devtools/release-notes/release-notes-2.30.0.md/0 | {
"file_path": "website/src/tools/devtools/release-notes/release-notes-2.30.0.md",
"repo_id": "website",
"token_count": 61
} | 1,440 |
---
title: Install and run DevTools from VS Code
description: Learn how to install and use DevTools from VS Code.
---
## Install the VS Code extensions
To use the DevTools from VS Code, you need the [Dart extension][].
If you're debugging Flutter applications, you should also install
the [Flutter extension][].
## St... | website/src/tools/devtools/vscode.md/0 | {
"file_path": "website/src/tools/devtools/vscode.md",
"repo_id": "website",
"token_count": 574
} | 1,441 |
---
title: Staggered animations
description: How to write a staggered animation in Flutter.
short-title: Staggered
---
{{site.alert.secondary}}
<h4>What you'll learn</h4>
* A staggered animation consists of sequential or overlapping
animations.
* To create a staggered animation, use multiple `Animation` objects... | website/src/ui/animations/staggered-animations.md/0 | {
"file_path": "website/src/ui/animations/staggered-animations.md",
"repo_id": "website",
"token_count": 3953
} | 1,442 |
---
layout: toc
title: Input & forms
description: Content covering handling input and adding forms to Flutter apps.
sitemap: false
---
| website/src/ui/interactivity/input/index.md/0 | {
"file_path": "website/src/ui/interactivity/input/index.md",
"repo_id": "website",
"token_count": 36
} | 1,443 |
---
title: Async widgets
short-title: Async
description: A catalog of Flutter widgets for handling asynchronous code.
---
{% include docs/catalogpage.html category="Async" %}
| website/src/ui/widgets/async.md/0 | {
"file_path": "website/src/ui/widgets/async.md",
"repo_id": "website",
"token_count": 49
} | 1,444 |
// 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 'package:args/command_runner.dart';
import 'src/commands/analyze_dart.dart';
import 'src/commands/check_all.dart';
import 'src/commands/check_link_... | website/tool/flutter_site/lib/flutter_site.dart/0 | {
"file_path": "website/tool/flutter_site/lib/flutter_site.dart",
"repo_id": "website",
"token_count": 420
} | 1,445 |
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
| codelabs/adaptive_app/step_03/android/gradle.properties/0 | {
"file_path": "codelabs/adaptive_app/step_03/android/gradle.properties",
"repo_id": "codelabs",
"token_count": 30
} | 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 'package:flutter/material.dart';
import 'package:googleapis/youtube/v3.dart';
import 'package:provider/provider.dart';
import 'app_state.dart';
cl... | codelabs/adaptive_app/step_05/lib/src/playlists.dart/0 | {
"file_path": "codelabs/adaptive_app/step_05/lib/src/playlists.dart",
"repo_id": "codelabs",
"token_count": 919
} | 1 |
#include "../../Flutter/Flutter-Release.xcconfig"
#include "Warnings.xcconfig"
| codelabs/adaptive_app/step_05/macos/Runner/Configs/Release.xcconfig/0 | {
"file_path": "codelabs/adaptive_app/step_05/macos/Runner/Configs/Release.xcconfig",
"repo_id": "codelabs",
"token_count": 32
} | 2 |
// 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 AdaptiveText extends StatelessWidget {
const AdaptiveText(this.data, {super.key, this.style});
final Str... | codelabs/adaptive_app/step_07/lib/src/adaptive_text.dart/0 | {
"file_path": "codelabs/adaptive_app/step_07/lib/src/adaptive_text.dart",
"repo_id": "codelabs",
"token_count": 184
} | 3 |
//
// Generated file. Do not edit.
//
import FlutterMacOS
import Foundation
import google_sign_in_ios
import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin"))
UrlLauncherPlugin.register... | codelabs/adaptive_app/step_07/macos/Flutter/GeneratedPluginRegistrant.swift/0 | {
"file_path": "codelabs/adaptive_app/step_07/macos/Flutter/GeneratedPluginRegistrant.swift",
"repo_id": "codelabs",
"token_count": 122
} | 4 |
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
| codelabs/animated-responsive-layout/step_03/android/gradle.properties/0 | {
"file_path": "codelabs/animated-responsive-layout/step_03/android/gradle.properties",
"repo_id": "codelabs",
"token_count": 30
} | 5 |
// 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/email_list_view.dart';
void main(... | codelabs/animated-responsive-layout/step_04/lib/main.dart/0 | {
"file_path": "codelabs/animated-responsive-layout/step_04/lib/main.dart",
"repo_id": "codelabs",
"token_count": 543
} | 6 |
#include "../../Flutter/Flutter-Debug.xcconfig"
#include "Warnings.xcconfig"
| codelabs/animated-responsive-layout/step_06/macos/Runner/Configs/Debug.xcconfig/0 | {
"file_path": "codelabs/animated-responsive-layout/step_06/macos/Runner/Configs/Debug.xcconfig",
"repo_id": "codelabs",
"token_count": 32
} | 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 '../animations.dart';
import '../destinations.dart';
import '../transitions/bottom_bar_transition.dart';
c... | codelabs/animated-responsive-layout/step_07/lib/widgets/disappearing_bottom_navigation_bar.dart/0 | {
"file_path": "codelabs/animated-responsive-layout/step_07/lib/widgets/disappearing_bottom_navigation_bar.dart",
"repo_id": "codelabs",
"token_count": 429
} | 8 |
#include "ephemeral/Flutter-Generated.xcconfig"
| codelabs/animated-responsive-layout/step_07/macos/Flutter/Flutter-Debug.xcconfig/0 | {
"file_path": "codelabs/animated-responsive-layout/step_07/macos/Flutter/Flutter-Debug.xcconfig",
"repo_id": "codelabs",
"token_count": 19
} | 9 |
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
| codelabs/boring_to_beautiful/final/android/gradle.properties/0 | {
"file_path": "codelabs/boring_to_beautiful/final/android/gradle.properties",
"repo_id": "codelabs",
"token_count": 30
} | 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 OutlinedCard extends StatefulWidget {
const OutlinedCard({
super.key,
required this.child,
thi... | codelabs/boring_to_beautiful/final/lib/src/shared/views/outlined_card.dart/0 | {
"file_path": "codelabs/boring_to_beautiful/final/lib/src/shared/views/outlined_card.dart",
"repo_id": "codelabs",
"token_count": 912
} | 11 |
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
| codelabs/boring_to_beautiful/step_02/android/gradle.properties/0 | {
"file_path": "codelabs/boring_to_beautiful/step_02/android/gradle.properties",
"repo_id": "codelabs",
"token_count": 30
} | 12 |
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
| codelabs/boring_to_beautiful/step_04/android/gradle.properties/0 | {
"file_path": "codelabs/boring_to_beautiful/step_04/android/gradle.properties",
"repo_id": "codelabs",
"token_count": 30
} | 13 |
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
| codelabs/boring_to_beautiful/step_06/android/gradle.properties/0 | {
"file_path": "codelabs/boring_to_beautiful/step_06/android/gradle.properties",
"repo_id": "codelabs",
"token_count": 30
} | 14 |
include: ../../analysis_options.yaml
| codelabs/brick_breaker/step_04/analysis_options.yaml/0 | {
"file_path": "codelabs/brick_breaker/step_04/analysis_options.yaml",
"repo_id": "codelabs",
"token_count": 12
} | 15 |
const gameWidth = 820.0;
const gameHeight = 1600.0;
| codelabs/brick_breaker/step_04/lib/src/config.dart/0 | {
"file_path": "codelabs/brick_breaker/step_04/lib/src/config.dart",
"repo_id": "codelabs",
"token_count": 18
} | 16 |
#include "../../Flutter/Flutter-Release.xcconfig"
#include "Warnings.xcconfig"
| codelabs/brick_breaker/step_04/macos/Runner/Configs/Release.xcconfig/0 | {
"file_path": "codelabs/brick_breaker/step_04/macos/Runner/Configs/Release.xcconfig",
"repo_id": "codelabs",
"token_count": 32
} | 17 |
import 'dart:async';
import 'dart:math' as math;
import 'package:flame/components.dart';
import 'package:flame/game.dart';
import 'components/components.dart';
import 'config.dart';
class BrickBreaker extends FlameGame {
BrickBreaker()
: super(
camera: CameraComponent.withFixedResolution(
... | codelabs/brick_breaker/step_05/lib/src/brick_breaker.dart/0 | {
"file_path": "codelabs/brick_breaker/step_05/lib/src/brick_breaker.dart",
"repo_id": "codelabs",
"token_count": 368
} | 18 |
include: ../../analysis_options.yaml
| codelabs/brick_breaker/step_08/analysis_options.yaml/0 | {
"file_path": "codelabs/brick_breaker/step_08/analysis_options.yaml",
"repo_id": "codelabs",
"token_count": 12
} | 19 |
#import "GeneratedPluginRegistrant.h"
| codelabs/brick_breaker/step_09/ios/Runner/Runner-Bridging-Header.h/0 | {
"file_path": "codelabs/brick_breaker/step_09/ios/Runner/Runner-Bridging-Header.h",
"repo_id": "codelabs",
"token_count": 13
} | 20 |
#import "GeneratedPluginRegistrant.h"
| codelabs/dart-patterns-and-records/step_03/ios/Runner/Runner-Bridging-Header.h/0 | {
"file_path": "codelabs/dart-patterns-and-records/step_03/ios/Runner/Runner-Bridging-Header.h",
"repo_id": "codelabs",
"token_count": 13
} | 21 |
#include "../../Flutter/Flutter-Debug.xcconfig"
#include "Warnings.xcconfig"
| codelabs/dart-patterns-and-records/step_03/macos/Runner/Configs/Debug.xcconfig/0 | {
"file_path": "codelabs/dart-patterns-and-records/step_03/macos/Runner/Configs/Debug.xcconfig",
"repo_id": "codelabs",
"token_count": 32
} | 22 |
#include "Generated.xcconfig"
| codelabs/dart-patterns-and-records/step_07_b/ios/Flutter/Debug.xcconfig/0 | {
"file_path": "codelabs/dart-patterns-and-records/step_07_b/ios/Flutter/Debug.xcconfig",
"repo_id": "codelabs",
"token_count": 12
} | 23 |
#include "ephemeral/Flutter-Generated.xcconfig"
| codelabs/dart-patterns-and-records/step_08/macos/Flutter/Flutter-Release.xcconfig/0 | {
"file_path": "codelabs/dart-patterns-and-records/step_08/macos/Flutter/Flutter-Release.xcconfig",
"repo_id": "codelabs",
"token_count": 19
} | 24 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.