text stringlengths 6 13.6M | id stringlengths 13 176 | metadata dict | __index_level_0__ int64 0 1.69k |
|---|---|---|---|
// Copyright 2014 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:file/memory.dart';
import 'package:flutter_tools/src/android/android_sdk.dart';
import 'package:flutter_tools/src/android/gradle.dart';
imp... | flutter/packages/flutter_tools/test/general.shard/android/gradle_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/android/gradle_test.dart",
"repo_id": "flutter",
"token_count": 10623
} | 779 |
// Copyright 2014 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:fake_async/fake_async.dart';
import 'package:flutter_tools/src/base/async_guard.dart';
import '../../src/common.dart... | flutter/packages/flutter_tools/test/general.shard/base/async_guard_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/base/async_guard_test.dart",
"repo_id": "flutter",
"token_count": 3481
} | 780 |
// Copyright 2014 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_tools/src/base/platform.dart';
import '../../src/common.dart';
void _expectPlatformsEqual(Platform actual, Platform expected) {
... | flutter/packages/flutter_tools/test/general.shard/base/platform_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/base/platform_test.dart",
"repo_id": "flutter",
"token_count": 602
} | 781 |
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:args/args.dart';
import 'package:file/memory.dart';
import 'package:file_testing/file_testing.dart';
import 'package:flutter_tools/src/arti... | flutter/packages/flutter_tools/test/general.shard/build_system/targets/asset_transformer_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/build_system/targets/asset_transformer_test.dart",
"repo_id": "flutter",
"token_count": 5460
} | 782 |
// Copyright 2014 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:collection/collection.dart' show IterableExtension;
import 'package:file/file.dart';
import 'package:file/memory.dart';
import 'package:fil... | flutter/packages/flutter_tools/test/general.shard/cache_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/cache_test.dart",
"repo_id": "flutter",
"token_count": 17321
} | 783 |
// Copyright 2014 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:convert';
import 'package:file/file.dart';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/base/io.dart';
import 'packag... | flutter/packages/flutter_tools/test/general.shard/crash_reporting_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/crash_reporting_test.dart",
"repo_id": "flutter",
"token_count": 4901
} | 784 |
// Copyright 2014 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:fake_async/fake_async.dart';
import 'package:flutter_tools/src/base/io.dart';
import 'package:flutter_tools/src/base/... | flutter/packages/flutter_tools/test/general.shard/device_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/device_test.dart",
"repo_id": "flutter",
"token_count": 16526
} | 785 |
// Copyright 2014 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:file/file.dart';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools... | flutter/packages/flutter_tools/test/general.shard/fuchsia/fuchsia_ffx_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/fuchsia/fuchsia_ffx_test.dart",
"repo_id": "flutter",
"token_count": 3188
} | 786 |
// Copyright 2014 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_tools/src/artifacts.dart';
import 'package:flutter_tools/src/base/async_guard.dart';
import 'package:flutter_... | flutter/packages/flutter_tools/test/general.shard/ios/ios_device_logger_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/ios/ios_device_logger_test.dart",
"repo_id": "flutter",
"token_count": 15887
} | 787 |
// Copyright 2014 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:file/memory.dart';
import 'package:flutter_tools/src/artifacts.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'pac... | flutter/packages/flutter_tools/test/general.shard/isolated/hot_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/isolated/hot_test.dart",
"repo_id": "flutter",
"token_count": 2424
} | 788 |
// Copyright 2014 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:file/file.dart';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/... | flutter/packages/flutter_tools/test/general.shard/macos/macos_project_migration_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/macos/macos_project_migration_test.dart",
"repo_id": "flutter",
"token_count": 5821
} | 789 |
// Copyright 2014 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:typed_data';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'packag... | flutter/packages/flutter_tools/test/general.shard/proxied_devices/file_transfer_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/proxied_devices/file_transfer_test.dart",
"repo_id": "flutter",
"token_count": 3604
} | 790 |
// Copyright 2014 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_tools/src/runner/flutter_command.dart';
typedef CommandFunction = Future<FlutterCommandResult> Function();
class DummyFlutterComm... | flutter/packages/flutter_tools/test/general.shard/runner/utils.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/runner/utils.dart",
"repo_id": "flutter",
"token_count": 363
} | 791 |
// Copyright 2014 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:file/memory.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/platform.dart';
import ... | flutter/packages/flutter_tools/test/general.shard/vscode/vscode_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/vscode/vscode_test.dart",
"repo_id": "flutter",
"token_count": 1885
} | 792 |
// Copyright 2014 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:file/file.dart';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools... | flutter/packages/flutter_tools/test/general.shard/windows/application_package_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/windows/application_package_test.dart",
"repo_id": "flutter",
"token_count": 1643
} | 793 |
// Copyright 2014 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_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/io.dart';
import '../src/common.dart';
import 'test_utils.... | flutter/packages/flutter_tools/test/integration.shard/analyze_once_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/integration.shard/analyze_once_test.dart",
"repo_id": "flutter",
"token_count": 5248
} | 794 |
// Copyright 2014 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:convert';
import 'package:file/file.dart';
import 'package:flutter_tools/src/base/io.dart';
import '../src/common.dart'... | flutter/packages/flutter_tools/test/integration.shard/bash_entrypoint_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/integration.shard/bash_entrypoint_test.dart",
"repo_id": "flutter",
"token_count": 1779
} | 795 |
// Copyright 2014 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:archive/archive.dart';
import 'package:file/file.dart';
import 'package:file_testing/file_testing.dart';
import 'package:flutter_tools/src/... | flutter/packages/flutter_tools/test/integration.shard/deferred_components_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/integration.shard/deferred_components_test.dart",
"repo_id": "flutter",
"token_count": 4641
} | 796 |
// Copyright 2014 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:file/file.dart';
import '../src/common.dart';
import 'test_utils.dart';
void main() {
final String flutterTools = fileSystem.path.join(... | flutter/packages/flutter_tools/test/integration.shard/forbidden_imports_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/integration.shard/forbidden_imports_test.dart",
"repo_id": "flutter",
"token_count": 4825
} | 797 |
// Copyright 2014 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 'project.dart';
class SteppingProject extends Project {
@override
final String pubspec = '''
name: test
environment:
sdk: '>=3.2.0-0 <4... | flutter/packages/flutter_tools/test/integration.shard/test_data/stepping_project.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/integration.shard/test_data/stepping_project.dart",
"repo_id": "flutter",
"token_count": 1027
} | 798 |
// Copyright 2014 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:args/command_runner.dart';
import 'package:collection/collection.dart';
import 'package:file/memory.dart';
import 'pa... | flutter/packages/flutter_tools/test/src/common.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/src/common.dart",
"repo_id": "flutter",
"token_count": 4210
} | 799 |
# Web integration tests
These tests are not hermetic, and use the actual Flutter SDK. While
they don't require actual devices, they run `flutter_tester` to test
Dart web debug services (dwds) and Flutter integration.
Use this command to run (from the `flutter_tools` directory):
```shell
../../bin/cache/dart-sdk/bin/... | flutter/packages/flutter_tools/test/web.shard/README.md/0 | {
"file_path": "flutter/packages/flutter_tools/test/web.shard/README.md",
"repo_id": "flutter",
"token_count": 181
} | 800 |
// Copyright 2014 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.
/// Extracts the pathname part of a full [url].
///
/// Example: for the url `http://example.com/foo`, the extracted pathname will
/// be `/foo`.
String ex... | flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart/0 | {
"file_path": "flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart",
"repo_id": "flutter",
"token_count": 388
} | 801 |
// Copyright 2014 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:core';
/// Determines whether `address` is a valid IPv6 or IPv4 address.
///
/// Throws an [ArgumentError] if the address is neither.
void va... | flutter/packages/fuchsia_remote_debug_protocol/lib/src/common/network.dart/0 | {
"file_path": "flutter/packages/fuchsia_remote_debug_protocol/lib/src/common/network.dart",
"repo_id": "flutter",
"token_count": 365
} | 802 |
// Copyright 2014 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.
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. ... | flutter/packages/integration_test/example/integration_test/_example_test_web.dart/0 | {
"file_path": "flutter/packages/integration_test/example/integration_test/_example_test_web.dart",
"repo_id": "flutter",
"token_count": 433
} | 803 |
// Copyright 2014 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_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '... | flutter/packages/integration_test/example/test_driver/failure.dart/0 | {
"file_path": "flutter/packages/integration_test/example/test_driver/failure.dart",
"repo_id": "flutter",
"token_count": 488
} | 804 |
// Copyright 2014 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 Foundation;
@class UIImage;
NS_ASSUME_NONNULL_BEGIN
typedef void (^FLTIntegrationTestResults)(SEL nativeTestSelector, BOOL success, NSString *_N... | flutter/packages/integration_test/ios/Classes/FLTIntegrationTestRunner.h/0 | {
"file_path": "flutter/packages/integration_test/ios/Classes/FLTIntegrationTestRunner.h",
"repo_id": "flutter",
"token_count": 304
} | 805 |
# Flutter Clock
Welcome to Flutter Clock!
See [flutter.dev/clock](https://flutter.dev/clock) for how to get started, submission requirements, contest rules, and FAQs.
See a [live demo](https://maryx.github.io/flutter_clock) with Flutter for Web!
Example [Analog Clock](analog_clock)
<img src='analog_clock/analog.gi... | flutter_clock/README.md/0 | {
"file_path": "flutter_clock/README.md",
"repo_id": "flutter_clock",
"token_count": 139
} | 806 |
Copyright 2012 The Press Start 2P Project Authors (cody@zone38.net), with Reserved Font Name "Press Start 2P".
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------... | flutter_clock/digital_clock/third_party/LICENSE/0 | {
"file_path": "flutter_clock/digital_clock/third_party/LICENSE",
"repo_id": "flutter_clock",
"token_count": 1050
} | 807 |
fastlane documentation
----
# Installation
Make sure you have the latest version of the Xcode command line tools installed:
```sh
xcode-select --install
```
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
# Available Actions
## Android
### a... | gallery/android/fastlane/README.md/0 | {
"file_path": "gallery/android/fastlane/README.md",
"repo_id": "gallery",
"token_count": 282
} | 808 |
// 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 GalleryIcons {
GalleryIcons._();
static const IconData tooltip = IconData(
0xe900,
fontFamily: 'Ga... | gallery/lib/data/icons.dart/0 | {
"file_path": "gallery/lib/data/icons.dart",
"repo_id": "gallery",
"token_count": 1576
} | 809 |
enum AlertDemoType {
alert,
alertTitle,
alertButtons,
alertButtonsOnly,
actionSheet,
}
| gallery/lib/demos/cupertino/demo_types.dart/0 | {
"file_path": "gallery/lib/demos/cupertino/demo_types.dart",
"repo_id": "gallery",
"token_count": 37
} | 810 |
// 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';
import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
import 'package:gallery/demos/material/material_dem... | gallery/lib/demos/material/menu_demo.dart/0 | {
"file_path": "gallery/lib/demos/material/menu_demo.dart",
"repo_id": "gallery",
"token_count": 5039
} | 811 |
import 'dart:math';
import 'package:animations/animations.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
// BEGIN sharedYAxisTransitionDemo
class SharedYAxisTransitionDemo extends StatefulWidget {
const SharedYAxisTransitionDemo({super.key});
@ove... | gallery/lib/demos/reference/motion_demo_shared_y_axis_transition.dart/0 | {
"file_path": "gallery/lib/demos/reference/motion_demo_shared_y_axis_transition.dart",
"repo_id": "gallery",
"token_count": 2948
} | 812 |
{
"loading": "Φόρτωση",
"deselect": "Αποεπιλογή",
"select": "Επιλογή",
"selectable": "Με δυνατότητα επιλογής (παρατεταμένο πάτημα)",
"selected": "Επιλεγμένο",
"demo": "Επίδειξη",
"bottomAppBar": "Γραμμή εφαρμογής στο κάτω μέρος",
"notSelected": "Δεν έχει επιλεχθεί",
"demoCupertinoSearchTextFieldTitle"... | gallery/lib/l10n/intl_el.arb/0 | {
"file_path": "gallery/lib/l10n/intl_el.arb",
"repo_id": "gallery",
"token_count": 42643
} | 813 |
{
"loading": "Laadimine",
"deselect": "Tühista valik",
"select": "Vali",
"selectable": "Valitav (pikk vajutus)",
"selected": "Valitud",
"demo": "Demo",
"bottomAppBar": "Alumine rakenduseriba",
"notSelected": "Pole valitud",
"demoCupertinoSearchTextFieldTitle": "Otsinguteksti väli",
"demoCupertinoPic... | gallery/lib/l10n/intl_et.arb/0 | {
"file_path": "gallery/lib/l10n/intl_et.arb",
"repo_id": "gallery",
"token_count": 20405
} | 814 |
{
"loading": "Memuat",
"deselect": "Batalkan pilihan",
"select": "Pilih",
"selectable": "Dapat dipilih (tekan lama)",
"selected": "Dipilih",
"demo": "Demo",
"bottomAppBar": "Panel aplikasi bawah",
"notSelected": "Tidak dipilih",
"demoCupertinoSearchTextFieldTitle": "Kolom teks penelusuran",
"demoCup... | gallery/lib/l10n/intl_id.arb/0 | {
"file_path": "gallery/lib/l10n/intl_id.arb",
"repo_id": "gallery",
"token_count": 18866
} | 815 |
{
"loading": "लोड करत आहे",
"deselect": "निवड रद्द करा",
"select": "निवडा",
"selectable": "निवडण्यायोग्य (प्रेस करून ठेवा)",
"selected": "निवडला",
"demo": "डेमो",
"bottomAppBar": "तळाशी असलेला ॲप बार",
"notSelected": "निवडलेला नाही",
"demoCupertinoSearchTextFieldTitle": "शोध फील्ड दर्शवा",
"demoCupe... | gallery/lib/l10n/intl_mr.arb/0 | {
"file_path": "gallery/lib/l10n/intl_mr.arb",
"repo_id": "gallery",
"token_count": 44586
} | 816 |
{
"loading": "Nalaganje",
"deselect": "Počisti izbiro",
"select": "Izberi",
"selectable": "Omogoča izbiro (dolg pritisk)",
"selected": "Izbrano",
"demo": "Predstavitvena različica",
"bottomAppBar": "Spodnja vrstica aplikacije",
"notSelected": "Ni izbrano",
"demoCupertinoSearchTextFieldTitle": "Besedil... | gallery/lib/l10n/intl_sl.arb/0 | {
"file_path": "gallery/lib/l10n/intl_sl.arb",
"repo_id": "gallery",
"token_count": 21759
} | 817 |
// 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:math';
import 'package:flutter/material.dart';
import 'package:gallery/pages/settings_icon/metrics.dart';
class SettingsIcon extends StatelessWi... | gallery/lib/pages/settings_icon/icon.dart/0 | {
"file_path": "gallery/lib/pages/settings_icon/icon.dart",
"repo_id": "gallery",
"token_count": 1972
} | 818 |
// 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';
import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
// Duration of time (e.g. 16h 12m)
String formatted... | gallery/lib/studies/crane/model/formatters.dart/0 | {
"file_path": "gallery/lib/studies/crane/model/formatters.dart",
"repo_id": "gallery",
"token_count": 199
} | 819 |
class Email {
Email({
required this.id,
required this.avatar,
this.sender = '',
this.time = '',
this.subject = '',
this.message = '',
this.recipients = '',
this.containsPictures = false,
});
final int id;
final String sender;
final String time;
final String subject;
final ... | gallery/lib/studies/reply/model/email_model.dart/0 | {
"file_path": "gallery/lib/studies/reply/model/email_model.dart",
"repo_id": "gallery",
"token_count": 343
} | 820 |
// 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';
import 'package:flutter_test/flutter_test.dart';
import 'package:gallery/main.dart';
void main() {
testWidgets('Hom... | gallery/test/pages/home_test.dart/0 | {
"file_path": "gallery/test/pages/home_test.dart",
"repo_id": "gallery",
"token_count": 401
} | 821 |
// 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:convert';
import 'dart:io';
import 'package:flutter/services.dart';
import 'package:google_fonts/src/google_fonts_family_with_variant.dart';
im... | gallery/test_goldens/testing/font_loader.dart/0 | {
"file_path": "gallery/test_goldens/testing/font_loader.dart",
"repo_id": "gallery",
"token_count": 1113
} | 822 |
// 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';
import 'package:args/args.dart';
import 'segment_generator.dart';
Future<void> main(List<String> arguments) async {
final parser = ArgP... | gallery/tool/codeviewer_cli/main.dart/0 | {
"file_path": "gallery/tool/codeviewer_cli/main.dart",
"repo_id": "gallery",
"token_count": 204
} | 823 |
{
"version": "2.0.0",
"options": {
"cwd": "${workspaceFolder}/api",
"env": {
"FB_APP_ID": "top-dash-dev",
"GAME_URL": "http://localhost:8080/",
"USE_EMULATOR": "true",
"ENCRYPTION_KEY": "X9YTchZdcnyZTNBSBgzj29p7RMBAIubD",
"ENCRYPTION_IV": "FxC21ctRg9SgiXuZ",
"INITIALS_BLA... | io_flip/.vscode/tasks.json/0 | {
"file_path": "io_flip/.vscode/tasks.json",
"repo_id": "io_flip",
"token_count": 1313
} | 824 |
import 'package:json_annotation/json_annotation.dart';
part 'template_metadata.g.dart';
/// {@template metadata}
/// Metadata for templates.
/// {@endtemplate}
@JsonSerializable()
class TemplateMetadata {
/// {@macro metadata}
const TemplateMetadata({
required this.title,
required this.description,
re... | io_flip/api/lib/templates/template_metadata.dart/0 | {
"file_path": "io_flip/api/lib/templates/template_metadata.dart",
"repo_id": "io_flip",
"token_count": 298
} | 825 |
import 'dart:typed_data';
import 'package:card_renderer/card_renderer.dart';
import 'package:game_domain/game_domain.dart';
import 'package:http/http.dart';
import 'package:image/image.dart';
// Component Sizes
const _cardSize = _Size(width: 327, height: 435);
const _characterSize = _Size(width: 279, height: 279);
co... | io_flip/api/packages/card_renderer/lib/src/card_renderer.dart/0 | {
"file_path": "io_flip/api/packages/card_renderer/lib/src/card_renderer.dart",
"repo_id": "io_flip",
"token_count": 4345
} | 826 |
/// Key String representing empty attribute
const emptyKey = 'EMPTY';
/// Key String representing a reserved room for a CPU match
const reservedKey = 'RESERVED_EMPTY';
| io_flip/api/packages/game_domain/lib/src/keys.dart/0 | {
"file_path": "io_flip/api/packages/game_domain/lib/src/keys.dart",
"repo_id": "io_flip",
"token_count": 43
} | 827 |
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
part 'prompt_term.g.dart';
/// The type of the prompt term.
enum PromptTermType {
/// Character.
character,
/// Character Class.
characterClass,
/// Primary power type.
power,
/// A location.
location;... | io_flip/api/packages/game_domain/lib/src/models/prompt_term.dart/0 | {
"file_path": "io_flip/api/packages/game_domain/lib/src/models/prompt_term.dart",
"repo_id": "io_flip",
"token_count": 429
} | 828 |
// ignore_for_file: prefer_const_constructors
import 'package:game_domain/game_domain.dart';
import 'package:test/test.dart';
void main() {
group('Prompt', () {
test('can be instantiated', () {
expect(
Prompt(),
isNotNull,
);
});
test('Prompt correctly copies', () {
co... | io_flip/api/packages/game_domain/test/src/models/prompt_test.dart/0 | {
"file_path": "io_flip/api/packages/game_domain/test/src/models/prompt_test.dart",
"repo_id": "io_flip",
"token_count": 1020
} | 829 |
import 'dart:typed_data';
import 'package:clock/clock.dart';
import 'package:jwt_middleware/src/jwt.dart';
import 'package:mocktail/mocktail.dart';
import 'package:test/test.dart';
import 'package:x509/x509.dart';
class _MockVerifier extends Mock implements Verifier<PublicKey> {}
void main() {
const validToken = '... | io_flip/api/packages/jwt_middleware/test/src/jwt_test.dart/0 | {
"file_path": "io_flip/api/packages/jwt_middleware/test/src/jwt_test.dart",
"repo_id": "io_flip",
"token_count": 4644
} | 830 |
import 'dart:async';
import 'dart:io';
import 'package:cards_repository/cards_repository.dart';
import 'package:dart_frog/dart_frog.dart';
import 'package:jwt_middleware/jwt_middleware.dart';
import 'package:logging/logging.dart';
FutureOr<Response> onRequest(RequestContext context) {
if (context.request.method == ... | io_flip/api/routes/game/decks/index.dart/0 | {
"file_path": "io_flip/api/routes/game/decks/index.dart",
"repo_id": "io_flip",
"token_count": 437
} | 831 |
import 'dart:io';
import 'package:cards_repository/cards_repository.dart';
import 'package:dart_frog/dart_frog.dart';
import 'package:game_domain/game_domain.dart';
import 'package:mocktail/mocktail.dart';
import 'package:prompt_repository/prompt_repository.dart';
import 'package:test/test.dart';
import '../../../../... | io_flip/api/test/routes/game/cards/index_test.dart/0 | {
"file_path": "io_flip/api/test/routes/game/cards/index_test.dart",
"repo_id": "io_flip",
"token_count": 1760
} | 832 |
import 'dart:io';
import 'dart:typed_data';
import 'package:api/game_url.dart';
import 'package:card_renderer/card_renderer.dart';
import 'package:cards_repository/cards_repository.dart';
import 'package:dart_frog/dart_frog.dart';
import 'package:firebase_cloud_storage/firebase_cloud_storage.dart';
import 'package:gam... | io_flip/api/test/routes/public/decks/[deckId]_test.dart/0 | {
"file_path": "io_flip/api/test/routes/public/decks/[deckId]_test.dart",
"repo_id": "io_flip",
"token_count": 1755
} | 833 |
import 'package:game_domain/game_domain.dart';
/// A mapping of the CSV columns to the [PromptTermType].
const promptColumnMap = {
0: PromptTermType.character,
1: PromptTermType.characterClass,
2: PromptTermType.power,
4: PromptTermType.location,
};
/// Given the [lines] of a CSV file, returns a map of [Promp... | io_flip/api/tools/data_loader/lib/src/prompt_mapper.dart/0 | {
"file_path": "io_flip/api/tools/data_loader/lib/src/prompt_mapper.dart",
"repo_id": "io_flip",
"token_count": 324
} | 834 |
// ignore_for_file: avoid_web_libraries_in_flutter, avoid_print
import 'dart:html';
import 'dart:js' as js;
import 'package:flop/app/app.dart';
import 'package:flop/bootstrap.dart';
import 'package:flutter/foundation.dart';
void main() {
bootstrap(
() => App(
setAppCheckDebugToken: (appCheckDebugToken) {
... | io_flip/flop/lib/main.dart/0 | {
"file_path": "io_flip/flop/lib/main.dart",
"repo_id": "io_flip",
"token_count": 229
} | 835 |
import * as admin from 'firebase-admin';
import * as functions from 'firebase-functions';
const firestore = admin.firestore();
export const updateLeaderboard = functions.firestore.document('score_cards/{card}').onUpdate(
async (change): Promise<void> => {
const card = change.after.data();
const longestStrea... | io_flip/functions/src/updateLeaderboard.ts/0 | {
"file_path": "io_flip/functions/src/updateLeaderboard.ts",
"repo_id": "io_flip",
"token_count": 399
} | 836 |
part of 'connection_bloc.dart';
abstract class ConnectionEvent extends Equatable {
const ConnectionEvent();
@override
List<Object> get props => [];
}
class ConnectionRequested extends ConnectionEvent {
const ConnectionRequested();
}
class ConnectionClosed extends ConnectionEvent {
const ConnectionClosed()... | io_flip/lib/connection/bloc/connection_event.dart/0 | {
"file_path": "io_flip/lib/connection/bloc/connection_event.dart",
"repo_id": "io_flip",
"token_count": 136
} | 837 |
part of 'how_to_play_bloc.dart';
class HowToPlayState extends Equatable {
const HowToPlayState({
this.position = 0,
this.wheelSuits = const [
Suit.fire,
Suit.air,
Suit.metal,
Suit.earth,
Suit.water,
],
});
final int position;
final List<Suit> wheelSuits;
static con... | io_flip/lib/how_to_play/bloc/how_to_play_state.dart/0 | {
"file_path": "io_flip/lib/how_to_play/bloc/how_to_play_state.dart",
"repo_id": "io_flip",
"token_count": 374
} | 838 |
import 'package:api_client/api_client.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:game_domain/game_domain.dart';
part 'leaderboard_event.dart';
part 'leaderboard_state.dart';
class LeaderboardBloc extends Bloc<LeaderboardEvent, LeaderboardState> {... | io_flip/lib/leaderboard/bloc/leaderboard_bloc.dart/0 | {
"file_path": "io_flip/lib/leaderboard/bloc/leaderboard_bloc.dart",
"repo_id": "io_flip",
"token_count": 411
} | 839 |
// ignore_for_file: avoid_web_libraries_in_flutter
import 'dart:async';
import 'dart:js' as js;
import 'package:api_client/api_client.dart';
import 'package:authentication_repository/authentication_repository.dart';
import 'package:config_repository/config_repository.dart';
import 'package:connection_repository/conne... | io_flip/lib/main_local.dart/0 | {
"file_path": "io_flip/lib/main_local.dart",
"repo_id": "io_flip",
"token_count": 1062
} | 840 |
import 'package:flutter/material.dart';
import 'package:game_domain/game_domain.dart';
import 'package:io_flip/audio/audio.dart';
import 'package:io_flip/l10n/l10n.dart';
import 'package:io_flip/prompt/prompt.dart';
import 'package:io_flip_ui/io_flip_ui.dart';
class PromptFormIntroView extends StatelessWidget {
cons... | io_flip/lib/prompt/view/prompt_form_intro_view.dart/0 | {
"file_path": "io_flip/lib/prompt/view/prompt_form_intro_view.dart",
"repo_id": "io_flip",
"token_count": 1454
} | 841 |
// 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:io_flip/settings/persistence/persistence.dart';
/// An in-memory implementation of [Sett... | io_flip/lib/settings/persistence/memory_settings_persistence.dart/0 | {
"file_path": "io_flip/lib/settings/persistence/memory_settings_persistence.dart",
"repo_id": "io_flip",
"token_count": 281
} | 842 |
export 'card_fan.dart';
export 'share_dialog.dart';
| io_flip/lib/share/widgets/widgets.dart/0 | {
"file_path": "io_flip/lib/share/widgets/widgets.dart",
"repo_id": "io_flip",
"token_count": 21
} | 843 |
// ignore_for_file: avoid_print, unused_local_variable
import 'package:api_client/api_client.dart';
void main() async {
const url = 'ws://top-dash-dev-api-synvj3dcmq-uc.a.run.app';
const localUrl = 'ws://localhost:8080';
final client = ApiClient(
baseUrl: localUrl,
idTokenStream: const Stream.empty(),
... | io_flip/packages/api_client/example/connect.dart/0 | {
"file_path": "io_flip/packages/api_client/example/connect.dart",
"repo_id": "io_flip",
"token_count": 177
} | 844 |
import 'dart:io';
import 'dart:typed_data';
import 'package:api_client/api_client.dart';
import 'package:http/http.dart' as http;
import 'package:mocktail/mocktail.dart';
import 'package:test/test.dart';
class _MockApiClient extends Mock implements ApiClient {}
class _MockResponse extends Mock implements http.Respon... | io_flip/packages/api_client/test/src/resources/share_resource_test.dart/0 | {
"file_path": "io_flip/packages/api_client/test/src/resources/share_resource_test.dart",
"repo_id": "io_flip",
"token_count": 1473
} | 845 |
/// Repository for match making.
library match_maker_repository;
export 'src/config_repository.dart';
| io_flip/packages/config_repository/lib/config_repository.dart/0 | {
"file_path": "io_flip/packages/config_repository/lib/config_repository.dart",
"repo_id": "io_flip",
"token_count": 33
} | 846 |
import 'package:flame/cache.dart';
import 'package:flutter/material.dart';
import 'package:gallery/story_scaffold.dart';
import 'package:io_flip_ui/io_flip_ui.dart';
import 'package:provider/provider.dart';
class CardLandingPuffStory extends StatefulWidget {
const CardLandingPuffStory({super.key});
@override
St... | io_flip/packages/io_flip_ui/gallery/lib/widgets/card_landing_puff_story.dart/0 | {
"file_path": "io_flip/packages/io_flip_ui/gallery/lib/widgets/card_landing_puff_story.dart",
"repo_id": "io_flip",
"token_count": 1277
} | 847 |
import 'package:io_flip_ui/gen/assets.gen.dart';
import 'package:io_flip_ui/io_flip_ui.dart';
/// {@template fire_damage}
// ignore: comment_references
/// A widget that renders several [SpriteAnimation]s for the damages
/// of a card on another.
/// {@endtemplate}
class FireDamage extends ElementalDamage {
/// {@ma... | io_flip/packages/io_flip_ui/lib/src/animations/damages/fire_damage.dart/0 | {
"file_path": "io_flip/packages/io_flip_ui/lib/src/animations/damages/fire_damage.dart",
"repo_id": "io_flip",
"token_count": 467
} | 848 |
import 'package:device_info_plus/device_info_plus.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter/foundation.dart';
/// Definition of a platform aware asset function.
typedef PlatformAwareAsset<T> = T Function({
required T desktop,
required T mobile,
bool isWeb,
TargetPlatform? overri... | io_flip/packages/io_flip_ui/lib/src/utils/platform_aware_asset.dart/0 | {
"file_path": "io_flip/packages/io_flip_ui/lib/src/utils/platform_aware_asset.dart",
"repo_id": "io_flip",
"token_count": 984
} | 849 |
import 'package:flutter/material.dart';
import 'package:flutter_shaders/flutter_shaders.dart';
/// {@template foil_shader}
/// A widget that applies a "foil" shader to its child. The foil shader
/// is a shader that applies an effect similar to a shiny metallic card.
/// {@endtemplate}
class FoilShader extends Statele... | io_flip/packages/io_flip_ui/lib/src/widgets/foil_shader.dart/0 | {
"file_path": "io_flip/packages/io_flip_ui/lib/src/widgets/foil_shader.dart",
"repo_id": "io_flip",
"token_count": 739
} | 850 |
import 'dart:async';
import 'package:flame/cache.dart';
import 'package:flame/widgets.dart';
import 'package:flutter/material.dart' hide Element;
import 'package:flutter_test/flutter_test.dart';
import 'package:io_flip_ui/gen/assets.gen.dart';
import 'package:io_flip_ui/src/animations/animations.dart';
import 'package... | io_flip/packages/io_flip_ui/test/src/animations/damages/elemental_damage_animation_test.dart/0 | {
"file_path": "io_flip/packages/io_flip_ui/test/src/animations/damages/elemental_damage_animation_test.dart",
"repo_id": "io_flip",
"token_count": 16742
} | 851 |
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:io_flip_ui/io_flip_ui.dart';
void main() {
group('FadingDotLoader', () {
testWidgets('renders the animation', (tester) async {
await tester.pumpWidget(
const MaterialApp(
home: Scaffol... | io_flip/packages/io_flip_ui/test/src/widgets/fading_dot_loader_test.dart/0 | {
"file_path": "io_flip/packages/io_flip_ui/test/src/widgets/fading_dot_loader_test.dart",
"repo_id": "io_flip",
"token_count": 265
} | 852 |
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:io_flip_ui/src/widgets/io_flip_dialog.dart';
void main() {
group('IoFlipDialog', () {
const child = Text('test');
testWidgets('renders child widget', (tester) async {
await tester.pumpWidget(
... | io_flip/packages/io_flip_ui/test/src/widgets/top_dash_dialog_test.dart/0 | {
"file_path": "io_flip/packages/io_flip_ui/test/src/widgets/top_dash_dialog_test.dart",
"repo_id": "io_flip",
"token_count": 904
} | 853 |
echo ' ################################# '
echo ' ## Starting flop in local mode ## '
echo ' ################################# '
ENCRYPTION_KEY=$1
ENCRYPTION_IV=$2
RECAPTCHA_KEY=$3
APPCHECK_DEBUG_TOKEN=$4
cd flop && flutter run \
-d chrome \
--dart-define ENCRYPTION_KEY=$ENCRYPTION_KEY \
--dart-define ENCRYPTI... | io_flip/scripts/start_flop.sh/0 | {
"file_path": "io_flip/scripts/start_flop.sh",
"repo_id": "io_flip",
"token_count": 170
} | 854 |
import 'package:flutter_test/flutter_test.dart';
import 'package:go_router/go_router.dart';
import 'package:io_flip/draft/draft.dart';
import '../../helpers/helpers.dart';
void main() {
late final GoRouter router;
setUp(() {
router = GoRouter(
routes: [
GoRoute(
path: '/',
b... | io_flip/test/draft/views/draft_page_test.dart/0 | {
"file_path": "io_flip/test/draft/views/draft_page_test.dart",
"repo_id": "io_flip",
"token_count": 310
} | 855 |
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
bool tapTextSpan(RichText richText, String text) {
final isTapped = !richText.text.visitChildren(
(visitor) => _findTextAndTap(visitor, text),
);
return isTapped;
}
bool _findTextAndTap(InlineSpan visitor, String text) {
if (v... | io_flip/test/helpers/tap_text_span.dart/0 | {
"file_path": "io_flip/test/helpers/tap_text_span.dart",
"repo_id": "io_flip",
"token_count": 174
} | 856 |
import 'package:api_client/api_client.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:io_flip/l10n/l10n.dart';
import 'package:io_flip/leaderboard/initials_form/initials_form.dart';
import 'package:io_flip/leaderboard/leaderboard.dart';
import 'package:mocktail/mocktail.dart';
import '../../hel... | io_flip/test/leaderboard/views/leaderboard_entry_view_test.dart/0 | {
"file_path": "io_flip/test/leaderboard/views/leaderboard_entry_view_test.dart",
"repo_id": "io_flip",
"token_count": 510
} | 857 |
import 'package:flame/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:io_flip/prompt/prompt.dart';
import 'package:io_flip_ui/io_flip_ui.dart';
import '../../helpers/helpers.dart';
void main() {
group('CardMaster', () {
testWidgets('renders correctly', (tester) async {
awai... | io_flip/test/prompt/widgets/card_master_test.dart/0 | {
"file_path": "io_flip/test/prompt/widgets/card_master_test.dart",
"repo_id": "io_flip",
"token_count": 608
} | 858 |
import 'package:bloc_test/bloc_test.dart';
import 'package:flutter/material.dart' hide Card;
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:game_domain/game_domain.dart';
import 'package:io_flip/share/bloc/download_bloc.dart';
import 'package:io_flip/sh... | io_flip/test/share/widgets/share_dialog_test.dart/0 | {
"file_path": "io_flip/test/share/widgets/share_dialog_test.dart",
"repo_id": "io_flip",
"token_count": 2748
} | 859 |
---
sidebar_position: 11
description: Learn how the toolkit caches your news application's state.
---
# Cache your application state
[Hydrated Bloc](https://pub.dev/packages/hydrated_bloc) is an extension to the BLoC pattern. It helps automatically persist and restore bloc states, ensuring that the app's state is ret... | news_toolkit/docs/docs/flutter_development/cache_application_state.md/0 | {
"file_path": "news_toolkit/docs/docs/flutter_development/cache_application_state.md",
"repo_id": "news_toolkit",
"token_count": 540
} | 860 |
---
sidebar_position: 5
description: Learn how to configure notifications for your application.
---
# Notifications setup
The Flutter News Toolkit comes with [Firebase Cloud Messaging (FCM)](https://firebase.google.com/docs/cloud-messaging) set up, but you can also configure your application with [OneSignal](https://... | news_toolkit/docs/docs/project_configuration/notifications.md/0 | {
"file_path": "news_toolkit/docs/docs/project_configuration/notifications.md",
"repo_id": "news_toolkit",
"token_count": 549
} | 861 |
{
"version": "0.2",
"enabled": true,
"language": "en",
"words": [
"abcdefghijklmnopqrstuvwxyz",
"ana",
"apiaryio",
"appicon",
"archs",
"assetcatalog",
"autocorrect",
"autoreleasing",
"baseflow",
"bitcode",
"bselwe",
"codemagic",
"codeowners",
"commandline"... | news_toolkit/flutter_news_example/.vscode/cspell.json/0 | {
"file_path": "news_toolkit/flutter_news_example/.vscode/cspell.json",
"repo_id": "news_toolkit",
"token_count": 1262
} | 862 |
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
| news_toolkit/flutter_news_example/android/gradle.properties/0 | {
"file_path": "news_toolkit/flutter_news_example/android/gradle.properties",
"repo_id": "news_toolkit",
"token_count": 31
} | 863 |
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:news_blocks/news_blocks.dart';
part 'related_articles.g.dart';
/// {@template related_articles}
/// An object which contains paginated related article contents.
/// {@endtemplate}
@JsonSerializable()
clas... | news_toolkit/flutter_news_example/api/lib/src/data/models/related_articles.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/lib/src/data/models/related_articles.dart",
"repo_id": "news_toolkit",
"token_count": 349
} | 864 |
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'current_user_response.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
CurrentUserResponse _$CurrentUserResponseFromJson(Ma... | news_toolkit/flutter_news_example/api/lib/src/models/current_user_response/current_user_response.g.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/lib/src/models/current_user_response/current_user_response.g.dart",
"repo_id": "news_toolkit",
"token_count": 175
} | 865 |
export 'src/article_introduction_block.dart' show ArticleIntroductionBlock;
export 'src/banner_ad_block.dart' show BannerAdBlock, BannerAdSize;
export 'src/block_action.dart'
show
BlockAction,
BlockActionType,
NavigateToArticleAction,
NavigateToFeedCategoryAction,
NavigateToS... | news_toolkit/flutter_news_example/api/packages/news_blocks/lib/news_blocks.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/packages/news_blocks/lib/news_blocks.dart",
"repo_id": "news_toolkit",
"token_count": 712
} | 866 |
import 'package:json_annotation/json_annotation.dart';
import 'package:news_blocks/news_blocks.dart';
/// {@template news_blocks_converter}
/// A [JsonConverter] that supports (de)serializing a `List<NewsBlock>`.
/// {@endtemplate}
class NewsBlocksConverter
implements JsonConverter<List<NewsBlock>, List<dynamic>> ... | news_toolkit/flutter_news_example/api/packages/news_blocks/lib/src/news_blocks_converter.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/packages/news_blocks/lib/src/news_blocks_converter.dart",
"repo_id": "news_toolkit",
"token_count": 266
} | 867 |
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: cast_nullable_to_non_nullable, implicit_dynamic_parameter, lines_longer_than_80_chars, prefer_const_constructors, require_trailing_commas
part of 'section_header_block.dart';
// **************************************************************************
//... | news_toolkit/flutter_news_example/api/packages/news_blocks/lib/src/section_header_block.g.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/packages/news_blocks/lib/src/section_header_block.g.dart",
"repo_id": "news_toolkit",
"token_count": 479
} | 868 |
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: cast_nullable_to_non_nullable, implicit_dynamic_parameter, lines_longer_than_80_chars, prefer_const_constructors, require_trailing_commas
part of 'text_paragraph_block.dart';
// **************************************************************************
//... | news_toolkit/flutter_news_example/api/packages/news_blocks/lib/src/text_paragraph_block.g.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/packages/news_blocks/lib/src/text_paragraph_block.g.dart",
"repo_id": "news_toolkit",
"token_count": 362
} | 869 |
// ignore_for_file: prefer_const_constructors
import 'package:news_blocks/news_blocks.dart';
import 'package:test/test.dart';
void main() {
group('HtmlBlock', () {
test('can be (de)serialized', () {
final block = HtmlBlock(content: '<p>hello world</p>');
expect(HtmlBlock.fromJson(block.toJson()), e... | news_toolkit/flutter_news_example/api/packages/news_blocks/test/src/html_block_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/packages/news_blocks/test/src/html_block_test.dart",
"repo_id": "news_toolkit",
"token_count": 137
} | 870 |
// ignore_for_file: prefer_const_constructors
import 'package:news_blocks/src/text_caption_block.dart';
import 'package:test/test.dart';
void main() {
group('TextCaptionBlock', () {
test('can be (de)serialized', () {
final block = TextCaptionBlock(
color: TextCaptionColor.normal,
text: 'Te... | news_toolkit/flutter_news_example/api/packages/news_blocks/test/src/test_caption_block_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/packages/news_blocks/test/src/test_caption_block_test.dart",
"repo_id": "news_toolkit",
"token_count": 171
} | 871 |
import 'dart:io';
import 'package:dart_frog/dart_frog.dart';
import 'package:flutter_news_example_api/api.dart';
import 'package:news_blocks/news_blocks.dart';
Future<Response> onRequest(RequestContext context) async {
if (context.request.method != HttpMethod.get) {
return Response(statusCode: HttpStatus.method... | news_toolkit/flutter_news_example/api/routes/api/v1/search/popular.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/routes/api/v1/search/popular.dart",
"repo_id": "news_toolkit",
"token_count": 232
} | 872 |
import 'dart:convert';
import 'dart:io';
import 'package:flutter_news_example_api/client.dart';
import 'package:http/http.dart' as http;
import 'package:mocktail/mocktail.dart';
import 'package:test/test.dart';
class MockHttpClient extends Mock implements http.Client {}
void main() {
Matcher isAUriHaving({String? ... | news_toolkit/flutter_news_example/api/test/src/client/flutter_news_example_api_client_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/test/src/client/flutter_news_example_api_client_test.dart",
"repo_id": "news_toolkit",
"token_count": 17498
} | 873 |
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retin... | news_toolkit/flutter_news_example/ios/Runner/Base.lproj/LaunchScreen.storyboard/0 | {
"file_path": "news_toolkit/flutter_news_example/ios/Runner/Base.lproj/LaunchScreen.storyboard",
"repo_id": "news_toolkit",
"token_count": 1317
} | 874 |
part of 'analytics_bloc.dart';
abstract class AnalyticsEvent extends Equatable {
const AnalyticsEvent();
}
class TrackAnalyticsEvent extends AnalyticsEvent {
const TrackAnalyticsEvent(this.event);
final analytics.AnalyticsEvent event;
@override
List<Object> get props => [event];
}
| news_toolkit/flutter_news_example/lib/analytics/bloc/analytics_event.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/lib/analytics/bloc/analytics_event.dart",
"repo_id": "news_toolkit",
"token_count": 84
} | 875 |
export 'article_page.dart';
| news_toolkit/flutter_news_example/lib/article/view/view.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/lib/article/view/view.dart",
"repo_id": "news_toolkit",
"token_count": 10
} | 876 |
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'feed_bloc.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
FeedState _$FeedStateFromJson(Map<String, dynamic> json) => Feed... | news_toolkit/flutter_news_example/lib/feed/bloc/feed_bloc.g.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/lib/feed/bloc/feed_bloc.g.dart",
"repo_id": "news_toolkit",
"token_count": 685
} | 877 |
{
"appName": "Flutter News Example",
"@appName": {
"description": "The name of this application",
"type": "String",
"placeholders": {}
},
"authenticationFailure": "Authentication failure",
"@authenticationFailure": {
"description": "Message shown when there is an error at login",
"type": "... | news_toolkit/flutter_news_example/lib/l10n/arb/app_en.arb/0 | {
"file_path": "news_toolkit/flutter_news_example/lib/l10n/arb/app_en.arb",
"repo_id": "news_toolkit",
"token_count": 6800
} | 878 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.