text
stringlengths
6
13.6M
id
stringlengths
13
176
metadata
dict
__index_level_0__
int64
0
1.69k
--- title: State management description: Learn how to manage state in Flutter. prev: title: Layouts path: /get-started/fwe/layout next: title: Handling user input --- # State management The _state_ of a Flutter app refers to all the objects it uses to display its UI or manage system resources. State managemen...
website/src/get-started/fwe/state-management.md/0
{ "file_path": "website/src/get-started/fwe/state-management.md", "repo_id": "website", "token_count": 5167 }
1,420
<p class="install-help"> <a id='{{ include.location }}' href='/get-started/install/help{{ include.section }}'> <span class='material-symbols'>help</span> <span>Help</span> </a> </p>
website/src/get-started/install/_help-link.md/0
{ "file_path": "website/src/get-started/install/_help-link.md", "repo_id": "website", "token_count": 79 }
1,421
--- title: Choose your first type of app description: Configure your system to develop Flutter on Windows. short-title: Windows target-list: [Desktop, Android, Web] js: [{url: '/assets/js/temp/windows-install-redirector.js'}] --- {% assign os = 'windows' -%} {% assign recommend = 'Android' %} {% capture rec-target ...
website/src/get-started/install/windows/index.md/0
{ "file_path": "website/src/get-started/install/windows/index.md", "repo_id": "website", "token_count": 749 }
1,422
--- title: Performance best practices short-title: Best practices description: How to ensure that your Flutter app is performant. --- {% include docs/performance.md %} Generally, Flutter applications are performant by default, so you only need to avoid common pitfalls to get excellent performance. These best practice...
website/src/perf/best-practices.md/0
{ "file_path": "website/src/perf/best-practices.md", "repo_id": "website", "token_count": 4750 }
1,423
--- title: Add Android devtools for Flutter from Linux start description: Configure your Mac to develop Flutter mobile apps for Android. short-title: Starting from Linux desktop --- To add Android as a Flutter app target for Linux, follow this procedure. ## Install Android Studio 1. Allocate a minimum of 7.5 GB of s...
website/src/platform-integration/android/install-android/install-android-from-linux.md/0
{ "file_path": "website/src/platform-integration/android/install-android/install-android-from-linux.md", "repo_id": "website", "token_count": 403 }
1,424
--- title: Add iOS devtools for Flutter description: Configure your system to develop Flutter for iOS. short-title: Add iOS DevTools target-list: [macOS, Android, Web] --- To choose the guide to add iOS devtools to your Flutter configuration, click the [Getting Started path][] you followed. <div class="card-deck mb-8...
website/src/platform-integration/ios/install-ios/index.md/0
{ "file_path": "website/src/platform-integration/ios/install-ios/index.md", "repo_id": "website", "token_count": 601 }
1,425
--- layout: toc title: macOS description: Content covering integration with macOS in Flutter apps. ---
website/src/platform-integration/macos/index.md/0
{ "file_path": "website/src/platform-integration/macos/index.md", "repo_id": "website", "token_count": 26 }
1,426
--- title: Add Web devtools to Flutter from iOS on macOS start description: Configure your system to develop Flutter web apps on macOS. short-title: Starting from iOS on macOS --- To add Web as a Flutter app target for iOS on macOS, follow this procedure. ## Configure Chrome as the web DevTools tools {% include docs...
website/src/platform-integration/web/install-web/install-web-from-ios-on-macos.md/0
{ "file_path": "website/src/platform-integration/web/install-web/install-web-from-ios-on-macos.md", "repo_id": "website", "token_count": 145 }
1,427
--- title: Supported deployment platforms short-title: Supported platforms description: The platforms that Flutter supports by platform version. --- As of Flutter {{site.appnow.flutter}}, Flutter supports deploying apps the following combinations of hardware architectures and operating system versions. These combinati...
website/src/reference/supported-platforms.md/0
{ "file_path": "website/src/reference/supported-platforms.md", "repo_id": "website", "token_count": 331 }
1,428
--- title: Actions API revision description: > Removes need for FocusNode in invocations, map Intent types to Actions. --- ## Summary In Flutter an [`Intent`][] is an object that's typically bound to a keyboard key combination using the [`Shortcuts`][] widget. An `Intent` can be bound to an [`Action`][], which can ...
website/src/release/breaking-changes/actions-api-revision.md/0
{ "file_path": "website/src/release/breaking-changes/actions-api-revision.md", "repo_id": "website", "token_count": 3363 }
1,429
--- title: A new way to customize context menus description: > Several hard-coded parameters for customizing context menus have now been replaced by a generic widget builder. --- ## Summary Context menus, or text selection toolbars, are the menus that show up when long pressing or right clicking on text in Flutt...
website/src/release/breaking-changes/context-menus.md/0
{ "file_path": "website/src/release/breaking-changes/context-menus.md", "repo_id": "website", "token_count": 3887 }
1,430
--- title: Introducing package:flutter_lints description: > Migrate to package:flutter_lints to get the latest set of recommended lints, which encourage good coding practices. --- ## Summary The [`package:flutter_lints`][] defines the latest set of recommended lints that encourage good coding practices for Flutte...
website/src/release/breaking-changes/flutter-lints-package.md/0
{ "file_path": "website/src/release/breaking-changes/flutter-lints-package.md", "repo_id": "website", "token_count": 1647 }
1,431
--- title: The ThemeData.useMaterial3 flag is true by default description: >- The ThemeData.useMaterial3 flag is now set to true by default. --- ## Summary The Material library has been updated to match the latest Material Design spec. Changes include new components, new component themes, and updated component vis...
website/src/release/breaking-changes/material-3-default.md/0
{ "file_path": "website/src/release/breaking-changes/material-3-default.md", "repo_id": "website", "token_count": 1024 }
1,432
--- title: Paint.enableDithering is now true by default. description: >- Deprecation of user-configurable `Paint.enableDithering`. --- ## Summary [`Paint.enableDithering`][] is now `true` by default (previously, `false`), and is _deprecated_ pending removal - Flutter no longer supports user-configurable dithering s...
website/src/release/breaking-changes/paint-enableDithering.md/0
{ "file_path": "website/src/release/breaking-changes/paint-enableDithering.md", "repo_id": "website", "token_count": 1459 }
1,433
--- title: Reversing the dependency between the scheduler and services layer description: The services layer now depends on the scheduler layer. --- ## Summary The services layer now depends on the scheduler layer. Previously, the opposite was true. This may affect you if you have defined custom bindings overriding F...
website/src/release/breaking-changes/services-scheduler-dependency-reversed.md/0
{ "file_path": "website/src/release/breaking-changes/services-scheduler-dependency-reversed.md", "repo_id": "website", "token_count": 531 }
1,434
--- title: Use maxLengthEnforcement instead of maxLengthEnforced description: Introducing the MaxLengthEnforcement enum. --- ## Summary To control the behavior of `maxLength` in the `LengthLimitingTextInputFormatter`, use `maxLengthEnforcement` instead of the now-deprecated `maxLengthEnforced`. ## Context The `maxL...
website/src/release/breaking-changes/use-maxLengthEnforcement-instead-of-maxLengthEnforced.md/0
{ "file_path": "website/src/release/breaking-changes/use-maxLengthEnforcement-instead-of-maxLengthEnforced.md", "repo_id": "website", "token_count": 2120 }
1,435
--- title: Flutter release notes short-title: Release notes description: Release notes for Flutter for prior releases. --- This page links to announcements and release notes for releases to the stable channel. {{site.alert.note}} For information about bug-fix releases, check out [Hotfixes to the Stable Channel][]...
website/src/release/release-notes/index.md/0
{ "file_path": "website/src/release/release-notes/index.md", "repo_id": "website", "token_count": 2433 }
1,436
--- title: FAQ description: Frequently asked questions and answers about Flutter. --- ## Introduction This page collects some common questions asked about Flutter. You might also check out the following specialized FAQs: * [Web FAQ][] * [Performance FAQ][] [Web FAQ]: /platform-integration/web/faq [Performance FAQ]:...
website/src/resources/faq.md/0
{ "file_path": "website/src/resources/faq.md", "repo_id": "website", "token_count": 12230 }
1,437
--- title: Integration testing description: Learn how to write integration tests --- <?code-excerpt path-base="testing/integration_tests/how_to"?> This page describes how to use the [`integration_test`][] package to run integration tests. Tests written using this package have the following properties: * Compatibilit...
website/src/testing/integration-tests/index.md/0
{ "file_path": "website/src/testing/integration-tests/index.md", "repo_id": "website", "token_count": 3372 }
1,438
--- title: Using the Network View description: How to use the DevTools network view. --- {{site.alert.note}} The network view works with all Flutter and Dart applications. {{site.alert.end}} ## What is it? The network view allows you to inspect HTTP, HTTPS, and web socket traffic from your Dart or Flutter applicat...
website/src/tools/devtools/network.md/0
{ "file_path": "website/src/tools/devtools/network.md", "repo_id": "website", "token_count": 685 }
1,439
--- short-title: 2.10.0 release notes description: Release notes for Dart and Flutter DevTools version 2.10.0. toc: false --- {% include_relative release-notes-2.10.0-src.md %}
website/src/tools/devtools/release-notes/release-notes-2.10.0.md/0
{ "file_path": "website/src/tools/devtools/release-notes/release-notes-2.10.0.md", "repo_id": "website", "token_count": 61 }
1,440
--- short-title: 2.17.0 release notes description: Release notes for Dart and Flutter DevTools version 2.17.0. toc: false --- {% include_relative release-notes-2.17.0-src.md %}
website/src/tools/devtools/release-notes/release-notes-2.17.0.md/0
{ "file_path": "website/src/tools/devtools/release-notes/release-notes-2.17.0.md", "repo_id": "website", "token_count": 61 }
1,441
--- short-title: 2.25.0 release notes description: Release notes for Dart and Flutter DevTools version 2.25.0. toc: false --- {% include_relative release-notes-2.25.0-src.md %}
website/src/tools/devtools/release-notes/release-notes-2.25.0.md/0
{ "file_path": "website/src/tools/devtools/release-notes/release-notes-2.25.0.md", "repo_id": "website", "token_count": 61 }
1,442
--- short-title: 2.29.0 release notes description: Release notes for Dart and Flutter DevTools version 2.29.0. toc: false --- {% include_relative release-notes-2.29.0-src.md %}
website/src/tools/devtools/release-notes/release-notes-2.29.0.md/0
{ "file_path": "website/src/tools/devtools/release-notes/release-notes-2.29.0.md", "repo_id": "website", "token_count": 61 }
1,443
--- short-title: 2.9.2 release notes description: Release notes for Dart and Flutter DevTools version 2.9.2. toc: false --- {% include_relative release-notes-2.9.2-src.md %}
website/src/tools/devtools/release-notes/release-notes-2.9.2.md/0
{ "file_path": "website/src/tools/devtools/release-notes/release-notes-2.9.2.md", "repo_id": "website", "token_count": 61 }
1,444
--- title: Introduction to animations short-title: Animations description: How to perform animations in Flutter. --- Well-designed animations make a UI feel more intuitive, contribute to the slick look and feel of a polished app, and improve the user experience. Flutter's animation support makes it easy to implement a...
website/src/ui/animations/index.md/0
{ "file_path": "website/src/ui/animations/index.md", "repo_id": "website", "token_count": 3315 }
1,445
--- title: Taps, drags, and other gestures short-title: Gestures description: How gestures, such as taps and drags, work in Flutter. --- This document explains how to listen for, and respond to, _gestures_ in Flutter. Examples of gestures include taps, drags, and scaling. The gesture system in Flutter has two separat...
website/src/ui/interactivity/gestures/index.md/0
{ "file_path": "website/src/ui/interactivity/gestures/index.md", "repo_id": "website", "token_count": 2218 }
1,446
--- title: Animation and motion widgets short-title: Animation description: A catalog of Flutter's animation widgets. --- {% include docs/catalogpage.html category="Animation and Motion" %}
website/src/ui/widgets/animation.md/0
{ "file_path": "website/src/ui/widgets/animation.md", "repo_id": "website", "token_count": 49 }
1,447
include: package:analysis_defaults/analysis.yaml
website/tool/flutter_site/analysis_options.yaml/0
{ "file_path": "website/tool/flutter_site/analysis_options.yaml", "repo_id": "website", "token_count": 14 }
1,448
name: Adaptive App rebuild script steps: - name: step_03 steps: - name: Remove generated code rmdir: step_03 - name: Create project flutter: create adaptive_app - name: Strip DEVELOPMENT_TEAM strip-lines-containing: DEVELOPMENT_TEAM = path: adaptive_app/ios/Runner...
codelabs/adaptive_app/codelab_rebuild.yaml/0
{ "file_path": "codelabs/adaptive_app/codelab_rebuild.yaml", "repo_id": "codelabs", "token_count": 38655 }
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:go_router/go_router.dart'; import 'package:googleapis/youtube/v3.dart'; import 'package:provider/pr...
codelabs/adaptive_app/step_04/lib/src/playlists.dart/0
{ "file_path": "codelabs/adaptive_app/step_04/lib/src/playlists.dart", "repo_id": "codelabs", "token_count": 920 }
1
#include "../../Flutter/Flutter-Release.xcconfig" #include "Warnings.xcconfig"
codelabs/adaptive_app/step_04/macos/Runner/Configs/Release.xcconfig/0
{ "file_path": "codelabs/adaptive_app/step_04/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:flex_color_scheme/flex_color_scheme.dart'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'packa...
codelabs/adaptive_app/step_07/lib/main.dart/0
{ "file_path": "codelabs/adaptive_app/step_07/lib/main.dart", "repo_id": "codelabs", "token_count": 1196 }
3
#include "Generated.xcconfig"
codelabs/animated-responsive-layout/step_04/ios/Flutter/Release.xcconfig/0
{ "file_path": "codelabs/animated-responsive-layout/step_04/ios/Flutter/Release.xcconfig", "repo_id": "codelabs", "token_count": 12 }
4
// 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 Attachment { const Attachment({ required this.url, }); final String url; } class Email { const Email({ required this.sender, re...
codelabs/animated-responsive-layout/step_06/lib/models/models.dart/0
{ "file_path": "codelabs/animated-responsive-layout/step_06/lib/models/models.dart", "repo_id": "codelabs", "token_count": 317 }
5
name: Boring to Beautiful script steps: - name: step_01 steps: - name: Remove generated code rmdir: step_01 - name: Create project flutter: create myartist - name: Strip DEVELOPMENT_TEAM strip-lines-containing: DEVELOPMENT_TEAM = path: myartist/ios/Runner.xcodepro...
codelabs/boring_to_beautiful/codelab_rebuild.yaml/0
{ "file_path": "codelabs/boring_to_beautiful/codelab_rebuild.yaml", "repo_id": "codelabs", "token_count": 5004579 }
6
// 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 '../../../shared/classes/classes.dart'; import '../../../s...
codelabs/boring_to_beautiful/final/lib/src/features/artists/view/artist_news.dart/0
{ "file_path": "codelabs/boring_to_beautiful/final/lib/src/features/artists/view/artist_news.dart", "repo_id": "codelabs", "token_count": 493 }
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 'dart:math'; import 'package:collection/collection.dart'; import '../classes/classes.dart'; class ArtistsProvider { static ArtistsProvider get s...
codelabs/boring_to_beautiful/final/lib/src/shared/providers/artists.dart/0
{ "file_path": "codelabs/boring_to_beautiful/final/lib/src/shared/providers/artists.dart", "repo_id": "codelabs", "token_count": 3733 }
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/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import '../classes/classes.dart'; import '../playback/bloc/bloc.da...
codelabs/boring_to_beautiful/final/lib/src/shared/views/hoverable_song_play_button.dart/0
{ "file_path": "codelabs/boring_to_beautiful/final/lib/src/shared/views/hoverable_song_play_button.dart", "repo_id": "codelabs", "token_count": 431 }
9
package com.example.myartist import io.flutter.embedding.android.FlutterActivity class MainActivity: FlutterActivity()
codelabs/boring_to_beautiful/step_01/android/app/src/main/kotlin/com/example/myartist/MainActivity.kt/0
{ "file_path": "codelabs/boring_to_beautiful/step_01/android/app/src/main/kotlin/com/example/myartist/MainActivity.kt", "repo_id": "codelabs", "token_count": 34 }
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 'package:url_launcher/url_launcher.dart'; import '../../../shared/views/views.dart'; class HomeHighlight e...
codelabs/boring_to_beautiful/step_01/lib/src/features/home/view/home_highlight.dart/0
{ "file_path": "codelabs/boring_to_beautiful/step_01/lib/src/features/home/view/home_highlight.dart", "repo_id": "codelabs", "token_count": 529 }
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 './classes.dart'; class RankedSong extends Song { final int ranking; const RankedSong(this.ranking, String title, Artist artist, Duration leng...
codelabs/boring_to_beautiful/step_01/lib/src/shared/classes/ranked_song.dart/0
{ "file_path": "codelabs/boring_to_beautiful/step_01/lib/src/shared/classes/ranked_song.dart", "repo_id": "codelabs", "token_count": 114 }
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 'package:flutter/material.dart'; class AdaptiveTable<T> extends StatelessWidget { const AdaptiveTable({ super.key, required this.items, ...
codelabs/boring_to_beautiful/step_01/lib/src/shared/views/adaptive_table.dart/0
{ "file_path": "codelabs/boring_to_beautiful/step_01/lib/src/shared/views/adaptive_table.dart", "repo_id": "codelabs", "token_count": 512 }
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. export 'adaptive_table.dart'; export 'article_content.dart'; export 'bottom_bar.dart'; export 'brightness_toggle.dart'; export 'center_row.dart'; export 'c...
codelabs/boring_to_beautiful/step_01/lib/src/shared/views/views.dart/0
{ "file_path": "codelabs/boring_to_beautiful/step_01/lib/src/shared/views/views.dart", "repo_id": "codelabs", "token_count": 188 }
14
#include "../../Flutter/Flutter-Release.xcconfig" #include "Warnings.xcconfig"
codelabs/boring_to_beautiful/step_01/macos/Runner/Configs/Release.xcconfig/0
{ "file_path": "codelabs/boring_to_beautiful/step_01/macos/Runner/Configs/Release.xcconfig", "repo_id": "codelabs", "token_count": 32 }
15
#include "../../Flutter/Flutter-Release.xcconfig" #include "Warnings.xcconfig"
codelabs/boring_to_beautiful/step_03/macos/Runner/Configs/Release.xcconfig/0
{ "file_path": "codelabs/boring_to_beautiful/step_03/macos/Runner/Configs/Release.xcconfig", "repo_id": "codelabs", "token_count": 32 }
16
#include "../../Flutter/Flutter-Release.xcconfig" #include "Warnings.xcconfig"
codelabs/boring_to_beautiful/step_05/macos/Runner/Configs/Release.xcconfig/0
{ "file_path": "codelabs/boring_to_beautiful/step_05/macos/Runner/Configs/Release.xcconfig", "repo_id": "codelabs", "token_count": 32 }
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:url_launcher/url_launcher.dart'; import '../../../shared/views/views.dart'; class HomeHighlight e...
codelabs/boring_to_beautiful/step_07/lib/src/features/home/view/home_highlight.dart/0
{ "file_path": "codelabs/boring_to_beautiful/step_07/lib/src/features/home/view/home_highlight.dart", "repo_id": "codelabs", "token_count": 524 }
18
#include "../../Flutter/Flutter-Release.xcconfig" #include "Warnings.xcconfig"
codelabs/boring_to_beautiful/step_07/macos/Runner/Configs/Release.xcconfig/0
{ "file_path": "codelabs/boring_to_beautiful/step_07/macos/Runner/Configs/Release.xcconfig", "repo_id": "codelabs", "token_count": 32 }
19
#include "../../Flutter/Flutter-Debug.xcconfig" #include "Warnings.xcconfig"
codelabs/brick_breaker/step_03/macos/Runner/Configs/Debug.xcconfig/0
{ "file_path": "codelabs/brick_breaker/step_03/macos/Runner/Configs/Debug.xcconfig", "repo_id": "codelabs", "token_count": 32 }
20
org.gradle.jvmargs=-Xmx4G android.useAndroidX=true android.enableJetifier=true
codelabs/brick_breaker/step_07/android/gradle.properties/0
{ "file_path": "codelabs/brick_breaker/step_07/android/gradle.properties", "repo_id": "codelabs", "token_count": 30 }
21
#include "../../Flutter/Flutter-Debug.xcconfig" #include "Warnings.xcconfig"
codelabs/brick_breaker/step_07/macos/Runner/Configs/Debug.xcconfig/0
{ "file_path": "codelabs/brick_breaker/step_07/macos/Runner/Configs/Debug.xcconfig", "repo_id": "codelabs", "token_count": 32 }
22
#include "ephemeral/Flutter-Generated.xcconfig"
codelabs/dart-patterns-and-records/step_04/macos/Flutter/Flutter-Release.xcconfig/0
{ "file_path": "codelabs/dart-patterns-and-records/step_04/macos/Flutter/Flutter-Release.xcconfig", "repo_id": "codelabs", "token_count": 19 }
23
#include "../../Flutter/Flutter-Debug.xcconfig" #include "Warnings.xcconfig"
codelabs/dart-patterns-and-records/step_05/macos/Runner/Configs/Debug.xcconfig/0
{ "file_path": "codelabs/dart-patterns-and-records/step_05/macos/Runner/Configs/Debug.xcconfig", "repo_id": "codelabs", "token_count": 32 }
24
#include "Generated.xcconfig"
codelabs/dart-patterns-and-records/step_09/ios/Flutter/Debug.xcconfig/0
{ "file_path": "codelabs/dart-patterns-and-records/step_09/ios/Flutter/Debug.xcconfig", "repo_id": "codelabs", "token_count": 12 }
25
#include "ephemeral/Flutter-Generated.xcconfig"
codelabs/dart-patterns-and-records/step_10/macos/Flutter/Flutter-Release.xcconfig/0
{ "file_path": "codelabs/dart-patterns-and-records/step_10/macos/Flutter/Flutter-Release.xcconfig", "repo_id": "codelabs", "token_count": 19 }
26
#include "../../Flutter/Flutter-Debug.xcconfig" #include "Warnings.xcconfig"
codelabs/dart-patterns-and-records/step_11_a/macos/Runner/Configs/Debug.xcconfig/0
{ "file_path": "codelabs/dart-patterns-and-records/step_11_a/macos/Runner/Configs/Debug.xcconfig", "repo_id": "codelabs", "token_count": 32 }
27
include: ../analysis_options.yaml
codelabs/deeplink_cookbook/analysis_options.yaml/0
{ "file_path": "codelabs/deeplink_cookbook/analysis_options.yaml", "repo_id": "codelabs", "token_count": 10 }
28
import 'dart:async'; import 'dart:ffi'; import 'dart:io'; import 'dart:isolate'; import 'ffigen_app_bindings_generated.dart'; /// A very short-lived native function. /// /// For very short-lived functions, it is fine to call them on the main isolate. /// They will block the Dart execution while running the native fun...
codelabs/ffigen_codelab/step_03/lib/ffigen_app.dart/0
{ "file_path": "codelabs/ffigen_codelab/step_03/lib/ffigen_app.dart", "repo_id": "codelabs", "token_count": 1470 }
29
rootProject.name = 'ffigen_app'
codelabs/ffigen_codelab/step_05/android/settings.gradle/0
{ "file_path": "codelabs/ffigen_codelab/step_05/android/settings.gradle", "repo_id": "codelabs", "token_count": 12 }
30
// 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:ffigen_app/ffigen_app.dart'; import 'package:flutter/material.dart'; const String jsCode = '1+2'; void main() { runApp(const MyApp()); ...
codelabs/ffigen_codelab/step_05/example/lib/main.dart/0
{ "file_path": "codelabs/ffigen_codelab/step_05/example/lib/main.dart", "repo_id": "codelabs", "token_count": 915 }
31
#include "../../Flutter/Flutter-Release.xcconfig" #include "Warnings.xcconfig"
codelabs/ffigen_codelab/step_05/example/macos/Runner/Configs/Release.xcconfig/0
{ "file_path": "codelabs/ffigen_codelab/step_05/example/macos/Runner/Configs/Release.xcconfig", "repo_id": "codelabs", "token_count": 32 }
32
#include "../../Flutter/Flutter-Debug.xcconfig" #include "Warnings.xcconfig"
codelabs/ffigen_codelab/step_06/example/macos/Runner/Configs/Debug.xcconfig/0
{ "file_path": "codelabs/ffigen_codelab/step_06/example/macos/Runner/Configs/Debug.xcconfig", "repo_id": "codelabs", "token_count": 32 }
33
rootProject.name = 'ffigen_app'
codelabs/ffigen_codelab/step_07/android/settings.gradle/0
{ "file_path": "codelabs/ffigen_codelab/step_07/android/settings.gradle", "repo_id": "codelabs", "token_count": 12 }
34
// 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:freezed_annotation/freezed_annotation.dart'; part 'duktape_message.freezed.dart'; @freezed class DuktapeMessage with _$DuktapeMessage { ...
codelabs/ffigen_codelab/step_07/example/lib/duktape_message.dart/0
{ "file_path": "codelabs/ffigen_codelab/step_07/example/lib/duktape_message.dart", "repo_id": "codelabs", "token_count": 166 }
35
include: ../../analysis_options.yaml linter: rules: avoid_print: false constant_identifier_names: false
codelabs/firebase-auth-flutterfire-ui/start/analysis_options.yaml/0
{ "file_path": "codelabs/firebase-auth-flutterfire-ui/start/analysis_options.yaml", "repo_id": "codelabs", "token_count": 42 }
36
#import "GeneratedPluginRegistrant.h"
codelabs/firebase-auth-flutterfire-ui/start/ios/Runner/Runner-Bridging-Header.h/0
{ "file_path": "codelabs/firebase-auth-flutterfire-ui/start/ios/Runner/Runner-Bridging-Header.h", "repo_id": "codelabs", "token_count": 13 }
37
package com.example.complete import io.flutter.embedding.android.FlutterActivity class MainActivity: FlutterActivity() { }
codelabs/firebase-emulator-suite/start/android/app/src/main/kotlin/com/example/complete/MainActivity.kt/0
{ "file_path": "codelabs/firebase-emulator-suite/start/android/app/src/main/kotlin/com/example/complete/MainActivity.kt", "repo_id": "codelabs", "token_count": 36 }
38
#include "ephemeral/Flutter-Generated.xcconfig"
codelabs/firebase-emulator-suite/start/macos/Flutter/Flutter-Release.xcconfig/0
{ "file_path": "codelabs/firebase-emulator-suite/start/macos/Flutter/Flutter-Release.xcconfig", "repo_id": "codelabs", "token_count": 19 }
39
org.gradle.jvmargs=-Xmx4G android.useAndroidX=true android.enableJetifier=true
codelabs/firebase-get-to-know-flutter/step_04/android/gradle.properties/0
{ "file_path": "codelabs/firebase-get-to-know-flutter/step_04/android/gradle.properties", "repo_id": "codelabs", "token_count": 30 }
40
include: ../../analysis_options.yaml
codelabs/firebase-get-to-know-flutter/step_07/analysis_options.yaml/0
{ "file_path": "codelabs/firebase-get-to-know-flutter/step_07/analysis_options.yaml", "repo_id": "codelabs", "token_count": 12 }
41
// 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:go_router/go_router.dart'; import 'widgets.dart'; class AuthFunc extends StatelessWidget { cons...
codelabs/firebase-get-to-know-flutter/step_09/lib/src/authentication.dart/0
{ "file_path": "codelabs/firebase-get-to-know-flutter/step_09/lib/src/authentication.dart", "repo_id": "codelabs", "token_count": 807 }
42
#!/usr/bin/env bash set -e -o pipefail DIR="${BASH_SOURCE%/*}" source "$DIR/flutter_ci_script_shared.sh" declare -a CODELABS=( # TODO(DomesticMouse): 'background' is deprecated and shouldn't be used. Use surface instead. # "adaptive_app" "animated-responsive-layout" # TODO(DomesticMouse): 'surfaceVariant' is...
codelabs/flutter_ci_script_beta.sh/0
{ "file_path": "codelabs/flutter_ci_script_beta.sh", "repo_id": "codelabs", "token_count": 395 }
43
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
codelabs/github-client/window_to_front/macos/Classes/WindowToFrontPlugin.swift/0
{ "file_path": "codelabs/github-client/window_to_front/macos/Classes/WindowToFrontPlugin.swift", "repo_id": "codelabs", "token_count": 362 }
44
plugins { id "com.android.application" id "kotlin-android" id "dev.flutter.flutter-gradle-plugin" } def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> local...
codelabs/google-maps-in-flutter/step_3/android/app/build.gradle/0
{ "file_path": "codelabs/google-maps-in-flutter/step_3/android/app/build.gradle", "repo_id": "codelabs", "token_count": 707 }
45
#import "GeneratedPluginRegistrant.h"
codelabs/google-maps-in-flutter/step_4/ios/Runner/Runner-Bridging-Header.h/0
{ "file_path": "codelabs/google-maps-in-flutter/step_4/ios/Runner/Runner-Bridging-Header.h", "repo_id": "codelabs", "token_count": 13 }
46
#include "Generated.xcconfig"
codelabs/haiku_generator/finished/ios/Flutter/Release.xcconfig/0
{ "file_path": "codelabs/haiku_generator/finished/ios/Flutter/Release.xcconfig", "repo_id": "codelabs", "token_count": 12 }
47
# Haiku generator demo app This folder contains the code for [Generative AI](https://developers.generativeai.google/) + Flutter codelab.
codelabs/haiku_generator/step0/README.md/0
{ "file_path": "codelabs/haiku_generator/step0/README.md", "repo_id": "codelabs", "token_count": 38 }
48
class Product { final String productName; Product(this.productName); Product.fromMap(Map<String, dynamic> json) : productName = json['productName']; Map<String, dynamic> toMap() { return { 'productName': productName, }; } }
codelabs/haiku_generator/step0/lib/domain/models/product.dart/0
{ "file_path": "codelabs/haiku_generator/step0/lib/domain/models/product.dart", "repo_id": "codelabs", "token_count": 92 }
49
#include "Generated.xcconfig"
codelabs/haiku_generator/step1/ios/Flutter/Release.xcconfig/0
{ "file_path": "codelabs/haiku_generator/step1/ios/Flutter/Release.xcconfig", "repo_id": "codelabs", "token_count": 12 }
50
#include "Generated.xcconfig"
codelabs/haiku_generator/step3/ios/Flutter/Release.xcconfig/0
{ "file_path": "codelabs/haiku_generator/step3/ios/Flutter/Release.xcconfig", "repo_id": "codelabs", "token_count": 12 }
51
class NewsArticle { final String title; final String description; final String? articleText; final String? image; NewsArticle({ required this.title, required this.description, this.articleText = loremIpsum, this.image, }); } const String loremIpsum = 'Lorem ipsum dolor sit amet, consec...
codelabs/homescreen_codelab/step_03/lib/news_data.dart/0
{ "file_path": "codelabs/homescreen_codelab/step_03/lib/news_data.dart", "repo_id": "codelabs", "token_count": 513 }
52
import WidgetKit import SwiftUI // TimelineProvider has three methods struct Provider: TimelineProvider { // Placeholder is used as a placeholder when the widget is first displayed func placeholder(in context: Context) -> NewsArticleEntry { // Add some placeholder title and description, and get the current d...
codelabs/homescreen_codelab/step_04/ios/NewsWidgets/NewsWidgets.swift/0
{ "file_path": "codelabs/homescreen_codelab/step_04/ios/NewsWidgets/NewsWidgets.swift", "repo_id": "codelabs", "token_count": 950 }
53
org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true
codelabs/homescreen_codelab/step_05/android/gradle.properties/0
{ "file_path": "codelabs/homescreen_codelab/step_05/android/gradle.properties", "repo_id": "codelabs", "token_count": 31 }
54
package com.mydomain.homescreen_widgets import io.flutter.embedding.android.FlutterActivity class MainActivity: FlutterActivity() { }
codelabs/homescreen_codelab/step_06/android/app/src/main/kotlin/com/mydomain/homescreen_widgets/MainActivity.kt/0
{ "file_path": "codelabs/homescreen_codelab/step_06/android/app/src/main/kotlin/com/mydomain/homescreen_widgets/MainActivity.kt", "repo_id": "codelabs", "token_count": 42 }
55
<?xml version="1.0" encoding="utf-8"?> <resources> <!-- Having themes.xml for v31 variant because @android:dimen/system_app_widget_background_radius and @android:dimen/system_app_widget_internal_padding requires API level 31 --> <style name="Theme.Android.AppWidgetContainerParent" parent="@android:...
codelabs/homescreen_codelab/step_06/android/app/src/main/res/values-v31/themes.xml/0
{ "file_path": "codelabs/homescreen_codelab/step_06/android/app/src/main/res/values-v31/themes.xml", "repo_id": "codelabs", "token_count": 197 }
56
import 'package:in_app_purchase/in_app_purchase.dart'; enum ProductStatus { purchasable, purchased, pending, } class PurchasableProduct { String get id => productDetails.id; String get title => productDetails.title; String get description => productDetails.description; String get price => productDetails...
codelabs/in_app_purchases/complete/app/lib/model/purchasable_product.dart/0
{ "file_path": "codelabs/in_app_purchases/complete/app/lib/model/purchasable_product.dart", "repo_id": "codelabs", "token_count": 134 }
57
const androidPackageId = 'your Android package ID'; const appStoreIssuerId = 'App Store Key issuer ID'; const appStoreKeyId = 'App Store Key ID'; const appStoreSharedSecret = 'App Store shared secret'; const bundleId = 'your iOS bundle ID'; const googlePlayProjectName = 'Google Cloud project name'; const googlePlayPubs...
codelabs/in_app_purchases/complete/dart-backend/lib/constants.dart/0
{ "file_path": "codelabs/in_app_purchases/complete/dart-backend/lib/constants.dart", "repo_id": "codelabs", "token_count": 94 }
58
#include "Generated.xcconfig"
codelabs/namer/step_04_b_behavior/ios/Flutter/Debug.xcconfig/0
{ "file_path": "codelabs/namer/step_04_b_behavior/ios/Flutter/Debug.xcconfig", "repo_id": "codelabs", "token_count": 12 }
59
#include "ephemeral/Flutter-Generated.xcconfig"
codelabs/namer/step_04_b_behavior/macos/Flutter/Flutter-Debug.xcconfig/0
{ "file_path": "codelabs/namer/step_04_b_behavior/macos/Flutter/Flutter-Debug.xcconfig", "repo_id": "codelabs", "token_count": 19 }
60
#import "GeneratedPluginRegistrant.h"
codelabs/namer/step_05_a_pair/ios/Runner/Runner-Bridging-Header.h/0
{ "file_path": "codelabs/namer/step_05_a_pair/ios/Runner/Runner-Bridging-Header.h", "repo_id": "codelabs", "token_count": 13 }
61
#include "../../Flutter/Flutter-Debug.xcconfig" #include "Warnings.xcconfig"
codelabs/namer/step_05_a_pair/macos/Runner/Configs/Debug.xcconfig/0
{ "file_path": "codelabs/namer/step_05_a_pair/macos/Runner/Configs/Debug.xcconfig", "repo_id": "codelabs", "token_count": 32 }
62
org.gradle.jvmargs=-Xmx4G android.useAndroidX=true android.enableJetifier=true
codelabs/namer/step_05_i_optional_changes/android/gradle.properties/0
{ "file_path": "codelabs/namer/step_05_i_optional_changes/android/gradle.properties", "repo_id": "codelabs", "token_count": 30 }
63
#include "Generated.xcconfig"
codelabs/namer/step_06_b_add_row/ios/Flutter/Release.xcconfig/0
{ "file_path": "codelabs/namer/step_06_b_add_row/ios/Flutter/Release.xcconfig", "repo_id": "codelabs", "token_count": 12 }
64
#include "ephemeral/Flutter-Generated.xcconfig"
codelabs/namer/step_06_b_add_row/macos/Flutter/Flutter-Release.xcconfig/0
{ "file_path": "codelabs/namer/step_06_b_add_row/macos/Flutter/Flutter-Release.xcconfig", "repo_id": "codelabs", "token_count": 19 }
65
#include "../../Flutter/Flutter-Release.xcconfig" #include "Warnings.xcconfig"
codelabs/namer/step_06_c_add_like_button/macos/Runner/Configs/Release.xcconfig/0
{ "file_path": "codelabs/namer/step_06_c_add_like_button/macos/Runner/Configs/Release.xcconfig", "repo_id": "codelabs", "token_count": 32 }
66
#include "Generated.xcconfig"
codelabs/namer/step_07_d_use_selectedindex/ios/Flutter/Debug.xcconfig/0
{ "file_path": "codelabs/namer/step_07_d_use_selectedindex/ios/Flutter/Debug.xcconfig", "repo_id": "codelabs", "token_count": 12 }
67
#include "ephemeral/Flutter-Generated.xcconfig"
codelabs/namer/step_07_d_use_selectedindex/macos/Flutter/Flutter-Debug.xcconfig/0
{ "file_path": "codelabs/namer/step_07_d_use_selectedindex/macos/Flutter/Flutter-Debug.xcconfig", "repo_id": "codelabs", "token_count": 19 }
68
#import "GeneratedPluginRegistrant.h"
codelabs/namer/step_07_e_add_layout_builder/ios/Runner/Runner-Bridging-Header.h/0
{ "file_path": "codelabs/namer/step_07_e_add_layout_builder/ios/Runner/Runner-Bridging-Header.h", "repo_id": "codelabs", "token_count": 13 }
69
#include "../../Flutter/Flutter-Debug.xcconfig" #include "Warnings.xcconfig"
codelabs/namer/step_07_e_add_layout_builder/macos/Runner/Configs/Debug.xcconfig/0
{ "file_path": "codelabs/namer/step_07_e_add_layout_builder/macos/Runner/Configs/Debug.xcconfig", "repo_id": "codelabs", "token_count": 32 }
70