text stringlengths 6 13.6M | id stringlengths 13 176 | metadata dict | __index_level_0__ int64 0 1.69k |
|---|---|---|---|
import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
... | samples/web_embedding/ng-flutter/src/app/app.component.spec.ts/0 | {
"file_path": "samples/web_embedding/ng-flutter/src/app/app.component.spec.ts",
"repo_id": "samples",
"token_count": 365
} | 1,422 |
analyzer:
exclude: [flutter, site-shared, src, tmp, 'examples/codelabs']
| website/analysis_options.yaml/0 | {
"file_path": "website/analysis_options.yaml",
"repo_id": "website",
"token_count": 28
} | 1,423 |
name: basic_staggered
publish_to: none
description: An introductory example to staggered animations.
environment:
sdk: ^3.3.0
dependencies:
flutter:
sdk: flutter
dev_dependencies:
example_utils:
path: ../../example_utils
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
| website/examples/_animation/basic_staggered_animation/pubspec.yaml/0 | {
"file_path": "website/examples/_animation/basic_staggered_animation/pubspec.yaml",
"repo_id": "website",
"token_count": 114
} | 1,424 |
name: radial_hero_animation_animate_rectclip
publish_to: none
description: >-
Shows how to apply a radial transformation to the Hero
as it animates to the new route.
environment:
sdk: ^3.3.0
dependencies:
flutter:
sdk: flutter
dev_dependencies:
example_utils:
path: ../../example_utils
flutter_tes... | website/examples/_animation/radial_hero_animation_animate_rectclip/pubspec.yaml/0 | {
"file_path": "website/examples/_animation/radial_hero_animation_animate_rectclip/pubspec.yaml",
"repo_id": "website",
"token_count": 182
} | 1,425 |
// 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.
/*
This app arranges its photos (allPhotos) in a list of blocks,
where each block contains an arrangement of a handful of photos
defined by photoBlockFram... | website/examples/_animation/staggered_pic_selection/lib/main.dart/0 | {
"file_path": "website/examples/_animation/staggered_pic_selection/lib/main.dart",
"repo_id": "website",
"token_count": 5015
} | 1,426 |
# Implicit animations codelab examples
The code samples within this folder are used
within the [Implicit animations codelab][].
- `container1` -> `container5` are used for the
steps of "Shape-shifting effect" portion.
- `container1` is also used for the runnable starter sample and
`container5` for the complete sa... | website/examples/animation/implicit/README.md/0 | {
"file_path": "website/examples/animation/implicit/README.md",
"repo_id": "website",
"token_count": 254
} | 1,427 |
name: null_safety_basics
description: Some code to demonstrate null safety.
version: 1.0.0
environment:
sdk: ^3.3.0
dependencies:
flutter:
sdk: flutter
dev_dependencies:
example_utils:
path: ../example_utils
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
| website/examples/basics/pubspec.yaml/0 | {
"file_path": "website/examples/basics/pubspec.yaml",
"repo_id": "website",
"token_count": 115
} | 1,428 |
import 'package:flutter/material.dart';
void main() {
runApp(const MaterialApp(home: PhysicsCardDragDemo()));
}
class PhysicsCardDragDemo extends StatelessWidget {
const PhysicsCardDragDemo({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: c... | website/examples/cookbook/animation/physics_simulation/lib/starter.dart/0 | {
"file_path": "website/examples/cookbook/animation/physics_simulation/lib/starter.dart",
"repo_id": "website",
"token_count": 364
} | 1,429 |
name: orientation
description: Sample code for orientation cookbook recipe.
environment:
sdk: ^3.3.0
dependencies:
flutter:
sdk: flutter
dev_dependencies:
example_utils:
path: ../../../example_utils
flutter:
uses-material-design: true
| website/examples/cookbook/design/orientation/pubspec.yaml/0 | {
"file_path": "website/examples/cookbook/design/orientation/pubspec.yaml",
"repo_id": "website",
"token_count": 89
} | 1,430 |
import 'dart:math' as math;
import 'package:flutter/material.dart';
@immutable
class ExampleExpandableFab extends StatelessWidget {
static const _actionTitles = ['Create Post', 'Upload Photo', 'Upload Video'];
const ExampleExpandableFab({super.key});
void _showAction(BuildContext context, int index) {
sho... | website/examples/cookbook/effects/expandable_fab/lib/excerpt3.dart/0 | {
"file_path": "website/examples/cookbook/effects/expandable_fab/lib/excerpt3.dart",
"repo_id": "website",
"token_count": 3205
} | 1,431 |
import 'package:flutter/material.dart';
// #docregion SetupFlow
class SetupFlow extends StatefulWidget {
const SetupFlow({
super.key,
required this.setupPageRoute,
});
final String setupPageRoute;
@override
State<SetupFlow> createState() => SetupFlowState();
}
class SetupFlowState extends State<Se... | website/examples/cookbook/effects/nested_nav/lib/setupflow.dart/0 | {
"file_path": "website/examples/cookbook/effects/nested_nav/lib/setupflow.dart",
"repo_id": "website",
"token_count": 140
} | 1,432 |
import 'package:flutter/material.dart';
@immutable
class FilterSelector extends StatefulWidget {
const FilterSelector({
super.key,
required this.filters,
required this.onFilterChanged,
this.padding = const EdgeInsets.symmetric(vertical: 24),
});
final List<Color> filters;
final void Function(C... | website/examples/cookbook/effects/photo_filter_carousel/lib/excerpt5.dart/0 | {
"file_path": "website/examples/cookbook/effects/photo_filter_carousel/lib/excerpt5.dart",
"repo_id": "website",
"token_count": 1047
} | 1,433 |
import 'package:flutter/material.dart';
class Menu extends StatefulWidget {
const Menu({super.key});
@override
State<Menu> createState() => _MenuState();
}
// #docregion AnimationController
class _MenuState extends State<Menu> with SingleTickerProviderStateMixin {
late AnimationController _staggeredControlle... | website/examples/cookbook/effects/staggered_menu_animation/lib/step2.dart/0 | {
"file_path": "website/examples/cookbook/effects/staggered_menu_animation/lib/step2.dart",
"repo_id": "website",
"token_count": 216
} | 1,434 |
name: focus
description: Sample code for focus cookbook recipe.
environment:
sdk: ^3.3.0
dependencies:
flutter:
sdk: flutter
dev_dependencies:
example_utils:
path: ../../../example_utils
flutter:
uses-material-design: true
| website/examples/cookbook/forms/focus/pubspec.yaml/0 | {
"file_path": "website/examples/cookbook/forms/focus/pubspec.yaml",
"repo_id": "website",
"token_count": 89
} | 1,435 |
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
const appTitle = 'Form Validation Demo';
return MaterialApp(
title: appTitle,
home: Scaffold(
... | website/examples/cookbook/forms/validation/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/forms/validation/lib/main.dart",
"repo_id": "website",
"token_count": 1067
} | 1,436 |
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 = 'Fade in images';
return MaterialApp(
title: title,
home: Scaffold(
appBar: ... | website/examples/cookbook/images/fading_in_images/lib/asset_main.dart/0 | {
"file_path": "website/examples/cookbook/images/fading_in_images/lib/asset_main.dart",
"repo_id": "website",
"token_count": 302
} | 1,437 |
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 = 'Grid List';
return MaterialApp(
title: title,
home: Scaffold(
appBar: AppBa... | website/examples/cookbook/lists/grid_lists/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/lists/grid_lists/lib/main.dart",
"repo_id": "website",
"token_count": 449
} | 1,438 |
// #docregion InitializeSDK
import 'package:flutter/widgets.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
Future<void> main() async {
await SentryFlutter.init(
(options) => options.dsn = 'https://example@sentry.io/example',
appRunner: () => runApp(const MyApp()),
);
}
// #enddocregion Initial... | website/examples/cookbook/maintenance/error_reporting/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/maintenance/error_reporting/lib/main.dart",
"repo_id": "website",
"token_count": 253
} | 1,439 |
import 'package:flutter/material.dart';
// #docregion FirstSecondRoutes
class FirstRoute extends StatelessWidget {
const FirstRoute({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('First Route'),
),
body: Center(
... | website/examples/cookbook/navigation/navigation_basics/lib/main_step1.dart/0 | {
"file_path": "website/examples/cookbook/navigation/navigation_basics/lib/main_step1.dart",
"repo_id": "website",
"token_count": 417
} | 1,440 |
import 'dart:async';
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
// #docregion fetchPhotos
Future<List<Photo>> fetchPhotos(http.Client client) async {
final response = await client
.get(Uri.parse('https://jso... | website/examples/cookbook/networking/background_parsing/lib/main.dart/0 | {
"file_path": "website/examples/cookbook/networking/background_parsing/lib/main.dart",
"repo_id": "website",
"token_count": 1091
} | 1,441 |
name: reading_writing_files
description: Reading and Writing Files
environment:
sdk: ^3.3.0
dependencies:
flutter:
sdk: flutter
path_provider: ^2.1.2
dev_dependencies:
example_utils:
path: ../../../example_utils
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
| website/examples/cookbook/persistence/reading_writing_files/pubspec.yaml/0 | {
"file_path": "website/examples/cookbook/persistence/reading_writing_files/pubspec.yaml",
"repo_id": "website",
"token_count": 118
} | 1,442 |
class Counter {
int value = 0;
void increment() => value++;
void decrement() => value--;
}
| website/examples/cookbook/testing/unit/counter_app/lib/counter.dart/0 | {
"file_path": "website/examples/cookbook/testing/unit/counter_app/lib/counter.dart",
"repo_id": "website",
"token_count": 31
} | 1,443 |
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
// ignore_for_file: unused_local_variable
// #docregion main
void main() {
testWidgets('MyWidget has a title and message', (tester) async {
await tester.pumpWidget(const MyWidget(title: 'T', message: 'M'));
// Create th... | website/examples/cookbook/testing/widget/introduction/test/main_step5_test.dart/0 | {
"file_path": "website/examples/cookbook/testing/widget/introduction/test/main_step5_test.dart",
"repo_id": "website",
"token_count": 355
} | 1,444 |
import 'dart:isolate';
import 'package:flutter/services.dart';
import 'package:shared_preferences/shared_preferences.dart';
void main() {
// Identify the root isolate to pass to the background isolate.
RootIsolateToken rootIsolateToken = RootIsolateToken.instance!;
Isolate.spawn(_isolateMain, rootIsolateToken);... | website/examples/development/concurrency/isolates/lib/isolate_binary_messenger.dart/0 | {
"file_path": "website/examples/development/concurrency/isolates/lib/isolate_binary_messenger.dart",
"repo_id": "website",
"token_count": 204
} | 1,445 |
// ignore_for_file: avoid_print, prefer_const_declarations, prefer_const_constructors
import 'package:flutter/material.dart';
// #docregion Main
import 'package:flutter/widgets.dart';
void main() {
runApp(const Center(child: Text('Hello', textDirection: TextDirection.ltr)));
}
// #enddocregion Main
// #docregion ... | website/examples/development/tools/lib/hot-reload/after.dart/0 | {
"file_path": "website/examples/development/tools/lib/hot-reload/after.dart",
"repo_id": "website",
"token_count": 487
} | 1,446 |
import 'package:flutter/material.dart';
class WelcomeScreen extends StatelessWidget {
const WelcomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Text(
'Welcome!',
style: Theme.of(context).textTheme.displayMedium,
... | website/examples/get-started/codelab_web/lib/step2.dart/0 | {
"file_path": "website/examples/get-started/codelab_web/lib/step2.dart",
"repo_id": "website",
"token_count": 1782
} | 1,447 |
// #docregion ToggleWidget
import 'package:flutter/material.dart';
void main() {
runApp(const SampleApp());
}
class SampleApp extends StatelessWidget {
const SampleApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
... | website/examples/get-started/flutter-for/android_devs/lib/layout.dart/0 | {
"file_path": "website/examples/get-started/flutter-for/android_devs/lib/layout.dart",
"repo_id": "website",
"token_count": 1268
} | 1,448 |
name: android_devs
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
flutter_localizations:
sdk: flutter
cupertino_icons: ^1.0.6
http: ^1.2.0
shared_preferen... | website/examples/get-started/flutter-for/android_devs/pubspec.yaml/0 | {
"file_path": "website/examples/get-started/flutter-for/android_devs/pubspec.yaml",
"repo_id": "website",
"token_count": 209
} | 1,449 |
import 'package:flutter/cupertino.dart';
void main() {
runApp(
const App(),
);
}
class App extends StatelessWidget {
const App({
super.key,
});
@override
Widget build(BuildContext context) {
return const CupertinoApp(
theme: CupertinoThemeData(brightness: Brightness.dark),
debugSh... | website/examples/get-started/flutter-for/ios_devs/lib/image.dart/0 | {
"file_path": "website/examples/get-started/flutter-for/ios_devs/lib/image.dart",
"repo_id": "website",
"token_count": 336
} | 1,450 |
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
runApp(const SampleApp());
}
class SampleApp extends StatelessWidget {
const SampleApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return Materia... | website/examples/get-started/flutter-for/ios_devs/lib/request_data.dart/0 | {
"file_path": "website/examples/get-started/flutter-for/ios_devs/lib/request_data.dart",
"repo_id": "website",
"token_count": 435
} | 1,451 |
// Dart
import 'dart:convert';
import 'package:http/http.dart' as http;
class Example {
Future<String> _getIPAddress() async {
final url = Uri.https('httpbin.org', '/ip');
final response = await http.get(url);
final ip = jsonDecode(response.body)['origin'] as String;
return ip;
}
}
/// An async f... | website/examples/get-started/flutter-for/react_native_devs/lib/async.dart/0 | {
"file_path": "website/examples/get-started/flutter-for/react_native_devs/lib/async.dart",
"repo_id": "website",
"token_count": 222
} | 1,452 |
name: react_native_devs
description: A new Flutter project.
publish_to: none
version: 1.0.0+1
environment:
sdk: ^3.3.0
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.6
http: ^1.2.0
google_sign_in: ^6.2.1
shared_preferences: ^2.2.2
my_widgets:
path: my_widgets
dev_dependencies:
exa... | website/examples/get-started/flutter-for/react_native_devs/pubspec.yaml/0 | {
"file_path": "website/examples/get-started/flutter-for/react_native_devs/pubspec.yaml",
"repo_id": "website",
"token_count": 195
} | 1,453 |
import 'package:flutter/material.dart';
void main() {
runApp(const SampleApp());
}
class SampleApp extends StatelessWidget {
/// This widget is the root of your application.
const SampleApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Sample App',... | website/examples/get-started/flutter-for/xamarin_devs/lib/listview.dart/0 | {
"file_path": "website/examples/get-started/flutter-for/xamarin_devs/lib/listview.dart",
"repo_id": "website",
"token_count": 313
} | 1,454 |
name: google_sign_in_example
publish_to: none
environment:
sdk: ^3.3.0
dependencies:
collection: any # Pull the version of collection from Flutter.
extension_google_sign_in_as_googleapis_auth: ^2.0.12
flutter:
sdk: flutter
google_sign_in: ^6.2.1
googleapis: ^13.1.0
http: ^1.2.0
dev_dependencies:
... | website/examples/googleapis/pubspec.yaml/0 | {
"file_path": "website/examples/googleapis/pubspec.yaml",
"repo_id": "website",
"token_count": 150
} | 1,455 |
// 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.
// #docregion all
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
// #docregion MyApp
class MyApp extends StatelessWidget {
... | website/examples/layout/base/lib/main.dart/0 | {
"file_path": "website/examples/layout/base/lib/main.dart",
"repo_id": "website",
"token_count": 330
} | 1,456 |
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart' show debugPaintSizeEnabled;
void main() {
debugPaintSizeEnabled = true; // Remove to suppress visual layout
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildCo... | website/examples/layout/row_column/lib/main.dart/0 | {
"file_path": "website/examples/layout/row_column/lib/main.dart",
"repo_id": "website",
"token_count": 538
} | 1,457 |
// ignore_for_file: unused_local_variable
// #docregion FFI
import 'dart:ffi';
import 'package:ffi/ffi.dart'; // contains .toNativeUtf16() extension method
typedef MessageBoxNative = Int32 Function(
IntPtr hWnd,
Pointer<Utf16> lpText,
Pointer<Utf16> lpCaption,
Int32 uType,
);
typedef MessageBoxDart = int Fun... | website/examples/resources/architectural_overview/lib/ffi.dart/0 | {
"file_path": "website/examples/resources/architectural_overview/lib/ffi.dart",
"repo_id": "website",
"token_count": 298
} | 1,458 |
import 'package:state_mgmt/src/provider.dart';
import 'package:test/test.dart';
void main() {
// #docregion test
test('adding item increases total cost', () {
final cart = CartModel();
final startingPrice = cart.totalPrice;
var i = 0;
cart.addListener(() {
expect(cart.totalPrice, greaterThan(... | website/examples/state_mgmt/simple/test/model_test.dart/0 | {
"file_path": "website/examples/state_mgmt/simple/test/model_test.dart",
"repo_id": "website",
"token_count": 167
} | 1,459 |
// #docregion PerfOverlay
import 'package:flutter/material.dart';
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
showPerformanceOverlay: true,
title: 'My Awesome App',
theme: ThemeData(
colorScheme:... | website/examples/testing/code_debugging/lib/performance_overlay.dart/0 | {
"file_path": "website/examples/testing/code_debugging/lib/performance_overlay.dart",
"repo_id": "website",
"token_count": 242
} | 1,460 |
import 'package:flutter/material.dart';
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const Text('hello world!');
}
}
| website/examples/testing/errors/lib/my_app.dart/0 | {
"file_path": "website/examples/testing/errors/lib/my_app.dart",
"repo_id": "website",
"token_count": 66
} | 1,461 |
import 'package:bitsdojo_window/bitsdojo_window.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
import 'app_model.dart';
import 'global/device_size.dart';
import 'global/device_type.dart';
import 'global/targeted_actions.dart';
import 'pag... | website/examples/ui/layout/adaptive_app_demos/lib/main_app_scaffold.dart/0 | {
"file_path": "website/examples/ui/layout/adaptive_app_demos/lib/main_app_scaffold.dart",
"repo_id": "website",
"token_count": 3288
} | 1,462 |
import 'package:flutter/material.dart';
class MyAppBar extends StatelessWidget {
const MyAppBar({required this.title, super.key});
// Fields in a Widget subclass are always marked "final".
final Widget title;
@override
Widget build(BuildContext context) {
return Container(
height: 56, // in logi... | website/examples/ui/widgets_intro/lib/main_myappbar.dart/0 | {
"file_path": "website/examples/ui/widgets_intro/lib/main_myappbar.dart",
"repo_id": "website",
"token_count": 876
} | 1,463 |
name: docs_flutter_dev
publish_to: none
environment:
sdk: ^3.3.0
dev_dependencies:
build_runner: ^2.4.8
code_excerpt_updater:
path: site-shared/packages/code_excerpt_updater
code_excerpter:
path: site-shared/packages/code_excerpter
flutter_site:
path: tool/flutter_site
| website/pubspec.yaml/0 | {
"file_path": "website/pubspec.yaml",
"repo_id": "website",
"token_count": 125
} | 1,464 |
<figure class="site-figure">
<div class="site-figure-container">
<img src='/assets/images/docs/get-started/android/{{include.image}}'
alt='{{include.alt}} on Android'
class='{{include.class}}'>
<figcaption class="figure-caption">Android</figcaption>
</div>
<div class="site-figure... | website/src/_includes/docs/android-ios-figure-pair.md/0 | {
"file_path": "website/src/_includes/docs/android-ios-figure-pair.md",
"repo_id": "website",
"token_count": 231
} | 1,465 |
1. To open the Flutter app directory, go to
**File** <span aria-label="and then">></span>
**Open Folder...** and choose the `my_app` directory.
1. Open the `lib/main.dart` file.
1. If you can build an app for more than one device,
you must select the device first.
Go to
**View** <span aria-label="and ... | website/src/_includes/docs/debug/debug-flow-vscode-as-start.md/0 | {
"file_path": "website/src/_includes/docs/debug/debug-flow-vscode-as-start.md",
"repo_id": "website",
"token_count": 404
} | 1,466 |
#### Configure your iOS simulator
To prepare to run and test your Flutter app on the iOS simulator,
follow this procedure.
1. To install the iOS Simulator, run the following command.
```terminal
{{prompt1}} xcodebuild -downloadPlatform iOS
```
1. To start the Simulator, run the following command:
`... | website/src/_includes/docs/install/devices/ios-simulator.md/0 | {
"file_path": "website/src/_includes/docs/install/devices/ios-simulator.md",
"repo_id": "website",
"token_count": 840
} | 1,467 |
{% assign target = include.target %}
{% case target %}
{% when 'mobile-ios' %}
{% assign v-target = "iOS" %}
{% when 'mobile-android' %}
{% assign v-target = "Android" %}
{% else %}
{% assign v-target = target %}
{% endcase %}
{% assign os = include.os %}
{% include docs/install/admonitions/install-in-order.md %}
## ... | website/src/_includes/docs/install/reqs/macos/base.md/0 | {
"file_path": "website/src/_includes/docs/install/reqs/macos/base.md",
"repo_id": "website",
"token_count": 1303
} | 1,468 |
After the app build completes, your device displays your app.
{% include docs/app-figure.md img-class="site-mobile-screenshot border"
path-prefix="get-started" platform="macOS" image="starter-app.png"
caption="Starter app" %}
## Try hot reload
Flutter offers a fast development cycle with _Stateful Hot Reload... | website/src/_includes/docs/install/test-drive/try-hot-reload.md/0 | {
"file_path": "website/src/_includes/docs/install/test-drive/try-hot-reload.md",
"repo_id": "website",
"token_count": 488
} | 1,469 |
{% assign active_entries = include.page_url_path | active_nav_for_page: site.data.activenav -%}
<ul class="nav flex-column">
{%- for entry in include.nav -%}
{% if entry == 'divider' -%}
<li aria-hidden="true"><div class="sidebar-primary-divider"></div></li>
{% elsif entry contains 'header' -%}
<... | website/src/_includes/sidenav-level-1.html/0 | {
"file_path": "website/src/_includes/sidenav-level-1.html",
"repo_id": "website",
"token_count": 1055
} | 1,470 |
module DartSite
# Takes the given code excerpt (with the given attributes) and creates
# some framing HTML: e.g., a div with possible excerpt title in a header.
class CodeExcerptFramer
def frame_code(title, classes, attrs, escaped_code, indent, secondary_class)
_unindented_template(title, classes, attr... | website/src/_plugins/code_excerpt_framer.rb/0 | {
"file_path": "website/src/_plugins/code_excerpt_framer.rb",
"repo_id": "website",
"token_count": 698
} | 1,471 |
@use '../base/variables' as *;
@use '../vendor/bootstrap';
.site-banner {
background-color: $flutter-color-blue;
color: $site-color-white;
font-family: $site-font-family-alt;
font-size: bootstrap.$font-size-lg;
padding: bootstrap.bs-spacer(5);
position: relative;
text-align: center;
z-index: bootstrap.... | website/src/_sass/components/_banner.scss/0 | {
"file_path": "website/src/_sass/components/_banner.scss",
"repo_id": "website",
"token_count": 453
} | 1,472 |
@use '../base/variables' as *;
// Import from NPM library directly
@forward '../../../node_modules/bootstrap-scss/bootstrap' with (
$primary: $site-color-primary,
$body-color: $site-color-body,
// Font config
$font-family-sans-serif: $site-font-family-base,
$font-family-monospace: $site-font-family-monospac... | website/src/_sass/vendor/_bootstrap.scss/0 | {
"file_path": "website/src/_sass/vendor/_bootstrap.scss",
"repo_id": "website",
"token_count": 2305
} | 1,473 |
---
---
@forward 'site';
| website/src/assets/css/main.scss/0 | {
"file_path": "website/src/assets/css/main.scss",
"repo_id": "website",
"token_count": 11
} | 1,474 |
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.7.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="48px" height="48px" viewBox="0 0 48 48" style="enab... | website/src/assets/images/docs/brand-svg/chromeos.svg/0 | {
"file_path": "website/src/assets/images/docs/brand-svg/chromeos.svg",
"repo_id": "website",
"token_count": 857
} | 1,475 |
document.addEventListener("DOMContentLoaded", function(_) {
adjustToc();
initFixedColumns();
scrollSidebarIntoView();
initVideoModal();
initCarousel();
initSnackbar();
initCookieNotice();
addCopyCodeButtonsEverywhere(); // Must be before tooltip activation.
$('[data-toggle="tooltip"]').tooltip();
s... | website/src/assets/js/main.js/0 | {
"file_path": "website/src/assets/js/main.js",
"repo_id": "website",
"token_count": 3585
} | 1,476 |
---
title: Animate a widget using a physics simulation
description: How to implement a physics animation.
diff2html: true
js:
- defer: true
url: https://old-dartpad-3ce3f.web.app/inject_embed.dart.js
---
<?code-excerpt path-base="cookbook/animation/physics_simulation/"?>
Physics simulations can make app interac... | website/src/cookbook/animation/physics-simulation.md/0 | {
"file_path": "website/src/cookbook/animation/physics-simulation.md",
"repo_id": "website",
"token_count": 4653
} | 1,477 |
---
title: Create a photo filter carousel
description: How to implement a photo filter carousel in Flutter.
js:
- defer: true
url: https://old-dartpad-3ce3f.web.app/inject_embed.dart.js
---
<?code-excerpt path-base="cookbook/effects/photo_filter_carousel"?>
Everybody knows that a photo looks better with a filte... | website/src/cookbook/effects/photo-filter-carousel.md/0 | {
"file_path": "website/src/cookbook/effects/photo-filter-carousel.md",
"repo_id": "website",
"token_count": 9355
} | 1,478 |
---
title: Add Material touch ripples
description: How to implement ripple animations.
js:
- defer: true
url: https://old-dartpad-3ce3f.web.app/inject_embed.dart.js
---
<?code-excerpt path-base="cookbook/gestures/ripples/"?>
Widgets that follow the Material Design guidelines display
a ripple animation when tapp... | website/src/cookbook/gestures/ripples.md/0 | {
"file_path": "website/src/cookbook/gestures/ripples.md",
"repo_id": "website",
"token_count": 940
} | 1,479 |
---
title: Maintenance
description: A catalog of recipes covering maintenance of Flutter apps.
---
{% include docs/cookbook-group-index.md %}
| website/src/cookbook/maintenance/index.md/0 | {
"file_path": "website/src/cookbook/maintenance/index.md",
"repo_id": "website",
"token_count": 39
} | 1,480 |
---
title: Update data over the internet
description: How to use the http package to update data over the internet.
---
<?code-excerpt path-base="cookbook/networking/update_data/"?>
Updating data over the internet is necessary for most apps.
The `http` package has got that covered!
This recipe uses the following ste... | website/src/cookbook/networking/update-data.md/0 | {
"file_path": "website/src/cookbook/networking/update-data.md",
"repo_id": "website",
"token_count": 4641
} | 1,481 |
---
title: Mock dependencies using Mockito
description: >
Use the Mockito package to mimic the behavior of services for testing.
short-title: Mocking
---
<?code-excerpt path-base="cookbook/testing/unit/mocking"?>
Sometimes, unit tests might depend on classes that fetch data from live
web services or databases. This... | website/src/cookbook/testing/unit/mocking.md/0 | {
"file_path": "website/src/cookbook/testing/unit/mocking.md",
"repo_id": "website",
"token_count": 3653
} | 1,482 |
---
layout: toc
title: State management
description: Content covering state management in Flutter apps.
---
| website/src/data-and-backend/state-mgmt/index.md/0 | {
"file_path": "website/src/data-and-backend/state-mgmt/index.md",
"repo_id": "website",
"token_count": 26
} | 1,483 |
---
title: Networking and data
description: Learn how to network your Flutter app.
prev:
title: Handling user input
next:
title: Local data and caching
---
While it's said that "no man is an island",
a Flutter app without any networking capability
can feel a tad disconnected.
This page covers how to add networki... | website/src/get-started/fwe/networking.md/0 | {
"file_path": "website/src/get-started/fwe/networking.md",
"repo_id": "website",
"token_count": 1504
} | 1,484 |
## Windows setup
[Announcing Flutter for Windows]: {{site.flutter-medium}}/announcing-flutter-for-windows-6979d0d01fed
### Additional Windows requirements
{% include_relative _help-link.md location='win-desktop' %}
For Windows desktop development,
you need the following in addition to the Flutter SDK:
* [Visual St... | website/src/get-started/install/_deprecated/_windows-desktop-setup.md/0 | {
"file_path": "website/src/get-started/install/_deprecated/_windows-desktop-setup.md",
"repo_id": "website",
"token_count": 258
} | 1,485 |
---
title: Start building Flutter native desktop apps on Windows
description: Configure your system to develop Flutter desktop apps on Windows.
short-title: Make Windows desktop apps
target: desktop
config: WindowsDesktop
devos: Windows
next:
title: Create a test app
path: /get-started/test-drive
---
{% include do... | website/src/get-started/install/windows/desktop.md/0 | {
"file_path": "website/src/get-started/install/windows/desktop.md",
"repo_id": "website",
"token_count": 263
} | 1,486 |
---
title: More thoughts about performance
description: What is performance, and why is performance important
---
## What is performance?
Performance is a set of quantifiable properties of a performer.
In this context, performance isn't the execution of an action itself;
it's how well something or someone performs. ... | website/src/perf/appendix.md/0 | {
"file_path": "website/src/perf/appendix.md",
"repo_id": "website",
"token_count": 1775
} | 1,487 |
---
title: Add Android devtools for Flutter from iOS start
description: Configure your Mac to develop Flutter mobile apps for Android.
short-title: Starting from iOS on macOS
---
To add Android as a Flutter app target for iOS, follow this procedure.
## Install Android Studio
1. Allocate a minimum of 7.5 GB of storag... | website/src/platform-integration/android/install-android/install-android-from-ios.md/0 | {
"file_path": "website/src/platform-integration/android/install-android/install-android-from-ios.md",
"repo_id": "website",
"token_count": 255
} | 1,488 |
---
title: iOS
layout: toc
description: Content covering integration with iOS in Flutter apps.
---
| website/src/platform-integration/ios/index.md/0 | {
"file_path": "website/src/platform-integration/ios/index.md",
"repo_id": "website",
"token_count": 26
} | 1,489 |
---
title: Add Web devtools to Flutter from Android on Windows start
description: Configure your system to develop Flutter web apps on Windows.
short-title: Starting from Android on Windows
---
To add Web as a Flutter app target for Windows with Android,
follow this procedure.
## Configure Chrome as the web DevTools ... | website/src/platform-integration/web/install-web/install-web-from-android-on-windows.md/0 | {
"file_path": "website/src/platform-integration/web/install-web/install-web-from-android-on-windows.md",
"repo_id": "website",
"token_count": 144
} | 1,490 |
---
title: Security false positives
description: Security vulnerabilities incorrectly reported by automated static analysis tools
---
## Introduction
We occasionally receive false reports of security
vulnerabilities in Dart and Flutter applications,
generated by tools that were built for other kinds
of applications (... | website/src/reference/security-false-positives.md/0 | {
"file_path": "website/src/reference/security-false-positives.md",
"repo_id": "website",
"token_count": 2076
} | 1,491 |
---
title: Deprecated API removed after v3.7
description: >
After reaching end of life, the following deprecated APIs
were removed from Flutter.
---
## Summary
In accordance with Flutter's [Deprecation Policy][],
deprecated APIs that reached end of life after the
3.7 stable release have been removed.
All affecte... | website/src/release/breaking-changes/3-7-deprecations.md/0 | {
"file_path": "website/src/release/breaking-changes/3-7-deprecations.md",
"repo_id": "website",
"token_count": 4529
} | 1,492 |
---
title: Container with color optimization
description: >
A container with a color and no other background decoration
no longer builds the same child widgets.
---
## Summary
A new `ColoredBox` widget has been added to the framework,
and the `Container` widget has been optimized to use it
if a user specifies a `... | website/src/release/breaking-changes/container-color.md/0 | {
"file_path": "website/src/release/breaking-changes/container-color.md",
"repo_id": "website",
"token_count": 863
} | 1,493 |
---
title: Deprecated imperative apply of Flutter's Gradle plugins
description: >
How to migrate your Flutter app's Android Gradle build files to the
new, declarative format.
---
## Summary
To build a Flutter app for Android, Flutter's Gradle plugins must be applied.
Historically, this was done imperatively with ... | website/src/release/breaking-changes/flutter-gradle-plugin-apply.md/0 | {
"file_path": "website/src/release/breaking-changes/flutter-gradle-plugin-apply.md",
"repo_id": "website",
"token_count": 2532
} | 1,494 |
---
title: LayoutBuilder optimization
description: >
LayoutBuilder and SliverLayoutBuilder call the builder function less often.
---
## Summary
This guide explains how to migrate Flutter applications after
[the LayoutBuilder optimization][1].
## Context
[LayoutBuilder][2] and [SliverLayoutBuilder][3] call
the [bu... | website/src/release/breaking-changes/layout-builder-optimization.md/0 | {
"file_path": "website/src/release/breaking-changes/layout-builder-optimization.md",
"repo_id": "website",
"token_count": 2837
} | 1,495 |
---
title: Make PageView.controller nullable
description: >-
PageView.controller is now nullable.
---
## Summary
If a controller isn't provided in the constructor,
the `controller` member is `null`. This makes
`PageView` and its `controller` property consistent with other widgets.
## Migration guide
Before:
```d... | website/src/release/breaking-changes/pageview-controller.md/0 | {
"file_path": "website/src/release/breaking-changes/pageview-controller.md",
"repo_id": "website",
"token_count": 220
} | 1,496 |
---
title: Scrollable AlertDialog (No longer deprecated)
description: AlertDialog should scroll automatically when it overflows.
---
## Summary
{{site.alert.note}}
`AlertDialog.scrollable` is no longer deprecated because there is
no backwards-compatible way to make `AlertDialog` scrollable by default.
Instead, ... | website/src/release/breaking-changes/scrollable-alert-dialog.md/0 | {
"file_path": "website/src/release/breaking-changes/scrollable-alert-dialog.md",
"repo_id": "website",
"token_count": 2000
} | 1,497 |
---
title: Trackpad gestures can trigger GestureRecognizer
description: >
Trackpad gestures on most platforms now send `PointerPanZoom` sequences and
can trigger pan, drag, and scale `GestureRecognizer` callbacks.
---
## Summary
Trackpad gestures on most platforms now send `PointerPanZoom` sequences and
can trig... | website/src/release/breaking-changes/trackpad-gestures.md/0 | {
"file_path": "website/src/release/breaking-changes/trackpad-gestures.md",
"repo_id": "website",
"token_count": 5830
} | 1,498 |
---
title: Change log for Flutter 1.9.1
short-title: 1.9.1 change log
description: Change log for Flutter 1.9.1 containing a list of all PRs merged for this release.
---
## PRs closed in this release of flutter/flutter
From Fri Jun 21 22:31:55 2019 -0400 to Sun Aug 18 12:22:00 2019 -0700
[28090](https://github.c... | website/src/release/release-notes/changelogs/changelog-1.9.1.md/0 | {
"file_path": "website/src/release/release-notes/changelogs/changelog-1.9.1.md",
"repo_id": "website",
"token_count": 41844
} | 1,499 |
---
title: Online courses
description: An index of online courses teaching Flutter development.
---
Learn how to build Flutter apps with these video courses.
Before signing up for a course, verify that it includes
up-to-date information, such as null-safe Dart code.
These courses are listed alphabetically.
To include ... | website/src/resources/courses.md/0 | {
"file_path": "website/src/resources/courses.md",
"repo_id": "website",
"token_count": 743
} | 1,500 |
---
layout: toc
title: Testing & debugging
description: Content covering testing and debugging Flutter apps.
---
| website/src/testing/index.md/0 | {
"file_path": "website/src/testing/index.md",
"repo_id": "website",
"token_count": 27
} | 1,501 |
---
title: Using the Memory view
description: Learn how to use the DevTools memory view.
---
The memory view provides insights into details
of the application's memory allocation and
tools to detect and debug specific issues.
{{site.alert.note}}
This page is up to date for DevTools 2.23.0.
{{site.alert.end}}
For i... | website/src/tools/devtools/memory.md/0 | {
"file_path": "website/src/tools/devtools/memory.md",
"repo_id": "website",
"token_count": 3862
} | 1,502 |
# DevTools 2.10.0 release notes
The 2.10.0 release of the Dart and Flutter DevTools
includes the following changes among other general improvements.
To learn more about DevTools, check out the
[DevTools overview](https://docs.flutter.dev/tools/devtools/overview).
## Flutter inspector updates
* Added search support t... | website/src/tools/devtools/release-notes/release-notes-2.10.0-src.md/0 | {
"file_path": "website/src/tools/devtools/release-notes/release-notes-2.10.0-src.md",
"repo_id": "website",
"token_count": 438
} | 1,503 |
# DevTools 2.17.0 release notes
The 2.17.0 release of the Dart and Flutter DevTools
includes the following changes among other general improvements.
To learn more about DevTools, check out the
[DevTools overview](https://docs.flutter.dev/tools/devtools/overview).
## Inspector updates
* Added support for manually set... | website/src/tools/devtools/release-notes/release-notes-2.17.0-src.md/0 | {
"file_path": "website/src/tools/devtools/release-notes/release-notes-2.17.0-src.md",
"repo_id": "website",
"token_count": 512
} | 1,504 |
# DevTools 2.25.0 release notes
The 2.25.0 release of the Dart and Flutter DevTools
includes the following changes among other general improvements.
To learn more about DevTools, check out the
[DevTools overview](https://docs.flutter.dev/tools/devtools/overview).
## General updates
- Improve DevTools tab bar navigat... | website/src/tools/devtools/release-notes/release-notes-2.25.0-src.md/0 | {
"file_path": "website/src/tools/devtools/release-notes/release-notes-2.25.0-src.md",
"repo_id": "website",
"token_count": 316
} | 1,505 |
# DevTools 2.29.0 release notes
The 2.29.0 release of the Dart and Flutter DevTools
includes the following changes among other general improvements.
To learn more about DevTools, check out the
[DevTools overview](https://docs.flutter.dev/tools/devtools/overview).
## General updates
* Fix a bug with service extension... | website/src/tools/devtools/release-notes/release-notes-2.29.0-src.md/0 | {
"file_path": "website/src/tools/devtools/release-notes/release-notes-2.29.0-src.md",
"repo_id": "website",
"token_count": 719
} | 1,506 |
# DevTools 2.9.2 release notes
The 2.9.2 release of the Dart and Flutter DevTools
includes the following changes among other general improvements.
To learn more about DevTools, check out the
[DevTools overview](https://docs.flutter.dev/tools/devtools/overview).
## General updates
* Take our 2022 DevTools survey! Pro... | website/src/tools/devtools/release-notes/release-notes-2.9.2-src.md/0 | {
"file_path": "website/src/tools/devtools/release-notes/release-notes-2.9.2-src.md",
"repo_id": "website",
"token_count": 556
} | 1,507 |
---
title: Implicit animations
description: Where to find more information on using implicit animations in Flutter.
---
With Flutter's [animation library][],
you can add motion and create visual effects
for the widgets in your UI.
One part of the library is an assortment of widgets
that manage animations for you.
Thes... | website/src/ui/animations/implicit-animations.md/0 | {
"file_path": "website/src/ui/animations/implicit-animations.md",
"repo_id": "website",
"token_count": 1045
} | 1,508 |
---
title: Drag outside an app
description: How to drag from an app to another app or the operating system.
---
You might want to implement
drag and drop somewhere in your app.
You have a couple potential approaches
that you can take. One directly uses
Flutter widgets and the other uses a package
([super_drag_and_dro... | website/src/ui/interactivity/gestures/drag-outside.md/0 | {
"file_path": "website/src/ui/interactivity/gestures/drag-outside.md",
"repo_id": "website",
"token_count": 591
} | 1,509 |
---
title: Accessibility widgets
short-title: Accessibility
description: A catalog of Flutter's accessibility widgets.
---
{% include docs/catalogpage.html category="Accessibility" %}
| website/src/ui/widgets/accessibility.md/0 | {
"file_path": "website/src/ui/widgets/accessibility.md",
"repo_id": "website",
"token_count": 48
} | 1,510 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.