text stringlengths 6 13.6M | id stringlengths 13 176 | metadata dict | __index_level_0__ int64 0 1.69k |
|---|---|---|---|
// Copyright 2013 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/foundation.dart';
/// The desired mode to launch a URL.
///
/// Support for these modes varies by platform. Platforms that do not ... | plugins/packages/url_launcher/url_launcher_platform_interface/lib/src/types.dart/0 | {
"file_path": "plugins/packages/url_launcher/url_launcher_platform_interface/lib/src/types.dart",
"repo_id": "plugins",
"token_count": 585
} | 1,171 |
// Copyright 2013 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.
// Autogenerated from Pigeon (v5.0.1), do not edit directly.
// See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_co... | plugins/packages/url_launcher/url_launcher_windows/lib/src/messages.g.dart/0 | {
"file_path": "plugins/packages/url_launcher/url_launcher_windows/lib/src/messages.g.dart",
"repo_id": "plugins",
"token_count": 1030
} | 1,172 |
targets:
$default:
sources:
include:
- lib/**
- android/app/src/main/**
# Some default includes that aren't really used here but will prevent
# false-negative warnings:
- $package$
- lib/$lib$
exclude:
- '**/.*/**'
- '**/build/**'
... | plugins/packages/video_player/video_player/example/build.excerpt.yaml/0 | {
"file_path": "plugins/packages/video_player/video_player/example/build.excerpt.yaml",
"repo_id": "plugins",
"token_count": 252
} | 1,173 |
// Copyright 2013 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.
// Autogenerated from Pigeon (v2.0.1), do not edit directly.
// See also: https://pub.dev/packages/pigeon
package io.flutter.plugins.videoplayer;
import a... | plugins/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/Messages.java/0 | {
"file_path": "plugins/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/Messages.java",
"repo_id": "plugins",
"token_count": 13443
} | 1,174 |
// Copyright 2013 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:html' as html;
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';... | plugins/packages/video_player/video_player_web/example/integration_test/video_player_test.dart/0 | {
"file_path": "plugins/packages/video_player/video_player_web/example/integration_test/video_player_test.dart",
"repo_id": "plugins",
"token_count": 3013
} | 1,175 |
// Copyright 2013 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.
// TODO(a14n): remove this import once Flutter 3.1 or later reaches stable (including flutter/flutter#104231)
// ignore: unnecessary_import
import 'dart:ty... | plugins/packages/webview_flutter/webview_flutter/lib/src/webview_controller.dart/0 | {
"file_path": "plugins/packages/webview_flutter/webview_flutter/lib/src/webview_controller.dart",
"repo_id": "plugins",
"token_count": 3143
} | 1,176 |
// Copyright 2013 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.
// Autogenerated from Pigeon (v4.2.14), do not edit directly.
// See also: https://pub.dev/packages/pigeon
package io.flutter.plugins.webviewflutter;
impo... | plugins/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/GeneratedAndroidWebView.java/0 | {
"file_path": "plugins/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/GeneratedAndroidWebView.java",
"repo_id": "plugins",
"token_count": 52000
} | 1,177 |
// Copyright 2013 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.
package io.flutter.plugins.webviewflutter;
import android.annotation.SuppressLint;
import android.content.Context;
import android.hardware.display.Display... | plugins/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/WebViewHostApiImpl.java/0 | {
"file_path": "plugins/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/WebViewHostApiImpl.java",
"repo_id": "plugins",
"token_count": 4742
} | 1,178 |
// Copyright 2013 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.
package io.flutter.plugins.webviewflutter;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.mo... | plugins/packages/webview_flutter/webview_flutter_android/android/src/test/java/io/flutter/plugins/webviewflutter/WebViewFlutterAndroidExternalApiTest.java/0 | {
"file_path": "plugins/packages/webview_flutter/webview_flutter_android/android/src/test/java/io/flutter/plugins/webviewflutter/WebViewFlutterAndroidExternalApiTest.java",
"repo_id": "plugins",
"token_count": 739
} | 1,179 |
// Copyright 2013 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/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
impo... | plugins/packages/webview_flutter/webview_flutter_android/test/legacy/surface_android_test.dart/0 | {
"file_path": "plugins/packages/webview_flutter/webview_flutter_android/test/legacy/surface_android_test.dart",
"repo_id": "plugins",
"token_count": 1654
} | 1,180 |
// Copyright 2013 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_test/flutter_test.dart';
import 'package:webview_flutter_platform_interface/src/webview_flutter_platform_interface_legacy.dart';
v... | plugins/packages/webview_flutter/webview_flutter_platform_interface/test/legacy/platform_interface/webview_cookie_manager_test.dart/0 | {
"file_path": "plugins/packages/webview_flutter/webview_flutter_platform_interface/test/legacy/platform_interface/webview_cookie_manager_test.dart",
"repo_id": "plugins",
"token_count": 284
} | 1,181 |
// Copyright 2013 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:html' as html;
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_te... | plugins/packages/webview_flutter/webview_flutter_web/example/integration_test/legacy/webview_flutter_test.dart/0 | {
"file_path": "plugins/packages/webview_flutter/webview_flutter_web/example/integration_test/legacy/webview_flutter_test.dart",
"repo_id": "plugins",
"token_count": 936
} | 1,182 |
## 3.1.0
* Adds support to access native `WKWebView`.
## 3.0.5
* Renames Pigeon output files.
## 3.0.4
* Fixes bug that prevented the web view from being garbage collected.
## 3.0.3
* Updates example code for `use_build_context_synchronously` lint.
## 3.0.2
* Updates code for stricter lint checks.
## 3.0.1
*... | plugins/packages/webview_flutter/webview_flutter_wkwebview/CHANGELOG.md/0 | {
"file_path": "plugins/packages/webview_flutter/webview_flutter_wkwebview/CHANGELOG.md",
"repo_id": "plugins",
"token_count": 1065
} | 1,183 |
// Copyright 2013 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 Flutter;
@import XCTest;
@import webview_flutter_wkwebview;
#import <OCMock/OCMock.h>
@interface FWFHTTPCookieStoreHostApiTests : XCTestCase
@end... | plugins/packages/webview_flutter/webview_flutter_wkwebview/example/ios/RunnerTests/FWFHTTPCookieStoreHostApiTests.m/0 | {
"file_path": "plugins/packages/webview_flutter/webview_flutter_wkwebview/example/ios/RunnerTests/FWFHTTPCookieStoreHostApiTests.m",
"repo_id": "plugins",
"token_count": 934
} | 1,184 |
// Copyright 2013 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.
// Autogenerated from Pigeon (v4.2.13), do not edit directly.
// See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_c... | plugins/packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/web_kit.g.dart/0 | {
"file_path": "plugins/packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/web_kit.g.dart",
"repo_id": "plugins",
"token_count": 35220
} | 1,185 |
// Copyright 2013 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:pigeon/pigeon.dart';
@ConfigurePigeon(
PigeonOptions(
dartOut: 'lib/src/common/web_kit.g.dart',
dartTestOut: 'test/src/common/te... | plugins/packages/webview_flutter/webview_flutter_wkwebview/pigeons/web_kit.dart/0 | {
"file_path": "plugins/packages/webview_flutter/webview_flutter_wkwebview/pigeons/web_kit.dart",
"repo_id": "plugins",
"token_count": 6790
} | 1,186 |
// Copyright 2013 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';
// TODO(a14n): remove this import once Flutter 3.1 or later reaches stable (including flutter/flutter#104231)
// ignore: unnecessary_im... | plugins/packages/webview_flutter/webview_flutter_wkwebview/test/webkit_webview_controller_test.dart/0 | {
"file_path": "plugins/packages/webview_flutter/webview_flutter_wkwebview/test/webkit_webview_controller_test.dart",
"repo_id": "plugins",
"token_count": 13538
} | 1,187 |
# Packages that have not yet adopted code-excerpt.
#
# This only exists to allow incrementally adopting the new requirement.
# Packages shoud never be added to this list.
# TODO(ecosystem): Remove everything from this list. See
# https://github.com/flutter/flutter/issues/102679
- camera_web
- espresso
- google_maps_fl... | plugins/script/configs/temp_exclude_excerpt.yaml/0 | {
"file_path": "plugins/script/configs/temp_exclude_excerpt.yaml",
"repo_id": "plugins",
"token_count": 226
} | 1,188 |
#!/bin/bash
# Copyright 2013 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.
set -e
# WARNING! Do not remove this script, or change its behavior, unless you have
# verified that it will not break the dart-lang analysis run... | plugins/script/tool_runner.sh/0 | {
"file_path": "plugins/script/tool_runner.sh",
"repo_id": "plugins",
"token_count": 297
} | 1,189 |
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:IOSFullScreen.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
| samples/add_to_app/fullscreen/ios_fullscreen/IOSFullScreen.xcworkspace/contents.xcworkspacedata/0 | {
"file_path": "samples/add_to_app/fullscreen/ios_fullscreen/IOSFullScreen.xcworkspace/contents.xcworkspacedata",
"repo_id": "samples",
"token_count": 106
} | 1,190 |
# multiple_flutters
This is a sample that shows how to use the Flutter Engine Groups API to embed
multiple instances of Flutter into an existing Android or iOS project.
## Getting Started
For iOS instructions, see:
[multiple_flutters_ios](./multiple_flutters_ios/README.md).
For Android instructions, see:
[multiple_... | samples/add_to_app/multiple_flutters/README.md/0 | {
"file_path": "samples/add_to_app/multiple_flutters/README.md",
"repo_id": "samples",
"token_count": 930
} | 1,191 |
name: multiple_flutters_module
description: A module that is embedded in the multiple_flutters_ios and multiple_flutters_android sample code.
version: 1.0.0+1
environment:
sdk: ^3.2.0
dependencies:
flutter:
sdk: flutter
url_launcher: ^6.0.6
cupertino_icons: ^1.0.0
dev_dependencies:
analysis_defaults:... | samples/add_to_app/multiple_flutters/multiple_flutters_module/pubspec.yaml/0 | {
"file_path": "samples/add_to_app/multiple_flutters/multiple_flutters_module/pubspec.yaml",
"repo_id": "samples",
"token_count": 213
} | 1,192 |
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:IOSUsingPlugin.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
| samples/add_to_app/plugin/ios_using_plugin/IOSUsingPlugin.xcworkspace/contents.xcworkspacedata/0 | {
"file_path": "samples/add_to_app/plugin/ios_using_plugin/IOSUsingPlugin.xcworkspace/contents.xcworkspacedata",
"repo_id": "samples",
"token_count": 106
} | 1,193 |
# prebuild_module
Embeds a full screen instance of Flutter as a prebuilt library that can be
loaded into an existing iOS or Android app.
## Description
These apps are essentially identical to `android_fullscreen` and
`ios_fullscreen`, respectively, with one key difference. Rather than being set
up to compile the `fl... | samples/add_to_app/prebuilt_module/README.md/0 | {
"file_path": "samples/add_to_app/prebuilt_module/README.md",
"repo_id": "samples",
"token_count": 809
} | 1,194 |
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == ... | samples/android_splash_screen/android/app/build.gradle/0 | {
"file_path": "samples/android_splash_screen/android/app/build.gradle",
"repo_id": "samples",
"token_count": 889
} | 1,195 |
// 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 'dart:io' show Platform;
import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:flutter/material.dart';
import 'package:go_router/go_ro... | samples/animations/lib/main.dart/0 | {
"file_path": "samples/animations/lib/main.dart",
"repo_id": "samples",
"token_count": 2178
} | 1,196 |
// 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 ExpandCardDemo extends StatelessWidget {
const ExpandCardDemo({super.key});
static const String routeName =... | samples/animations/lib/src/misc/expand_card.dart/0 | {
"file_path": "samples/animations/lib/src/misc/expand_card.dart",
"repo_id": "samples",
"token_count": 1322
} | 1,197 |
// 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:animations/src/misc/animated_positioned.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
Widge... | samples/animations/test/misc/animated_positioned_test.dart/0 | {
"file_path": "samples/animations/test/misc/animated_positioned_test.dart",
"repo_id": "samples",
"token_count": 373
} | 1,198 |
include: package:analysis_defaults/flutter.yaml
| samples/background_isolate_channels/analysis_options.yaml/0 | {
"file_path": "samples/background_isolate_channels/analysis_options.yaml",
"repo_id": "samples",
"token_count": 15
} | 1,199 |
#include "Generated.xcconfig"
| samples/code_sharing/client/ios/Flutter/Debug.xcconfig/0 | {
"file_path": "samples/code_sharing/client/ios/Flutter/Debug.xcconfig",
"repo_id": "samples",
"token_count": 12
} | 1,200 |
#include "ephemeral/Flutter-Generated.xcconfig"
| samples/code_sharing/client/macos/Flutter/Flutter-Debug.xcconfig/0 | {
"file_path": "samples/code_sharing/client/macos/Flutter/Flutter-Debug.xcconfig",
"repo_id": "samples",
"token_count": 19
} | 1,201 |
## 1.0.0
- Initial version.
| samples/code_sharing/shared/CHANGELOG.md/0 | {
"file_path": "samples/code_sharing/shared/CHANGELOG.md",
"repo_id": "samples",
"token_count": 13
} | 1,202 |
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
import 'constants.dart';
import 'platform_selector.dart';
class FieldTypesPage extends StatelessWidget {
FieldTypesPage({
super.key,
required this.onChangedPlatform,
});
sta... | samples/context_menus/lib/field_types_page.dart/0 | {
"file_path": "samples/context_menus/lib/field_types_page.dart",
"repo_id": "samples",
"token_count": 2207
} | 1,203 |
#include "Generated.xcconfig"
| samples/deeplink_store_example/ios/Flutter/Debug.xcconfig/0 | {
"file_path": "samples/deeplink_store_example/ios/Flutter/Debug.xcconfig",
"repo_id": "samples",
"token_count": 12
} | 1,204 |
// 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.
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'links.dart';
// **************************************************************************
// BuiltValueG... | samples/desktop_photo_search/fluent_ui/lib/src/unsplash/links.g.dart/0 | {
"file_path": "samples/desktop_photo_search/fluent_ui/lib/src/unsplash/links.g.dart",
"repo_id": "samples",
"token_count": 2133
} | 1,205 |
// 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:fluent_ui/fluent_ui.dart' hide Card, FluentIcons;
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
import 'package:flutter/m... | samples/desktop_photo_search/fluent_ui/lib/src/widgets/photo_details.dart/0 | {
"file_path": "samples/desktop_photo_search/fluent_ui/lib/src/widgets/photo_details.dart",
"repo_id": "samples",
"token_count": 1997
} | 1,206 |
// 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 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:async/async.dart' show StreamGroup;
import 'package:grinder/grinder.dart';
voi... | samples/desktop_photo_search/fluent_ui/tool/grind.dart/0 | {
"file_path": "samples/desktop_photo_search/fluent_ui/tool/grind.dart",
"repo_id": "samples",
"token_count": 658
} | 1,207 |
group 'dev.flutter.federated_plugin'
version '1.0-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_... | samples/experimental/federated_plugin/federated_plugin/android/build.gradle/0 | {
"file_path": "samples/experimental/federated_plugin/federated_plugin/android/build.gradle",
"repo_id": "samples",
"token_count": 427
} | 1,208 |
name: federated_plugin_example
description: Demonstrates how to use the federated_plugin plugin.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
environment:
sdk: ^3.2.0
dependencies:
flutter:
sdk: flutter
federated_plugin:
path: ../
cupertino_icons: ^1.0.2
dev_dependencies:... | samples/experimental/federated_plugin/federated_plugin/example/pubspec.yaml/0 | {
"file_path": "samples/experimental/federated_plugin/federated_plugin/example/pubspec.yaml",
"repo_id": "samples",
"token_count": 170
} | 1,209 |
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint federated_plugin.podspec` to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'federated_plugin'
s.version = '0.0.1'
s.summary = 'A new flutter plugin project.'
s.d... | samples/experimental/federated_plugin/federated_plugin/ios/federated_plugin.podspec/0 | {
"file_path": "samples/experimental/federated_plugin/federated_plugin/ios/federated_plugin.podspec",
"repo_id": "samples",
"token_count": 402
} | 1,210 |
// 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:federated_plugin_platform_interface/battery_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
... | samples/experimental/federated_plugin/federated_plugin_platform_interface/lib/federated_plugin_platform_interface.dart/0 | {
"file_path": "samples/experimental/federated_plugin/federated_plugin_platform_interface/lib/federated_plugin_platform_interface.dart",
"repo_id": "samples",
"token_count": 294
} | 1,211 |
// The federated_plugin_windows uses the default BatteryMethodChannel used by
// federated_plugin_platform_interface to do platform calls.
| samples/experimental/federated_plugin/federated_plugin_windows/lib/federated_plugin_windows.dart/0 | {
"file_path": "samples/experimental/federated_plugin/federated_plugin_windows/lib/federated_plugin_windows.dart",
"repo_id": "samples",
"token_count": 32
} | 1,212 |
// Copyright 2021 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 'dart:convert';
import 'dart:developer';
import 'dart:io';
import 'dart:typed_data';
import 'package:file_selector/file_selector.dart' as file_selecto... | samples/experimental/linting_tool/lib/model/profiles_store.dart/0 | {
"file_path": "samples/experimental/linting_tool/lib/model/profiles_store.dart",
"repo_id": "samples",
"token_count": 1849
} | 1,213 |
// Copyright 2021 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';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:linting_tool/model/profile.dart';
import 'pac... | samples/experimental/linting_tool/lib/widgets/lint_expansion_tile.dart/0 | {
"file_path": "samples/experimental/linting_tool/lib/widgets/lint_expansion_tile.dart",
"repo_id": "samples",
"token_count": 4444
} | 1,214 |
#include "../../Flutter/Flutter-Debug.xcconfig"
#include "Warnings.xcconfig"
| samples/experimental/linting_tool/macos/Runner/Configs/Debug.xcconfig/0 | {
"file_path": "samples/experimental/linting_tool/macos/Runner/Configs/Debug.xcconfig",
"repo_id": "samples",
"token_count": 32
} | 1,215 |
#include "../../src/dart-sdk/include/dart_api_dl.c"
| samples/experimental/pedometer/ios/Classes/dart_api_dl.c/0 | {
"file_path": "samples/experimental/pedometer/ios/Classes/dart_api_dl.c",
"repo_id": "samples",
"token_count": 25
} | 1,216 |
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#pragma once
// Note: include appropriate system jni.h as found by CMake, not third_party/jni.h.
#incl... | samples/experimental/pedometer/src/health_connect/dartjni.h/0 | {
"file_path": "samples/experimental/pedometer/src/health_connect/dartjni.h",
"repo_id": "samples",
"token_count": 4939
} | 1,217 |
// Copyright 2023 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 'dart:math';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import '../model/puzzle_model.d... | samples/experimental/varfont_shader_puzzle/lib/components/rotator_puzzle.dart/0 | {
"file_path": "samples/experimental/varfont_shader_puzzle/lib/components/rotator_puzzle.dart",
"repo_id": "samples",
"token_count": 6470
} | 1,218 |
# Veggie Seasons
The [Veggie Seasons](https://github.com/flutter/samples/tree/main/veggieseasons) app has been moved out of the experimental
directory of this repository as it now works on stable channel of Flutter.
| samples/experimental/veggieseasons/README.md/0 | {
"file_path": "samples/experimental/veggieseasons/README.md",
"repo_id": "samples",
"token_count": 58
} | 1,219 |
// Copyright 2020, the Flutter project authors. Please see the AUTHORS file
// for details. 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:intl/intl.dart' as intl;
import 'package:provider... | samples/experimental/web_dashboard/lib/src/pages/entries.dart/0 | {
"file_path": "samples/experimental/web_dashboard/lib/src/pages/entries.dart",
"repo_id": "samples",
"token_count": 2239
} | 1,220 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Finding Ice Cream stores near you</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(... | samples/flutter_maps_firestore/ios/Runner/Info.plist/0 | {
"file_path": "samples/flutter_maps_firestore/ios/Runner/Info.plist",
"repo_id": "samples",
"token_count": 681
} | 1,221 |
<?xml version="1.0" encoding="utf-8"?>
<!--
Google Play game services IDs.
TODO: When ready, update this file with actual IDs from Google Play.
You can download this file from Google Play Console,
in the Play Games Services section. The button is called "Get resources".
Details in README.txt.
-->
<resources>... | samples/game_template/android/app/src/main/res/values/games-ids.xml/0 | {
"file_path": "samples/game_template/android/app/src/main/res/values/games-ids.xml",
"repo_id": "samples",
"token_count": 203
} | 1,222 |
// Copyright 2022, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Uncomment the following lines when enabling Firebase Crashlytics
// import 'dart:io';
// import 'packa... | samples/game_template/lib/main.dart/0 | {
"file_path": "samples/game_template/lib/main.dart",
"repo_id": "samples",
"token_count": 4573
} | 1,223 |
// Copyright 2022, the Flutter project authors. Please see the AUTHORS file
// for details. 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/material.dart';
import 'package:go_router/go_router.dart';
... | samples/game_template/lib/src/play_session/play_session_screen.dart/0 | {
"file_path": "samples/game_template/lib/src/play_session/play_session_screen.dart",
"repo_id": "samples",
"token_count": 2725
} | 1,224 |
// Copyright 2022, the Flutter project authors. Please see the AUTHORS file
// for details. 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:provid... | samples/game_template/lib/src/win_game/win_game_screen.dart/0 | {
"file_path": "samples/game_template/lib/src/win_game/win_game_screen.dart",
"repo_id": "samples",
"token_count": 1003
} | 1,225 |
#include "../../Flutter/Flutter-Release.xcconfig"
#include "Warnings.xcconfig"
| samples/game_template/macos/Runner/Configs/Release.xcconfig/0 | {
"file_path": "samples/game_template/macos/Runner/Configs/Release.xcconfig",
"repo_id": "samples",
"token_count": 32
} | 1,226 |
#import "GeneratedPluginRegistrant.h"
| samples/google_maps/ios/Runner/Runner-Bridging-Header.h/0 | {
"file_path": "samples/google_maps/ios/Runner/Runner-Bridging-Header.h",
"repo_id": "samples",
"token_count": 13
} | 1,227 |
# infinite_list
A Flutter sample app that shows an implementation of the "infinite list" UX pattern. That is,
a list is shown to the user as if it was continuous although it is internally paginated.
This is a common feature of mobile apps, from shopping catalogs through search engines
to social media clients.
![An an... | samples/infinite_list/README.md/0 | {
"file_path": "samples/infinite_list/README.md",
"repo_id": "samples",
"token_count": 322
} | 1,228 |
// Copyright 2020 The Chromium 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 Item {
final Color color;
final int price;
final String name;
Item({
required this.color,
... | samples/infinite_list/lib/src/api/item.dart/0 | {
"file_path": "samples/infinite_list/lib/src/api/item.dart",
"repo_id": "samples",
"token_count": 150
} | 1,229 |
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id... | samples/ios_app_clip/ios/Runner/Base.lproj/Main.storyboard/0 | {
"file_path": "samples/ios_app_clip/ios/Runner/Base.lproj/Main.storyboard",
"repo_id": "samples",
"token_count": 820
} | 1,230 |
name: isolate_example
description: A Flutter sample to demonstrate isolates
version: 1.0.0+1
publish_to: none
environment:
sdk: ^3.2.0
dependencies:
flutter:
sdk: flutter
provider: ^6.0.2
window_size:
git:
url: https://github.com/google/flutter-desktop-embedding.git
path: plugins/window_si... | samples/isolate_example/pubspec.yaml/0 | {
"file_path": "samples/isolate_example/pubspec.yaml",
"repo_id": "samples",
"token_count": 184
} | 1,231 |
// Copyright 2021, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:io' show Platform;
import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:fl... | samples/navigation_and_routing/lib/main.dart/0 | {
"file_path": "samples/navigation_and_routing/lib/main.dart",
"repo_id": "samples",
"token_count": 493
} | 1,232 |
// Copyright 2021, the Flutter project authors. Please see the AUTHORS file
// for details. 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 FadeTransitionPage<T> extends Page<T> {
final Widget chi... | samples/navigation_and_routing/lib/src/widgets/fade_transition_page.dart/0 | {
"file_path": "samples/navigation_and_routing/lib/src/widgets/fade_transition_page.dart",
"repo_id": "samples",
"token_count": 466
} | 1,233 |
#include "../../Flutter/Flutter-Release.xcconfig"
#include "Warnings.xcconfig"
| samples/navigation_and_routing/macos/Runner/Configs/Release.xcconfig/0 | {
"file_path": "samples/navigation_and_routing/macos/Runner/Configs/Release.xcconfig",
"repo_id": "samples",
"token_count": 32
} | 1,234 |
// 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.
package dev.flutter.platform_channels
import android.hardware.Sensor
import android.hardware.SensorEvent
import android.hardware.SensorEventListener
import a... | samples/platform_channels/android/app/src/main/kotlin/dev/flutter/platform_channels/AccelerometerStreamHandler.kt/0 | {
"file_path": "samples/platform_channels/android/app/src/main/kotlin/dev/flutter/platform_channels/AccelerometerStreamHandler.kt",
"repo_id": "samples",
"token_count": 503
} | 1,235 |
// 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/services.dart';
/// This class includes implementation of two platform methods [increment],
/// and [decrement] which are used to inc... | samples/platform_channels/lib/src/counter_method_channel.dart/0 | {
"file_path": "samples/platform_channels/lib/src/counter_method_channel.dart",
"repo_id": "samples",
"token_count": 321
} | 1,236 |
# Platform Design
Instead of transliterating widgets one by one between Cupertino and Material,
Android and iOS apps often follow different information architecture patterns
that require some design decisions.
This sample project shows a Flutter app that maximizes application code reuse
while adhering to different de... | samples/platform_design/README.md/0 | {
"file_path": "samples/platform_design/README.md",
"repo_id": "samples",
"token_count": 782
} | 1,237 |
// 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/cupertino.dart';
import 'package:flutter/material.dart';
import 'settings_tab.dart';
import 'widgets.dart';
class ProfileTab extends... | samples/platform_design/lib/profile_tab.dart/0 | {
"file_path": "samples/platform_design/lib/profile_tab.dart",
"repo_id": "samples",
"token_count": 3642
} | 1,238 |
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
| samples/provider_shopper/android/gradle.properties/0 | {
"file_path": "samples/provider_shopper/android/gradle.properties",
"repo_id": "samples",
"token_count": 30
} | 1,239 |
// 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/foundation.dart';
import 'package:provider_shopper/models/catalog.dart';
class CartModel extends ChangeNotifier {
/// The private f... | samples/provider_shopper/lib/models/cart.dart/0 | {
"file_path": "samples/provider_shopper/lib/models/cart.dart",
"repo_id": "samples",
"token_count": 472
} | 1,240 |
import 'package:flutter_test/flutter_test.dart';
import 'package:simple_shader/main.dart';
void main() {
testWidgets('Smoke test', (tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MyApp());
});
}
| samples/simple_shader/test/widget_test.dart/0 | {
"file_path": "samples/simple_shader/test/widget_test.dart",
"repo_id": "samples",
"token_count": 90
} | 1,241 |
name: simplistic_calculator
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: ^3.2.0
dependencies:
auto_size_text: ^3.0.0
cupertino_icons: ^1.0.2
fluent_ui: ^4.6.0
fluentui_system_icons: ^1.1.190
flutter:
sdk: flutter
flutter_layout_grid: ^2.0.1
flutter_rive... | samples/simplistic_calculator/pubspec.yaml/0 | {
"file_path": "samples/simplistic_calculator/pubspec.yaml",
"repo_id": "samples",
"token_count": 272
} | 1,242 |
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'app_state_manager.dart';
class TextEditingDeltaHistoryView extends StatelessWidget {
const TextEditingDeltaHistoryView({super.key});
List<Widget> _buildTextEditingDeltaHistoryViews(
List<TextEditingDelta> textEditingDel... | samples/simplistic_editor/lib/text_editing_delta_history_view.dart/0 | {
"file_path": "samples/simplistic_editor/lib/text_editing_delta_history_view.dart",
"repo_id": "samples",
"token_count": 2703
} | 1,243 |
// 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';
import 'package:flutter_test/flutter_test.dart';
import 'package:provider/provider.dart';
import 'package:testing_app/... | samples/testing_app/test/favorites_test.dart/0 | {
"file_path": "samples/testing_app/test/favorites_test.dart",
"repo_id": "samples",
"token_count": 766
} | 1,244 |
#!/bin/bash
set -e
DIR="${BASH_SOURCE%/*}"
source "$DIR/flutter_ci_script_shared.sh"
flutter doctor -v
declare -ar PROJECT_NAMES=(
"add_to_app/android_view/flutter_module_using_plugin"
"add_to_app/books/flutter_module_books"
"add_to_app/fullscreen/flutter_module"
"add_to_app/multiple_flutters/multip... | samples/tool/flutter_ci_script_stable.sh/0 | {
"file_path": "samples/tool/flutter_ci_script_stable.sh",
"repo_id": "samples",
"token_count": 797
} | 1,245 |
// Copyright 2018 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 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:veggieseasons/data... | samples/veggieseasons/lib/data/preferences.dart/0 | {
"file_path": "samples/veggieseasons/lib/data/preferences.dart",
"repo_id": "samples",
"token_count": 875
} | 1,246 |
// Copyright 2018 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/cupertino.dart';
import 'package:go_router/go_router.dart';
import 'package:veggieseasons/data/veggie.dart';
import 'package:veggiesea... | samples/veggieseasons/lib/widgets/veggie_headline.dart/0 | {
"file_path": "samples/veggieseasons/lib/widgets/veggie_headline.dart",
"repo_id": "samples",
"token_count": 1506
} | 1,247 |
// 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 'dart:io';
const ansiGreen = 32;
const ansiRed = 31;
const ansiMagenta = 35;
Future<bool> run(
String workingDir, String commandName, List<String>... | samples/web/_tool/common.dart/0 | {
"file_path": "samples/web/_tool/common.dart",
"repo_id": "samples",
"token_count": 513
} | 1,248 |
include: package:lints/recommended.yaml
analyzer:
exclude:
- lib/src/data.g.dart
language:
strict-casts: true
strict-inference: true
strict-raw-types: true
linter:
rules:
avoid_types_on_closure_parameters: true
avoid_void_async: true
cancel_subscriptions: true
close_sinks: true
... | samples/web/samples_index/analysis_options.yaml/0 | {
"file_path": "samples/web/samples_index/analysis_options.yaml",
"repo_id": "samples",
"token_count": 260
} | 1,249 |
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ng-flutter": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {... | samples/web_embedding/ng-flutter/angular.json/0 | {
"file_path": "samples/web_embedding/ng-flutter/angular.json",
"repo_id": "samples",
"token_count": 1960
} | 1,250 |
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts"
],
"include": [
"src/**/*.d.ts"
]
}
| samples/web_embedding/ng-flutter/tsconfig.app.json/0 | {
"file_path": "samples/web_embedding/ng-flutter/tsconfig.app.json",
"repo_id": "samples",
"token_count": 117
} | 1,251 |
FROM ruby:3.2.3-slim-bookworm@sha256:97fccffe954d1e0c7fa6634020379417d67435a7f9a7c10b6ef3f49e498307e6 as base
ENV TZ=US/Pacific
RUN apt-get update && apt-get install -yq --no-install-recommends \
apt-transport-https \
build-essential \
ca-certificates \
curl \
git \
gnupg \
ls... | website/Dockerfile/0 | {
"file_path": "website/Dockerfile",
"repo_id": "website",
"token_count": 672
} | 1,252 |
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
// A "radial transformation" as defined here:
// https://m1.material.io/motion/transforming-material.html#transforming-material-radial-transformation
// ... | website/examples/_animation/radial_hero_animation/lib/main.dart/0 | {
"file_path": "website/examples/_animation/radial_hero_animation/lib/main.dart",
"repo_id": "website",
"token_count": 2546
} | 1,253 |
import 'package:flutter/material.dart';
void main() => runApp(const LogoApp());
class LogoApp extends StatefulWidget {
const LogoApp({super.key});
@override
State<LogoApp> createState() => _LogoAppState();
}
class _LogoAppState extends State<LogoApp> with SingleTickerProviderStateMixin {
late Animation<doub... | website/examples/animation/animate1/lib/main.dart/0 | {
"file_path": "website/examples/animation/animate1/lib/main.dart",
"repo_id": "website",
"token_count": 462
} | 1,254 |
import 'package:flutter/material.dart';
void main() {
runApp(const TabBarDemo());
}
class TabBarDemo extends StatelessWidget {
const TabBarDemo({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: DefaultTabController(
length: 3,
child: Scaffold(
... | website/examples/cookbook/design/tabs/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/design/tabs/lib/main.dart",
"repo_id": "website",
"token_count": 510
} | 1,255 |
import 'dart:math';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
void main() {
runApp(const App(home: ExampleGradientBubbles()));
}
@immutable
class App extends StatelessWidget {
const App({super.key, this.home});
final Widget? home;
@override
Widget build(BuildContext context) {
r... | website/examples/cookbook/effects/gradient_bubbles/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/effects/gradient_bubbles/lib/main.dart",
"repo_id": "website",
"token_count": 3041
} | 1,256 |
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialAp... | website/examples/cookbook/effects/parallax_scrolling/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/effects/parallax_scrolling/lib/main.dart",
"repo_id": "website",
"token_count": 3834
} | 1,257 |
import 'package:flutter/material.dart';
class ShimmerLoading extends StatefulWidget {
const ShimmerLoading({
super.key,
required this.isLoading,
required this.child,
});
final bool isLoading;
final Widget child;
@override
State<ShimmerLoading> createState() => _ShimmerLoadingState();
}
// #d... | website/examples/cookbook/effects/shimmer_loading/lib/shimmer_loading_state_pt2.dart/0 | {
"file_path": "website/examples/cookbook/effects/shimmer_loading/lib/shimmer_loading_state_pt2.dart",
"repo_id": "website",
"token_count": 903
} | 1,258 |
import 'dart:math';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(
const MaterialApp(
home: ExampleIsTyping(),
debugShowCheckedModeBanner: false,
),
);
}
const _backgroundColor = Color(0xFF333333);
class ExampleIsTyping extends Stateful... | website/examples/cookbook/effects/typing_indicator/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/effects/typing_indicator/lib/main.dart",
"repo_id": "website",
"token_count": 4636
} | 1,259 |
import 'package:flutter/material.dart';
// #docregion Step1
// 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 data related... | website/examples/cookbook/forms/text_field_changes/lib/main_step1.dart/0 | {
"file_path": "website/examples/cookbook/forms/text_field_changes/lib/main_step1.dart",
"repo_id": "website",
"token_count": 254
} | 1,260 |
// This file has only enough in it to satisfy `firestore_controller.dart`.
import 'package:flutter/foundation.dart';
import 'playing_area.dart';
class BoardState {
final VoidCallback onWin;
final PlayingArea areaOne = PlayingArea();
final PlayingArea areaTwo = PlayingArea();
BoardState({required this.onWi... | website/examples/cookbook/games/firestore_multiplayer/lib/game_internals/board_state.dart/0 | {
"file_path": "website/examples/cookbook/games/firestore_multiplayer/lib/game_internals/board_state.dart",
"repo_id": "website",
"token_count": 123
} | 1,261 |
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 = 'InkWell Demo';
return const MaterialApp(
title: title,
home: MyHomePage(title: title),... | website/examples/cookbook/gestures/ripples/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/gestures/ripples/lib/main.dart",
"repo_id": "website",
"token_count": 485
} | 1,262 |
import 'package:flutter/material.dart';
void main() {
runApp(
MyApp(
// #docregion Items
items: List<ListItem>.generate(
1000,
(i) => i % 6 == 0
? HeadingItem('Heading $i')
: MessageItem('Sender $i', 'Message body $i'),
),
// #enddocregion Items
... | website/examples/cookbook/lists/mixed_list/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/lists/mixed_list/lib/main.dart",
"repo_id": "website",
"token_count": 895
} | 1,263 |
import 'package:flutter/material.dart';
void main() {
runApp(
const MaterialApp(
title: 'Returning Data',
home: HomeScreen(),
),
);
}
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBa... | website/examples/cookbook/navigation/returning_data/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/navigation/returning_data/lib/main.dart",
"repo_id": "website",
"token_count": 1291
} | 1,264 |
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
// #docregion Http
import 'package:http/http.dart' as http;
// #enddocregion Http
// #docregion fetchAlbum
Future<Album> fetchAlbum() async {
final response = await http
.get(Uri.parse('https://jsonplaceholder.typicode.com/alb... | website/examples/cookbook/networking/fetch_data/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/networking/fetch_data/lib/main.dart",
"repo_id": "website",
"token_count": 1095
} | 1,265 |
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Shared preference... | website/examples/cookbook/persistence/key_value/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/persistence/key_value/lib/main.dart",
"repo_id": "website",
"token_count": 807
} | 1,266 |
name: google_mobile_ads_example
description: Google mobile ads
environment:
sdk: ^3.3.0
dependencies:
flutter:
sdk: flutter
google_mobile_ads: ^4.0.0
dev_dependencies:
example_utils:
path: ../../../example_utils
flutter:
uses-material-design: true
| website/examples/cookbook/plugins/google_mobile_ads/pubspec.yaml/0 | {
"file_path": "website/examples/cookbook/plugins/google_mobile_ads/pubspec.yaml",
"repo_id": "website",
"token_count": 104
} | 1,267 |
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
// #docregion TestWidgetStep2
testWidgets('Add and remove a todo', (tester) async {
// Build the widget
await tester.pumpWidget(const TodoList());
// Enter 'hi' into the TextField.
await tester.e... | website/examples/cookbook/testing/widget/tap_drag/test/main_steps.dart/0 | {
"file_path": "website/examples/cookbook/testing/widget/tap_drag/test/main_steps.dart",
"repo_id": "website",
"token_count": 1203
} | 1,268 |
import 'address.dart';
import 'user.dart';
void exampleJson() {
// #docregion print
Address address = Address('My st.', 'New York');
User user = User('John', address);
print(user.toJson());
// #enddocregion print
}
| website/examples/development/data-and-backend/json/lib/nested/main.dart/0 | {
"file_path": "website/examples/development/data-and-backend/json/lib/nested/main.dart",
"repo_id": "website",
"token_count": 77
} | 1,269 |
name: platform_integration
description: Examples for documenting platform integration.
publish_to: none
version: 1.0.0+1
environment:
sdk: ^3.3.0
dependencies:
flutter:
sdk: flutter
pigeon: ^17.0.0
cupertino_icons: ^1.0.6
dev_dependencies:
example_utils:
path: ../../example_utils
flutter_test:
... | website/examples/development/platform_integration/pubspec.yaml/0 | {
"file_path": "website/examples/development/platform_integration/pubspec.yaml",
"repo_id": "website",
"token_count": 148
} | 1,270 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.