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';
import 'package:flutter_tools/src/android/gradle_utils.dart' as gradle_utils;
import 'package:flutter_tools/src/artifacts.dart';
import 'package:flutter_tools/src/base/common.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/base/platform.dart';
import 'package:flutter_tools/src/build_info.dart';
import 'package:flutter_tools/src/cache.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/project.dart';
import '../../src/common.dart';
import '../../src/context.dart';
const String kModulePubspec = '''
name: test
flutter:
module:
androidPackage: com.example
androidX: true
''';
void main() {
Cache.flutterRoot = getFlutterRoot();
group('build artifacts', () {
late FileSystem fileSystem;
setUp(() {
fileSystem = MemoryFileSystem.test();
});
testWithoutContext('getApkDirectory in app projects', () {
final FlutterProject project = FlutterProject.fromDirectoryTest(fileSystem.currentDirectory);
expect(
getApkDirectory(project).path, '/build/app/outputs/flutter-apk',
);
});
testWithoutContext('getApkDirectory in module projects', () {
fileSystem.currentDirectory
.childFile('pubspec.yaml')
.writeAsStringSync(kModulePubspec);
final FlutterProject project = FlutterProject.fromDirectoryTest(fileSystem.currentDirectory);
expect(project.isModule, true);
expect(
getApkDirectory(project).path, '/build/host/outputs/apk',
);
});
testWithoutContext('getBundleDirectory in app projects', () {
final FlutterProject project = FlutterProject.fromDirectoryTest(fileSystem.currentDirectory);
expect(
getBundleDirectory(project).path, '/build/app/outputs/bundle',
);
});
testWithoutContext('getBundleDirectory in module projects', () {
fileSystem.currentDirectory
.childFile('pubspec.yaml')
.writeAsStringSync(kModulePubspec);
final FlutterProject project = FlutterProject.fromDirectoryTest(fileSystem.currentDirectory);
expect(project.isModule, true);
expect(
getBundleDirectory(project).path, '/build/host/outputs/bundle',
);
});
testWithoutContext('getRepoDirectory', () {
expect(
getRepoDirectory(fileSystem.directory('foo')).path,
equals(fileSystem.path.join('foo','outputs', 'repo')),
);
});
});
group('gradle tasks', () {
testWithoutContext('assemble release', () {
expect(
getAssembleTaskFor(const BuildInfo(BuildMode.release, null, treeShakeIcons: false)),
equals('assembleRelease'),
);
expect(
getAssembleTaskFor(const BuildInfo(BuildMode.release, 'flavorFoo', treeShakeIcons: false)),
equals('assembleFlavorFooRelease'),
);
});
testWithoutContext('assemble debug', () {
expect(
getAssembleTaskFor(BuildInfo.debug),
equals('assembleDebug'),
);
expect(
getAssembleTaskFor(const BuildInfo(BuildMode.debug, 'flavorFoo', treeShakeIcons: false)),
equals('assembleFlavorFooDebug'),
);
});
testWithoutContext('assemble profile', () {
expect(
getAssembleTaskFor(const BuildInfo(BuildMode.profile, null, treeShakeIcons: false)),
equals('assembleProfile'),
);
expect(
getAssembleTaskFor(const BuildInfo(BuildMode.profile, 'flavorFoo', treeShakeIcons: false)),
equals('assembleFlavorFooProfile'),
);
});
});
group('listApkPaths', () {
testWithoutContext('Finds APK without flavor in debug', () {
final Iterable<String> apks = listApkPaths(
const AndroidBuildInfo(BuildInfo(BuildMode.debug, '', treeShakeIcons: false)),
);
expect(apks, <String>['app-debug.apk']);
});
testWithoutContext('Finds APK with flavor in debug', () {
final Iterable<String> apks = listApkPaths(
const AndroidBuildInfo(BuildInfo(BuildMode.debug, 'flavor1', treeShakeIcons: false)),
);
expect(apks, <String>['app-flavor1-debug.apk']);
});
testWithoutContext('Finds APK without flavor in release', () {
final Iterable<String> apks = listApkPaths(
const AndroidBuildInfo(BuildInfo(BuildMode.release, '', treeShakeIcons: false)),
);
expect(apks, <String>['app-release.apk']);
});
testWithoutContext('Finds APK with flavor in release mode', () {
final Iterable<String> apks = listApkPaths(
const AndroidBuildInfo(BuildInfo(BuildMode.release, 'flavor1', treeShakeIcons: false)),
);
expect(apks, <String>['app-flavor1-release.apk']);
});
testWithoutContext('Finds APK with flavor in release mode', () {
final Iterable<String> apks = listApkPaths(
const AndroidBuildInfo(BuildInfo(BuildMode.release, 'flavorA', treeShakeIcons: false)),
);
expect(apks, <String>['app-flavora-release.apk']);
});
testWithoutContext('Finds APK with flavor in release mode - AGP v3', () {
final Iterable<String> apks = listApkPaths(
const AndroidBuildInfo(BuildInfo(BuildMode.release, 'flavor1', treeShakeIcons: false)),
);
expect(apks, <String>['app-flavor1-release.apk']);
});
testWithoutContext('Finds APK with split-per-abi', () {
final Iterable<String> apks = listApkPaths(
const AndroidBuildInfo(BuildInfo(BuildMode.release, 'flavor1', treeShakeIcons: false), splitPerAbi: true),
);
expect(apks, unorderedEquals(<String>[
'app-armeabi-v7a-flavor1-release.apk',
'app-arm64-v8a-flavor1-release.apk',
'app-x86_64-flavor1-release.apk',
]));
});
testWithoutContext('Finds APK with split-per-abi when flavor contains uppercase letters', () {
final Iterable<String> apks = listApkPaths(
const AndroidBuildInfo(BuildInfo(BuildMode.release, 'flavorA', treeShakeIcons: false), splitPerAbi: true),
);
expect(apks, unorderedEquals(<String>[
'app-armeabi-v7a-flavora-release.apk',
'app-arm64-v8a-flavora-release.apk',
'app-x86_64-flavora-release.apk',
]));
});
});
group('gradle build', () {
testUsingContext('do not crash if there is no Android SDK', () async {
expect(() {
gradle_utils.updateLocalProperties(project: FlutterProject.fromDirectoryTest(globals.fs.currentDirectory));
}, throwsToolExit(
message: '${globals.logger.terminal.warningMark} No Android SDK found. Try setting the ANDROID_HOME environment variable.',
));
}, overrides: <Type, Generator>{
AndroidSdk: () => null,
});
});
group('Gradle local.properties', () {
late Artifacts localEngineArtifacts;
late FileSystem fs;
setUp(() {
fs = MemoryFileSystem.test();
localEngineArtifacts = Artifacts.testLocalEngine(localEngine: 'out/android_arm', localEngineHost: 'out/host_release');
});
void testUsingAndroidContext(String description, dynamic Function() testMethod) {
testUsingContext(description, testMethod, overrides: <Type, Generator>{
Artifacts: () => localEngineArtifacts,
Platform: () => FakePlatform(),
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
}
String? propertyFor(String key, File file) {
final Iterable<String> result = file.readAsLinesSync()
.where((String line) => line.startsWith('$key='))
.map((String line) => line.split('=')[1]);
return result.isEmpty ? null : result.first;
}
Future<void> checkBuildVersion({
required String manifest,
BuildInfo? buildInfo,
String? expectedBuildName,
String? expectedBuildNumber,
}) async {
final File manifestFile = globals.fs.file('path/to/project/pubspec.yaml');
manifestFile.createSync(recursive: true);
manifestFile.writeAsStringSync(manifest);
gradle_utils.updateLocalProperties(
project: FlutterProject.fromDirectoryTest(globals.fs.directory('path/to/project')),
buildInfo: buildInfo,
requireAndroidSdk: false,
);
final File localPropertiesFile = globals.fs.file('path/to/project/android/local.properties');
expect(propertyFor('flutter.versionName', localPropertiesFile), expectedBuildName);
expect(propertyFor('flutter.versionCode', localPropertiesFile), expectedBuildNumber);
}
testUsingAndroidContext('extract build name and number from pubspec.yaml', () async {
const String manifest = '''
name: test
version: 1.0.0+1
dependencies:
flutter:
sdk: flutter
flutter:
''';
const BuildInfo buildInfo = BuildInfo(BuildMode.release, null, treeShakeIcons: false);
await checkBuildVersion(
manifest: manifest,
buildInfo: buildInfo,
expectedBuildName: '1.0.0',
expectedBuildNumber: '1',
);
});
testUsingAndroidContext('extract build name from pubspec.yaml', () async {
const String manifest = '''
name: test
version: 1.0.0
dependencies:
flutter:
sdk: flutter
flutter:
''';
const BuildInfo buildInfo = BuildInfo(BuildMode.release, null, treeShakeIcons: false);
await checkBuildVersion(
manifest: manifest,
buildInfo: buildInfo,
expectedBuildName: '1.0.0',
);
});
testUsingAndroidContext('allow build info to override build name', () async {
const String manifest = '''
name: test
version: 1.0.0+1
dependencies:
flutter:
sdk: flutter
flutter:
''';
const BuildInfo buildInfo = BuildInfo(BuildMode.release, null, buildName: '1.0.2', treeShakeIcons: false);
await checkBuildVersion(
manifest: manifest,
buildInfo: buildInfo,
expectedBuildName: '1.0.2',
expectedBuildNumber: '1',
);
});
testUsingAndroidContext('allow build info to override build number', () async {
const String manifest = '''
name: test
version: 1.0.0+1
dependencies:
flutter:
sdk: flutter
flutter:
''';
const BuildInfo buildInfo = BuildInfo(BuildMode.release, null, buildNumber: '3', treeShakeIcons: false);
await checkBuildVersion(
manifest: manifest,
buildInfo: buildInfo,
expectedBuildName: '1.0.0',
expectedBuildNumber: '3',
);
});
testUsingAndroidContext('allow build info to override build name and number', () async {
const String manifest = '''
name: test
version: 1.0.0+1
dependencies:
flutter:
sdk: flutter
flutter:
''';
const BuildInfo buildInfo = BuildInfo(BuildMode.release, null, buildName: '1.0.2', buildNumber: '3', treeShakeIcons: false);
await checkBuildVersion(
manifest: manifest,
buildInfo: buildInfo,
expectedBuildName: '1.0.2',
expectedBuildNumber: '3',
);
});
testUsingAndroidContext('allow build info to override build name and set number', () async {
const String manifest = '''
name: test
version: 1.0.0
dependencies:
flutter:
sdk: flutter
flutter:
''';
const BuildInfo buildInfo = BuildInfo(BuildMode.release, null, buildName: '1.0.2', buildNumber: '3', treeShakeIcons: false);
await checkBuildVersion(
manifest: manifest,
buildInfo: buildInfo,
expectedBuildName: '1.0.2',
expectedBuildNumber: '3',
);
});
testUsingAndroidContext('allow build info to set build name and number', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
''';
const BuildInfo buildInfo = BuildInfo(BuildMode.release, null, buildName: '1.0.2', buildNumber: '3', treeShakeIcons: false);
await checkBuildVersion(
manifest: manifest,
buildInfo: buildInfo,
expectedBuildName: '1.0.2',
expectedBuildNumber: '3',
);
});
testUsingAndroidContext('allow build info to unset build name and number', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
''';
await checkBuildVersion(
manifest: manifest,
buildInfo: const BuildInfo(BuildMode.release, null, treeShakeIcons: false),
);
await checkBuildVersion(
manifest: manifest,
buildInfo: const BuildInfo(BuildMode.release, null, buildName: '1.0.2', buildNumber: '3', treeShakeIcons: false),
expectedBuildName: '1.0.2',
expectedBuildNumber: '3',
);
await checkBuildVersion(
manifest: manifest,
buildInfo: const BuildInfo(BuildMode.release, null, buildName: '1.0.3', buildNumber: '4', treeShakeIcons: false),
expectedBuildName: '1.0.3',
expectedBuildNumber: '4',
);
// Values don't get unset.
await checkBuildVersion(
manifest: manifest,
expectedBuildName: '1.0.3',
expectedBuildNumber: '4',
);
// Values get unset.
await checkBuildVersion(
manifest: manifest,
buildInfo: const BuildInfo(BuildMode.release, null, treeShakeIcons: false),
);
});
});
group('gradgradle_utils.le version', () {
testWithoutContext('should be compatible with the Android plugin version', () {
// Grangradle_utils.ular versions.
expect(gradle_utils.getGradleVersionFor('1.0.0'), '2.3');
expect(gradle_utils.getGradleVersionFor('1.0.1'), '2.3');
expect(gradle_utils.getGradleVersionFor('1.0.2'), '2.3');
expect(gradle_utils.getGradleVersionFor('1.0.4'), '2.3');
expect(gradle_utils.getGradleVersionFor('1.0.8'), '2.3');
expect(gradle_utils.getGradleVersionFor('1.1.0'), '2.3');
expect(gradle_utils.getGradleVersionFor('1.1.2'), '2.3');
expect(gradle_utils.getGradleVersionFor('1.1.2'), '2.3');
expect(gradle_utils.getGradleVersionFor('1.1.3'), '2.3');
// Versgradle_utils.ion Ranges.
expect(gradle_utils.getGradleVersionFor('1.2.0'), '2.9');
expect(gradle_utils.getGradleVersionFor('1.3.1'), '2.9');
expect(gradle_utils.getGradleVersionFor('1.5.0'), '2.2.1');
expect(gradle_utils.getGradleVersionFor('2.0.0'), '2.13');
expect(gradle_utils.getGradleVersionFor('2.1.2'), '2.13');
expect(gradle_utils.getGradleVersionFor('2.1.3'), '2.14.1');
expect(gradle_utils.getGradleVersionFor('2.2.3'), '2.14.1');
expect(gradle_utils.getGradleVersionFor('2.3.0'), '3.3');
expect(gradle_utils.getGradleVersionFor('3.0.0'), '4.1');
expect(gradle_utils.getGradleVersionFor('3.1.0'), '4.4');
expect(gradle_utils.getGradleVersionFor('3.2.0'), '4.6');
expect(gradle_utils.getGradleVersionFor('3.2.1'), '4.6');
expect(gradle_utils.getGradleVersionFor('3.3.0'), '4.10.2');
expect(gradle_utils.getGradleVersionFor('3.3.2'), '4.10.2');
expect(gradle_utils.getGradleVersionFor('3.4.0'), '5.6.2');
expect(gradle_utils.getGradleVersionFor('3.5.0'), '5.6.2');
expect(gradle_utils.getGradleVersionFor('4.0.0'), '6.7');
expect(gradle_utils.getGradleVersionFor('4.1.0'), '6.7');
expect(gradle_utils.getGradleVersionFor('7.0'), '7.5');
expect(gradle_utils.getGradleVersionFor('7.1.2'), '7.5');
expect(gradle_utils.getGradleVersionFor('7.2'), '7.5');
expect(gradle_utils.getGradleVersionFor('8.0'), '8.0');
expect(gradle_utils.getGradleVersionFor(gradle_utils.maxKnownAgpVersion), '8.0');
});
testWithoutContext('throws on unsupported versions', () {
expect(() => gradle_utils.getGradleVersionFor('3.6.0'),
throwsA(predicate<Exception>((Exception e) => e is ToolExit)));
});
});
group('isAppUsingAndroidX', () {
late FileSystem fs;
setUp(() {
fs = MemoryFileSystem.test();
});
testUsingContext('returns true when the project is using AndroidX', () async {
final Directory androidDirectory = globals.fs.systemTempDirectory.createTempSync('flutter_android.');
androidDirectory
.childFile('gradle.properties')
.writeAsStringSync('android.useAndroidX=true');
expect(isAppUsingAndroidX(androidDirectory), isTrue);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('returns false when the project is not using AndroidX', () async {
final Directory androidDirectory = globals.fs.systemTempDirectory.createTempSync('flutter_android.');
androidDirectory
.childFile('gradle.properties')
.writeAsStringSync('android.useAndroidX=false');
expect(isAppUsingAndroidX(androidDirectory), isFalse);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('returns false when gradle.properties does not exist', () async {
final Directory androidDirectory = globals.fs.systemTempDirectory.createTempSync('flutter_android.');
expect(isAppUsingAndroidX(androidDirectory), isFalse);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
});
group('printHowToConsumeAar', () {
late BufferLogger logger;
late FileSystem fileSystem;
setUp(() {
logger = BufferLogger.test();
fileSystem = MemoryFileSystem.test();
});
testWithoutContext('stdout contains release, debug and profile', () async {
printHowToConsumeAar(
buildModes: const <String>{'release', 'debug', 'profile'},
androidPackage: 'com.mycompany',
repoDirectory: fileSystem.directory('build/'),
buildNumber: '2.2',
logger: logger,
fileSystem: fileSystem,
);
expect(
logger.statusText,
contains(
'\n'
'Consuming the Module\n'
' 1. Open <host>/app/build.gradle\n'
' 2. Ensure you have the repositories configured, otherwise add them:\n'
'\n'
' String storageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com"\n'
' repositories {\n'
' maven {\n'
" url 'build/'\n"
' }\n'
' maven {\n'
' url "\$storageUrl/download.flutter.io"\n'
' }\n'
' }\n'
'\n'
' 3. Make the host app depend on the Flutter module:\n'
'\n'
' dependencies {\n'
" releaseImplementation 'com.mycompany:flutter_release:2.2'\n"
" debugImplementation 'com.mycompany:flutter_debug:2.2'\n"
" profileImplementation 'com.mycompany:flutter_profile:2.2'\n"
' }\n'
'\n'
'\n'
' 4. Add the `profile` build type:\n'
'\n'
' android {\n'
' buildTypes {\n'
' profile {\n'
' initWith debug\n'
' }\n'
' }\n'
' }\n'
'\n'
'To learn more, visit https://flutter.dev/go/build-aar\n'
)
);
});
testWithoutContext('stdout contains release', () async {
printHowToConsumeAar(
buildModes: const <String>{'release'},
androidPackage: 'com.mycompany',
repoDirectory: fileSystem.directory('build/'),
logger: logger,
fileSystem: fileSystem,
);
expect(
logger.statusText,
contains(
'\n'
'Consuming the Module\n'
' 1. Open <host>/app/build.gradle\n'
' 2. Ensure you have the repositories configured, otherwise add them:\n'
'\n'
' String storageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com"\n'
' repositories {\n'
' maven {\n'
" url 'build/'\n"
' }\n'
' maven {\n'
' url "\$storageUrl/download.flutter.io"\n'
' }\n'
' }\n'
'\n'
' 3. Make the host app depend on the Flutter module:\n'
'\n'
' dependencies {\n'
" releaseImplementation 'com.mycompany:flutter_release:1.0'\n"
' }\n'
'\n'
'To learn more, visit https://flutter.dev/go/build-aar\n'
)
);
});
testWithoutContext('stdout contains debug', () async {
printHowToConsumeAar(
buildModes: const <String>{'debug'},
androidPackage: 'com.mycompany',
repoDirectory: fileSystem.directory('build/'),
logger: logger,
fileSystem: fileSystem,
);
expect(
logger.statusText,
contains(
'\n'
'Consuming the Module\n'
' 1. Open <host>/app/build.gradle\n'
' 2. Ensure you have the repositories configured, otherwise add them:\n'
'\n'
' String storageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com"\n'
' repositories {\n'
' maven {\n'
" url 'build/'\n"
' }\n'
' maven {\n'
' url "\$storageUrl/download.flutter.io"\n'
' }\n'
' }\n'
'\n'
' 3. Make the host app depend on the Flutter module:\n'
'\n'
' dependencies {\n'
" debugImplementation 'com.mycompany:flutter_debug:1.0'\n"
' }\n'
'\n'
'To learn more, visit https://flutter.dev/go/build-aar\n'
)
);
});
testWithoutContext('stdout contains profile', () async {
printHowToConsumeAar(
buildModes: const <String>{'profile'},
androidPackage: 'com.mycompany',
repoDirectory: fileSystem.directory('build/'),
buildNumber: '1.0',
logger: logger,
fileSystem: fileSystem,
);
expect(
logger.statusText,
contains(
'\n'
'Consuming the Module\n'
' 1. Open <host>/app/build.gradle\n'
' 2. Ensure you have the repositories configured, otherwise add them:\n'
'\n'
' String storageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com"\n'
' repositories {\n'
' maven {\n'
" url 'build/'\n"
' }\n'
' maven {\n'
' url "\$storageUrl/download.flutter.io"\n'
' }\n'
' }\n'
'\n'
' 3. Make the host app depend on the Flutter module:\n'
'\n'
' dependencies {\n'
" profileImplementation 'com.mycompany:flutter_profile:1.0'\n"
' }\n'
'\n'
'\n'
' 4. Add the `profile` build type:\n'
'\n'
' android {\n'
' buildTypes {\n'
' profile {\n'
' initWith debug\n'
' }\n'
' }\n'
' }\n'
'\n'
'To learn more, visit https://flutter.dev/go/build-aar\n'
)
);
});
});
test('Current settings.gradle is in our legacy settings.gradle file set', () {
// If this test fails, you probably edited templates/app/android.tmpl.
// That's fine, but you now need to add a copy of that file to gradle/settings.gradle.legacy_versions, separated
// from the previous versions by a line that just says ";EOF".
final File templateSettingsDotGradle = globals.fs.file(globals.fs.path.join(Cache.flutterRoot!, 'packages', 'flutter_tools', 'templates', 'app', 'android.tmpl', 'settings.gradle'));
final File legacySettingsDotGradleFiles = globals.fs.file(globals.fs.path.join(Cache.flutterRoot!, 'packages','flutter_tools', 'gradle', 'settings.gradle.legacy_versions'));
expect(
legacySettingsDotGradleFiles.readAsStringSync().split(';EOF').map<String>((String body) => body.trim()),
contains(templateSettingsDotGradle.readAsStringSync().trim()),
);
// TODO(zanderso): This is an integration test and should be moved to the integration shard.
}, skip: true); // https://github.com/flutter/flutter/issues/87922
}
| 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';
Future<void> asyncError() {
final Completer<void> completer = Completer<void>();
final Completer<void> errorCompleter = Completer<void>();
errorCompleter.completeError(_CustomException('Async Doom'), StackTrace.current);
return completer.future;
}
/// Specialized exception to be caught.
class _CustomException implements Exception {
_CustomException(this.message);
final String message;
@override
String toString() => message;
}
Future<void> syncError() {
throw _CustomException('Sync Doom');
}
Future<void> syncAndAsyncError() {
final Completer<void> errorCompleter = Completer<void>();
errorCompleter.completeError(_CustomException('Async Doom'), StackTrace.current);
throw _CustomException('Sync Doom');
}
Future<void> delayedThrow(FakeAsync time) {
final Future<void> result =
Future<void>.delayed(const Duration(milliseconds: 10))
.then((_) async {
throw _CustomException('Delayed Doom');
});
time.elapse(const Duration(seconds: 1));
time.flushMicrotasks();
return result;
}
void main() {
late Completer<void> caughtInZone;
bool caughtByZone = false;
bool caughtByHandler = false;
late Zone zone;
setUp(() {
caughtInZone = Completer<void>();
caughtByZone = false;
caughtByHandler = false;
zone = Zone.current.fork(specification: ZoneSpecification(
handleUncaughtError: (
Zone self,
ZoneDelegate parent,
Zone zone,
Object error,
StackTrace stackTrace,
) {
caughtByZone = true;
if (!caughtInZone.isCompleted) {
caughtInZone.complete();
}
},
));
});
test('asyncError percolates through zone', () async {
await zone.run(() async {
try {
// Completer is required or else we timeout.
await Future.any(<Future<void>>[asyncError(), caughtInZone.future]);
} on _CustomException {
caughtByHandler = true;
}
});
expect(caughtByZone, true);
expect(caughtByHandler, false);
});
test('syncAndAsyncError percolates through zone', () async {
await zone.run(() async {
try {
// Completer is required or else we timeout.
await Future.any(<Future<void>>[syncAndAsyncError(), caughtInZone.future]);
} on _CustomException {
caughtByHandler = true;
}
});
expect(caughtByZone, true);
expect(caughtByHandler, true);
});
test('syncError percolates through zone', () async {
await zone.run(() async {
try {
await syncError();
} on _CustomException {
caughtByHandler = true;
}
});
expect(caughtByZone, false);
expect(caughtByHandler, true);
});
test('syncError is caught by asyncGuard', () async {
await zone.run(() async {
try {
await asyncGuard(syncError);
} on _CustomException {
caughtByHandler = true;
}
});
expect(caughtByZone, false);
expect(caughtByHandler, true);
});
test('asyncError is caught by asyncGuard', () async {
await zone.run(() async {
try {
await asyncGuard(asyncError);
} on _CustomException {
caughtByHandler = true;
}
});
expect(caughtByZone, false);
expect(caughtByHandler, true);
});
test('asyncAndSyncError is caught by asyncGuard', () async {
await zone.run(() async {
try {
await asyncGuard(syncAndAsyncError);
} on _CustomException {
caughtByHandler = true;
}
});
expect(caughtByZone, false);
expect(caughtByHandler, true);
});
test('asyncError is missed when catchError is attached too late', () async {
bool caughtByZone = false;
bool caughtByHandler = false;
bool caughtByCatchError = false;
final Completer<void> completer = Completer<void>();
await FakeAsync().run((FakeAsync time) {
unawaited(runZonedGuarded(() async {
final Future<void> f = asyncGuard<void>(() => delayedThrow(time))
.then(
(Object? obj) => obj,
onError: (Object e, StackTrace s) {
caughtByCatchError = true;
},
);
try {
await f;
} on _CustomException {
caughtByHandler = true;
}
if (!completer.isCompleted) {
completer.complete();
}
}, (Object e, StackTrace s) {
caughtByZone = true;
if (!completer.isCompleted) {
completer.complete();
}
}));
time.elapse(const Duration(seconds: 1));
time.flushMicrotasks();
return completer.future;
});
expect(caughtByZone, true);
expect(caughtByHandler, false);
expect(caughtByCatchError, true);
});
test('asyncError is propagated with binary onError', () async {
bool caughtByZone = false;
bool caughtByHandler = false;
bool caughtByOnError = false;
final Completer<void> completer = Completer<void>();
await FakeAsync().run((FakeAsync time) {
unawaited(runZonedGuarded(() async {
final Future<void> f = asyncGuard<void>(
() => delayedThrow(time),
onError: (Object e, StackTrace s) {
caughtByOnError = true;
},
);
try {
await f;
} on _CustomException {
caughtByHandler = true;
}
if (!completer.isCompleted) {
completer.complete();
}
}, (Object e, StackTrace s) {
caughtByZone = true;
if (!completer.isCompleted) {
completer.complete();
}
}));
time.elapse(const Duration(seconds: 1));
time.flushMicrotasks();
return completer.future;
});
expect(caughtByZone, false);
expect(caughtByHandler, false);
expect(caughtByOnError, true);
});
test('asyncError is propagated with unary onError', () async {
bool caughtByZone = false;
bool caughtByHandler = false;
bool caughtByOnError = false;
final Completer<void> completer = Completer<void>();
await FakeAsync().run((FakeAsync time) {
unawaited(runZonedGuarded(() async {
final Future<void> f = asyncGuard<void>(
() => delayedThrow(time),
onError: (Object e) {
caughtByOnError = true;
},
);
try {
await f;
} on _CustomException {
caughtByHandler = true;
}
if (!completer.isCompleted) {
completer.complete();
}
}, (Object e, StackTrace s) {
caughtByZone = true;
if (!completer.isCompleted) {
completer.complete();
}
}));
time.elapse(const Duration(seconds: 1));
time.flushMicrotasks();
return completer.future;
});
expect(caughtByZone, false);
expect(caughtByHandler, false);
expect(caughtByOnError, true);
});
test('asyncError is propagated with optional stack trace', () async {
bool caughtByZone = false;
bool caughtByHandler = false;
bool caughtByOnError = false;
bool nonNullStackTrace = false;
final Completer<void> completer = Completer<void>();
await FakeAsync().run((FakeAsync time) {
unawaited(runZonedGuarded(() async {
final Future<void> f = asyncGuard<void>(
() => delayedThrow(time),
onError: (Object e, [StackTrace? s]) {
caughtByOnError = true;
nonNullStackTrace = s != null;
},
);
try {
await f;
} on _CustomException {
caughtByHandler = true;
}
if (!completer.isCompleted) {
completer.complete();
}
}, (Object e, StackTrace s) {
caughtByZone = true;
if (!completer.isCompleted) {
completer.complete();
}
}));
time.elapse(const Duration(seconds: 1));
time.flushMicrotasks();
return completer.future;
});
expect(caughtByZone, false);
expect(caughtByHandler, false);
expect(caughtByOnError, true);
expect(nonNullStackTrace, true);
});
}
| 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) {
expect(actual.numberOfProcessors, expected.numberOfProcessors);
expect(actual.pathSeparator, expected.pathSeparator);
expect(actual.operatingSystem, expected.operatingSystem);
expect(actual.operatingSystemVersion, expected.operatingSystemVersion);
expect(actual.localHostname, expected.localHostname);
expect(actual.environment, expected.environment);
expect(actual.executable, expected.executable);
expect(actual.resolvedExecutable, expected.resolvedExecutable);
expect(actual.script, expected.script);
expect(actual.executableArguments, expected.executableArguments);
expect(actual.packageConfig, expected.packageConfig);
expect(actual.version, expected.version);
expect(actual.localeName, expected.localeName);
}
void main() {
group('FakePlatform.fromPlatform', () {
late FakePlatform fake;
late LocalPlatform local;
setUp(() {
local = const LocalPlatform();
fake = FakePlatform.fromPlatform(local);
});
testWithoutContext('copiesAllProperties', () {
_expectPlatformsEqual(fake, local);
});
testWithoutContext('convertsPropertiesToMutable', () {
final String key = fake.environment.keys.first;
expect(fake.environment[key], local.environment[key]);
fake.environment[key] = 'FAKE';
expect(fake.environment[key], 'FAKE');
expect(
fake.executableArguments.length,
local.executableArguments.length,
);
fake.executableArguments.add('ARG');
expect(fake.executableArguments.last, 'ARG');
});
});
}
| 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/artifacts.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/build_system/tools/asset_transformer.dart';
import 'package:flutter_tools/src/flutter_manifest.dart';
import '../../../src/common.dart';
import '../../../src/fake_process_manager.dart';
void main() {
testWithoutContext('Invokes dart properly', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final BufferLogger logger = BufferLogger.test();
final Artifacts artifacts = Artifacts.test();
final File asset = fileSystem.file('asset.txt')..createSync()..writeAsStringSync('hello world');
const String outputPath = 'output.txt';
final FakeProcessManager processManager =
FakeProcessManager.list(<FakeCommand>[
FakeCommand(
command: <String>[
artifacts.getArtifactPath(Artifact.engineDartBinary),
'run',
'my_copy_transformer',
'--input=/.tmp_rand0/asset.txt-transformOutput0.txt',
'--output=/.tmp_rand0/asset.txt-transformOutput1.txt',
'-f',
'--my_option',
'my_option_value',
],
onRun: (List<String> args) {
final ArgResults parsedArgs = (ArgParser()
..addOption('input')
..addOption('output')
..addFlag('foo', abbr: 'f')
..addOption('my_option'))
.parse(args);
fileSystem.file(parsedArgs['input']).copySync(parsedArgs['output'] as String);
},
),
]);
final AssetTransformer transformer = AssetTransformer(
processManager: processManager,
fileSystem: fileSystem,
dartBinaryPath: artifacts.getArtifactPath(Artifact.engineDartBinary),
);
final AssetTransformationFailure? transformationFailure = await transformer.transformAsset(
asset: asset,
outputPath: outputPath,
workingDirectory: fileSystem.currentDirectory.path,
transformerEntries: <AssetTransformerEntry>[
const AssetTransformerEntry(
package: 'my_copy_transformer',
args: <String>[
'-f',
'--my_option',
'my_option_value',
],
)
],
);
expect(transformationFailure, isNull, reason: logger.errorText);
expect(processManager, hasNoRemainingExpectations);
expect(fileSystem.file(outputPath).readAsStringSync(), 'hello world');
expect(fileSystem.directory('.tmp_rand0').listSync(), isEmpty, reason: 'Transformer did not clean up after itself.');
});
testWithoutContext('logs useful error information when transformation process returns a nonzero exit code', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final Artifacts artifacts = Artifacts.test();
final File asset = fileSystem.file('asset.txt')..createSync();
const String outputPath = 'output.txt';
final String dartBinaryPath = artifacts.getArtifactPath(Artifact.engineDartBinary);
final FakeProcessManager processManager =
FakeProcessManager.list(<FakeCommand>[
FakeCommand(
command: <String>[
dartBinaryPath,
'run',
'my_copy_transformer',
'--input=/.tmp_rand0/asset.txt-transformOutput0.txt',
'--output=/.tmp_rand0/asset.txt-transformOutput1.txt',
],
onRun: (List<String> args) {
final ArgResults parsedArgs = (ArgParser()
..addOption('input')
..addOption('output'))
.parse(args);
fileSystem.file(parsedArgs['input']).copySync(parsedArgs['output'] as String);
},
exitCode: 1,
stdout: 'Beginning transformation',
stderr: 'Something went wrong',
),
]);
final AssetTransformer transformer = AssetTransformer(
processManager: processManager,
fileSystem: fileSystem,
dartBinaryPath: dartBinaryPath,
);
final AssetTransformationFailure? failure = await transformer.transformAsset(
asset: asset,
outputPath: outputPath,
workingDirectory: fileSystem.currentDirectory.path,
transformerEntries: <AssetTransformerEntry>[
const AssetTransformerEntry(
package: 'my_copy_transformer',
args: <String>[],
)
],
);
expect(asset, exists);
expect(processManager, hasNoRemainingExpectations);
expect(failure, isNotNull);
expect(failure!.message,
'''
User-defined transformation of asset "asset.txt" failed.
Transformer process terminated with non-zero exit code: 1
Transformer package: my_copy_transformer
Full command: $dartBinaryPath run my_copy_transformer --input=/.tmp_rand0/asset.txt-transformOutput0.txt --output=/.tmp_rand0/asset.txt-transformOutput1.txt
stdout:
Beginning transformation
stderr:
Something went wrong''');
expect(fileSystem.directory('.tmp_rand0').listSync(), isEmpty, reason: 'Transformer did not clean up after itself.');
});
testWithoutContext('prints error message when the transformer does not produce an output file', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final Artifacts artifacts = Artifacts.test();
final File asset = fileSystem.file('asset.txt')..createSync();
const String outputPath = 'output.txt';
final String dartBinaryPath = artifacts.getArtifactPath(Artifact.engineDartBinary);
final FakeProcessManager processManager =
FakeProcessManager.list(<FakeCommand>[
FakeCommand(
command: <String>[
dartBinaryPath,
'run',
'my_transformer',
'--input=/.tmp_rand0/asset.txt-transformOutput0.txt',
'--output=/.tmp_rand0/asset.txt-transformOutput1.txt',
],
onRun: (_) {
// Do nothing.
},
stderr: 'Transformation failed, but I forgot to exit with a non-zero code.'
),
]);
final AssetTransformer transformer = AssetTransformer(
processManager: processManager,
fileSystem: fileSystem,
dartBinaryPath: dartBinaryPath,
);
final AssetTransformationFailure? failure = await transformer.transformAsset(
asset: asset,
outputPath: outputPath,
workingDirectory: fileSystem.currentDirectory.path,
transformerEntries: <AssetTransformerEntry>[
const AssetTransformerEntry(
package: 'my_transformer',
args: <String>[],
)
],
);
expect(processManager, hasNoRemainingExpectations);
expect(failure, isNotNull);
expect(failure!.message,
'''
User-defined transformation of asset "asset.txt" failed.
Asset transformer my_transformer did not produce an output file.
Input file provided to transformer: "/.tmp_rand0/asset.txt-transformOutput0.txt"
Expected output file at: "/.tmp_rand0/asset.txt-transformOutput1.txt"
Full command: $dartBinaryPath run my_transformer --input=/.tmp_rand0/asset.txt-transformOutput0.txt --output=/.tmp_rand0/asset.txt-transformOutput1.txt
stdout:
stderr:
Transformation failed, but I forgot to exit with a non-zero code.'''
);
expect(fileSystem.directory('.tmp_rand0').listSync(), isEmpty, reason: 'Transformer did not clean up after itself.');
});
testWithoutContext('correctly chains transformations when there are multiple of them', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final Artifacts artifacts = Artifacts.test();
final File asset = fileSystem.file('asset.txt')
..createSync()
..writeAsStringSync('ABC');
const String outputPath = 'output.txt';
final String dartBinaryPath = artifacts.getArtifactPath(Artifact.engineDartBinary);
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
FakeCommand(
command: <String>[
dartBinaryPath,
'run',
'my_lowercase_transformer',
'--input=/.tmp_rand0/asset.txt-transformOutput0.txt',
'--output=/.tmp_rand0/asset.txt-transformOutput1.txt',
],
onRun: (List<String> args) {
final ArgResults parsedArgs = (ArgParser()
..addOption('input')
..addOption('output'))
.parse(args);
final String inputFileContents = fileSystem.file(parsedArgs['input']).readAsStringSync();
fileSystem.file(parsedArgs['output'])
..createSync()
..writeAsStringSync(inputFileContents.toLowerCase());
},
),
FakeCommand(
command: <String>[
dartBinaryPath,
'run',
'my_distance_from_ascii_a_transformer',
'--input=/.tmp_rand0/asset.txt-transformOutput1.txt',
'--output=/.tmp_rand0/asset.txt-transformOutput2.txt',
],
onRun: (List<String> args) {
final ArgResults parsedArgs = (ArgParser()
..addOption('input')
..addOption('output'))
.parse(args);
final String inputFileContents = fileSystem.file(parsedArgs['input']).readAsStringSync();
final StringBuffer outputContents = StringBuffer();
for (int i = 0; i < inputFileContents.length; i++) {
outputContents.write(inputFileContents.codeUnitAt(i) - 'a'.codeUnits.first);
}
fileSystem.file(parsedArgs['output'])
..createSync()
..writeAsStringSync(outputContents.toString());
},
),
]);
final AssetTransformer transformer = AssetTransformer(
processManager: processManager,
fileSystem: fileSystem,
dartBinaryPath: dartBinaryPath,
);
final AssetTransformationFailure? failure = await transformer.transformAsset(
asset: asset,
outputPath: outputPath,
workingDirectory: fileSystem.currentDirectory.path,
transformerEntries: <AssetTransformerEntry>[
const AssetTransformerEntry(
package: 'my_lowercase_transformer',
args: <String>[],
),
const AssetTransformerEntry(
package: 'my_distance_from_ascii_a_transformer',
args: <String>[],
),
],
);
expect(processManager, hasNoRemainingExpectations);
expect(failure, isNull);
expect(fileSystem.file(outputPath).readAsStringSync(), '012');
expect(fileSystem.directory('.tmp_rand0').listSync(), isEmpty, reason: 'Transformer did not clean up after itself.');
});
testWithoutContext('prints an error when a transformer in a chain (thats not the first) does not produce an output', () async {
final FileSystem fileSystem = MemoryFileSystem();
final Artifacts artifacts = Artifacts.test();
final File asset = fileSystem.file('asset.txt')
..createSync()
..writeAsStringSync('ABC');
const String outputPath = 'output.txt';
final String dartBinaryPath = artifacts.getArtifactPath(Artifact.engineDartBinary);
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
FakeCommand(
command: <String>[
dartBinaryPath,
'run',
'my_lowercase_transformer',
'--input=/.tmp_rand0/asset.txt-transformOutput0.txt',
'--output=/.tmp_rand0/asset.txt-transformOutput1.txt',
],
onRun: (List<String> args) {
final ArgResults parsedArgs = (ArgParser()
..addOption('input')
..addOption('output'))
.parse(args);
final String inputFileContents = fileSystem.file(parsedArgs['input']).readAsStringSync();
fileSystem.file(parsedArgs['output'])
..createSync()
..writeAsStringSync(inputFileContents.toLowerCase());
},
),
FakeCommand(
command: <String>[
dartBinaryPath,
'run',
'my_distance_from_ascii_a_transformer',
'--input=/.tmp_rand0/asset.txt-transformOutput1.txt',
'--output=/.tmp_rand0/asset.txt-transformOutput2.txt',
],
onRun: (List<String> args) {
// Do nothing.
},
stderr: 'Transformation failed, but I forgot to exit with a non-zero code.'
),
]);
final AssetTransformer transformer = AssetTransformer(
processManager: processManager,
fileSystem: fileSystem,
dartBinaryPath: dartBinaryPath,
);
final AssetTransformationFailure? failure = await transformer.transformAsset(
asset: asset,
outputPath: outputPath,
workingDirectory: fileSystem.currentDirectory.path,
transformerEntries: <AssetTransformerEntry>[
const AssetTransformerEntry(
package: 'my_lowercase_transformer',
args: <String>[],
),
const AssetTransformerEntry(
package: 'my_distance_from_ascii_a_transformer',
args: <String>[],
),
],
);
expect(failure, isNotNull);
expect(failure!.message,
'''
User-defined transformation of asset "asset.txt" failed.
Asset transformer my_distance_from_ascii_a_transformer did not produce an output file.
Input file provided to transformer: "/.tmp_rand0/asset.txt-transformOutput1.txt"
Expected output file at: "/.tmp_rand0/asset.txt-transformOutput2.txt"
Full command: Artifact.engineDartBinary run my_distance_from_ascii_a_transformer --input=/.tmp_rand0/asset.txt-transformOutput1.txt --output=/.tmp_rand0/asset.txt-transformOutput2.txt
stdout:
stderr:
Transformation failed, but I forgot to exit with a non-zero code.'''
);
expect(processManager, hasNoRemainingExpectations);
expect(fileSystem.file(outputPath), isNot(exists));
expect(fileSystem.directory('.tmp_rand0').listSync(), isEmpty, reason: 'Transformer did not clean up after itself.');
});
}
| 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:file_testing/file_testing.dart';
import 'package:flutter_tools/src/android/android_sdk.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/io.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/base/os.dart';
import 'package:flutter_tools/src/base/platform.dart';
import 'package:flutter_tools/src/cache.dart';
import 'package:flutter_tools/src/dart/pub.dart';
import 'package:flutter_tools/src/flutter_cache.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/project.dart';
import 'package:test/fake.dart';
import '../src/common.dart';
import '../src/context.dart';
import '../src/fakes.dart';
const FakeCommand unameCommandForX64 = FakeCommand(
command: <String>[
'uname',
'-m',
],
stdout: 'x86_64',
);
const FakeCommand unameCommandForArm64 = FakeCommand(
command: <String>[
'uname',
'-m',
],
stdout: 'aarch64',
);
void main() {
late FakeProcessManager fakeProcessManager;
setUp(() {
fakeProcessManager = FakeProcessManager.empty();
});
Cache createCache(Platform platform) {
return Cache.test(
platform: platform,
processManager: fakeProcessManager
);
}
group('Cache.checkLockAcquired', () {
setUp(() {
Cache.enableLocking();
});
tearDown(() {
// Restore locking to prevent potential side-effects in
// tests outside this group (this option is globally shared).
Cache.enableLocking();
});
testWithoutContext('should throw when locking is not acquired', () {
final Cache cache = Cache.test(processManager: FakeProcessManager.any());
expect(cache.checkLockAcquired, throwsStateError);
});
testWithoutContext('should not throw when locking is disabled', () {
final Cache cache = Cache.test(processManager: FakeProcessManager.any());
Cache.disableLocking();
expect(cache.checkLockAcquired, returnsNormally);
});
testWithoutContext('should not throw when lock is acquired', () async {
final String? oldRoot = Cache.flutterRoot;
Cache.flutterRoot = '';
try {
final FileSystem fileSystem = MemoryFileSystem.test();
final Cache cache = Cache.test(
fileSystem: fileSystem, processManager: FakeProcessManager.any());
fileSystem.file(fileSystem.path.join('bin', 'cache', 'lockfile'))
.createSync(recursive: true);
await cache.lock();
expect(cache.checkLockAcquired, returnsNormally);
expect(cache.releaseLock, returnsNormally);
} finally {
Cache.flutterRoot = oldRoot;
}
// TODO(zanderso): implement support for lock so this can be tested with the memory file system.
}, skip: true); // https://github.com/flutter/flutter/issues/87923
testWithoutContext('throws tool exit when lockfile open fails', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final Cache cache = Cache.test(fileSystem: fileSystem, processManager: FakeProcessManager.any());
fileSystem.file(fileSystem.path.join('bin', 'cache', 'lockfile'))
.createSync(recursive: true);
expect(() async => cache.lock(), throwsToolExit());
// TODO(zanderso): implement support for lock so this can be tested with the memory file system.
}, skip: true); // https://github.com/flutter/flutter/issues/87923
testWithoutContext('should not throw when FLUTTER_ALREADY_LOCKED is set', () {
final Cache cache = Cache.test(
platform: FakePlatform(environment: <String, String>{
'FLUTTER_ALREADY_LOCKED': 'true',
}),
processManager: FakeProcessManager.any(),
);
expect(cache.checkLockAcquired, returnsNormally);
});
});
group('Cache', () {
testWithoutContext('Continues on failed stamp file update', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final BufferLogger logger = BufferLogger.test();
final Directory artifactDir = fileSystem.systemTempDirectory.createTempSync('flutter_cache_test_artifact.');
final Directory downloadDir = fileSystem.systemTempDirectory.createTempSync('flutter_cache_test_download.');
final Cache cache = FakeSecondaryCache()
..version = 'asdasd'
..artifactDirectory = artifactDir
..downloadDir = downloadDir
..onSetStamp = (String name, String version) {
throw const FileSystemException('stamp write failed');
};
final FakeSimpleArtifact artifact = FakeSimpleArtifact(cache);
await artifact.update(FakeArtifactUpdater(), logger, fileSystem, FakeOperatingSystemUtils());
expect(logger.warningText, contains('stamp write failed'));
});
testWithoutContext('Continues on missing version file', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final BufferLogger logger = BufferLogger.test();
final Directory artifactDir = fileSystem.systemTempDirectory.createTempSync('flutter_cache_test_artifact.');
final Directory downloadDir = fileSystem.systemTempDirectory.createTempSync('flutter_cache_test_download.');
final Cache cache = FakeSecondaryCache()
..version = null // version is missing.
..artifactDirectory = artifactDir
..downloadDir = downloadDir;
final FakeSimpleArtifact artifact = FakeSimpleArtifact(cache);
await artifact.update(FakeArtifactUpdater(), logger, fileSystem, FakeOperatingSystemUtils());
expect(logger.warningText, contains('No known version for the artifact name "fake"'));
});
testWithoutContext('Gradle wrapper should not be up to date, if some cached artifact is not available', () {
final FileSystem fileSystem = MemoryFileSystem.test();
final Cache cache = Cache.test(fileSystem: fileSystem, processManager: FakeProcessManager.any());
final GradleWrapper gradleWrapper = GradleWrapper(cache);
final Directory directory = cache.getCacheDir(fileSystem.path.join('artifacts', 'gradle_wrapper'));
fileSystem.file(fileSystem.path.join(directory.path, 'gradle', 'wrapper', 'gradle-wrapper.jar')).createSync(recursive: true);
expect(gradleWrapper.isUpToDateInner(fileSystem), false);
});
testWithoutContext('Gradle wrapper will delete .properties/NOTICES if they exist', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final Directory artifactDir = fileSystem.systemTempDirectory.createTempSync('flutter_cache_test_artifact.');
final FakeSecondaryCache cache = FakeSecondaryCache()
..artifactDirectory = artifactDir
..version = '123456';
final OperatingSystemUtils operatingSystemUtils = OperatingSystemUtils(
processManager: FakeProcessManager.any(),
platform: FakePlatform(),
logger: BufferLogger.test(),
fileSystem: fileSystem,
);
final GradleWrapper gradleWrapper = GradleWrapper(cache);
final File propertiesFile = fileSystem.file(fileSystem.path.join(artifactDir.path, 'gradle', 'wrapper', 'gradle-wrapper.properties'))
..createSync(recursive: true);
final File noticeFile = fileSystem.file(fileSystem.path.join(artifactDir.path, 'NOTICE'))
..createSync(recursive: true);
await gradleWrapper.updateInner(FakeArtifactUpdater(), fileSystem, operatingSystemUtils);
expect(propertiesFile, isNot(exists));
expect(noticeFile, isNot(exists));
});
testWithoutContext('Gradle wrapper should be up to date, only if all cached artifact are available', () {
final FileSystem fileSystem = MemoryFileSystem.test();
final Cache cache = Cache.test(fileSystem: fileSystem, processManager: FakeProcessManager.any());
final GradleWrapper gradleWrapper = GradleWrapper(cache);
final Directory directory = cache.getCacheDir(fileSystem.path.join('artifacts', 'gradle_wrapper'));
fileSystem.file(fileSystem.path.join(directory.path, 'gradle', 'wrapper', 'gradle-wrapper.jar')).createSync(recursive: true);
fileSystem.file(fileSystem.path.join(directory.path, 'gradlew')).createSync(recursive: true);
fileSystem.file(fileSystem.path.join(directory.path, 'gradlew.bat')).createSync(recursive: true);
expect(gradleWrapper.isUpToDateInner(fileSystem), true);
});
testWithoutContext('should not be up to date, if some cached artifact is not', () async {
final CachedArtifact artifact1 = FakeSecondaryCachedArtifact()
..upToDate = true;
final CachedArtifact artifact2 = FakeSecondaryCachedArtifact()
..upToDate = false;
final FileSystem fileSystem = MemoryFileSystem.test();
final Cache cache = Cache.test(
fileSystem: fileSystem,
artifacts: <CachedArtifact>[artifact1, artifact2],
processManager: FakeProcessManager.any(),
);
expect(await cache.isUpToDate(), isFalse);
});
testWithoutContext('should be up to date, if all cached artifacts are', () async {
final FakeSecondaryCachedArtifact artifact1 = FakeSecondaryCachedArtifact()
..upToDate = true;
final FakeSecondaryCachedArtifact artifact2 = FakeSecondaryCachedArtifact()
..upToDate = true;
final FileSystem fileSystem = MemoryFileSystem.test();
final Cache cache = Cache.test(
fileSystem: fileSystem,
artifacts: <CachedArtifact>[artifact1, artifact2],
processManager: FakeProcessManager.any(),
);
expect(await cache.isUpToDate(), isTrue);
});
testWithoutContext('should update cached artifacts which are not up to date', () async {
final FakeSecondaryCachedArtifact artifact1 = FakeSecondaryCachedArtifact()
..upToDate = true;
final FakeSecondaryCachedArtifact artifact2 = FakeSecondaryCachedArtifact()
..upToDate = false;
final FileSystem fileSystem = MemoryFileSystem.test();
final Cache cache = Cache.test(
fileSystem: fileSystem,
artifacts: <CachedArtifact>[artifact1, artifact2],
processManager: FakeProcessManager.any(),
);
await cache.updateAll(<DevelopmentArtifact>{
DevelopmentArtifact.universal,
});
expect(artifact1.didUpdate, false);
expect(artifact2.didUpdate, true);
});
testWithoutContext("getter dyLdLibEntry concatenates the output of each artifact's dyLdLibEntry getter", () async {
final FakeIosUsbArtifacts artifact1 = FakeIosUsbArtifacts();
final FakeIosUsbArtifacts artifact2 = FakeIosUsbArtifacts();
final FakeIosUsbArtifacts artifact3 = FakeIosUsbArtifacts();
artifact1.environment = <String, String>{
'DYLD_LIBRARY_PATH': '/path/to/alpha:/path/to/beta',
};
artifact2.environment = <String, String>{
'DYLD_LIBRARY_PATH': '/path/to/gamma:/path/to/delta:/path/to/epsilon',
};
artifact3.environment = <String, String>{
'DYLD_LIBRARY_PATH': '',
};
final Cache cache = Cache.test(
artifacts: <CachedArtifact>[artifact1, artifact2, artifact3],
processManager: FakeProcessManager.any(),
);
expect(cache.dyLdLibEntry.key, 'DYLD_LIBRARY_PATH');
expect(
cache.dyLdLibEntry.value,
'/path/to/alpha:/path/to/beta:/path/to/gamma:/path/to/delta:/path/to/epsilon',
);
});
testWithoutContext('failed storage.googleapis.com download shows China warning', () async {
final InternetAddress address = (await InternetAddress.lookup('storage.googleapis.com')).first;
final FakeSecondaryCachedArtifact artifact1 = FakeSecondaryCachedArtifact()
..upToDate = false;
final FakeSecondaryCachedArtifact artifact2 = FakeSecondaryCachedArtifact()
..upToDate = false
..updateException = SocketException(
'Connection reset by peer',
address: address,
);
final BufferLogger logger = BufferLogger.test();
final Cache cache = Cache.test(
artifacts: <CachedArtifact>[artifact1, artifact2],
processManager: FakeProcessManager.any(),
logger: logger,
);
await expectLater(
() => cache.updateAll(<DevelopmentArtifact>{DevelopmentArtifact.universal}),
throwsException,
);
expect(artifact1.didUpdate, true);
// Don't continue when retrieval fails.
expect(artifact2.didUpdate, false);
expect(
logger.errorText,
contains('https://flutter.dev/community/china'),
);
});
testWithoutContext('Invalid URI for FLUTTER_STORAGE_BASE_URL throws ToolExit', () async {
final Cache cache = Cache.test(
platform: FakePlatform(environment: <String, String>{
'FLUTTER_STORAGE_BASE_URL': ' http://foo',
}),
processManager: FakeProcessManager.any(),
);
expect(() => cache.storageBaseUrl, throwsToolExit());
});
testWithoutContext('overridden storage base url prints warning', () async {
final BufferLogger logger = BufferLogger.test();
const String baseUrl = 'https://storage.com';
final Cache cache = Cache.test(
platform: FakePlatform(environment: <String, String>{
'FLUTTER_STORAGE_BASE_URL': baseUrl,
}),
processManager: FakeProcessManager.any(),
logger: logger,
);
expect(cache.storageBaseUrl, baseUrl);
expect(logger.warningText, contains('Flutter assets will be downloaded from $baseUrl'));
expect(logger.statusText, isEmpty);
});
testWithoutContext('a non-empty realm is included in the storage url', () async {
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
final Directory internalDir = fileSystem.currentDirectory
.childDirectory('cache')
.childDirectory('bin')
.childDirectory('internal');
final File engineVersionFile = internalDir.childFile('engine.version');
engineVersionFile.createSync(recursive: true);
engineVersionFile.writeAsStringSync('abcdef');
final File engineRealmFile = internalDir.childFile('engine.realm');
engineRealmFile.createSync(recursive: true);
engineRealmFile.writeAsStringSync('flutter_archives_v2');
final Cache cache = Cache.test(
processManager: FakeProcessManager.any(),
fileSystem: fileSystem,
);
expect(cache.storageBaseUrl, contains('flutter_archives_v2'));
});
});
testWithoutContext('flattenNameSubdirs', () {
expect(flattenNameSubdirs(Uri.parse('http://flutter.dev/foo/bar'), MemoryFileSystem.test()), 'flutter.dev/foo/bar');
expect(flattenNameSubdirs(Uri.parse('http://api.flutter.dev/foo/bar'), MemoryFileSystem.test()), 'api.flutter.dev/foo/bar');
expect(flattenNameSubdirs(Uri.parse('https://www.flutter.dev'), MemoryFileSystem.test()), 'www.flutter.dev');
});
testWithoutContext('EngineCachedArtifact makes binary dirs readable and executable by all', () async {
final FakeOperatingSystemUtils operatingSystemUtils = FakeOperatingSystemUtils();
final FileSystem fileSystem = MemoryFileSystem.test();
final Directory artifactDir = fileSystem.systemTempDirectory.createTempSync('flutter_cache_test_artifact.');
final Directory downloadDir = fileSystem.systemTempDirectory.createTempSync('flutter_cache_test_download.');
final FakeSecondaryCache cache = FakeSecondaryCache()
..artifactDirectory = artifactDir
..downloadDir = downloadDir;
artifactDir.childDirectory('bin_dir').createSync();
artifactDir.childFile('unused_url_path').createSync();
final FakeCachedArtifact artifact = FakeCachedArtifact(
cache: cache,
binaryDirs: <List<String>>[
<String>['bin_dir', 'unused_url_path'],
],
requiredArtifacts: DevelopmentArtifact.universal,
);
await artifact.updateInner(FakeArtifactUpdater(), fileSystem, operatingSystemUtils);
final Directory dir = fileSystem.systemTempDirectory
.listSync(recursive: true)
.whereType<Directory>()
.singleWhereOrNull((Directory directory) => directory.basename == 'bin_dir')!;
expect(dir, isNotNull);
expect(dir.path, artifactDir.childDirectory('bin_dir').path);
expect(operatingSystemUtils.chmods, <List<String>>[<String>['/.tmp_rand0/flutter_cache_test_artifact.rand0/bin_dir', 'a+r,a+x']]);
});
testWithoutContext('Try to remove without a parent', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final Directory parent = fileSystem.directory('dir');
parent.createSync();
final Directory child = parent.childDirectory('child');
child.createSync();
final Directory tempStorage = parent.childDirectory('temp');
tempStorage.createSync();
final FakeArtifactUpdaterDownload fakeArtifact = FakeArtifactUpdaterDownload(
operatingSystemUtils: FakeOperatingSystemUtils(),
logger: BufferLogger.test(),
fileSystem: fileSystem,
tempStorage: tempStorage,
httpClient: HttpClient(),
platform: FakePlatform(),
allowedBaseUrls: <String>[]
);
final File file = child.childFile('file');
file.createSync();
fakeArtifact.addFiles(<File>[file]);
child.deleteSync(recursive: true);
fakeArtifact.removeDownloadedFiles();
});
testWithoutContext('IosUsbArtifacts verifies executables for libimobiledevice in isUpToDateInner', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final Cache cache = Cache.test(fileSystem: fileSystem, processManager: FakeProcessManager.any());
final IosUsbArtifacts iosUsbArtifacts = IosUsbArtifacts('libimobiledevice', cache, platform: FakePlatform(operatingSystem: 'macos'));
iosUsbArtifacts.location.createSync();
final File ideviceScreenshotFile = iosUsbArtifacts.location.childFile('idevicescreenshot')
..createSync();
iosUsbArtifacts.location.childFile('idevicesyslog')
.createSync();
expect(iosUsbArtifacts.isUpToDateInner(fileSystem), true);
ideviceScreenshotFile.deleteSync();
expect(iosUsbArtifacts.isUpToDateInner(fileSystem), false);
});
testWithoutContext('IosUsbArtifacts verifies iproxy for usbmuxd in isUpToDateInner', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final Cache cache = Cache.test(fileSystem: fileSystem, processManager: FakeProcessManager.any());
final IosUsbArtifacts iosUsbArtifacts = IosUsbArtifacts('usbmuxd', cache, platform: FakePlatform(operatingSystem: 'macos'));
iosUsbArtifacts.location.createSync();
final File iproxy = iosUsbArtifacts.location.childFile('iproxy')
..createSync();
expect(iosUsbArtifacts.isUpToDateInner(fileSystem), true);
iproxy.deleteSync();
expect(iosUsbArtifacts.isUpToDateInner(fileSystem), false);
});
testWithoutContext('IosUsbArtifacts does not verify executables for openssl in isUpToDateInner', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final Cache cache = Cache.test(fileSystem: fileSystem, processManager: FakeProcessManager.any());
final IosUsbArtifacts iosUsbArtifacts = IosUsbArtifacts('openssl', cache, platform: FakePlatform(operatingSystem: 'macos'));
iosUsbArtifacts.location.createSync();
expect(iosUsbArtifacts.isUpToDateInner(fileSystem), true);
});
testWithoutContext('IosUsbArtifacts uses unsigned when specified', () async {
final Cache cache = Cache.test(processManager: FakeProcessManager.any());
cache.useUnsignedMacBinaries = true;
final IosUsbArtifacts iosUsbArtifacts = IosUsbArtifacts('name', cache, platform: FakePlatform(operatingSystem: 'macos'));
expect(iosUsbArtifacts.archiveUri.toString(), contains('/unsigned/'));
});
testWithoutContext('IosUsbArtifacts does not use unsigned when not specified', () async {
final Cache cache = Cache.test(processManager: FakeProcessManager.any());
final IosUsbArtifacts iosUsbArtifacts = IosUsbArtifacts('name', cache, platform: FakePlatform(operatingSystem: 'macos'));
expect(iosUsbArtifacts.archiveUri.toString(), isNot(contains('/unsigned/')));
});
testWithoutContext('FlutterRunnerDebugSymbols downloads Flutter runner debug symbols', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final Cache cache = FakeSecondaryCache()
..artifactDirectory = fileSystem.currentDirectory
..version = '123456';
final FakeVersionedPackageResolver packageResolver = FakeVersionedPackageResolver();
final FlutterRunnerDebugSymbols flutterRunnerDebugSymbols = FlutterRunnerDebugSymbols(
cache,
packageResolver: packageResolver,
platform: FakePlatform(),
);
await flutterRunnerDebugSymbols.updateInner(FakeArtifactUpdater(), fileSystem, FakeOperatingSystemUtils());
expect(packageResolver.resolved, <List<String>>[
<String>['fuchsia-debug-symbols-x64', '123456'],
<String>['fuchsia-debug-symbols-arm64', '123456'],
]);
});
testWithoutContext('FontSubset in universal artifacts', () {
final Cache cache = Cache.test(processManager: FakeProcessManager.any());
final FontSubsetArtifacts artifacts = FontSubsetArtifacts(cache, platform: FakePlatform());
expect(artifacts.developmentArtifact, DevelopmentArtifact.universal);
});
testWithoutContext('FontSubset artifacts on x64 linux', () {
fakeProcessManager.addCommand(unameCommandForX64);
final Cache cache = createCache(FakePlatform());
final FontSubsetArtifacts artifacts = FontSubsetArtifacts(cache, platform: FakePlatform());
cache.includeAllPlatforms = false;
expect(artifacts.getBinaryDirs(), <List<String>>[<String>['linux-x64', 'linux-x64/font-subset.zip']]);
});
testWithoutContext('FontSubset artifacts on arm64 linux', () {
fakeProcessManager.addCommand(unameCommandForArm64);
final Cache cache = createCache(FakePlatform());
final FontSubsetArtifacts artifacts = FontSubsetArtifacts(cache, platform: FakePlatform());
cache.includeAllPlatforms = false;
expect(artifacts.getBinaryDirs(), <List<String>>[<String>['linux-arm64', 'linux-arm64/font-subset.zip']]);
});
testWithoutContext('FontSubset artifacts on windows', () {
final Cache cache = createCache(FakePlatform(operatingSystem: 'windows'));
final FontSubsetArtifacts artifacts = FontSubsetArtifacts(cache, platform: FakePlatform(operatingSystem: 'windows'));
cache.includeAllPlatforms = false;
expect(artifacts.getBinaryDirs(), <List<String>>[<String>['windows-x64', 'windows-x64/font-subset.zip']]);
});
testWithoutContext('FontSubset artifacts on macos', () {
fakeProcessManager.addCommands(<FakeCommand>[
const FakeCommand(
command: <String>[
'which',
'sysctl',
],
stdout: '/sbin/sysctl',
),
const FakeCommand(
command: <String>[
'sysctl',
'hw.optional.arm64',
],
stdout: 'hw.optional.arm64: 0',
),
]);
final Cache cache = createCache(FakePlatform(operatingSystem: 'macos'));
final FontSubsetArtifacts artifacts = FontSubsetArtifacts(cache, platform: FakePlatform(operatingSystem: 'macos'));
cache.includeAllPlatforms = false;
expect(artifacts.getBinaryDirs(), <List<String>>[<String>['darwin-x64', 'darwin-x64/font-subset.zip']]);
});
testWithoutContext('FontSubset artifacts on fuchsia', () {
fakeProcessManager.addCommand(unameCommandForX64);
final Cache cache = createCache(FakePlatform(operatingSystem: 'fuchsia'));
final FontSubsetArtifacts artifacts = FontSubsetArtifacts(cache, platform: FakePlatform(operatingSystem: 'fuchsia'));
cache.includeAllPlatforms = false;
expect(artifacts.getBinaryDirs, throwsToolExit(message: 'Unsupported operating system: fuchsia'));
});
testWithoutContext('FontSubset artifacts for all platforms on x64 hosts', () {
fakeProcessManager.addCommand(unameCommandForX64);
final Cache cache = createCache(FakePlatform(operatingSystem: 'fuchsia'));
final FontSubsetArtifacts artifacts = FontSubsetArtifacts(cache, platform: FakePlatform(operatingSystem: 'fuchsia'));
cache.includeAllPlatforms = true;
expect(artifacts.getBinaryDirs(), <List<String>>[
<String>['darwin-x64', 'darwin-x64/font-subset.zip'],
<String>['linux-x64', 'linux-x64/font-subset.zip'],
<String>['windows-x64', 'windows-x64/font-subset.zip'],
]);
});
testWithoutContext('FontSubset artifacts for all platforms on arm64 hosts', () {
fakeProcessManager.addCommand(unameCommandForArm64);
final Cache cache = createCache(FakePlatform(operatingSystem: 'fuchsia'));
final FontSubsetArtifacts artifacts = FontSubsetArtifacts(cache, platform: FakePlatform(operatingSystem: 'fuchsia'));
cache.includeAllPlatforms = true;
expect(artifacts.getBinaryDirs(), <List<String>>[
<String>['darwin-x64', 'darwin-arm64/font-subset.zip'],
<String>['linux-arm64', 'linux-arm64/font-subset.zip'],
<String>['windows-arm64', 'windows-arm64/font-subset.zip'],
]);
});
testWithoutContext('macOS desktop artifacts include all gen_snapshot binaries', () {
final Cache cache = Cache.test(processManager: FakeProcessManager.any());
final MacOSEngineArtifacts artifacts = MacOSEngineArtifacts(cache, platform: FakePlatform());
cache.includeAllPlatforms = false;
cache.platformOverrideArtifacts = <String>{'macos'};
expect(artifacts.getBinaryDirs(), containsAll(<List<String>>[
<String>['darwin-x64', 'darwin-x64/gen_snapshot.zip'],
<String>['darwin-x64-profile', 'darwin-x64-profile/gen_snapshot.zip'],
<String>['darwin-x64-release', 'darwin-x64-release/gen_snapshot.zip'],
]));
});
testWithoutContext('macOS desktop artifacts ignore filtering when requested', () {
final Cache cache = Cache.test(processManager: FakeProcessManager.any());
final MacOSEngineArtifacts artifacts = MacOSEngineArtifacts(cache, platform: FakePlatform());
cache.includeAllPlatforms = false;
cache.platformOverrideArtifacts = <String>{'macos'};
expect(artifacts.getBinaryDirs(), isNotEmpty);
});
testWithoutContext('Windows desktop artifacts ignore filtering when requested', () {
final Cache cache = Cache.test(processManager: FakeProcessManager.any());
final WindowsEngineArtifacts artifacts = WindowsEngineArtifacts(
cache,
platform: FakePlatform(),
);
cache.includeAllPlatforms = false;
cache.platformOverrideArtifacts = <String>{'windows'};
expect(artifacts.getBinaryDirs(), isNotEmpty);
});
testWithoutContext('Windows desktop artifacts include profile and release artifacts', () {
final Cache cache = Cache.test(processManager: FakeProcessManager.any());
final WindowsEngineArtifacts artifacts = WindowsEngineArtifacts(
cache,
platform: FakePlatform(operatingSystem: 'windows'),
);
expect(artifacts.getBinaryDirs(), containsAll(<Matcher>[
contains(contains('profile')),
contains(contains('release')),
]));
});
testWithoutContext('Linux desktop artifacts ignore filtering when requested', () {
fakeProcessManager.addCommand(unameCommandForX64);
final Cache cache = createCache(FakePlatform());
final LinuxEngineArtifacts artifacts = LinuxEngineArtifacts(
cache,
platform: FakePlatform(operatingSystem: 'macos'),
);
cache.includeAllPlatforms = false;
cache.platformOverrideArtifacts = <String>{'linux'};
expect(artifacts.getBinaryDirs(), isNotEmpty);
});
testWithoutContext('Linux desktop artifacts for x64 include profile and release artifacts', () {
fakeProcessManager.addCommand(unameCommandForX64);
final Cache cache = createCache(FakePlatform());
final LinuxEngineArtifacts artifacts = LinuxEngineArtifacts(
cache,
platform: FakePlatform(),
);
expect(artifacts.getBinaryDirs(), <List<String>>[
<String>['linux-x64', 'linux-x64-debug/linux-x64-flutter-gtk.zip'],
<String>['linux-x64-profile', 'linux-x64-profile/linux-x64-flutter-gtk.zip'],
<String>['linux-x64-release', 'linux-x64-release/linux-x64-flutter-gtk.zip'],
]);
});
testWithoutContext('Linux desktop artifacts for arm64 include profile and release artifacts', () {
fakeProcessManager.addCommand(unameCommandForArm64);
final Cache cache = createCache(FakePlatform());
final LinuxEngineArtifacts artifacts = LinuxEngineArtifacts(
cache,
platform: FakePlatform(),
);
expect(artifacts.getBinaryDirs(), <List<String>>[
<String>['linux-arm64', 'linux-arm64-debug/linux-arm64-flutter-gtk.zip'],
<String>['linux-arm64-profile', 'linux-arm64-profile/linux-arm64-flutter-gtk.zip'],
<String>['linux-arm64-release', 'linux-arm64-release/linux-arm64-flutter-gtk.zip'],
]);
});
testWithoutContext('Cache can delete stampfiles of artifacts', () {
final FileSystem fileSystem = MemoryFileSystem.test();
final FakeIosUsbArtifacts artifactSet = FakeIosUsbArtifacts();
final BufferLogger logger = BufferLogger.test();
artifactSet.stampName = 'STAMP';
final Cache cache = Cache(
artifacts: <ArtifactSet>[
artifactSet,
],
logger: logger,
fileSystem: fileSystem,
platform: FakePlatform(),
osUtils: FakeOperatingSystemUtils(),
rootOverride: fileSystem.currentDirectory,
);
final File toolStampFile = fileSystem.file('bin/cache/flutter_tools.stamp');
final File stampFile = cache.getStampFileFor(artifactSet.stampName);
stampFile.createSync(recursive: true);
toolStampFile.createSync(recursive: true);
cache.clearStampFiles();
expect(logger.errorText, isEmpty);
expect(stampFile, isNot(exists));
expect(toolStampFile, isNot(exists));
});
testWithoutContext('Cache does not attempt to delete already missing stamp files', () {
final FileSystem fileSystem = MemoryFileSystem.test();
final FakeIosUsbArtifacts artifactSet = FakeIosUsbArtifacts();
final BufferLogger logger = BufferLogger.test();
artifactSet.stampName = 'STAMP';
final Cache cache = Cache(
artifacts: <ArtifactSet>[
artifactSet,
],
logger: logger,
fileSystem: fileSystem,
platform: FakePlatform(),
osUtils: FakeOperatingSystemUtils(),
rootOverride: fileSystem.currentDirectory,
);
final File toolStampFile = fileSystem.file('bin/cache/flutter_tools.stamp');
final File stampFile = cache.getStampFileFor(artifactSet.stampName);
toolStampFile.createSync(recursive: true);
cache.clearStampFiles();
expect(logger.errorText, isEmpty);
expect(stampFile, isNot(exists));
expect(toolStampFile, isNot(exists));
});
testWithoutContext('Cache catches file system exception from missing tool stamp file', () {
final FileSystem fileSystem = MemoryFileSystem.test();
final FakeIosUsbArtifacts artifactSet = FakeIosUsbArtifacts();
final BufferLogger logger = BufferLogger.test();
artifactSet.stampName = 'STAMP';
final Cache cache = Cache(
artifacts: <ArtifactSet>[
artifactSet,
],
logger: logger,
fileSystem: fileSystem,
platform: FakePlatform(),
osUtils: FakeOperatingSystemUtils(),
rootOverride: fileSystem.currentDirectory,
);
cache.clearStampFiles();
expect(logger.warningText, contains('Failed to delete some stamp files'));
});
testWithoutContext('FlutterWebSdk fetches web artifacts and deletes previous directory contents', () async {
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
final Directory internalDir = fileSystem.currentDirectory
.childDirectory('cache')
.childDirectory('bin')
.childDirectory('internal');
final File canvasKitVersionFile = internalDir.childFile('canvaskit.version');
canvasKitVersionFile.createSync(recursive: true);
canvasKitVersionFile.writeAsStringSync('abcdefg');
final File engineVersionFile = internalDir.childFile('engine.version');
engineVersionFile.createSync(recursive: true);
engineVersionFile.writeAsStringSync('hijklmnop');
final Cache cache = Cache.test(processManager: FakeProcessManager.any(), fileSystem: fileSystem);
final Directory webCacheDirectory = cache.getWebSdkDirectory();
final FakeArtifactUpdater artifactUpdater = FakeArtifactUpdater();
final FlutterWebSdk webSdk = FlutterWebSdk(cache);
final List<String> messages = <String>[];
final List<String> downloads = <String>[];
final List<String> locations = <String>[];
artifactUpdater.onDownloadZipArchive = (String message, Uri uri, Directory location) {
messages.add(message);
downloads.add(uri.toString());
locations.add(location.path);
location.createSync(recursive: true);
location.childFile('foo').createSync();
};
webCacheDirectory.childFile('bar').createSync(recursive: true);
await webSdk.updateInner(artifactUpdater, fileSystem, FakeOperatingSystemUtils());
expect(messages, <String>[
'Downloading Web SDK...',
]);
expect(downloads, <String>[
'https://storage.googleapis.com/flutter_infra_release/flutter/hijklmnop/flutter-web-sdk.zip',
]);
expect(locations, <String>[
'cache/bin/cache/flutter_web_sdk',
]);
expect(webCacheDirectory.childFile('foo'), exists);
expect(webCacheDirectory.childFile('bar'), isNot(exists));
});
testWithoutContext('FlutterWebSdk CanvasKit URL can be overridden via FLUTTER_STORAGE_BASE_URL', () async {
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
final Directory internalDir = fileSystem.currentDirectory
.childDirectory('cache')
.childDirectory('bin')
.childDirectory('internal');
final File canvasKitVersionFile = internalDir.childFile('canvaskit.version');
canvasKitVersionFile.createSync(recursive: true);
canvasKitVersionFile.writeAsStringSync('abcdefg');
final File engineVersionFile = internalDir.childFile('engine.version');
engineVersionFile.createSync(recursive: true);
engineVersionFile.writeAsStringSync('hijklmnop');
final Cache cache = Cache.test(
processManager: FakeProcessManager.any(),
fileSystem: fileSystem,
platform: FakePlatform(
environment: <String, String>{
'FLUTTER_STORAGE_BASE_URL': 'https://flutter.storage.com/override',
},
),
);
final Directory webCacheDirectory = cache.getWebSdkDirectory();
final FakeArtifactUpdater artifactUpdater = FakeArtifactUpdater();
final FlutterWebSdk webSdk = FlutterWebSdk(cache);
final List<String> downloads = <String>[];
final List<String> locations = <String>[];
artifactUpdater.onDownloadZipArchive = (String message, Uri uri, Directory location) {
downloads.add(uri.toString());
locations.add(location.path);
location.createSync(recursive: true);
location.childFile('foo').createSync();
};
webCacheDirectory.childFile('bar').createSync(recursive: true);
await webSdk.updateInner(artifactUpdater, fileSystem, FakeOperatingSystemUtils());
expect(downloads, <String>[
'https://flutter.storage.com/override/flutter_infra_release/flutter/hijklmnop/flutter-web-sdk.zip',
]);
});
testWithoutContext('FlutterWebSdk uses tryToDelete to handle directory edge cases', () async {
final FileExceptionHandler handler = FileExceptionHandler();
final MemoryFileSystem fileSystem = MemoryFileSystem.test(opHandle: handler.opHandle);
final Cache cache = Cache.test(processManager: FakeProcessManager.any(), fileSystem: fileSystem);
final Directory webCacheDirectory = cache.getWebSdkDirectory();
final FakeArtifactUpdater artifactUpdater = FakeArtifactUpdater();
final FlutterWebSdk webSdk = FlutterWebSdk(cache);
artifactUpdater.onDownloadZipArchive = (String message, Uri uri, Directory location) {
location.createSync(recursive: true);
location.childFile('foo').createSync();
};
webCacheDirectory.childFile('bar').createSync(recursive: true);
handler.addError(webCacheDirectory, FileSystemOp.delete, const FileSystemException('', '', OSError('', 2)));
await expectLater(() => webSdk.updateInner(artifactUpdater, fileSystem, FakeOperatingSystemUtils()), throwsToolExit(
message: RegExp('The Flutter tool tried to delete the file or directory cache/bin/cache/flutter_web_sdk but was unable to'),
));
});
testWithoutContext('LegacyCanvasKitRemover removes old canvaskit artifacts if they exist', () async {
final FileExceptionHandler handler = FileExceptionHandler();
final MemoryFileSystem fileSystem = MemoryFileSystem.test(opHandle: handler.opHandle);
final Cache cache = Cache.test(processManager: FakeProcessManager.any(), fileSystem: fileSystem);
final File canvasKitWasm = fileSystem.file(fileSystem.path.join(
cache.getRoot().path,
'canvaskit',
'canvaskit.wasm',
));
canvasKitWasm.createSync(recursive: true);
canvasKitWasm.writeAsStringSync('hello world');
final LegacyCanvasKitRemover remover = LegacyCanvasKitRemover(cache);
expect(await remover.isUpToDate(fileSystem), false);
await remover.update(
FakeArtifactUpdater(),
BufferLogger.test(),
fileSystem,
FakeOperatingSystemUtils(),
);
expect(await remover.isUpToDate(fileSystem), true);
expect(canvasKitWasm.existsSync(), isFalse);
});
testWithoutContext('Cache handles exception thrown if stamp file cannot be parsed', () {
final FileExceptionHandler exceptionHandler = FileExceptionHandler();
final FileSystem fileSystem = MemoryFileSystem.test(opHandle: exceptionHandler.opHandle);
final Logger logger = BufferLogger.test();
final FakeCache cache = FakeCache(
fileSystem: fileSystem,
logger: logger,
platform: FakePlatform(),
osUtils: FakeOperatingSystemUtils()
);
final File file = fileSystem.file('stamp');
cache.stampFile = file;
expect(cache.getStampFor('foo'), null);
file.createSync();
exceptionHandler.addError(
file,
FileSystemOp.read,
const FileSystemException(),
);
expect(cache.getStampFor('foo'), null);
});
testWithoutContext('Cache parses stamp file', () {
final FileSystem fileSystem = MemoryFileSystem.test();
final Logger logger = BufferLogger.test();
final FakeCache cache = FakeCache(
fileSystem: fileSystem,
logger: logger,
platform: FakePlatform(),
osUtils: FakeOperatingSystemUtils()
);
final File file = fileSystem.file('stamp')..writeAsStringSync('ABC ');
cache.stampFile = file;
expect(cache.getStampFor('foo'), 'ABC');
});
testWithoutContext('PubDependencies needs to be updated if the package config'
' file or the source directories are missing', () async {
final BufferLogger logger = BufferLogger.test();
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
final PubDependencies pubDependencies = PubDependencies(
flutterRoot: () => '',
logger: logger,
pub: () => FakePub(),
projectFactory: FakeFlutterProjectFactory(),
);
expect(await pubDependencies.isUpToDate(fileSystem), false); // no package config
fileSystem.file('packages/flutter_tools/.packages')
..createSync(recursive: true)
..writeAsStringSync('\n');
fileSystem.file('packages/flutter_tools/.dart_tool/package_config.json')
..createSync(recursive: true)
..writeAsStringSync('''
{
"configVersion": 2,
"packages": [
{
"name": "example",
"rootUri": "file:///.pub-cache/hosted/pub.dartlang.org/example-7.0.0",
"packageUri": "lib/",
"languageVersion": "2.7"
}
],
"generated": "2020-09-15T20:29:20.691147Z",
"generator": "pub",
"generatorVersion": "2.10.0-121.0.dev"
}
''');
expect(await pubDependencies.isUpToDate(fileSystem), false); // dependencies are missing.
fileSystem.file('.pub-cache/hosted/pub.dartlang.org/example-7.0.0/pubspec.yaml')
.createSync(recursive: true);
expect(await pubDependencies.isUpToDate(fileSystem), true);
});
testWithoutContext('PubDependencies updates via pub get', () async {
final BufferLogger logger = BufferLogger.test();
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
final FakePub pub = FakePub();
final PubDependencies pubDependencies = PubDependencies(
flutterRoot: () => '',
logger: logger,
pub: () => pub,
projectFactory: FakeFlutterProjectFactory()
);
await pubDependencies.update(FakeArtifactUpdater(), logger, fileSystem, FakeOperatingSystemUtils());
expect(pub.calledGet, 1);
expect(
pub.invocations.first,
predicate<FakePubInvocation>(
(FakePubInvocation invocation) => invocation.outputMode == PubOutputMode.none,
'Pub invoked with PubOutputMode.none',
),
);
});
testUsingContext('Check current DevTools version', () async {
final String currentDevToolsVersion = globals.cache.devToolsVersion;
final RegExp devToolsVersionFormat = RegExp(r'\d+\.\d+\.\d+(?:-\S+)?');
expect(devToolsVersionFormat.allMatches(currentDevToolsVersion).length, 1,);
});
// Check that the build number matches the format documented here:
// https://dart.dev/get-dart#release-channels
testUsingContext('Check current Dart SDK build number', () async {
final String currentDartSdkVersion = globals.cache.dartSdkBuild;
final RegExp dartSdkVersionFormat = RegExp(r'\d+\.\d+\.\d+(?:-\S+)?');
expect(dartSdkVersionFormat.allMatches(currentDartSdkVersion).length, 1,);
});
group('AndroidMavenArtifacts', () {
MemoryFileSystem? memoryFileSystem;
Cache? cache;
FakeAndroidSdk? fakeAndroidSdk;
setUp(() {
memoryFileSystem = MemoryFileSystem.test();
cache = Cache.test(
fileSystem: memoryFileSystem,
processManager: FakeProcessManager.any(),
);
fakeAndroidSdk = FakeAndroidSdk();
});
testWithoutContext('AndroidMavenArtifacts has a specified development artifact', () async {
final AndroidMavenArtifacts mavenArtifacts = AndroidMavenArtifacts(
cache!,
java: FakeJava(),
platform: FakePlatform(),
);
expect(mavenArtifacts.developmentArtifact, DevelopmentArtifact.androidMaven);
});
testUsingContext('AndroidMavenArtifacts can invoke Gradle resolve dependencies if Android SDK is present', () async {
final String? oldRoot = Cache.flutterRoot;
Cache.flutterRoot = '';
try {
final AndroidMavenArtifacts mavenArtifacts = AndroidMavenArtifacts(
cache!,
java: FakeJava(),
platform: FakePlatform(),
);
expect(await mavenArtifacts.isUpToDate(memoryFileSystem!), isFalse);
final Directory gradleWrapperDir = cache!.getArtifactDirectory('gradle_wrapper')..createSync(recursive: true);
gradleWrapperDir.childFile('gradlew').writeAsStringSync('irrelevant');
gradleWrapperDir.childFile('gradlew.bat').writeAsStringSync('irrelevant');
await mavenArtifacts.update(FakeArtifactUpdater(), BufferLogger.test(), memoryFileSystem!, FakeOperatingSystemUtils());
expect(await mavenArtifacts.isUpToDate(memoryFileSystem!), isFalse);
expect(fakeAndroidSdk!.reinitialized, true);
} finally {
Cache.flutterRoot = oldRoot;
}
}, overrides: <Type, Generator>{
Cache: () => cache,
FileSystem: () => memoryFileSystem,
Platform: () => FakePlatform(),
ProcessManager: () => FakeProcessManager.list(<FakeCommand>[
const FakeCommand(command: <String>[
'/cache/bin/cache/flutter_gradle_wrapper.rand0/gradlew',
'-b',
'packages/flutter_tools/gradle/resolve_dependencies.gradle',
'--project-cache-dir',
'cache/bin/cache/flutter_gradle_wrapper.rand0',
'resolveDependencies',
]),
]),
AndroidSdk: () => fakeAndroidSdk,
});
testUsingContext('AndroidMavenArtifacts is a no-op if the Android SDK is absent', () async {
final AndroidMavenArtifacts mavenArtifacts = AndroidMavenArtifacts(
cache!,
java: FakeJava(),
platform: FakePlatform(),
);
expect(await mavenArtifacts.isUpToDate(memoryFileSystem!), isFalse);
await mavenArtifacts.update(FakeArtifactUpdater(), BufferLogger.test(), memoryFileSystem!, FakeOperatingSystemUtils());
expect(await mavenArtifacts.isUpToDate(memoryFileSystem!), isFalse);
}, overrides: <Type, Generator>{
Cache: () => cache,
FileSystem: () => memoryFileSystem,
ProcessManager: () => FakeProcessManager.empty(),
AndroidSdk: () => null, // Android SDK was not located.
});
});
}
class FakeCachedArtifact extends EngineCachedArtifact {
FakeCachedArtifact({
String stampName = 'STAMP',
required Cache cache,
required DevelopmentArtifact requiredArtifacts,
this.binaryDirs = const <List<String>>[],
this.licenseDirs = const <String>[],
this.packageDirs = const <String>[],
}) : super(stampName, cache, requiredArtifacts);
final List<List<String>> binaryDirs;
final List<String> licenseDirs;
final List<String> packageDirs;
@override
List<List<String>> getBinaryDirs() => binaryDirs;
@override
List<String> getLicenseDirs() => licenseDirs;
@override
List<String> getPackageDirs() => packageDirs;
}
class FakeSimpleArtifact extends CachedArtifact {
FakeSimpleArtifact(Cache cache) : super(
'fake',
cache,
DevelopmentArtifact.universal,
);
@override
Future<void> updateInner(ArtifactUpdater artifactUpdater, FileSystem fileSystem, OperatingSystemUtils operatingSystemUtils) async { }
}
class FakeSecondaryCachedArtifact extends Fake implements CachedArtifact {
bool upToDate = false;
bool didUpdate = false;
Exception? updateException;
@override
Future<bool> isUpToDate(FileSystem fileSystem) async => upToDate;
@override
Future<void> update(ArtifactUpdater artifactUpdater, Logger logger, FileSystem fileSystem, OperatingSystemUtils operatingSystemUtils, {bool offline = false}) async {
if (updateException != null) {
throw updateException!;
}
didUpdate = true;
}
@override
DevelopmentArtifact get developmentArtifact => DevelopmentArtifact.universal;
}
class FakeIosUsbArtifacts extends Fake implements IosUsbArtifacts {
@override
Map<String, String> environment = <String, String>{};
@override
String stampName = 'ios-usb';
}
class FakeSecondaryCache extends Fake implements Cache {
Directory? downloadDir;
late Directory artifactDirectory;
String? version;
late void Function(String artifactName, String version) onSetStamp;
@override
String get storageBaseUrl => 'https://storage.googleapis.com';
@override
Directory getDownloadDir() => artifactDirectory;
@override
Directory getArtifactDirectory(String name) => artifactDirectory;
@override
Directory getCacheDir(String name, { bool shouldCreate = true }) {
return artifactDirectory.childDirectory(name);
}
@override
File getLicenseFile() {
return artifactDirectory.childFile('LICENSE');
}
@override
String? getVersionFor(String artifactName) => version;
@override
void setStampFor(String artifactName, String version) {
onSetStamp(artifactName, version);
}
}
class FakeVersionedPackageResolver extends Fake implements VersionedPackageResolver {
final List<List<String>> resolved = <List<String>>[];
@override
String resolveUrl(String packageName, String version) {
resolved.add(<String>[packageName, version]);
return '';
}
}
class FakePubInvocation {
FakePubInvocation({
required this.outputMode,
});
final PubOutputMode outputMode;
}
class FakePub extends Fake implements Pub {
final List<FakePubInvocation> invocations = <FakePubInvocation>[];
int get calledGet => invocations.length;
@override
Future<void> get({
PubContext? context,
required FlutterProject project,
bool upgrade = false,
bool offline = false,
bool generateSyntheticPackage = false,
String? flutterRootOverride,
bool checkUpToDate = false,
bool shouldSkipThirdPartyGenerator = true,
bool printProgress = true,
PubOutputMode outputMode = PubOutputMode.all,
}) async {
invocations.add(FakePubInvocation(outputMode: outputMode));
}
}
class FakeCache extends Cache {
FakeCache({
required super.logger,
required super.fileSystem,
required super.platform,
required super.osUtils,
}) : super(
artifacts: <ArtifactSet>[],
);
late File stampFile;
@override
File getStampFileFor(String artifactName) {
return stampFile;
}
}
class FakeAndroidSdk extends Fake implements AndroidSdk {
bool reinitialized = false;
@override
void reinitialize({FileSystem? fileSystem}) {
reinitialized = true;
}
}
class FakeArtifactUpdater extends Fake implements ArtifactUpdater {
void Function(String, Uri, Directory)? onDownloadZipArchive;
void Function(String, Uri, Directory)? onDownloadZipTarball;
@override
Future<void> downloadZippedTarball(String message, Uri url, Directory location) async {
onDownloadZipTarball?.call(message, url, location);
}
@override
Future<void> downloadZipArchive(String message, Uri url, Directory location) async {
onDownloadZipArchive?.call(message, url, location);
}
@override
void removeDownloadedFiles() { }
}
class FakeArtifactUpdaterDownload extends ArtifactUpdater {
FakeArtifactUpdaterDownload({
required super.operatingSystemUtils,
required super.logger,
required super.fileSystem,
required super.tempStorage,
required super.httpClient,
required super.platform,
required super.allowedBaseUrls
});
void addFiles(List<File> files) {
downloadedFiles.addAll(files);
}
}
| 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 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/base/os.dart';
import 'package:flutter_tools/src/base/platform.dart';
import 'package:flutter_tools/src/doctor.dart';
import 'package:flutter_tools/src/project.dart';
import 'package:flutter_tools/src/reporting/crash_reporting.dart';
import 'package:flutter_tools/src/reporting/reporting.dart';
import 'package:http/http.dart';
import 'package:http/testing.dart';
import 'package:test/fake.dart';
import '../src/common.dart';
import '../src/fake_process_manager.dart';
void main() {
late BufferLogger logger;
late FileSystem fs;
late TestUsage testUsage;
late Platform platform;
late OperatingSystemUtils operatingSystemUtils;
late StackTrace stackTrace;
setUp(() async {
logger = BufferLogger.test();
fs = MemoryFileSystem.test();
testUsage = TestUsage();
platform = FakePlatform(environment: <String, String>{});
operatingSystemUtils = OperatingSystemUtils(
fileSystem: fs,
logger: logger,
platform: platform,
processManager: FakeProcessManager.any(),
);
MockCrashReportSender.sendCalls = 0;
stackTrace = StackTrace.fromString('''
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:366:9)
#1 _rootRunUnary (dart:async/zone.dart:1141:38)''');
});
Future<void> verifyCrashReportSent(RequestInfo crashInfo, {
int crashes = 1,
}) async {
// Verify that we sent the crash report.
expect(crashInfo.method, 'POST');
expect(crashInfo.uri, Uri(
scheme: 'https',
host: 'clients2.google.com',
port: 443,
path: '/cr/report',
queryParameters: <String, String>{
'product': 'Flutter_Tools',
'version': 'test-version',
},
));
expect(crashInfo.fields?['uuid'], testUsage.clientId);
expect(crashInfo.fields?['product'], 'Flutter_Tools');
expect(crashInfo.fields?['version'], 'test-version');
expect(crashInfo.fields?['osName'], 'linux');
expect(crashInfo.fields?['osVersion'], 'Linux');
expect(crashInfo.fields?['type'], 'DartError');
expect(crashInfo.fields?['error_runtime_type'], 'StateError');
expect(crashInfo.fields?['error_message'], 'Bad state: Test bad state error');
expect(crashInfo.fields?['comments'], 'crash');
expect(logger.traceText, contains('Sending crash report to Google.'));
expect(logger.traceText, contains('Crash report sent (report ID: test-report-id)'));
}
testWithoutContext('CrashReporter.informUser provides basic instructions without PII', () async {
final CrashReporter crashReporter = CrashReporter(
fileSystem: fs,
logger: logger,
flutterProjectFactory: FlutterProjectFactory(fileSystem: fs, logger: logger),
);
final File file = fs.file('flutter_00.log');
await crashReporter.informUser(
CrashDetails(
command: 'arg1 arg2 arg3',
error: Exception('Dummy exception'),
stackTrace: StackTrace.current,
// Spaces are URL query encoded in the output, make it one word to make this test simpler.
doctorText: FakeDoctorText('Ignored', 'NoPIIFakeDoctorText'),
),
file,
);
expect(logger.statusText, contains('NoPIIFakeDoctorText'));
expect(logger.statusText, isNot(contains('Ignored')));
expect(logger.statusText, contains('https://github.com/flutter/flutter/issues/new'));
expect(logger.errorText.trim(), 'A crash report has been written to ${file.path}');
});
testWithoutContext('suppress analytics', () async {
testUsage.suppressAnalytics = true;
final CrashReportSender crashReportSender = CrashReportSender(
client: CrashingCrashReportSender(const SocketException('no internets')),
usage: testUsage,
platform: platform,
logger: logger,
operatingSystemUtils: operatingSystemUtils,
);
await crashReportSender.sendReport(
error: StateError('Test bad state error'),
stackTrace: stackTrace,
getFlutterVersion: () => 'test-version',
command: 'crash',
);
expect(logger.traceText, isEmpty);
});
group('allow analytics', () {
setUp(() async {
testUsage.suppressAnalytics = false;
});
testWithoutContext('should send crash reports', () async {
final RequestInfo requestInfo = RequestInfo();
final CrashReportSender crashReportSender = CrashReportSender(
client: MockCrashReportSender(requestInfo),
usage: testUsage,
platform: platform,
logger: logger,
operatingSystemUtils: operatingSystemUtils,
);
await crashReportSender.sendReport(
error: StateError('Test bad state error'),
stackTrace: stackTrace,
getFlutterVersion: () => 'test-version',
command: 'crash',
);
await verifyCrashReportSent(requestInfo);
});
testWithoutContext('should print an explanatory message when there is a SocketException', () async {
final CrashReportSender crashReportSender = CrashReportSender(
client: CrashingCrashReportSender(const SocketException('no internets')),
usage: testUsage,
platform: platform,
logger: logger,
operatingSystemUtils: operatingSystemUtils,
);
await crashReportSender.sendReport(
error: StateError('Test bad state error'),
stackTrace: stackTrace,
getFlutterVersion: () => 'test-version',
command: 'crash',
);
expect(logger.errorText, contains('Failed to send crash report due to a network error'));
});
testWithoutContext('should print an explanatory message when there is an HttpException', () async {
final CrashReportSender crashReportSender = CrashReportSender(
client: CrashingCrashReportSender(const HttpException('no internets')),
usage: testUsage,
platform: platform,
logger: logger,
operatingSystemUtils: operatingSystemUtils,
);
await crashReportSender.sendReport(
error: StateError('Test bad state error'),
stackTrace: stackTrace,
getFlutterVersion: () => 'test-version',
command: 'crash',
);
expect(logger.errorText, contains('Failed to send crash report due to a network error'));
});
testWithoutContext('should print an explanatory message when there is a ClientException', () async {
final CrashReportSender crashReportSender = CrashReportSender(
client: CrashingCrashReportSender(const HttpException('no internets')),
usage: testUsage,
platform: platform,
logger: logger,
operatingSystemUtils: operatingSystemUtils,
);
await crashReportSender.sendReport(
error: ClientException('Test bad state error'),
stackTrace: stackTrace,
getFlutterVersion: () => 'test-version',
command: 'crash',
);
expect(logger.errorText, contains('Failed to send crash report due to a network error'));
});
testWithoutContext('should send only one crash report when sent many times', () async {
final RequestInfo requestInfo = RequestInfo();
final CrashReportSender crashReportSender = CrashReportSender(
client: MockCrashReportSender(requestInfo),
usage: testUsage,
platform: platform,
logger: logger,
operatingSystemUtils: operatingSystemUtils,
);
await crashReportSender.sendReport(
error: StateError('Test bad state error'),
stackTrace: stackTrace,
getFlutterVersion: () => 'test-version',
command: 'crash',
);
await crashReportSender.sendReport(
error: StateError('Test bad state error'),
stackTrace: stackTrace,
getFlutterVersion: () => 'test-version',
command: 'crash',
);
await crashReportSender.sendReport(
error: StateError('Test bad state error'),
stackTrace: stackTrace,
getFlutterVersion: () => 'test-version',
command: 'crash',
);
await crashReportSender.sendReport(
error: StateError('Test bad state error'),
stackTrace: stackTrace,
getFlutterVersion: () => 'test-version',
command: 'crash',
);
expect(MockCrashReportSender.sendCalls, 1);
await verifyCrashReportSent(requestInfo, crashes: 4);
});
testWithoutContext('should not send a crash report if on a user-branch', () async {
String? method;
Uri? uri;
final MockClient mockClient = MockClient((Request request) async {
method = request.method;
uri = request.url;
return Response(
'test-report-id',
200,
);
});
final CrashReportSender crashReportSender = CrashReportSender(
client: mockClient,
usage: testUsage,
platform: platform,
logger: logger,
operatingSystemUtils: operatingSystemUtils,
);
await crashReportSender.sendReport(
error: StateError('Test bad state error'),
stackTrace: stackTrace,
getFlutterVersion: () => '[user-branch]/v1.2.3',
command: 'crash',
);
// Verify that the report wasn't sent
expect(method, null);
expect(uri, null);
expect(logger.traceText, isNot(contains('Crash report sent')));
});
testWithoutContext('can override base URL', () async {
Uri? uri;
final MockClient mockClient = MockClient((Request request) async {
uri = request.url;
return Response('test-report-id', 200);
});
final Platform environmentPlatform = FakePlatform(
environment: <String, String>{
'HOME': '/',
'FLUTTER_CRASH_SERVER_BASE_URL': 'https://localhost:12345/fake_server',
},
script: Uri(scheme: 'data'),
);
final CrashReportSender crashReportSender = CrashReportSender(
client: mockClient,
usage: testUsage,
platform: environmentPlatform,
logger: logger,
operatingSystemUtils: operatingSystemUtils,
);
await crashReportSender.sendReport(
error: StateError('Test bad state error'),
stackTrace: stackTrace,
getFlutterVersion: () => 'test-version',
command: 'crash',
);
// Verify that we sent the crash report.
expect(uri, isNotNull);
expect(uri, Uri(
scheme: 'https',
host: 'localhost',
port: 12345,
path: '/fake_server',
queryParameters: <String, String>{
'product': 'Flutter_Tools',
'version': 'test-version',
},
));
});
});
}
class RequestInfo {
String? method;
Uri? uri;
Map<String, String>? fields;
}
class MockCrashReportSender extends MockClient {
MockCrashReportSender(RequestInfo crashInfo) : super((Request request) async {
MockCrashReportSender.sendCalls++;
crashInfo.method = request.method;
crashInfo.uri = request.url;
// A very ad-hoc multipart request parser. Good enough for this test.
String? boundary = request.headers['Content-Type'];
boundary = boundary?.substring(boundary.indexOf('boundary=') + 9);
crashInfo.fields = Map<String, String>.fromIterable(
utf8.decode(request.bodyBytes)
.split('--$boundary')
.map<List<String>?>((String part) {
final Match? nameMatch = RegExp(r'name="(.*)"').firstMatch(part);
if (nameMatch == null) {
return null;
}
final String name = nameMatch[1]!;
final String value = part.split('\n').skip(2).join('\n').trim();
return <String>[name, value];
}).whereType<List<String>>(),
key: (dynamic key) {
final List<String> pair = key as List<String>;
return pair[0];
},
value: (dynamic value) {
final List<String> pair = value as List<String>;
return pair[1];
},
);
return Response(
'test-report-id',
200,
);
});
static int sendCalls = 0;
}
class CrashingCrashReportSender extends MockClient {
CrashingCrashReportSender(Exception exception) : super((Request request) async {
throw exception;
});
}
class FakeDoctorText extends Fake implements DoctorText {
FakeDoctorText(String text, String piiStrippedText)
: _text = text, _piiStrippedText = piiStrippedText;
@override
Future<String> get text async => _text;
final String _text;
@override
Future<String> get piiStrippedText async => _piiStrippedText;
final String _piiStrippedText;
}
| 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/logger.dart';
import 'package:flutter_tools/src/base/utils.dart';
import 'package:flutter_tools/src/build_info.dart';
import 'package:flutter_tools/src/convert.dart';
import 'package:flutter_tools/src/device.dart';
import 'package:flutter_tools/src/project.dart';
import 'package:test/fake.dart';
import '../src/common.dart';
import '../src/context.dart';
import '../src/fake_devices.dart';
void main() {
group('DeviceManager', () {
testWithoutContext('getDevices', () async {
final FakeDevice device1 = FakeDevice('Nexus 5', '0553790d0a4e726f');
final FakeDevice device2 = FakeDevice('Nexus 5X', '01abfc49119c410e');
final FakeDevice device3 = FakeDevice('iPod touch', '82564b38861a9a5');
final List<Device> devices = <Device>[device1, device2, device3];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
expect(await deviceManager.getDevices(), devices);
});
testWithoutContext('getDeviceById exact matcher', () async {
final FakeDevice device1 = FakeDevice('Nexus 5', '0553790d0a4e726f');
final FakeDevice device2 = FakeDevice('Nexus 5X', '01abfc49119c410e');
final FakeDevice device3 = FakeDevice('iPod touch', '82564b38861a9a5');
final List<Device> devices = <Device>[device1, device2, device3];
final BufferLogger logger = BufferLogger.test();
// Include different device discoveries:
// 1. One that never completes to prove the first exact match is
// returned quickly.
// 2. One that throws, to prove matches can return when some succeed
// and others fail.
// 3. A device discoverer that succeeds.
final DeviceManager deviceManager = TestDeviceManager(
devices,
deviceDiscoveryOverrides: <DeviceDiscovery>[
ThrowingPollingDeviceDiscovery(),
LongPollingDeviceDiscovery(),
],
logger: logger,
);
Future<void> expectDevice(String id, List<Device> expected) async {
expect(await deviceManager.getDevicesById(id), expected);
}
await expectDevice('01abfc49119c410e', <Device>[device2]);
expect(logger.traceText, contains('Ignored error discovering 01abfc49119c410e'));
await expectDevice('Nexus 5X', <Device>[device2]);
expect(logger.traceText, contains('Ignored error discovering Nexus 5X'));
await expectDevice('0553790d0a4e726f', <Device>[device1]);
expect(logger.traceText, contains('Ignored error discovering 0553790d0a4e726f'));
});
testWithoutContext('getDeviceById exact matcher with well known ID', () async {
final FakeDevice device1 = FakeDevice('Windows', 'windows');
final FakeDevice device2 = FakeDevice('Nexus 5X', '01abfc49119c410e');
final FakeDevice device3 = FakeDevice('iPod touch', '82564b38861a9a5');
final List<Device> devices = <Device>[device1, device2, device3];
final BufferLogger logger = BufferLogger.test();
// Because the well known ID will match, no other device discovery will run.
final DeviceManager deviceManager = TestDeviceManager(
devices,
deviceDiscoveryOverrides: <DeviceDiscovery>[
ThrowingPollingDeviceDiscovery(),
LongPollingDeviceDiscovery(),
],
logger: logger,
wellKnownId: 'windows',
);
Future<void> expectDevice(String id, List<Device> expected) async {
deviceManager.specifiedDeviceId = id;
expect(await deviceManager.getDevicesById(id), expected);
}
await expectDevice('windows', <Device>[device1]);
expect(logger.traceText, isEmpty);
});
testWithoutContext('getDeviceById prefix matcher', () async {
final FakeDevice device1 = FakeDevice('Nexus 5', '0553790d0a4e726f');
final FakeDevice device2 = FakeDevice('Nexus 5X', '01abfc49119c410e');
final FakeDevice device3 = FakeDevice('iPod touch', '82564b38861a9a5');
final List<Device> devices = <Device>[device1, device2, device3];
final BufferLogger logger = BufferLogger.test();
// Include different device discoveries:
// 1. One that throws, to prove matches can return when some succeed
// and others fail.
// 2. A device discoverer that succeeds.
final DeviceManager deviceManager = TestDeviceManager(
devices,
deviceDiscoveryOverrides: <DeviceDiscovery>[
ThrowingPollingDeviceDiscovery(),
],
logger: logger,
);
Future<void> expectDevice(String id, List<Device> expected) async {
expect(await deviceManager.getDevicesById(id), expected);
}
await expectDevice('Nexus 5', <Device>[device1]);
expect(logger.traceText, contains('Ignored error discovering Nexus 5'));
await expectDevice('0553790', <Device>[device1]);
expect(logger.traceText, contains('Ignored error discovering 0553790'));
await expectDevice('Nexus', <Device>[device1, device2]);
expect(logger.traceText, contains('Ignored error discovering Nexus'));
});
testWithoutContext('getDeviceById two exact matches, matches on first', () async {
final FakeDevice device1 = FakeDevice('Nexus 5', '0553790d0a4e726f');
final FakeDevice device2 = FakeDevice('Nexus 5', '01abfc49119c410e');
final List<Device> devices = <Device>[device1, device2];
final BufferLogger logger = BufferLogger.test();
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: logger,
);
Future<void> expectDevice(String id, List<Device> expected) async {
expect(await deviceManager.getDevicesById(id), expected);
}
await expectDevice('Nexus 5', <Device>[device1]);
});
testWithoutContext('getAllDevices caches', () async {
final FakePollingDeviceDiscovery notSupportedDiscoverer = FakePollingDeviceDiscovery();
final FakePollingDeviceDiscovery supportedDiscoverer = FakePollingDeviceDiscovery(requiresExtendedWirelessDeviceDiscovery: true);
final FakeDevice attachedDevice = FakeDevice('Nexus 5', '0553790d0a4e726f');
final FakeDevice wirelessDevice = FakeDevice('Wireless device', 'wireless-device', connectionInterface: DeviceConnectionInterface.wireless);
notSupportedDiscoverer.addDevice(attachedDevice);
supportedDiscoverer.addDevice(wirelessDevice);
final TestDeviceManager deviceManager = TestDeviceManager(
<Device>[],
logger: BufferLogger.test(),
deviceDiscoveryOverrides: <DeviceDiscovery>[
notSupportedDiscoverer,
supportedDiscoverer,
],
);
expect(await deviceManager.getAllDevices(), <Device>[attachedDevice, wirelessDevice]);
final FakeDevice newAttachedDevice = FakeDevice('Nexus 5X', '01abfc49119c410e');
notSupportedDiscoverer.addDevice(newAttachedDevice);
final FakeDevice newWirelessDevice = FakeDevice('New wireless device', 'new-wireless-device', connectionInterface: DeviceConnectionInterface.wireless);
supportedDiscoverer.addDevice(newWirelessDevice);
expect(await deviceManager.getAllDevices(), <Device>[attachedDevice, wirelessDevice]);
});
testWithoutContext('refreshAllDevices does not cache', () async {
final FakePollingDeviceDiscovery notSupportedDiscoverer = FakePollingDeviceDiscovery();
final FakePollingDeviceDiscovery supportedDiscoverer = FakePollingDeviceDiscovery(requiresExtendedWirelessDeviceDiscovery: true);
final FakeDevice attachedDevice = FakeDevice('Nexus 5', '0553790d0a4e726f');
final FakeDevice wirelessDevice = FakeDevice('Wireless device', 'wireless-device', connectionInterface: DeviceConnectionInterface.wireless);
notSupportedDiscoverer.addDevice(attachedDevice);
supportedDiscoverer.addDevice(wirelessDevice);
final TestDeviceManager deviceManager = TestDeviceManager(
<Device>[],
logger: BufferLogger.test(),
deviceDiscoveryOverrides: <DeviceDiscovery>[
notSupportedDiscoverer,
supportedDiscoverer,
],
);
expect(await deviceManager.refreshAllDevices(), <Device>[attachedDevice, wirelessDevice]);
final FakeDevice newAttachedDevice = FakeDevice('Nexus 5X', '01abfc49119c410e');
notSupportedDiscoverer.addDevice(newAttachedDevice);
final FakeDevice newWirelessDevice = FakeDevice('New wireless device', 'new-wireless-device', connectionInterface: DeviceConnectionInterface.wireless);
supportedDiscoverer.addDevice(newWirelessDevice);
expect(await deviceManager.refreshAllDevices(), <Device>[attachedDevice, newAttachedDevice, wirelessDevice, newWirelessDevice]);
});
testWithoutContext('refreshExtendedWirelessDeviceDiscoverers only refreshes discoverers that require extended time', () async {
final FakePollingDeviceDiscovery normalDiscoverer = FakePollingDeviceDiscovery();
final FakePollingDeviceDiscovery extendedDiscoverer = FakePollingDeviceDiscovery(requiresExtendedWirelessDeviceDiscovery: true);
final FakeDevice attachedDevice = FakeDevice('Nexus 5', '0553790d0a4e726f');
final FakeDevice wirelessDevice = FakeDevice('Wireless device', 'wireless-device', connectionInterface: DeviceConnectionInterface.wireless);
normalDiscoverer.addDevice(attachedDevice);
extendedDiscoverer.addDevice(wirelessDevice);
final TestDeviceManager deviceManager = TestDeviceManager(
<Device>[],
logger: BufferLogger.test(),
deviceDiscoveryOverrides: <DeviceDiscovery>[
normalDiscoverer,
extendedDiscoverer,
],
);
await deviceManager.refreshExtendedWirelessDeviceDiscoverers();
expect(await deviceManager.getAllDevices(), <Device>[attachedDevice, wirelessDevice]);
final FakeDevice newAttachedDevice = FakeDevice('Nexus 5X', '01abfc49119c410e');
normalDiscoverer.addDevice(newAttachedDevice);
final FakeDevice newWirelessDevice = FakeDevice('New wireless device', 'new-wireless-device', connectionInterface: DeviceConnectionInterface.wireless);
extendedDiscoverer.addDevice(newWirelessDevice);
await deviceManager.refreshExtendedWirelessDeviceDiscoverers();
expect(await deviceManager.getAllDevices(), <Device>[attachedDevice, wirelessDevice, newWirelessDevice]);
});
});
testWithoutContext('PollingDeviceDiscovery startPolling', () {
FakeAsync().run((FakeAsync time) {
final FakePollingDeviceDiscovery pollingDeviceDiscovery = FakePollingDeviceDiscovery();
pollingDeviceDiscovery.startPolling();
// First check should use the default polling timeout
// to quickly populate the list.
expect(pollingDeviceDiscovery.lastPollingTimeout, isNull);
time.elapse(const Duration(milliseconds: 4001));
// Subsequent polling should be much longer.
expect(pollingDeviceDiscovery.lastPollingTimeout, const Duration(seconds: 30));
pollingDeviceDiscovery.stopPolling();
});
});
group('Filter devices', () {
final FakeDevice ephemeralOne = FakeDevice('ephemeralOne', 'ephemeralOne');
final FakeDevice ephemeralTwo = FakeDevice('ephemeralTwo', 'ephemeralTwo');
final FakeDevice nonEphemeralOne = FakeDevice('nonEphemeralOne', 'nonEphemeralOne', ephemeral: false);
final FakeDevice nonEphemeralTwo = FakeDevice('nonEphemeralTwo', 'nonEphemeralTwo', ephemeral: false);
final FakeDevice unsupported = FakeDevice('unsupported', 'unsupported', isSupported: false);
final FakeDevice unsupportedForProject = FakeDevice('unsupportedForProject', 'unsupportedForProject', isSupportedForProject: false);
final FakeDevice webDevice = FakeDevice('webby', 'webby')
..targetPlatform = Future<TargetPlatform>.value(TargetPlatform.web_javascript);
final FakeDevice fuchsiaDevice = FakeDevice('fuchsiay', 'fuchsiay')
..targetPlatform = Future<TargetPlatform>.value(TargetPlatform.fuchsia_x64);
final FakeDevice unconnectedDevice = FakeDevice('ephemeralTwo', 'ephemeralTwo', isConnected: false);
final FakeDevice wirelessDevice = FakeDevice('ephemeralTwo', 'ephemeralTwo', connectionInterface: DeviceConnectionInterface.wireless);
testUsingContext('chooses ephemeral device', () async {
final List<Device> devices = <Device>[
ephemeralOne,
nonEphemeralOne,
nonEphemeralTwo,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
final Device? ephemeralDevice = deviceManager.getSingleEphemeralDevice(devices);
expect(ephemeralDevice, ephemeralOne);
}, overrides: <Type, Generator>{
FlutterProject: () => FakeFlutterProject(),
});
testUsingContext('returns null when multiple non ephemeral devices are found', () async {
final List<Device> devices = <Device>[
ephemeralOne,
ephemeralTwo,
nonEphemeralOne,
nonEphemeralTwo,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
final Device? ephemeralDevice = deviceManager.getSingleEphemeralDevice(devices);
expect(ephemeralDevice, isNull);
}, overrides: <Type, Generator>{
FlutterProject: () => FakeFlutterProject(),
});
testUsingContext('return null when hasSpecifiedDeviceId is true', () async {
final List<Device> devices = <Device>[
ephemeralOne,
nonEphemeralOne,
nonEphemeralTwo,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
deviceManager.specifiedDeviceId = 'device';
final Device? ephemeralDevice = deviceManager.getSingleEphemeralDevice(devices);
expect(ephemeralDevice, isNull);
}, overrides: <Type, Generator>{
FlutterProject: () => FakeFlutterProject(),
});
testUsingContext('returns null when no ephemeral devices are found', () async {
final List<Device> devices = <Device>[
nonEphemeralOne,
nonEphemeralTwo,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
final Device? ephemeralDevice = deviceManager.getSingleEphemeralDevice(devices);
expect(ephemeralDevice, isNull);
}, overrides: <Type, Generator>{
FlutterProject: () => FakeFlutterProject(),
});
testWithoutContext('Unsupported devices listed in all devices', () async {
final List<Device> devices = <Device>[
unsupported,
unsupportedForProject,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
final List<Device> filtered = await deviceManager.getDevices();
expect(filtered, <Device>[
unsupported,
unsupportedForProject,
]);
});
testUsingContext('Removes unsupported devices', () async {
final List<Device> devices = <Device>[
unsupported,
unsupportedForProject,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
final List<Device> filtered = await deviceManager.getDevices(
filter: DeviceDiscoveryFilter(
supportFilter: deviceManager.deviceSupportFilter(),
),
);
expect(filtered, <Device>[]);
});
testUsingContext('Retains devices unsupported by the project if includeDevicesUnsupportedByProject is true', () async {
final List<Device> devices = <Device>[
unsupported,
unsupportedForProject,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
final List<Device> filtered = await deviceManager.getDevices(
filter: DeviceDiscoveryFilter(
supportFilter: deviceManager.deviceSupportFilter(
includeDevicesUnsupportedByProject: true,
),
),
);
expect(filtered, <Device>[unsupportedForProject]);
});
testUsingContext('Removes web and fuchsia from --all', () async {
final List<Device> devices = <Device>[
webDevice,
fuchsiaDevice,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
deviceManager.specifiedDeviceId = 'all';
final List<Device> filtered = await deviceManager.getDevices(
filter: DeviceDiscoveryFilter(
supportFilter: deviceManager.deviceSupportFilter(),
),
);
expect(filtered, <Device>[]);
});
testUsingContext('Removes devices unsupported by the project from --all', () async {
final List<Device> devices = <Device>[
nonEphemeralOne,
nonEphemeralTwo,
unsupported,
unsupportedForProject,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
deviceManager.specifiedDeviceId = 'all';
final List<Device> filtered = await deviceManager.getDevices(
filter: DeviceDiscoveryFilter(
supportFilter: deviceManager.deviceSupportFilter(),
),
);
expect(filtered, <Device>[
nonEphemeralOne,
nonEphemeralTwo,
]);
});
testUsingContext('Returns device with the specified id', () async {
final List<Device> devices = <Device>[
nonEphemeralOne,
nonEphemeralTwo,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
deviceManager.specifiedDeviceId = nonEphemeralOne.id;
final List<Device> filtered = await deviceManager.getDevices(
filter: DeviceDiscoveryFilter(
supportFilter: deviceManager.deviceSupportFilter(),
),
);
expect(filtered, <Device>[
nonEphemeralOne,
]);
});
testUsingContext('Returns multiple devices when multiple devices matches the specified id', () async {
final List<Device> devices = <Device>[
nonEphemeralOne,
nonEphemeralTwo,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
deviceManager.specifiedDeviceId = 'nonEphemeral'; // This prefix matches both devices
final List<Device> filtered = await deviceManager.getDevices(
filter: DeviceDiscoveryFilter(
supportFilter: deviceManager.deviceSupportFilter(),
),
);
expect(filtered, <Device>[
nonEphemeralOne,
nonEphemeralTwo,
]);
});
testUsingContext('Returns empty when device of specified id is not found', () async {
final List<Device> devices = <Device>[
nonEphemeralOne,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
deviceManager.specifiedDeviceId = nonEphemeralTwo.id;
final List<Device> filtered = await deviceManager.getDevices(
filter: DeviceDiscoveryFilter(
supportFilter: deviceManager.deviceSupportFilter(),
),
);
expect(filtered, <Device>[]);
});
testWithoutContext('uses DeviceDiscoverySupportFilter.isDeviceSupportedForProject instead of device.isSupportedForProject', () async {
final List<Device> devices = <Device>[
unsupported,
unsupportedForProject,
];
final TestDeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
final TestDeviceDiscoverySupportFilter supportFilter =
TestDeviceDiscoverySupportFilter.excludeDevicesUnsupportedByFlutterOrProject(
flutterProject: FakeFlutterProject(),
);
supportFilter.isAlwaysSupportedForProjectOverride = true;
final DeviceDiscoveryFilter filter = DeviceDiscoveryFilter(
supportFilter: supportFilter,
);
final List<Device> filtered = await deviceManager.getDevices(
filter: filter,
);
expect(filtered, <Device>[
unsupportedForProject,
]);
});
testUsingContext('Unconnected devices filtered out by default', () async {
final List<Device> devices = <Device>[
unconnectedDevice,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
final List<Device> filtered = await deviceManager.getDevices();
expect(filtered, <Device>[]);
});
testUsingContext('Return unconnected devices when filter allows', () async {
final List<Device> devices = <Device>[
unconnectedDevice,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
final DeviceDiscoveryFilter filter = DeviceDiscoveryFilter(
excludeDisconnected: false,
);
final List<Device> filtered = await deviceManager.getDevices(
filter: filter,
);
expect(filtered, <Device>[unconnectedDevice]);
});
testUsingContext('Filter to only include wireless devices', () async {
final List<Device> devices = <Device>[
ephemeralOne,
wirelessDevice,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
final DeviceDiscoveryFilter filter = DeviceDiscoveryFilter(
deviceConnectionInterface: DeviceConnectionInterface.wireless,
);
final List<Device> filtered = await deviceManager.getDevices(
filter: filter,
);
expect(filtered, <Device>[wirelessDevice]);
});
testUsingContext('Filter to only include attached devices', () async {
final List<Device> devices = <Device>[
ephemeralOne,
wirelessDevice,
];
final DeviceManager deviceManager = TestDeviceManager(
devices,
logger: BufferLogger.test(),
);
final DeviceDiscoveryFilter filter = DeviceDiscoveryFilter(
deviceConnectionInterface: DeviceConnectionInterface.attached,
);
final List<Device> filtered = await deviceManager.getDevices(
filter: filter,
);
expect(filtered, <Device>[ephemeralOne]);
});
});
group('Simultaneous device discovery', () {
testWithoutContext('Run getAllDevices and refreshAllDevices at same time with refreshAllDevices finishing last', () async {
FakeAsync().run((FakeAsync time) {
final FakeDevice device1 = FakeDevice('Nexus 5', '0553790d0a4e726f');
final FakeDevice device2 = FakeDevice('Nexus 5X', '01abfc49119c410e');
const Duration timeToGetInitialDevices = Duration(seconds: 1);
const Duration timeToRefreshDevices = Duration(seconds: 5);
final List<Device> initialDevices = <Device>[device2];
final List<Device> refreshDevices = <Device>[device1];
final TestDeviceManager deviceManager = TestDeviceManager(
<Device>[],
logger: BufferLogger.test(),
fakeDiscoverer: FakePollingDeviceDiscoveryWithTimeout(
<List<Device>>[
initialDevices,
refreshDevices,
],
timeout: timeToGetInitialDevices,
),
);
// Expect that the cache is set by getOrSetCache process (1 second timeout)
// and then later updated by refreshCache process (5 second timeout).
// Ending with devices from the refreshCache process.
final Future<List<Device>> refreshCache = deviceManager.refreshAllDevices(
timeout: timeToRefreshDevices,
);
final Future<List<Device>> getOrSetCache = deviceManager.getAllDevices();
// After 1 second, the getAllDevices should be done
time.elapse(const Duration(seconds: 1));
expect(getOrSetCache, completion(<Device>[device2]));
// double check values in cache are as expected
Future<List<Device>> getFromCache = deviceManager.getAllDevices();
expect(getFromCache, completion(<Device>[device2]));
// After 5 seconds, getOrSetCache should be done
time.elapse(const Duration(seconds: 5));
expect(refreshCache, completion(<Device>[device1]));
// double check values in cache are as expected
getFromCache = deviceManager.getAllDevices();
expect(getFromCache, completion(<Device>[device1]));
time.flushMicrotasks();
});
});
testWithoutContext('Run getAllDevices and refreshAllDevices at same time with refreshAllDevices finishing first', () async {
fakeAsync((FakeAsync async) {
final FakeDevice device1 = FakeDevice('Nexus 5', '0553790d0a4e726f');
final FakeDevice device2 = FakeDevice('Nexus 5X', '01abfc49119c410e');
const Duration timeToGetInitialDevices = Duration(seconds: 5);
const Duration timeToRefreshDevices = Duration(seconds: 1);
final List<Device> initialDevices = <Device>[device2];
final List<Device> refreshDevices = <Device>[device1];
final TestDeviceManager deviceManager = TestDeviceManager(
<Device>[],
logger: BufferLogger.test(),
fakeDiscoverer: FakePollingDeviceDiscoveryWithTimeout(
<List<Device>>[
initialDevices,
refreshDevices,
],
timeout: timeToGetInitialDevices,
),
);
// Expect that the cache is set by refreshCache process (1 second timeout).
// Then later when getOrSetCache finishes (5 second timeout), it does not update the cache.
// Ending with devices from the refreshCache process.
final Future<List<Device>> refreshCache = deviceManager.refreshAllDevices(
timeout: timeToRefreshDevices,
);
final Future<List<Device>> getOrSetCache = deviceManager.getAllDevices();
// After 1 second, the refreshCache should be done
async.elapse(const Duration(seconds: 1));
expect(refreshCache, completion(<Device>[device2]));
// double check values in cache are as expected
Future<List<Device>> getFromCache = deviceManager.getAllDevices();
expect(getFromCache, completion(<Device>[device2]));
// After 5 seconds, getOrSetCache should be done
async.elapse(const Duration(seconds: 5));
expect(getOrSetCache, completion(<Device>[device2]));
// double check values in cache are as expected
getFromCache = deviceManager.getAllDevices();
expect(getFromCache, completion(<Device>[device2]));
async.flushMicrotasks();
});
});
testWithoutContext('refreshAllDevices twice', () async {
fakeAsync((FakeAsync async) {
final FakeDevice device1 = FakeDevice('Nexus 5', '0553790d0a4e726f');
final FakeDevice device2 = FakeDevice('Nexus 5X', '01abfc49119c410e');
const Duration timeToFirstRefresh = Duration(seconds: 1);
const Duration timeToSecondRefresh = Duration(seconds: 5);
final List<Device> firstRefreshDevices = <Device>[device2];
final List<Device> secondRefreshDevices = <Device>[device1];
final TestDeviceManager deviceManager = TestDeviceManager(
<Device>[],
logger: BufferLogger.test(),
fakeDiscoverer: FakePollingDeviceDiscoveryWithTimeout(
<List<Device>>[
firstRefreshDevices,
secondRefreshDevices,
],
),
);
// Expect that the cache is updated by each refresh in order of completion.
final Future<List<Device>> firstRefresh = deviceManager.refreshAllDevices(
timeout: timeToFirstRefresh,
);
final Future<List<Device>> secondRefresh = deviceManager.refreshAllDevices(
timeout: timeToSecondRefresh,
);
// After 1 second, the firstRefresh should be done
async.elapse(const Duration(seconds: 1));
expect(firstRefresh, completion(<Device>[device2]));
// double check values in cache are as expected
Future<List<Device>> getFromCache = deviceManager.getAllDevices();
expect(getFromCache, completion(<Device>[device2]));
// After 5 seconds, secondRefresh should be done
async.elapse(const Duration(seconds: 5));
expect(secondRefresh, completion(<Device>[device1]));
// double check values in cache are as expected
getFromCache = deviceManager.getAllDevices();
expect(getFromCache, completion(<Device>[device1]));
async.flushMicrotasks();
});
});
});
group('JSON encode devices', () {
testWithoutContext('Consistency of JSON representation', () async {
expect(
// This tests that fakeDevices is a list of tuples where "second" is the
// correct JSON representation of the "first". Actual values are irrelevant
await Future.wait(fakeDevices.map((FakeDeviceJsonData d) => d.dev.toJson())),
fakeDevices.map((FakeDeviceJsonData d) => d.json)
);
});
});
testWithoutContext('computeDartVmFlags handles various combinations of Dart VM flags and null_assertions', () {
expect(computeDartVmFlags(DebuggingOptions.enabled(BuildInfo.debug)), '');
expect(computeDartVmFlags(DebuggingOptions.enabled(BuildInfo.debug, dartFlags: '--foo')), '--foo');
expect(computeDartVmFlags(DebuggingOptions.enabled(BuildInfo.debug, nullAssertions: true)), '--null_assertions');
expect(computeDartVmFlags(DebuggingOptions.enabled(BuildInfo.debug, dartFlags: '--foo', nullAssertions: true)), '--foo,--null_assertions');
});
group('JSON encode DebuggingOptions', () {
testWithoutContext('can preserve the original options', () {
final DebuggingOptions original = DebuggingOptions.enabled(
BuildInfo.debug,
startPaused: true,
disableServiceAuthCodes: true,
enableDds: false,
dartEntrypointArgs: <String>['a', 'b'],
dartFlags: 'c',
deviceVmServicePort: 1234,
enableImpeller: ImpellerStatus.enabled,
enableDartProfiling: false,
enableEmbedderApi: true,
);
final String jsonString = json.encode(original.toJson());
final Map<String, dynamic> decoded = castStringKeyedMap(json.decode(jsonString))!;
final DebuggingOptions deserialized = DebuggingOptions.fromJson(decoded, BuildInfo.debug);
expect(deserialized.startPaused, original.startPaused);
expect(deserialized.disableServiceAuthCodes, original.disableServiceAuthCodes);
expect(deserialized.enableDds, original.enableDds);
expect(deserialized.dartEntrypointArgs, original.dartEntrypointArgs);
expect(deserialized.dartFlags, original.dartFlags);
expect(deserialized.deviceVmServicePort, original.deviceVmServicePort);
expect(deserialized.enableImpeller, original.enableImpeller);
expect(deserialized.enableDartProfiling, original.enableDartProfiling);
expect(deserialized.enableEmbedderApi, original.enableEmbedderApi);
});
});
group('Get iOS launch arguments from DebuggingOptions', () {
testWithoutContext('Get launch arguments for physical device with debugging enabled with all launch arguments', () {
final DebuggingOptions original = DebuggingOptions.enabled(
BuildInfo.debug,
startPaused: true,
disableServiceAuthCodes: true,
disablePortPublication: true,
dartFlags: '--foo',
useTestFonts: true,
enableSoftwareRendering: true,
skiaDeterministicRendering: true,
traceSkia: true,
traceAllowlist: 'foo',
traceSkiaAllowlist: 'skia.a,skia.b',
traceSystrace: true,
traceToFile: 'path/to/trace.binpb',
endlessTraceBuffer: true,
dumpSkpOnShaderCompilation: true,
cacheSkSL: true,
purgePersistentCache: true,
verboseSystemLogs: true,
enableImpeller: ImpellerStatus.disabled,
nullAssertions: true,
deviceVmServicePort: 0,
hostVmServicePort: 1,
);
final List<String> launchArguments = original.getIOSLaunchArguments(
EnvironmentType.physical,
'/test',
<String, dynamic>{
'trace-startup': true,
},
);
expect(
launchArguments.join(' '),
<String>[
'--enable-dart-profiling',
'--disable-service-auth-codes',
'--disable-vm-service-publication',
'--start-paused',
'--dart-flags="--foo,--null_assertions"',
'--use-test-fonts',
'--enable-checked-mode',
'--verify-entry-points',
'--enable-software-rendering',
'--trace-systrace',
'--trace-to-file="path/to/trace.binpb"',
'--skia-deterministic-rendering',
'--trace-skia',
'--trace-allowlist="foo"',
'--trace-skia-allowlist="skia.a,skia.b"',
'--endless-trace-buffer',
'--dump-skp-on-shader-compilation',
'--verbose-logging',
'--cache-sksl',
'--purge-persistent-cache',
'--route=/test',
'--trace-startup',
'--enable-impeller=false',
'--vm-service-port=0',
].join(' '),
);
});
testWithoutContext('Get launch arguments for physical device with debugging enabled with no launch arguments', () {
final DebuggingOptions original = DebuggingOptions.enabled(
BuildInfo.debug,
);
final List<String> launchArguments = original.getIOSLaunchArguments(
EnvironmentType.physical,
null,
<String, Object?>{},
);
expect(
launchArguments.join(' '),
<String>[
'--enable-dart-profiling',
'--enable-checked-mode',
'--verify-entry-points',
].join(' '),
);
});
testWithoutContext('Get launch arguments for physical CoreDevice with debugging enabled with no launch arguments', () {
final DebuggingOptions original = DebuggingOptions.enabled(
BuildInfo.debug,
);
final List<String> launchArguments = original.getIOSLaunchArguments(
EnvironmentType.physical,
null,
<String, Object?>{},
isCoreDevice: true,
);
expect(
launchArguments.join(' '),
<String>[
'--enable-dart-profiling',
].join(' '),
);
});
testWithoutContext('Get launch arguments for physical device with iPv4 network connection', () {
final DebuggingOptions original = DebuggingOptions.enabled(
BuildInfo.debug,
);
final List<String> launchArguments = original.getIOSLaunchArguments(
EnvironmentType.physical,
null,
<String, Object?>{},
interfaceType: DeviceConnectionInterface.wireless,
);
expect(
launchArguments.join(' '),
<String>[
'--enable-dart-profiling',
'--enable-checked-mode',
'--verify-entry-points',
'--vm-service-host=0.0.0.0',
].join(' '),
);
});
testWithoutContext('Get launch arguments for physical device with iPv6 network connection', () {
final DebuggingOptions original = DebuggingOptions.enabled(
BuildInfo.debug,
);
final List<String> launchArguments = original.getIOSLaunchArguments(
EnvironmentType.physical,
null,
<String, Object?>{},
ipv6: true,
interfaceType: DeviceConnectionInterface.wireless,
);
expect(
launchArguments.join(' '),
<String>[
'--enable-dart-profiling',
'--enable-checked-mode',
'--verify-entry-points',
'--vm-service-host=::0',
].join(' '),
);
});
testWithoutContext('Get launch arguments for physical device with debugging disabled with available launch arguments', () {
final DebuggingOptions original = DebuggingOptions.disabled(
BuildInfo.debug,
traceAllowlist: 'foo',
cacheSkSL: true,
enableImpeller: ImpellerStatus.disabled,
);
final List<String> launchArguments = original.getIOSLaunchArguments(
EnvironmentType.physical,
'/test',
<String, dynamic>{
'trace-startup': true,
},
);
expect(
launchArguments.join(' '),
<String>[
'--enable-dart-profiling',
'--trace-allowlist="foo"',
'--cache-sksl',
'--route=/test',
'--trace-startup',
'--enable-impeller=false',
].join(' '),
);
});
testWithoutContext('Get launch arguments for simulator device with debugging enabled with all launch arguments', () {
final DebuggingOptions original = DebuggingOptions.enabled(
BuildInfo.debug,
startPaused: true,
disableServiceAuthCodes: true,
disablePortPublication: true,
dartFlags: '--foo',
useTestFonts: true,
enableSoftwareRendering: true,
skiaDeterministicRendering: true,
traceSkia: true,
traceAllowlist: 'foo',
traceSkiaAllowlist: 'skia.a,skia.b',
traceSystrace: true,
traceToFile: 'path/to/trace.binpb',
endlessTraceBuffer: true,
dumpSkpOnShaderCompilation: true,
cacheSkSL: true,
purgePersistentCache: true,
verboseSystemLogs: true,
enableImpeller: ImpellerStatus.disabled,
nullAssertions: true,
deviceVmServicePort: 0,
hostVmServicePort: 1,
);
final List<String> launchArguments = original.getIOSLaunchArguments(
EnvironmentType.simulator,
'/test',
<String, dynamic>{
'trace-startup': true,
},
);
expect(
launchArguments.join(' '),
<String>[
'--enable-dart-profiling',
'--disable-service-auth-codes',
'--disable-vm-service-publication',
'--start-paused',
'--dart-flags=--foo,--null_assertions',
'--use-test-fonts',
'--enable-checked-mode',
'--verify-entry-points',
'--enable-software-rendering',
'--trace-systrace',
'--trace-to-file="path/to/trace.binpb"',
'--skia-deterministic-rendering',
'--trace-skia',
'--trace-allowlist="foo"',
'--trace-skia-allowlist="skia.a,skia.b"',
'--endless-trace-buffer',
'--dump-skp-on-shader-compilation',
'--verbose-logging',
'--cache-sksl',
'--purge-persistent-cache',
'--route=/test',
'--trace-startup',
'--enable-impeller=false',
'--vm-service-port=1',
].join(' '),
);
});
testWithoutContext('Get launch arguments for simulator device with debugging enabled with no launch arguments', () {
final DebuggingOptions original = DebuggingOptions.enabled(
BuildInfo.debug,
);
final List<String> launchArguments = original.getIOSLaunchArguments(
EnvironmentType.simulator,
null,
<String, Object?>{},
);
expect(
launchArguments.join(' '),
<String>[
'--enable-dart-profiling',
'--enable-checked-mode',
'--verify-entry-points',
].join(' '),
);
});
testWithoutContext('No --enable-dart-profiling flag when option is false', () {
final DebuggingOptions original = DebuggingOptions.enabled(
BuildInfo.debug,
enableDartProfiling: false,
);
final List<String> launchArguments = original.getIOSLaunchArguments(
EnvironmentType.physical,
null,
<String, Object?>{},
);
expect(
launchArguments.join(' '),
<String>[
'--enable-checked-mode',
'--verify-entry-points',
].join(' '),
);
});
});
}
class TestDeviceManager extends DeviceManager {
TestDeviceManager(
List<Device> allDevices, {
List<DeviceDiscovery>? deviceDiscoveryOverrides,
required super.logger,
String? wellKnownId,
FakePollingDeviceDiscovery? fakeDiscoverer,
}) : _fakeDeviceDiscoverer = fakeDiscoverer ?? FakePollingDeviceDiscovery(),
_deviceDiscoverers = <DeviceDiscovery>[],
super() {
if (wellKnownId != null) {
_fakeDeviceDiscoverer.wellKnownIds.add(wellKnownId);
}
_deviceDiscoverers.add(_fakeDeviceDiscoverer);
if (deviceDiscoveryOverrides != null) {
_deviceDiscoverers.addAll(deviceDiscoveryOverrides);
}
resetDevices(allDevices);
}
@override
List<DeviceDiscovery> get deviceDiscoverers => _deviceDiscoverers;
final List<DeviceDiscovery> _deviceDiscoverers;
final FakePollingDeviceDiscovery _fakeDeviceDiscoverer;
void resetDevices(List<Device> allDevices) {
_fakeDeviceDiscoverer.setDevices(allDevices);
}
}
class TestDeviceDiscoverySupportFilter extends DeviceDiscoverySupportFilter {
TestDeviceDiscoverySupportFilter.excludeDevicesUnsupportedByFlutterOrProject({
required super.flutterProject,
}) : super.excludeDevicesUnsupportedByFlutterOrProject();
bool? isAlwaysSupportedForProjectOverride;
@override
bool isDeviceSupportedForProject(Device device) {
return isAlwaysSupportedForProjectOverride ?? super.isDeviceSupportedForProject(device);
}
}
class FakePollingDeviceDiscoveryWithTimeout extends FakePollingDeviceDiscovery {
FakePollingDeviceDiscoveryWithTimeout(
this._devices, {
Duration? timeout,
}): defaultTimeout = timeout ?? const Duration(seconds: 2);
final List<List<Device>> _devices;
int index = 0;
Duration defaultTimeout;
@override
Future<List<Device>> pollingGetDevices({ Duration? timeout }) async {
timeout ??= defaultTimeout;
await Future<void>.delayed(timeout);
final List<Device> results = _devices[index];
index += 1;
return results;
}
}
class FakeFlutterProject extends Fake implements FlutterProject { }
class LongPollingDeviceDiscovery extends PollingDeviceDiscovery {
LongPollingDeviceDiscovery() : super('forever');
final Completer<List<Device>> _completer = Completer<List<Device>>();
@override
Future<List<Device>> pollingGetDevices({ Duration? timeout }) async {
return _completer.future;
}
@override
Future<void> stopPolling() async {
_completer.complete(<Device>[]);
}
@override
Future<void> dispose() async {
_completer.complete(<Device>[]);
}
@override
bool get supportsPlatform => true;
@override
bool get canListAnything => true;
@override
final List<String> wellKnownIds = <String>[];
}
class ThrowingPollingDeviceDiscovery extends PollingDeviceDiscovery {
ThrowingPollingDeviceDiscovery() : super('throw');
@override
Future<List<Device>> pollingGetDevices({ Duration? timeout }) async {
throw const ProcessException('fake-discovery', <String>[]);
}
@override
bool get supportsPlatform => true;
@override
bool get canListAnything => true;
@override
List<String> get wellKnownIds => <String>[];
}
| 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/src/base/logger.dart';
import 'package:flutter_tools/src/base/platform.dart';
import 'package:flutter_tools/src/features.dart';
import 'package:flutter_tools/src/fuchsia/fuchsia_ffx.dart';
import 'package:flutter_tools/src/fuchsia/fuchsia_sdk.dart';
import 'package:test/fake.dart';
import '../../src/common.dart';
import '../../src/context.dart';
import '../../src/fakes.dart';
void main() {
late FakeFuchsiaArtifacts fakeFuchsiaArtifacts;
late BufferLogger logger;
late MemoryFileSystem memoryFileSystem;
late File ffx;
setUp(() {
fakeFuchsiaArtifacts = FakeFuchsiaArtifacts();
memoryFileSystem = MemoryFileSystem.test();
logger = BufferLogger.test();
ffx = memoryFileSystem.file('ffx');
fakeFuchsiaArtifacts.ffx = ffx;
});
testUsingContext('isFuchsiaSupportedPlatform returns true when opted in on Linux and macOS', () {
expect(isFuchsiaSupportedPlatform(FakePlatform(operatingSystem: 'macos')), true);
expect(isFuchsiaSupportedPlatform(FakePlatform()), true);
expect(isFuchsiaSupportedPlatform(FakePlatform(operatingSystem: 'windows')), false);
}, overrides: <Type, Generator>{
FeatureFlags: () => TestFeatureFlags(isFuchsiaEnabled: true),
});
testUsingContext('isFuchsiaSupportedPlatform returns false when opted out on Linux and macOS', () {
expect(isFuchsiaSupportedPlatform(FakePlatform(operatingSystem: 'macos')), false);
expect(isFuchsiaSupportedPlatform(FakePlatform()), false);
expect(isFuchsiaSupportedPlatform(FakePlatform(operatingSystem: 'windows')), false);
}, overrides: <Type, Generator>{
FeatureFlags: () => TestFeatureFlags(),
});
group('ffx list', () {
testWithoutContext('ffx not found', () {
final FuchsiaFfx fuchsiaFfx = FuchsiaFfx(
fuchsiaArtifacts: fakeFuchsiaArtifacts,
logger: logger,
processManager: FakeProcessManager.any(),
);
expect(() async => fuchsiaFfx.list(),
throwsToolExit(message: 'Fuchsia ffx tool not found.'));
});
testWithoutContext('no device found', () async {
ffx.createSync();
final ProcessManager processManager =
FakeProcessManager.list(<FakeCommand>[
FakeCommand(
command: <String>[ffx.path, 'target', 'list', '-f', 's'],
stderr: 'No devices found.',
),
]);
final FuchsiaFfx fuchsiaFfx = FuchsiaFfx(
fuchsiaArtifacts: fakeFuchsiaArtifacts,
logger: logger,
processManager: processManager,
);
expect(await fuchsiaFfx.list(), isNull);
expect(logger.errorText, isEmpty);
});
testWithoutContext('error', () async {
ffx.createSync();
final ProcessManager processManager =
FakeProcessManager.list(<FakeCommand>[
FakeCommand(
command: <String>[ffx.path, 'target', 'list', '-f', 's'],
exitCode: 1,
stderr: 'unexpected error',
),
]);
final FuchsiaFfx fuchsiaFfx = FuchsiaFfx(
fuchsiaArtifacts: fakeFuchsiaArtifacts,
logger: logger,
processManager: processManager,
);
expect(await fuchsiaFfx.list(), isNull);
expect(logger.errorText, contains('unexpected error'));
});
testWithoutContext('devices found', () async {
ffx.createSync();
final ProcessManager processManager =
FakeProcessManager.list(<FakeCommand>[
FakeCommand(
command: <String>[ffx.path, 'target', 'list', '-f', 's'],
stdout: 'device1\ndevice2',
),
]);
final FuchsiaFfx fuchsiaFfx = FuchsiaFfx(
fuchsiaArtifacts: fakeFuchsiaArtifacts,
logger: logger,
processManager: processManager,
);
expect(await fuchsiaFfx.list(), <String>['device1', 'device2']);
expect(logger.errorText, isEmpty);
});
testWithoutContext('timeout', () async {
ffx.createSync();
final ProcessManager processManager =
FakeProcessManager.list(<FakeCommand>[
FakeCommand(
command: <String>[ffx.path, '-T', '2', 'target', 'list', '-f', 's'],
stdout: 'device1',
),
]);
final FuchsiaFfx fuchsiaFfx = FuchsiaFfx(
fuchsiaArtifacts: fakeFuchsiaArtifacts,
logger: logger,
processManager: processManager,
);
expect(await fuchsiaFfx.list(timeout: const Duration(seconds: 2)),
<String>['device1']);
});
});
group('ffx resolve', () {
testWithoutContext('ffx not found', () {
final FuchsiaFfx fuchsiaFfx = FuchsiaFfx(
fuchsiaArtifacts: fakeFuchsiaArtifacts,
logger: logger,
processManager: FakeProcessManager.any(),
);
expect(() async => fuchsiaFfx.list(),
throwsToolExit(message: 'Fuchsia ffx tool not found.'));
});
testWithoutContext('unknown device', () async {
ffx.createSync();
final ProcessManager processManager =
FakeProcessManager.list(<FakeCommand>[
FakeCommand(
command: <String>[
ffx.path,
'target',
'list',
'-f',
'a',
'unknown-device'
],
exitCode: 2,
stderr: 'No devices found.',
),
]);
final FuchsiaFfx fuchsiaFfx = FuchsiaFfx(
fuchsiaArtifacts: fakeFuchsiaArtifacts,
logger: logger,
processManager: processManager,
);
expect(await fuchsiaFfx.resolve('unknown-device'), isNull);
expect(logger.errorText, 'ffx failed: No devices found.\n');
});
testWithoutContext('error', () async {
ffx.createSync();
final ProcessManager processManager =
FakeProcessManager.list(<FakeCommand>[
FakeCommand(
command: <String>[
ffx.path,
'target',
'list',
'-f',
'a',
'error-device'
],
exitCode: 1,
stderr: 'unexpected error',
),
]);
final FuchsiaFfx fuchsiaFfx = FuchsiaFfx(
fuchsiaArtifacts: fakeFuchsiaArtifacts,
logger: logger,
processManager: processManager,
);
expect(await fuchsiaFfx.resolve('error-device'), isNull);
expect(logger.errorText, contains('unexpected error'));
});
testWithoutContext('valid device', () async {
ffx.createSync();
final ProcessManager processManager =
FakeProcessManager.list(<FakeCommand>[
FakeCommand(
command: <String>[
ffx.path,
'target',
'list',
'-f',
'a',
'known-device'
],
stdout: '1234-1234-1234-1234',
),
]);
final FuchsiaFfx fuchsiaFfx = FuchsiaFfx(
fuchsiaArtifacts: fakeFuchsiaArtifacts,
logger: logger,
processManager: processManager,
);
expect(await fuchsiaFfx.resolve('known-device'), '1234-1234-1234-1234');
expect(logger.errorText, isEmpty);
});
});
}
class FakeFuchsiaArtifacts extends Fake implements FuchsiaArtifacts {
@override
File? ffx;
}
| 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_tools/src/base/logger.dart';
import 'package:flutter_tools/src/cache.dart';
import 'package:flutter_tools/src/convert.dart';
import 'package:flutter_tools/src/device.dart';
import 'package:flutter_tools/src/ios/devices.dart';
import 'package:flutter_tools/src/ios/ios_deploy.dart';
import 'package:flutter_tools/src/ios/mac.dart';
import 'package:flutter_tools/src/vmservice.dart';
import 'package:test/fake.dart';
import 'package:vm_service/vm_service.dart';
import '../../src/common.dart';
import '../../src/fake_process_manager.dart';
import '../../src/fake_vm_services.dart';
void main() {
late FakeProcessManager processManager;
late Artifacts artifacts;
late Cache fakeCache;
late BufferLogger logger;
late String ideviceSyslogPath;
setUp(() {
processManager = FakeProcessManager.empty();
fakeCache = Cache.test(processManager: FakeProcessManager.any());
artifacts = Artifacts.test();
logger = BufferLogger.test();
ideviceSyslogPath = artifacts.getHostArtifact(HostArtifact.idevicesyslog).path;
});
group('syslog stream', () {
testWithoutContext('decodeSyslog decodes a syslog-encoded line', () {
final String decoded = decodeSyslog(
r'I \M-b\M^]\M-$\M-o\M-8\M^O syslog '
r'\M-B\M-/\134_(\M-c\M^C\M^D)_/\M-B\M-/ \M-l\M^F\240!');
expect(decoded, r'I ❤️ syslog ¯\_(ツ)_/¯ 솠!');
});
testWithoutContext('decodeSyslog passes through un-decodeable lines as-is', () {
final String decoded = decodeSyslog(r'I \M-b\M^O syslog!');
expect(decoded, r'I \M-b\M^O syslog!');
});
testWithoutContext('IOSDeviceLogReader suppresses non-Flutter lines from output with syslog', () async {
processManager.addCommand(
FakeCommand(
command: <String>[
ideviceSyslogPath, '-u', '1234',
],
stdout: '''
Runner(Flutter)[297] <Notice>: A is for ari
Runner(libsystem_asl.dylib)[297] <Notice>: libMobileGestalt MobileGestaltSupport.m:153: pid 123 (Runner) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled
Runner(libsystem_asl.dylib)[297] <Notice>: libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see <rdar://problem/11744455>)
Runner(Flutter)[297] <Notice>: I is for ichigo
Runner(UIKit)[297] <Notice>: E is for enpitsu"
'''
),
);
final DeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
);
final List<String> lines = await logReader.logLines.toList();
expect(lines, <String>['A is for ari', 'I is for ichigo']);
});
testWithoutContext('IOSDeviceLogReader includes multi-line Flutter logs in the output with syslog', () async {
processManager.addCommand(
FakeCommand(
command: <String>[
ideviceSyslogPath, '-u', '1234',
],
stdout: '''
Runner(Flutter)[297] <Notice>: This is a multi-line message,
with another Flutter message following it.
Runner(Flutter)[297] <Notice>: This is a multi-line message,
with a non-Flutter log message following it.
Runner(libsystem_asl.dylib)[297] <Notice>: libMobileGestalt
'''
),
);
final DeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
);
final List<String> lines = await logReader.logLines.toList();
expect(lines, <String>[
'This is a multi-line message,',
' with another Flutter message following it.',
'This is a multi-line message,',
' with a non-Flutter log message following it.',
]);
});
testWithoutContext('includes multi-line Flutter logs in the output', () async {
processManager.addCommand(
FakeCommand(
command: <String>[
ideviceSyslogPath, '-u', '1234',
],
stdout: '''
Runner(Flutter)[297] <Notice>: This is a multi-line message,
with another Flutter message following it.
Runner(Flutter)[297] <Notice>: This is a multi-line message,
with a non-Flutter log message following it.
Runner(libsystem_asl.dylib)[297] <Notice>: libMobileGestalt
''',
),
);
final DeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
);
final List<String> lines = await logReader.logLines.toList();
expect(lines, <String>[
'This is a multi-line message,',
' with another Flutter message following it.',
'This is a multi-line message,',
' with a non-Flutter log message following it.',
]);
});
});
group('VM service', () {
testWithoutContext('IOSDeviceLogReader can listen to VM Service logs', () async {
final Event stdoutEvent = Event(
kind: 'Stdout',
timestamp: 0,
bytes: base64.encode(utf8.encode(' This is a message ')),
);
final Event stderrEvent = Event(
kind: 'Stderr',
timestamp: 0,
bytes: base64.encode(utf8.encode(' And this is an error ')),
);
final FlutterVmService vmService = FakeVmServiceHost(requests: <VmServiceExpectation>[
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Debug',
}),
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Stdout',
}),
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Stderr',
}),
FakeVmServiceStreamResponse(event: stdoutEvent, streamId: 'Stdout'),
FakeVmServiceStreamResponse(event: stderrEvent, streamId: 'Stderr'),
]).vmService;
final DeviceLogReader logReader = IOSDeviceLogReader.test(
useSyslog: false,
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
);
logReader.connectedVMService = vmService;
// Wait for stream listeners to fire.
await expectLater(logReader.logLines, emitsInAnyOrder(<Matcher>[
equals(' This is a message '),
equals(' And this is an error '),
]));
});
testWithoutContext('IOSDeviceLogReader ignores VM Service logs when attached to and received flutter logs from debugger', () async {
final Event stdoutEvent = Event(
kind: 'Stdout',
timestamp: 0,
bytes: base64.encode(utf8.encode(' This is a message ')),
);
final Event stderrEvent = Event(
kind: 'Stderr',
timestamp: 0,
bytes: base64.encode(utf8.encode(' And this is an error ')),
);
final FlutterVmService vmService = FakeVmServiceHost(requests: <VmServiceExpectation>[
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Debug',
}),
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Stdout',
}),
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Stderr',
}),
FakeVmServiceStreamResponse(event: stdoutEvent, streamId: 'Stdout'),
FakeVmServiceStreamResponse(event: stderrEvent, streamId: 'Stderr'),
]).vmService;
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
useSyslog: false,
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
);
logReader.connectedVMService = vmService;
final FakeIOSDeployDebugger iosDeployDebugger = FakeIOSDeployDebugger();
iosDeployDebugger.debuggerAttached = true;
final Stream<String> debuggingLogs = Stream<String>.fromIterable(<String>[
'flutter: Message from debugger',
]);
iosDeployDebugger.logLines = debuggingLogs;
logReader.debuggerStream = iosDeployDebugger;
// Wait for stream listeners to fire.
await expectLater(logReader.logLines, emitsInAnyOrder(<Matcher>[
equals('flutter: Message from debugger'),
]));
});
});
group('debugger stream', () {
testWithoutContext('IOSDeviceLogReader removes metadata prefix from lldb output', () async {
final Stream<String> debuggingLogs = Stream<String>.fromIterable(<String>[
'2020-09-15 19:15:10.931434-0700 Runner[541:226276] Did finish launching.',
'2020-09-15 19:15:10.931434-0700 Runner[541:226276] [Category] Did finish launching from logging category.',
'stderr from dart',
'',
]);
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
useSyslog: false,
);
final FakeIOSDeployDebugger iosDeployDebugger = FakeIOSDeployDebugger();
iosDeployDebugger.logLines = debuggingLogs;
logReader.debuggerStream = iosDeployDebugger;
final Future<List<String>> logLines = logReader.logLines.toList();
expect(await logLines, <String>[
'Did finish launching.',
'[Category] Did finish launching from logging category.',
'stderr from dart',
'',
]);
});
testWithoutContext('errors on debugger stream closes log stream', () async {
final Stream<String> debuggingLogs = Stream<String>.error('ios-deploy error');
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
useSyslog: false,
);
final Completer<void> streamComplete = Completer<void>();
final FakeIOSDeployDebugger iosDeployDebugger = FakeIOSDeployDebugger();
iosDeployDebugger.logLines = debuggingLogs;
logReader.logLines.listen(null, onError: (Object error) => streamComplete.complete());
logReader.debuggerStream = iosDeployDebugger;
await streamComplete.future;
});
testWithoutContext('detaches debugger', () async {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
useSyslog: false,
);
final FakeIOSDeployDebugger iosDeployDebugger = FakeIOSDeployDebugger();
logReader.debuggerStream = iosDeployDebugger;
logReader.dispose();
expect(iosDeployDebugger.detached, true);
});
testWithoutContext('Does not throw if debuggerStream set after logReader closed', () async {
final Stream<String> debuggingLogs = Stream<String>.fromIterable(<String>[
'2020-09-15 19:15:10.931434-0700 Runner[541:226276] Did finish launching.',
'2020-09-15 19:15:10.931434-0700 Runner[541:226276] [Category] Did finish launching from logging category.',
'stderr from dart',
'',
]);
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
useSyslog: false,
);
Object? exception;
StackTrace? trace;
await asyncGuard(
() async {
await logReader.linesController.close();
final FakeIOSDeployDebugger iosDeployDebugger = FakeIOSDeployDebugger();
iosDeployDebugger.logLines = debuggingLogs;
logReader.debuggerStream = iosDeployDebugger;
await logReader.logLines.drain<void>();
},
onError: (Object err, StackTrace stackTrace) {
exception = err;
trace = stackTrace;
}
);
expect(
exception,
isNull,
reason: trace.toString(),
);
});
});
group('Determine which loggers to use', () {
testWithoutContext('for physically attached CoreDevice', () {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
majorSdkVersion: 17,
isCoreDevice: true,
);
expect(logReader.useSyslogLogging, isTrue);
expect(logReader.useUnifiedLogging, isTrue);
expect(logReader.useIOSDeployLogging, isFalse);
expect(logReader.logSources.primarySource, IOSDeviceLogSource.idevicesyslog);
expect(logReader.logSources.fallbackSource, IOSDeviceLogSource.unifiedLogging);
});
testWithoutContext('for wirelessly attached CoreDevice', () {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
majorSdkVersion: 17,
isCoreDevice: true,
isWirelesslyConnected: true,
);
expect(logReader.useSyslogLogging, isFalse);
expect(logReader.useUnifiedLogging, isTrue);
expect(logReader.useIOSDeployLogging, isFalse);
expect(logReader.logSources.primarySource, IOSDeviceLogSource.unifiedLogging);
expect(logReader.logSources.fallbackSource, isNull);
});
testWithoutContext('for iOS 12 or less device', () {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
majorSdkVersion: 12,
);
expect(logReader.useSyslogLogging, isTrue);
expect(logReader.useUnifiedLogging, isFalse);
expect(logReader.useIOSDeployLogging, isFalse);
expect(logReader.logSources.primarySource, IOSDeviceLogSource.idevicesyslog);
expect(logReader.logSources.fallbackSource, isNull);
});
testWithoutContext('for iOS 13 or greater non-CoreDevice and _iosDeployDebugger not attached', () {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
majorSdkVersion: 13,
);
expect(logReader.useSyslogLogging, isFalse);
expect(logReader.useUnifiedLogging, isTrue);
expect(logReader.useIOSDeployLogging, isTrue);
expect(logReader.logSources.primarySource, IOSDeviceLogSource.iosDeploy);
expect(logReader.logSources.fallbackSource, IOSDeviceLogSource.unifiedLogging);
});
testWithoutContext('for iOS 13 or greater non-CoreDevice, _iosDeployDebugger not attached, and VM is connected', () {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
majorSdkVersion: 13,
);
final FlutterVmService vmService = FakeVmServiceHost(requests: <VmServiceExpectation>[
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Debug',
}),
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Stdout',
}),
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Stderr',
}),
]).vmService;
logReader.connectedVMService = vmService;
expect(logReader.useSyslogLogging, isFalse);
expect(logReader.useUnifiedLogging, isTrue);
expect(logReader.useIOSDeployLogging, isTrue);
expect(logReader.logSources.primarySource, IOSDeviceLogSource.unifiedLogging);
expect(logReader.logSources.fallbackSource, IOSDeviceLogSource.iosDeploy);
});
testWithoutContext('for iOS 13 or greater non-CoreDevice and _iosDeployDebugger is attached', () {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
majorSdkVersion: 13,
);
final FakeIOSDeployDebugger iosDeployDebugger = FakeIOSDeployDebugger();
iosDeployDebugger.debuggerAttached = true;
logReader.debuggerStream = iosDeployDebugger;
final FlutterVmService vmService = FakeVmServiceHost(requests: <VmServiceExpectation>[
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Debug',
}),
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Stdout',
}),
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Stderr',
}),
]).vmService;
logReader.connectedVMService = vmService;
expect(logReader.useSyslogLogging, isFalse);
expect(logReader.useUnifiedLogging, isTrue);
expect(logReader.useIOSDeployLogging, isTrue);
expect(logReader.logSources.primarySource, IOSDeviceLogSource.iosDeploy);
expect(logReader.logSources.fallbackSource, IOSDeviceLogSource.unifiedLogging);
});
testWithoutContext('for iOS 16 or greater non-CoreDevice', () {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
majorSdkVersion: 16,
);
final FakeIOSDeployDebugger iosDeployDebugger = FakeIOSDeployDebugger();
iosDeployDebugger.debuggerAttached = true;
logReader.debuggerStream = iosDeployDebugger;
expect(logReader.useSyslogLogging, isFalse);
expect(logReader.useUnifiedLogging, isTrue);
expect(logReader.useIOSDeployLogging, isTrue);
expect(logReader.logSources.primarySource, IOSDeviceLogSource.iosDeploy);
expect(logReader.logSources.fallbackSource, IOSDeviceLogSource.unifiedLogging);
});
testWithoutContext('for iOS 16 or greater non-CoreDevice in CI', () {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
usingCISystem: true,
majorSdkVersion: 16,
);
expect(logReader.useSyslogLogging, isTrue);
expect(logReader.useUnifiedLogging, isFalse);
expect(logReader.useIOSDeployLogging, isTrue);
expect(logReader.logSources.primarySource, IOSDeviceLogSource.iosDeploy);
expect(logReader.logSources.fallbackSource, IOSDeviceLogSource.idevicesyslog);
});
group('when useSyslogLogging', () {
testWithoutContext('is true syslog sends flutter messages to stream', () async {
processManager.addCommand(
FakeCommand(
command: <String>[
ideviceSyslogPath, '-u', '1234',
],
stdout: '''
Runner(Flutter)[297] <Notice>: A is for ari
Runner(Flutter)[297] <Notice>: I is for ichigo
May 30 13:56:28 Runner(Flutter)[2037] <Notice>: flutter: The Dart VM service is listening on http://127.0.0.1:63098/35ZezGIQLnw=/
May 30 13:56:28 Runner(Flutter)[2037] <Notice>: flutter: This is a test
May 30 13:56:28 Runner(Flutter)[2037] <Notice>: [VERBOSE-2:FlutterDarwinContextMetalImpeller.mm(39)] Using the Impeller rendering backend.
'''
),
);
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
usingCISystem: true,
majorSdkVersion: 16,
);
final List<String> lines = await logReader.logLines.toList();
expect(logReader.useSyslogLogging, isTrue);
expect(processManager, hasNoRemainingExpectations);
expect(lines, <String>[
'flutter: The Dart VM service is listening on http://127.0.0.1:63098/35ZezGIQLnw=/',
'flutter: This is a test'
]);
});
testWithoutContext('is false syslog does not send flutter messages to stream', () async {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
majorSdkVersion: 16,
);
final FakeIOSDeployDebugger iosDeployDebugger = FakeIOSDeployDebugger();
iosDeployDebugger.logLines = Stream<String>.fromIterable(<String>[]);
logReader.debuggerStream = iosDeployDebugger;
final List<String> lines = await logReader.logLines.toList();
expect(logReader.useSyslogLogging, isFalse);
expect(processManager, hasNoRemainingExpectations);
expect(lines, isEmpty);
});
});
group('when useIOSDeployLogging', () {
testWithoutContext('is true ios-deploy sends flutter messages to stream', () async {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
majorSdkVersion: 16,
);
final FakeIOSDeployDebugger iosDeployDebugger = FakeIOSDeployDebugger();
final Stream<String> debuggingLogs = Stream<String>.fromIterable(<String>[
'flutter: Message from debugger',
]);
iosDeployDebugger.logLines = debuggingLogs;
logReader.debuggerStream = iosDeployDebugger;
final List<String> lines = await logReader.logLines.toList();
expect(logReader.useIOSDeployLogging, isTrue);
expect(processManager, hasNoRemainingExpectations);
expect(lines, <String>[
'flutter: Message from debugger',
]);
});
testWithoutContext('is false ios-deploy does not send flutter messages to stream', () async {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: FakeProcessManager.any(),
cache: fakeCache,
logger: logger,
),
majorSdkVersion: 12,
);
final FakeIOSDeployDebugger iosDeployDebugger = FakeIOSDeployDebugger();
final Stream<String> debuggingLogs = Stream<String>.fromIterable(<String>[
'flutter: Message from debugger',
]);
iosDeployDebugger.logLines = debuggingLogs;
logReader.debuggerStream = iosDeployDebugger;
final List<String> lines = await logReader.logLines.toList();
expect(logReader.useIOSDeployLogging, isFalse);
expect(processManager, hasNoRemainingExpectations);
expect(lines, isEmpty);
});
});
group('when useUnifiedLogging', () {
testWithoutContext('is true Dart VM sends flutter messages to stream', () async {
final Event stdoutEvent = Event(
kind: 'Stdout',
timestamp: 0,
bytes: base64.encode(utf8.encode('flutter: A flutter message')),
);
final Event stderrEvent = Event(
kind: 'Stderr',
timestamp: 0,
bytes: base64.encode(utf8.encode('flutter: A second flutter message')),
);
final FlutterVmService vmService = FakeVmServiceHost(requests: <VmServiceExpectation>[
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Debug',
}),
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Stdout',
}),
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Stderr',
}),
FakeVmServiceStreamResponse(event: stdoutEvent, streamId: 'Stdout'),
FakeVmServiceStreamResponse(event: stderrEvent, streamId: 'Stderr'),
]).vmService;
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
useSyslog: false,
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: processManager,
cache: fakeCache,
logger: logger,
),
);
logReader.connectedVMService = vmService;
// Wait for stream listeners to fire.
expect(logReader.useUnifiedLogging, isTrue);
expect(processManager, hasNoRemainingExpectations);
await expectLater(logReader.logLines, emitsInAnyOrder(<Matcher>[
equals('flutter: A flutter message'),
equals('flutter: A second flutter message'),
]));
});
testWithoutContext('is false Dart VM does not send flutter messages to stream', () async {
final Event stdoutEvent = Event(
kind: 'Stdout',
timestamp: 0,
bytes: base64.encode(utf8.encode('flutter: A flutter message')),
);
final Event stderrEvent = Event(
kind: 'Stderr',
timestamp: 0,
bytes: base64.encode(utf8.encode('flutter: A second flutter message')),
);
final FlutterVmService vmService = FakeVmServiceHost(requests: <VmServiceExpectation>[
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Debug',
}),
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Stdout',
}),
const FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Stderr',
}),
FakeVmServiceStreamResponse(event: stdoutEvent, streamId: 'Stdout'),
FakeVmServiceStreamResponse(event: stderrEvent, streamId: 'Stderr'),
]).vmService;
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: FakeProcessManager.any(),
cache: fakeCache,
logger: logger,
),
majorSdkVersion: 12,
);
logReader.connectedVMService = vmService;
final List<String> lines = await logReader.logLines.toList();
// Wait for stream listeners to fire.
expect(logReader.useUnifiedLogging, isFalse);
expect(processManager, hasNoRemainingExpectations);
expect(lines, isEmpty);
});
});
group('and when to exclude logs:', () {
testWithoutContext('all primary messages are included except if fallback sent flutter message first', () async {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: FakeProcessManager.any(),
cache: fakeCache,
logger: logger,
),
usingCISystem: true,
majorSdkVersion: 16,
);
expect(logReader.useSyslogLogging, isTrue);
expect(logReader.useIOSDeployLogging, isTrue);
expect(logReader.logSources.primarySource, IOSDeviceLogSource.iosDeploy);
expect(logReader.logSources.fallbackSource, IOSDeviceLogSource.idevicesyslog);
final Future<List<String>> logLines = logReader.logLines.toList();
logReader.addToLinesController(
'flutter: The Dart VM service is listening on http://127.0.0.1:63098/35ZezGIQLnw=/',
IOSDeviceLogSource.idevicesyslog,
);
// Will be excluded because was already added by fallback.
logReader.addToLinesController(
'flutter: The Dart VM service is listening on http://127.0.0.1:63098/35ZezGIQLnw=/',
IOSDeviceLogSource.iosDeploy,
);
logReader.addToLinesController(
'A second non-flutter message',
IOSDeviceLogSource.iosDeploy,
);
logReader.addToLinesController(
'flutter: Another flutter message',
IOSDeviceLogSource.iosDeploy,
);
final List<String> lines = await logLines;
expect(lines, containsAllInOrder(<String>[
'flutter: The Dart VM service is listening on http://127.0.0.1:63098/35ZezGIQLnw=/', // from idevicesyslog
'A second non-flutter message', // from iosDeploy
'flutter: Another flutter message', // from iosDeploy
]));
});
testWithoutContext('all primary messages are included when there is no fallback', () async {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: FakeProcessManager.any(),
cache: fakeCache,
logger: logger,
),
majorSdkVersion: 12,
);
expect(logReader.useSyslogLogging, isTrue);
expect(logReader.logSources.primarySource, IOSDeviceLogSource.idevicesyslog);
expect(logReader.logSources.fallbackSource, isNull);
final Future<List<String>> logLines = logReader.logLines.toList();
logReader.addToLinesController(
'flutter: The Dart VM service is listening on http://127.0.0.1:63098/35ZezGIQLnw=/',
IOSDeviceLogSource.idevicesyslog,
);
logReader.addToLinesController(
'A non-flutter message',
IOSDeviceLogSource.idevicesyslog,
);
logReader.addToLinesController(
'A non-flutter message',
IOSDeviceLogSource.idevicesyslog,
);
logReader.addToLinesController(
'flutter: A flutter message',
IOSDeviceLogSource.idevicesyslog,
);
logReader.addToLinesController(
'flutter: A flutter message',
IOSDeviceLogSource.idevicesyslog,
);
final List<String> lines = await logLines;
expect(lines, containsAllInOrder(<String>[
'flutter: The Dart VM service is listening on http://127.0.0.1:63098/35ZezGIQLnw=/',
'A non-flutter message',
'A non-flutter message',
'flutter: A flutter message',
'flutter: A flutter message',
]));
});
testWithoutContext('primary messages are not added if fallback already added them, otherwise duplicates are allowed', () async {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: FakeProcessManager.any(),
cache: fakeCache,
logger: logger,
),
usingCISystem: true,
majorSdkVersion: 16,
);
expect(logReader.useSyslogLogging, isTrue);
expect(logReader.useIOSDeployLogging, isTrue);
expect(logReader.logSources.primarySource, IOSDeviceLogSource.iosDeploy);
expect(logReader.logSources.fallbackSource, IOSDeviceLogSource.idevicesyslog);
final Future<List<String>> logLines = logReader.logLines.toList();
logReader.addToLinesController(
'flutter: A flutter message',
IOSDeviceLogSource.idevicesyslog,
);
logReader.addToLinesController(
'flutter: A flutter message',
IOSDeviceLogSource.idevicesyslog,
);
logReader.addToLinesController(
'A non-flutter message',
IOSDeviceLogSource.iosDeploy,
);
logReader.addToLinesController(
'A non-flutter message',
IOSDeviceLogSource.iosDeploy,
);
// Will be excluded because was already added by fallback.
logReader.addToLinesController(
'flutter: A flutter message',
IOSDeviceLogSource.iosDeploy,
);
// Will be excluded because was already added by fallback.
logReader.addToLinesController(
'flutter: A flutter message',
IOSDeviceLogSource.iosDeploy,
);
// Will be included because, although the message is the same, the
// fallback only added it twice so this third one is considered new.
logReader.addToLinesController(
'flutter: A flutter message',
IOSDeviceLogSource.iosDeploy,
);
final List<String> lines = await logLines;
expect(lines, containsAllInOrder(<String>[
'flutter: A flutter message', // from idevicesyslog
'flutter: A flutter message', // from idevicesyslog
'A non-flutter message', // from iosDeploy
'A non-flutter message', // from iosDeploy
'flutter: A flutter message', // from iosDeploy
]));
});
testWithoutContext('flutter fallback messages are included until a primary flutter message is received', () async {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: FakeProcessManager.any(),
cache: fakeCache,
logger: logger,
),
usingCISystem: true,
majorSdkVersion: 16,
);
expect(logReader.useSyslogLogging, isTrue);
expect(logReader.useIOSDeployLogging, isTrue);
expect(logReader.logSources.primarySource, IOSDeviceLogSource.iosDeploy);
expect(logReader.logSources.fallbackSource, IOSDeviceLogSource.idevicesyslog);
final Future<List<String>> logLines = logReader.logLines.toList();
logReader.addToLinesController(
'flutter: The Dart VM service is listening on http://127.0.0.1:63098/35ZezGIQLnw=/',
IOSDeviceLogSource.idevicesyslog,
);
logReader.addToLinesController(
'A second non-flutter message',
IOSDeviceLogSource.iosDeploy,
);
// Will be included because the first log from primary source wasn't a
// flutter log.
logReader.addToLinesController(
'flutter: A flutter message',
IOSDeviceLogSource.idevicesyslog,
);
// Will be excluded because was already added by fallback, however, it
// will be used to determine a flutter log was received by the primary source.
logReader.addToLinesController(
'flutter: The Dart VM service is listening on http://127.0.0.1:63098/35ZezGIQLnw=/',
IOSDeviceLogSource.iosDeploy,
);
// Will be excluded because flutter log from primary was received.
logReader.addToLinesController(
'flutter: A third flutter message',
IOSDeviceLogSource.idevicesyslog,
);
final List<String> lines = await logLines;
expect(lines, containsAllInOrder(<String>[
'flutter: The Dart VM service is listening on http://127.0.0.1:63098/35ZezGIQLnw=/', // from idevicesyslog
'A second non-flutter message', // from iosDeploy
'flutter: A flutter message', // from idevicesyslog
]));
});
testWithoutContext('non-flutter fallback messages are not included', () async {
final IOSDeviceLogReader logReader = IOSDeviceLogReader.test(
iMobileDevice: IMobileDevice(
artifacts: artifacts,
processManager: FakeProcessManager.any(),
cache: fakeCache,
logger: logger,
),
usingCISystem: true,
majorSdkVersion: 16,
);
expect(logReader.useSyslogLogging, isTrue);
expect(logReader.useIOSDeployLogging, isTrue);
expect(logReader.logSources.primarySource, IOSDeviceLogSource.iosDeploy);
expect(logReader.logSources.fallbackSource, IOSDeviceLogSource.idevicesyslog);
final Future<List<String>> logLines = logReader.logLines.toList();
logReader.addToLinesController(
'flutter: A flutter message',
IOSDeviceLogSource.idevicesyslog,
);
// Will be excluded because it's from fallback and not a flutter message.
logReader.addToLinesController(
'A non-flutter message',
IOSDeviceLogSource.idevicesyslog,
);
final List<String> lines = await logLines;
expect(lines, containsAllInOrder(<String>[
'flutter: A flutter message',
]));
});
});
});
}
class FakeIOSDeployDebugger extends Fake implements IOSDeployDebugger {
bool detached = false;
@override
bool debuggerAttached = false;
@override
Stream<String> logLines = const Stream<String>.empty();
@override
Future<void> detach() async {
detached = true;
}
}
| 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 'package:flutter_tools/src/base/platform.dart';
import 'package:flutter_tools/src/build_info.dart';
import 'package:flutter_tools/src/devfs.dart';
import 'package:flutter_tools/src/device.dart';
import 'package:flutter_tools/src/features.dart';
import 'package:flutter_tools/src/resident_devtools_handler.dart';
import 'package:flutter_tools/src/resident_runner.dart';
import 'package:flutter_tools/src/run_hot.dart';
import 'package:native_assets_cli/native_assets_cli_internal.dart'
hide BuildMode, Target;
import 'package:native_assets_cli/native_assets_cli_internal.dart'
as native_assets_cli;
import 'package:package_config/package_config.dart';
import 'package:unified_analytics/unified_analytics.dart';
import '../../src/common.dart';
import '../../src/context.dart';
import '../../src/fakes.dart';
import '../hot_shared.dart';
import 'fake_native_assets_build_runner.dart';
void main() {
group('native assets', () {
late TestHotRunnerConfig testingConfig;
late FileSystem fileSystem;
late FakeAnalytics fakeAnalytics;
setUp(() {
fileSystem = MemoryFileSystem.test();
testingConfig = TestHotRunnerConfig(
successfulHotRestartSetup: true,
);
fakeAnalytics = getInitializedFakeAnalyticsInstance(
fs: fileSystem,
fakeFlutterVersion: FakeFlutterVersion(),
);
});
testUsingContext('native assets restart', () async {
final FakeDevice device = FakeDevice();
final FakeFlutterDevice fakeFlutterDevice = FakeFlutterDevice(device);
final List<FlutterDevice> devices = <FlutterDevice>[
fakeFlutterDevice,
];
fakeFlutterDevice.updateDevFSReportCallback = () async => UpdateFSReport(
success: true,
invalidatedSourcesCount: 6,
syncedBytes: 8,
scannedSourcesCount: 16,
compileDuration: const Duration(seconds: 16),
transferDuration: const Duration(seconds: 32),
);
(fakeFlutterDevice.devFS! as FakeDevFs).baseUri = Uri.parse('file:///base_uri');
final FakeNativeAssetsBuildRunner buildRunner = FakeNativeAssetsBuildRunner(
packagesWithNativeAssetsResult: <Package>[
Package('bar', fileSystem.currentDirectory.uri),
],
dryRunResult: FakeNativeAssetsBuilderResult(
assets: <Asset>[
Asset(
id: 'package:bar/bar.dart',
linkMode: LinkMode.dynamic,
target: native_assets_cli.Target.macOSArm64,
path: AssetAbsolutePath(Uri.file('bar.dylib')),
),
],
),
);
final HotRunner hotRunner = HotRunner(
devices,
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
target: 'main.dart',
devtoolsHandler: createNoOpHandler,
nativeAssetsBuilder: FakeHotRunnerNativeAssetsBuilder(buildRunner),
analytics: fakeAnalytics,
);
final OperationResult result = await hotRunner.restart(fullRestart: true);
expect(result.isOk, true);
// Hot restart does not require rerunning anything for native assets.
// The previous native assets mapping should be used.
expect(buildRunner.buildInvocations, 0);
expect(buildRunner.dryRunInvocations, 0);
expect(buildRunner.hasPackageConfigInvocations, 0);
expect(buildRunner.packagesWithNativeAssetsInvocations, 0);
}, overrides: <Type, Generator>{
HotRunnerConfig: () => testingConfig,
Artifacts: () => Artifacts.test(),
FileSystem: () => fileSystem,
Platform: () => FakePlatform(),
ProcessManager: () => FakeProcessManager.empty(),
FeatureFlags: () => TestFeatureFlags(isNativeAssetsEnabled: true, isMacOSEnabled: true),
});
testUsingContext('native assets run unsupported', () async {
final FakeDevice device = FakeDevice(targetPlatform: TargetPlatform.fuchsia_arm64);
final FakeFlutterDevice fakeFlutterDevice = FakeFlutterDevice(device);
final List<FlutterDevice> devices = <FlutterDevice>[
fakeFlutterDevice,
];
fakeFlutterDevice.updateDevFSReportCallback = () async => UpdateFSReport(
success: true,
invalidatedSourcesCount: 6,
syncedBytes: 8,
scannedSourcesCount: 16,
compileDuration: const Duration(seconds: 16),
transferDuration: const Duration(seconds: 32),
);
(fakeFlutterDevice.devFS! as FakeDevFs).baseUri = Uri.parse('file:///base_uri');
final FakeNativeAssetsBuildRunner buildRunner = FakeNativeAssetsBuildRunner(
packagesWithNativeAssetsResult: <Package>[
Package('bar', fileSystem.currentDirectory.uri),
],
dryRunResult: FakeNativeAssetsBuilderResult(
assets: <Asset>[
Asset(
id: 'package:bar/bar.dart',
linkMode: LinkMode.dynamic,
target: native_assets_cli.Target.macOSArm64,
path: AssetAbsolutePath(Uri.file('bar.dylib')),
),
],
),
);
final HotRunner hotRunner = HotRunner(
devices,
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
target: 'main.dart',
devtoolsHandler: createNoOpHandler,
nativeAssetsBuilder: FakeHotRunnerNativeAssetsBuilder(buildRunner),
analytics: fakeAnalytics,
);
expect(
() => hotRunner.run(),
throwsToolExit( message:
'Package(s) bar require the native assets feature. '
'This feature has not yet been implemented for `TargetPlatform.fuchsia_arm64`. '
'For more info see https://github.com/flutter/flutter/issues/129757.',
)
);
}, overrides: <Type, Generator>{
HotRunnerConfig: () => testingConfig,
Artifacts: () => Artifacts.test(),
FileSystem: () => fileSystem,
Platform: () => FakePlatform(),
ProcessManager: () => FakeProcessManager.empty(),
FeatureFlags: () => TestFeatureFlags(isNativeAssetsEnabled: true, isMacOSEnabled: true),
});
});
}
| 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/ios/plist_parser.dart';
import 'package:flutter_tools/src/macos/migrations/flutter_application_migration.dart';
import 'package:flutter_tools/src/macos/migrations/macos_deployment_target_migration.dart';
import 'package:flutter_tools/src/macos/migrations/remove_macos_framework_link_and_embedding_migration.dart';
import 'package:flutter_tools/src/project.dart';
import 'package:flutter_tools/src/reporting/reporting.dart';
import 'package:test/fake.dart';
import 'package:unified_analytics/unified_analytics.dart';
import '../../src/common.dart';
import '../../src/context.dart';
import '../../src/fakes.dart';
void main() {
group('remove link and embed migration', () {
late TestUsage testUsage;
late FakeAnalytics fakeAnalytics;
late MemoryFileSystem memoryFileSystem;
late BufferLogger testLogger;
late FakeMacOSProject macOSProject;
late File xcodeProjectInfoFile;
setUp(() {
testUsage = TestUsage();
memoryFileSystem = MemoryFileSystem.test();
fakeAnalytics = getInitializedFakeAnalyticsInstance(
fs: memoryFileSystem,
fakeFlutterVersion: FakeFlutterVersion(),
);
xcodeProjectInfoFile = memoryFileSystem.file('project.pbxproj');
testLogger = BufferLogger.test();
macOSProject = FakeMacOSProject();
macOSProject.xcodeProjectInfoFile = xcodeProjectInfoFile;
});
testWithoutContext('skipped if files are missing', () {
final RemoveMacOSFrameworkLinkAndEmbeddingMigration macosProjectMigration =
RemoveMacOSFrameworkLinkAndEmbeddingMigration(
macOSProject,
testLogger,
testUsage,
fakeAnalytics,
);
macosProjectMigration.migrate();
expect(testUsage.events, isEmpty);
expect(fakeAnalytics.sentEvents, isEmpty);
expect(xcodeProjectInfoFile.existsSync(), isFalse);
expect(
testLogger.traceText,
contains(
'Xcode project not found, skipping framework link and embedding migration'));
expect(testLogger.statusText, isEmpty);
});
testWithoutContext('skipped if nothing to upgrade', () {
const String contents = 'Nothing to upgrade';
xcodeProjectInfoFile.writeAsStringSync(contents);
final DateTime projectLastModified =
xcodeProjectInfoFile.lastModifiedSync();
final RemoveMacOSFrameworkLinkAndEmbeddingMigration macosProjectMigration =
RemoveMacOSFrameworkLinkAndEmbeddingMigration(
macOSProject,
testLogger,
testUsage,
fakeAnalytics,
);
macosProjectMigration.migrate();
expect(testUsage.events, isEmpty);
expect(fakeAnalytics.sentEvents, isEmpty);
expect(xcodeProjectInfoFile.lastModifiedSync(), projectLastModified);
expect(xcodeProjectInfoFile.readAsStringSync(), contents);
expect(testLogger.statusText, isEmpty);
});
testWithoutContext('skips migrating script with embed', () {
const String contents = r'''
shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
''';
xcodeProjectInfoFile.writeAsStringSync(contents);
final RemoveMacOSFrameworkLinkAndEmbeddingMigration macosProjectMigration =
RemoveMacOSFrameworkLinkAndEmbeddingMigration(
macOSProject,
testLogger,
testUsage,
fakeAnalytics,
);
macosProjectMigration.migrate();
expect(xcodeProjectInfoFile.readAsStringSync(), contents);
expect(testLogger.statusText, isEmpty);
});
testWithoutContext('Xcode project is migrated', () {
xcodeProjectInfoFile.writeAsStringSync(r'''
prefix D73912F022F37F9E000D13A0
D73912F222F3801D000D13A0 suffix
D73912EF22F37F9E000D13A0
keep this 1
33D1A10422148B71006C7A3E spaces
33D1A10522148B93006C7A3E
shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename\n";
keep this 2
''');
final RemoveMacOSFrameworkLinkAndEmbeddingMigration macosProjectMigration =
RemoveMacOSFrameworkLinkAndEmbeddingMigration(
macOSProject,
testLogger,
testUsage,
fakeAnalytics,
);
macosProjectMigration.migrate();
expect(testUsage.events, isEmpty);
expect(fakeAnalytics.sentEvents, isEmpty);
expect(xcodeProjectInfoFile.readAsStringSync(), r'''
keep this 1
shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
keep this 2
''');
expect(testLogger.statusText, contains('Upgrading project.pbxproj'));
});
testWithoutContext('migration fails with leftover App.framework reference', () {
xcodeProjectInfoFile.writeAsStringSync('''
D73912F022F37F9bogus /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D73912F022F37F9bogus /* App.framework */; };
''');
final RemoveMacOSFrameworkLinkAndEmbeddingMigration macosProjectMigration =
RemoveMacOSFrameworkLinkAndEmbeddingMigration(
macOSProject,
testLogger,
testUsage,
fakeAnalytics,
);
expect(macosProjectMigration.migrate,
throwsToolExit(message: 'Your Xcode project requires migration'));
expect(testUsage.events, contains(
const TestUsageEvent('macos-migration', 'remove-frameworks', label: 'failure'),
));
expect(fakeAnalytics.sentEvents, contains(
Event.appleUsageEvent(
workflow: 'macos-migration',
parameter: 'remove-frameworks',
result: 'failure',
)
));
});
testWithoutContext(
'migration fails with leftover FlutterMacOS.framework reference', () {
xcodeProjectInfoFile.writeAsStringSync('''
33D1A10522148B93bogus /* FlutterMacOS.framework in Bundle Framework */,
''');
final RemoveMacOSFrameworkLinkAndEmbeddingMigration macosProjectMigration =
RemoveMacOSFrameworkLinkAndEmbeddingMigration(
macOSProject,
testLogger,
testUsage,
fakeAnalytics,
);
expect(macosProjectMigration.migrate,
throwsToolExit(message: 'Your Xcode project requires migration'));
expect(testUsage.events, contains(
const TestUsageEvent('macos-migration', 'remove-frameworks', label: 'failure'),
));
expect(fakeAnalytics.sentEvents, contains(
Event.appleUsageEvent(
workflow: 'macos-migration',
parameter: 'remove-frameworks',
result: 'failure',
)
));
});
});
group('update deployment target version', () {
late MemoryFileSystem memoryFileSystem;
late BufferLogger testLogger;
late FakeMacOSProject project;
late File xcodeProjectInfoFile;
late File podfile;
setUp(() {
memoryFileSystem = MemoryFileSystem();
testLogger = BufferLogger.test();
project = FakeMacOSProject();
xcodeProjectInfoFile = memoryFileSystem.file('project.pbxproj');
project.xcodeProjectInfoFile = xcodeProjectInfoFile;
podfile = memoryFileSystem.file('Podfile');
project.podfile = podfile;
});
testWithoutContext('skipped if files are missing', () {
final MacOSDeploymentTargetMigration macOSProjectMigration = MacOSDeploymentTargetMigration(
project,
testLogger,
);
macOSProjectMigration.migrate();
expect(xcodeProjectInfoFile.existsSync(), isFalse);
expect(podfile.existsSync(), isFalse);
expect(testLogger.traceText, contains('Xcode project not found, skipping macOS deployment target version migration'));
expect(testLogger.traceText, contains('Podfile not found, skipping global platform macOS version migration'));
expect(testLogger.statusText, isEmpty);
});
testWithoutContext('skipped if nothing to upgrade', () {
const String xcodeProjectInfoFileContents = 'MACOSX_DEPLOYMENT_TARGET = 10.14;';
xcodeProjectInfoFile.writeAsStringSync(xcodeProjectInfoFileContents);
final DateTime projectLastModified = xcodeProjectInfoFile.lastModifiedSync();
const String podfileFileContents = "# platform :osx, '10.14'";
podfile.writeAsStringSync(podfileFileContents);
final DateTime podfileLastModified = podfile.lastModifiedSync();
final MacOSDeploymentTargetMigration macOSProjectMigration = MacOSDeploymentTargetMigration(
project,
testLogger,
);
macOSProjectMigration.migrate();
expect(xcodeProjectInfoFile.lastModifiedSync(), projectLastModified);
expect(xcodeProjectInfoFile.readAsStringSync(), xcodeProjectInfoFileContents);
expect(podfile.lastModifiedSync(), podfileLastModified);
expect(podfile.readAsStringSync(), podfileFileContents);
expect(testLogger.statusText, isEmpty);
});
testWithoutContext('Xcode project is migrated from 10.11 to 10.14', () {
xcodeProjectInfoFile.writeAsStringSync('''
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = YES;
''');
podfile.writeAsStringSync('''
# platform :osx, '10.11'
platform :osx, '10.11'
''');
final MacOSDeploymentTargetMigration macOSProjectMigration = MacOSDeploymentTargetMigration(
project,
testLogger,
);
macOSProjectMigration.migrate();
expect(xcodeProjectInfoFile.readAsStringSync(), '''
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = YES;
''');
expect(podfile.readAsStringSync(), '''
# platform :osx, '10.14'
platform :osx, '10.14'
''');
// Only print once even though 2 lines were changed.
expect('Updating minimum macOS deployment target to 10.14'.allMatches(testLogger.statusText).length, 1);
});
testWithoutContext('Xcode project is migrated from 10.13 to 10.14', () {
xcodeProjectInfoFile.writeAsStringSync('''
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = YES;
''');
podfile.writeAsStringSync('''
# platform :osx, '10.13'
platform :osx, '10.13'
''');
final MacOSDeploymentTargetMigration macOSProjectMigration = MacOSDeploymentTargetMigration(
project,
testLogger,
);
macOSProjectMigration.migrate();
expect(xcodeProjectInfoFile.readAsStringSync(), '''
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = YES;
''');
expect(podfile.readAsStringSync(), '''
# platform :osx, '10.14'
platform :osx, '10.14'
''');
// Only print once even though 2 lines were changed.
expect('Updating minimum macOS deployment target to 10.14'.allMatches(testLogger.statusText).length, 1);
});
});
group('update NSPrincipalClass from FlutterApplication to NSApplication', () {
late MemoryFileSystem memoryFileSystem;
late BufferLogger testLogger;
late FakeMacOSProject project;
late File infoPlistFile;
late FakePlistParser fakePlistParser;
late FlutterProjectFactory flutterProjectFactory;
setUp(() {
memoryFileSystem = MemoryFileSystem();
fakePlistParser = FakePlistParser();
testLogger = BufferLogger.test();
project = FakeMacOSProject();
infoPlistFile = memoryFileSystem.file('Info.plist');
project.defaultHostInfoPlist = infoPlistFile;
flutterProjectFactory = FlutterProjectFactory(
fileSystem: memoryFileSystem,
logger: testLogger,
);
});
void testWithMocks(String description, Future<void> Function() testMethod) {
testUsingContext(description, testMethod, overrides: <Type, Generator>{
FileSystem: () => memoryFileSystem,
ProcessManager: () => FakeProcessManager.any(),
PlistParser: () => fakePlistParser,
FlutterProjectFactory: () => flutterProjectFactory,
});
}
testWithMocks('skipped if files are missing', () async {
final FlutterApplicationMigration macOSProjectMigration = FlutterApplicationMigration(
project,
testLogger,
);
macOSProjectMigration.migrate();
expect(infoPlistFile.existsSync(), isFalse);
expect(testLogger.traceText, isEmpty);
expect(testLogger.statusText, isEmpty);
});
testWithMocks('skipped if no NSPrincipalClass key exists to upgrade', () async {
final FlutterApplicationMigration macOSProjectMigration = FlutterApplicationMigration(
project,
testLogger,
);
infoPlistFile.writeAsStringSync('contents'); // Just so it exists: parser is a fake.
macOSProjectMigration.migrate();
expect(fakePlistParser.getValueFromFile<String>(infoPlistFile.path, PlistParser.kNSPrincipalClassKey), isNull);
expect(testLogger.statusText, isEmpty);
});
testWithMocks('skipped if already de-upgraded (or never migrated)', () async {
fakePlistParser.setProperty(PlistParser.kNSPrincipalClassKey, 'NSApplication');
final FlutterApplicationMigration macOSProjectMigration = FlutterApplicationMigration(
project,
testLogger,
);
infoPlistFile.writeAsStringSync('contents'); // Just so it exists: parser is a fake.
macOSProjectMigration.migrate();
expect(fakePlistParser.getValueFromFile<String>(infoPlistFile.path, PlistParser.kNSPrincipalClassKey), 'NSApplication');
expect(testLogger.statusText, isEmpty);
});
testWithMocks('Info.plist migrated to use NSApplication', () async {
fakePlistParser.setProperty(PlistParser.kNSPrincipalClassKey, 'FlutterApplication');
final FlutterApplicationMigration macOSProjectMigration = FlutterApplicationMigration(
project,
testLogger,
);
infoPlistFile.writeAsStringSync('contents'); // Just so it exists: parser is a fake.
macOSProjectMigration.migrate();
expect(fakePlistParser.getValueFromFile<String>(infoPlistFile.path, PlistParser.kNSPrincipalClassKey), 'NSApplication');
// Only print once.
expect('Updating ${infoPlistFile.basename} to use NSApplication instead of FlutterApplication.'.allMatches(testLogger.statusText).length, 1);
});
testWithMocks('Skip if NSPrincipalClass is not NSApplication', () async {
const String differentApp = 'DIFFERENTApplication';
fakePlistParser.setProperty(PlistParser.kNSPrincipalClassKey, differentApp);
final FlutterApplicationMigration macOSProjectMigration = FlutterApplicationMigration(
project,
testLogger,
);
infoPlistFile.writeAsStringSync('contents'); // Just so it exists: parser is a fake.
macOSProjectMigration.migrate();
expect(fakePlistParser.getValueFromFile<String>(infoPlistFile.path, PlistParser.kNSPrincipalClassKey), differentApp);
expect(testLogger.traceText, isEmpty);
});
});
}
class FakeMacOSProject extends Fake implements MacOSProject {
@override
File xcodeProjectInfoFile = MemoryFileSystem.test().file('xcodeProjectInfoFile');
@override
File defaultHostInfoPlist = MemoryFileSystem.test().file('InfoplistFile');
@override
File podfile = MemoryFileSystem.test().file('Podfile');
}
| 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 'package:flutter_tools/src/convert.dart';
import 'package:flutter_tools/src/proxied_devices/file_transfer.dart';
import '../../src/common.dart';
void main() {
group('convertToChunks', () {
test('works correctly', () async {
final StreamController<Uint8List> controller = StreamController<Uint8List>();
final Stream<Uint8List> chunked = convertToChunks(controller.stream, 4);
final Future<List<Uint8List>> chunkedListFuture = chunked.toList();
// Full chunk.
controller.add(Uint8List.fromList(<int>[1, 2, 3, 4]));
// Multiple of full chunks, on chunk boundaries.
controller.add(Uint8List.fromList(<int>[5, 6, 7, 8, 9, 10, 11, 12]));
// Larger than one chunk, starts on chunk boundary, ends not on chunk boundary.
controller.add(Uint8List.fromList(<int>[13, 14, 15, 16, 17, 18]));
// Larger than one chunk, starts not on chunk boundary, ends not on chunk boundary.
controller.add(Uint8List.fromList(<int>[19, 20, 21, 22, 23]));
// Larger than one chunk, starts not on chunk boundary, ends on chunk boundary.
controller.add(Uint8List.fromList(<int>[24, 25, 26, 27, 28]));
// Smaller than one chunk, starts on chunk boundary, ends not on chunk boundary.
controller.add(Uint8List.fromList(<int>[29, 30]));
// Smaller than one chunk, starts not on chunk boundary, ends not on chunk boundary.
controller.add(Uint8List.fromList(<int>[31, 32, 33]));
// Full chunk, not on chunk boundary.
controller.add(Uint8List.fromList(<int>[34, 35, 36, 37]));
// Smaller than one chunk, starts not on chunk boundary, ends on chunk boundary.
controller.add(Uint8List.fromList(<int>[38, 39, 40]));
// Empty chunk.
controller.add(Uint8List.fromList(<int>[]));
// Extra chunk.
controller.add(Uint8List.fromList(<int>[41, 42]));
await controller.close();
final List<Uint8List> chunkedList = await chunkedListFuture;
expect(chunkedList, hasLength(11));
expect(chunkedList[0], <int>[1, 2, 3, 4]);
expect(chunkedList[1], <int>[5, 6, 7, 8]);
expect(chunkedList[2], <int>[9, 10, 11, 12]);
expect(chunkedList[3], <int>[13, 14, 15, 16]);
expect(chunkedList[4], <int>[17, 18, 19, 20]);
expect(chunkedList[5], <int>[21, 22, 23, 24]);
expect(chunkedList[6], <int>[25, 26, 27, 28]);
expect(chunkedList[7], <int>[29, 30, 31, 32]);
expect(chunkedList[8], <int>[33, 34, 35, 36]);
expect(chunkedList[9], <int>[37, 38, 39, 40]);
expect(chunkedList[10], <int>[41, 42]);
});
});
group('adler32Hash', () {
test('works correctly', () {
final int hash = adler32Hash(Uint8List.fromList(utf8.encode('abcdefg')));
expect(hash, 0x0adb02bd);
});
});
group('RollingAdler32', () {
test('works correctly without rolling', () {
final RollingAdler32 adler32 = RollingAdler32(7);
utf8.encode('abcdefg').forEach(adler32.push);
expect(adler32.hash, adler32Hash(Uint8List.fromList(utf8.encode('abcdefg'))));
});
test('works correctly after rolling once', () {
final RollingAdler32 adler32 = RollingAdler32(7);
utf8.encode('12abcdefg').forEach(adler32.push);
expect(adler32.hash, adler32Hash(Uint8List.fromList(utf8.encode('abcdefg'))));
});
test('works correctly after rolling multiple cycles', () {
final RollingAdler32 adler32 = RollingAdler32(7);
utf8.encode('1234567890123456789abcdefg').forEach(adler32.push);
expect(adler32.hash, adler32Hash(Uint8List.fromList(utf8.encode('abcdefg'))));
});
test('works correctly after reset', () {
final RollingAdler32 adler32 = RollingAdler32(7);
utf8.encode('1234567890123456789abcdefg').forEach(adler32.push);
adler32.reset();
utf8.encode('abcdefg').forEach(adler32.push);
expect(adler32.hash, adler32Hash(Uint8List.fromList(utf8.encode('abcdefg'))));
});
test('currentBlock returns the correct entry when read less than one block', () {
final RollingAdler32 adler32 = RollingAdler32(7);
utf8.encode('abcd').forEach(adler32.push);
expect(adler32.currentBlock(), utf8.encode('abcd'));
});
test('currentBlock returns the correct entry when read exactly one block', () {
final RollingAdler32 adler32 = RollingAdler32(7);
utf8.encode('abcdefg').forEach(adler32.push);
expect(adler32.currentBlock(), utf8.encode('abcdefg'));
});
test('currentBlock returns the correct entry when read more than one block', () {
final RollingAdler32 adler32 = RollingAdler32(7);
utf8.encode('123456789abcdefg').forEach(adler32.push);
expect(adler32.currentBlock(), utf8.encode('abcdefg'));
});
});
group('FileTransfer', () {
const String content1 = 'a...b...c...d...e.';
const String content2 = 'b...c...d...a...f...g...b...h..';
const List<FileDeltaBlock> expectedDelta = <FileDeltaBlock>[
FileDeltaBlock.fromDestination(start: 4, size: 12),
FileDeltaBlock.fromDestination(start: 0, size: 4),
FileDeltaBlock.fromSource(start: 16, size: 8),
FileDeltaBlock.fromDestination(start: 4, size: 4),
FileDeltaBlock.fromSource(start: 28, size: 3),
];
const String expectedBinaryForRebuilding = 'f...g...h..';
late MemoryFileSystem fileSystem;
setUp(() {
fileSystem = MemoryFileSystem();
});
test('calculateBlockHashesOfFile works normally', () async {
final File file = fileSystem.file('test')..writeAsStringSync(content1);
final BlockHashes hashes = await const FileTransfer().calculateBlockHashesOfFile(file, blockSize: 4);
expect(hashes.blockSize, 4);
expect(hashes.totalSize, content1.length);
expect(hashes.adler32, hasLength(5));
expect(hashes.adler32, <int>[
0x029c00ec,
0x02a000ed,
0x02a400ee,
0x02a800ef,
0x00fa0094,
]);
expect(hashes.md5, hasLength(5));
expect(hashes.md5, <String>[
'zB0S8R/fGt05GcI5v8AjIQ==',
'uZCZ4i/LUGFYAD+K1ZD0Wg==',
'6kbZGS8T1NJl/naWODQcNw==',
'kKh/aA2XAhR/r0HdZa3Bxg==',
'34eF7Bs/OhfoJ5+sAw0zyw==',
]);
expect(hashes.fileMd5, 'VT/gkSEdctzUEUJCxclxuQ==');
});
test('computeDelta returns empty list if file is identical', () async {
final File file1 = fileSystem.file('file1')..writeAsStringSync(content1);
final File file2 = fileSystem.file('file1')..writeAsStringSync(content1);
final BlockHashes hashes = await const FileTransfer().calculateBlockHashesOfFile(file1, blockSize: 4);
final List<FileDeltaBlock> delta = await const FileTransfer().computeDelta(file2, hashes);
expect(delta, isEmpty);
});
test('computeDelta returns the correct delta', () async {
final File file1 = fileSystem.file('file1')..writeAsStringSync(content1);
final File file2 = fileSystem.file('file2')..writeAsStringSync(content2);
final BlockHashes hashes = await const FileTransfer().calculateBlockHashesOfFile(file1, blockSize: 4);
final List<FileDeltaBlock> delta = await const FileTransfer().computeDelta(file2, hashes);
expect(delta, expectedDelta);
});
test('binaryForRebuilding returns the correct binary', () async {
final File file = fileSystem.file('file')..writeAsStringSync(content2);
final List<int> binaryForRebuilding = await const FileTransfer().binaryForRebuilding(file, expectedDelta);
expect(binaryForRebuilding, utf8.encode(expectedBinaryForRebuilding));
});
test('rebuildFile can rebuild the correct file', () async {
final File file = fileSystem.file('file')..writeAsStringSync(content1);
await const FileTransfer().rebuildFile(file, expectedDelta, Stream<List<int>>.fromIterable(<List<int>>[utf8.encode(expectedBinaryForRebuilding)]));
expect(file.readAsStringSync(), content2);
});
});
group('BlockHashes', () {
test('json conversion works normally', () {
const String json = '''
{
"blockSize":4,
"totalSize":18,
"adler32":"7ACcAu0AoALuAKQC7wCoApQA+gA=",
"md5": [
"zB0S8R/fGt05GcI5v8AjIQ==",
"uZCZ4i/LUGFYAD+K1ZD0Wg==",
"6kbZGS8T1NJl/naWODQcNw==",
"kKh/aA2XAhR/r0HdZa3Bxg==",
"34eF7Bs/OhfoJ5+sAw0zyw=="
],
"fileMd5":"VT/gkSEdctzUEUJCxclxuQ=="
}
''';
final Map<String, Object?> decodedJson = jsonDecode(json) as Map<String, Object?>;
expect(BlockHashes.fromJson(decodedJson).toJson(), decodedJson);
});
});
}
| 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 DummyFlutterCommand extends FlutterCommand {
DummyFlutterCommand({
this.shouldUpdateCache = false,
this.noUsagePath = false,
this.name = 'dummy',
this.commandFunction,
this.packagesPath,
this.fileSystemScheme,
this.fileSystemRoots = const <String>[],
});
final bool noUsagePath;
final CommandFunction? commandFunction;
@override
final bool shouldUpdateCache;
@override
String get description => 'does nothing';
@override
Future<String?> get usagePath async => noUsagePath ? null : super.usagePath;
@override
final String name;
@override
Future<FlutterCommandResult> runCommand() async {
return commandFunction == null ? FlutterCommandResult.fail() : await commandFunction!();
}
@override
final String? packagesPath;
@override
final String? fileSystemScheme;
@override
final List<String> fileSystemRoots;
}
| 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 'package:flutter_tools/src/vscode/vscode.dart';
import '../../src/common.dart';
import '../../src/fake_process_manager.dart';
void main() {
testWithoutContext('VsCodeInstallLocation equality', () {
const VsCodeInstallLocation installLocation1 = VsCodeInstallLocation('abc', 'zyx', edition: '123');
const VsCodeInstallLocation installLocation2 = VsCodeInstallLocation('abc', 'zyx', edition: '123');
const VsCodeInstallLocation installLocation3 = VsCodeInstallLocation('cba', 'zyx', edition: '123');
const VsCodeInstallLocation installLocation4 = VsCodeInstallLocation('abc', 'xyz', edition: '123');
const VsCodeInstallLocation installLocation5 = VsCodeInstallLocation('abc', 'xyz', edition: '321');
expect(installLocation1, installLocation2);
expect(installLocation1.hashCode, installLocation2.hashCode);
expect(installLocation1, isNot(installLocation3));
expect(installLocation1.hashCode, isNot(installLocation3.hashCode));
expect(installLocation1, isNot(installLocation4));
expect(installLocation1.hashCode, isNot(installLocation4.hashCode));
expect(installLocation1, isNot(installLocation5));
expect(installLocation1.hashCode, isNot(installLocation5.hashCode));
});
testWithoutContext('VsCode.fromDirectory does not crash when packages.json is malformed', () {
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
// Create invalid JSON file.
fileSystem.file(fileSystem.path.join('', 'resources', 'app', 'package.json'))
..createSync(recursive: true)
..writeAsStringSync('{');
final VsCode vsCode = VsCode.fromDirectory('', '', fileSystem: fileSystem);
expect(vsCode.version, null);
});
testWithoutContext('can locate VS Code installed via Snap', () {
final FileSystem fileSystem = MemoryFileSystem.test();
const String home = '/home/me';
final Platform platform = FakePlatform(environment: <String, String>{'HOME': home});
fileSystem.directory(fileSystem.path.join('/snap/code/current/usr/share/code', '.vscode')).createSync(recursive: true);
fileSystem.directory(fileSystem.path.join('/snap/code-insiders/current/usr/share/code-insiders', '.vscode-insiders')).createSync(recursive: true);
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[]);
final List<VsCode> installed = VsCode.allInstalled(fileSystem, platform, processManager);
expect(installed.length, 2);
});
testWithoutContext('can locate VS Code installed via Flatpak', () {
final FileSystem fileSystem = MemoryFileSystem.test();
const String home = '/home/me';
final Platform platform = FakePlatform(environment: <String, String>{'HOME': home});
fileSystem.directory(fileSystem.path.join(
'/var/lib/flatpak/app/com.visualstudio.code/x86_64/stable/active/files/extra/vscode',
'.var/app/com.visualstudio.code/data/vscode',
)).createSync(recursive: true);
fileSystem.directory(fileSystem.path.join(
'/var/lib/flatpak/app/com.visualstudio.code.insiders/x86_64/beta/active/files/extra/vscode-insiders',
'.var/app/com.visualstudio.code.insiders/data/vscode-insiders',
)).createSync(recursive: true);
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[]);
final List<VsCode> installed = VsCode.allInstalled(fileSystem, platform, processManager);
expect(installed.length, 2);
});
testWithoutContext('can locate installations on macOS', () {
final FileSystem fileSystem = MemoryFileSystem.test();
const String home = '/home/me';
final Platform platform = FakePlatform(operatingSystem: 'macos', environment: <String, String>{'HOME': home});
final String randomLocation = fileSystem.path.join(
'/',
'random',
'Visual Studio Code.app',
);
fileSystem.directory(fileSystem.path.join(randomLocation, 'Contents')).createSync(recursive: true);
final String randomInsidersLocation = fileSystem.path.join(
'/',
'random',
'Visual Studio Code - Insiders.app',
);
fileSystem.directory(fileSystem.path.join(randomInsidersLocation, 'Contents')).createSync(recursive: true);
fileSystem.directory(fileSystem.path.join('/', 'Applications', 'Visual Studio Code.app', 'Contents')).createSync(recursive: true);
fileSystem.directory(fileSystem.path.join('/', 'Applications', 'Visual Studio Code - Insiders.app', 'Contents')).createSync(recursive: true);
fileSystem.directory(fileSystem.path.join(home, 'Applications', 'Visual Studio Code.app', 'Contents')).createSync(recursive: true);
fileSystem.directory(fileSystem.path.join(home, 'Applications', 'Visual Studio Code - Insiders.app', 'Contents')).createSync(recursive: true);
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
FakeCommand(
command: const <String>[
'mdfind',
'kMDItemCFBundleIdentifier="com.microsoft.VSCode"',
],
stdout: randomLocation,
),
FakeCommand(
command: const <String>[
'mdfind',
'kMDItemCFBundleIdentifier="com.microsoft.VSCodeInsiders"',
],
stdout: randomInsidersLocation,
),
]);
final List<VsCode> installed = VsCode.allInstalled(fileSystem, platform, processManager);
expect(installed.length, 6);
expect(processManager, hasNoRemainingExpectations);
});
}
| 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/src/base/logger.dart';
import 'package:flutter_tools/src/base/os.dart';
import 'package:flutter_tools/src/windows/application_package.dart';
import 'package:test/fake.dart';
import '../../src/common.dart';
import '../../src/context.dart';
void main() {
group('PrebuiltWindowsApp', () {
late FakeOperatingSystemUtils os;
late FileSystem fileSystem;
late BufferLogger logger;
final Map<Type, Generator> overrides = <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => FakeProcessManager.any(),
OperatingSystemUtils: () => os,
Logger: () => logger,
};
setUp(() {
fileSystem = MemoryFileSystem.test();
os = FakeOperatingSystemUtils();
logger = BufferLogger.test();
});
testUsingContext('Error on non-existing exe file', () {
final PrebuiltWindowsApp? windowsApp = WindowsApp.fromPrebuiltApp(fileSystem.file('not_existing.exe')) as PrebuiltWindowsApp?;
expect(windowsApp, isNull);
expect(logger.errorText, contains('File "not_existing.exe" does not exist.'));
}, overrides: overrides);
testUsingContext('Success on exe file', () {
fileSystem.file('file.exe').createSync();
final PrebuiltWindowsApp windowsApp = WindowsApp.fromPrebuiltApp(fileSystem.file('file.exe'))! as PrebuiltWindowsApp;
expect(windowsApp.name, 'file.exe');
}, overrides: overrides);
testUsingContext('Error on non-existing zip file', () {
final PrebuiltWindowsApp? windowsApp = WindowsApp.fromPrebuiltApp(fileSystem.file('not_existing.zip')) as PrebuiltWindowsApp?;
expect(windowsApp, isNull);
expect(logger.errorText, contains('File "not_existing.zip" does not exist.'));
}, overrides: overrides);
testUsingContext('Bad zipped app, no payload dir', () {
fileSystem.file('app.zip').createSync();
final PrebuiltWindowsApp? windowsApp = WindowsApp.fromPrebuiltApp(fileSystem.file('app.zip')) as PrebuiltWindowsApp?;
expect(windowsApp, isNull);
expect(logger.errorText, contains('Cannot find .exe files in the zip archive.'));
}, overrides: overrides);
testUsingContext('Bad zipped app, two .exe files', () {
fileSystem.file('app.zip').createSync();
os.unzipOverride = (File zipFile, Directory targetDirectory) {
if (zipFile.path != 'app.zip') {
return;
}
final String exePath1 = fileSystem.path.join(targetDirectory.path, 'app1.exe');
final String exePath2 = fileSystem.path.join(targetDirectory.path, 'app2.exe');
fileSystem.directory(exePath1).createSync(recursive: true);
fileSystem.directory(exePath2).createSync(recursive: true);
};
final PrebuiltWindowsApp? windowsApp = WindowsApp.fromPrebuiltApp(fileSystem.file('app.zip')) as PrebuiltWindowsApp?;
expect(windowsApp, isNull);
expect(logger.errorText, contains('Archive "app.zip" contains more than one .exe files.'));
}, overrides: overrides);
testUsingContext('Success with zipped app', () {
fileSystem.file('app.zip').createSync();
String? exePath;
os.unzipOverride = (File zipFile, Directory targetDirectory) {
if (zipFile.path != 'app.zip') {
return;
}
exePath = fileSystem.path.join(targetDirectory.path, 'app.exe');
fileSystem.directory(exePath).createSync(recursive: true);
};
final PrebuiltWindowsApp windowsApp = WindowsApp.fromPrebuiltApp(fileSystem.file('app.zip'))! as PrebuiltWindowsApp;
expect(logger.errorText, isEmpty);
expect(windowsApp.name, exePath);
expect(windowsApp.applicationPackage.path, 'app.zip');
}, overrides: overrides);
testUsingContext('Error on unknown file type', () {
fileSystem.file('not_existing.app').createSync();
final PrebuiltWindowsApp? windowsApp = WindowsApp.fromPrebuiltApp(fileSystem.file('not_existing.app')) as PrebuiltWindowsApp?;
expect(windowsApp, isNull);
expect(logger.errorText, contains('Unknown windows application type.'));
}, overrides: overrides);
});
}
class FakeOperatingSystemUtils extends Fake implements OperatingSystemUtils {
FakeOperatingSystemUtils();
void Function(File, Directory)? unzipOverride;
@override
void unzip(File file, Directory targetDirectory) {
unzipOverride?.call(file, targetDirectory);
}
}
| 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.dart';
final String analyzerSeparator = platform.isWindows ? '-' : '•';
void main() {
late Directory tempDir;
late String projectPath;
late File libMain;
late File errorFile;
Future<void> runCommand({
List<String> arguments = const <String>[],
List<String> statusTextContains = const <String>[],
List<String> errorTextContains = const <String>[],
String exitMessageContains = '',
int exitCode = 0,
}) async {
final ProcessResult result = await processManager.run(<String>[
fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter'),
'--no-color',
...arguments,
], workingDirectory: projectPath);
expect(result, ProcessResultMatcher(exitCode: exitCode));
assertContains(result.stdout.toString(), statusTextContains);
assertContains(result.stdout.toString(), errorTextContains);
expect(result.stderr, contains(exitMessageContains));
}
void createDotPackages(String projectPath) {
final StringBuffer flutterRootUri = StringBuffer('file://');
final String canonicalizedFlutterRootPath = fileSystem.path.canonicalize(getFlutterRoot());
if (platform.isWindows) {
flutterRootUri
..write('/')
..write(canonicalizedFlutterRootPath.replaceAll(r'\', '/'));
} else {
flutterRootUri.write(canonicalizedFlutterRootPath);
}
final String dotPackagesSrc = '''
{
"configVersion": 2,
"packages": [
{
"name": "flutter",
"rootUri": "$flutterRootUri/packages/flutter",
"packageUri": "lib/",
"languageVersion": "3.0"
},
{
"name": "sky_engine",
"rootUri": "$flutterRootUri/bin/cache/pkg/sky_engine",
"packageUri": "lib/",
"languageVersion": "3.0"
},
{
"name": "flutter_project",
"rootUri": "../",
"packageUri": "lib/",
"languageVersion": "2.12"
}
]
}
''';
fileSystem.file(fileSystem.path.join(projectPath, '.dart_tool', 'package_config.json'))
..createSync(recursive: true)
..writeAsStringSync(dotPackagesSrc);
}
setUp(() {
tempDir = fileSystem.systemTempDirectory.createTempSync('flutter_analyze_once_test_1.').absolute;
projectPath = fileSystem.path.join(tempDir.path, 'flutter_project');
final String projectWithErrors = fileSystem.path.join(tempDir.path, 'flutter_project_errors');
fileSystem.file(fileSystem.path.join(projectPath, 'pubspec.yaml'))
..createSync(recursive: true)
..writeAsStringSync(pubspecYamlSrc);
createDotPackages(projectPath);
libMain = fileSystem.file(fileSystem.path.join(projectPath, 'lib', 'main.dart'))
..createSync(recursive: true)
..writeAsStringSync(mainDartSrc);
errorFile = fileSystem.file(fileSystem.path.join(projectWithErrors, 'other', 'error.dart'))
..createSync(recursive: true)
..writeAsStringSync(r"""import 'package:flutter/material.dart""");
});
tearDown(() {
tryToDelete(tempDir);
});
// Analyze in the current directory - no arguments
testWithoutContext('working directory', () async {
await runCommand(
arguments: <String>['analyze', '--no-pub'],
statusTextContains: <String>['No issues found!'],
);
});
testWithoutContext('passing one file works', () async {
await runCommand(
arguments: <String>['analyze', '--no-pub', libMain.path],
statusTextContains: <String>['No issues found!']
);
});
testWithoutContext('passing more than one file with errors', () async {
await runCommand(
arguments: <String>['analyze', '--no-pub', libMain.path, errorFile.path],
statusTextContains: <String>[
'Analyzing 2 items',
"error $analyzerSeparator Target of URI doesn't exist",
"error $analyzerSeparator Expected to find ';'",
'error $analyzerSeparator Unterminated string literal',
],
exitMessageContains: '3 issues found',
exitCode: 1
);
});
testWithoutContext('passing more than one file success', () async {
final File secondFile = fileSystem.file(fileSystem.path.join(projectPath, 'lib', 'second.dart'))
..createSync(recursive: true)
..writeAsStringSync('');
await runCommand(
arguments: <String>['analyze', '--no-pub', libMain.path, secondFile.path],
statusTextContains: <String>['No issues found!']
);
});
testWithoutContext('mixing directory and files success', () async {
await runCommand(
arguments: <String>['analyze', '--no-pub', libMain.path, projectPath],
statusTextContains: <String>['No issues found!']
);
});
testWithoutContext('file not found', () async {
await runCommand(
arguments: <String>['analyze', '--no-pub', 'not_found.abc'],
exitMessageContains: "not_found.abc', however it does not exist on disk",
exitCode: 1
);
});
// Analyze in the current directory - no arguments
testWithoutContext('working directory with errors', () async {
// Break the code to produce an error and a warning.
// Also insert a statement that should not trigger a lint here
// but will trigger a lint later on when an analysis_options.yaml is added.
String source = await libMain.readAsString();
source = source.replaceFirst(
'onPressed: _incrementCounter,',
'// onPressed: _incrementCounter,',
);
source = source.replaceFirst(
'_counter++;',
'_counter++; throw "an error message";',
);
libMain.writeAsStringSync(source);
// Analyze in the current directory - no arguments
await runCommand(
arguments: <String>['analyze', '--no-pub'],
statusTextContains: <String>[
'Analyzing',
'unused_element',
'missing_required_argument',
],
exitMessageContains: '2 issues found.',
exitCode: 1,
);
});
// Analyze in the current directory - no arguments
testWithoutContext('working directory with local options', () async {
// Insert an analysis_options.yaml file in the project
// which will trigger a lint for broken code that was inserted earlier
final File optionsFile = fileSystem.file(fileSystem.path.join(projectPath, 'analysis_options.yaml'));
optionsFile.writeAsStringSync('''
linter:
rules:
- only_throw_errors
''');
String source = libMain.readAsStringSync();
source = source.replaceFirst(
'onPressed: _incrementCounter,',
'// onPressed: _incrementCounter,',
);
source = source.replaceFirst(
'_counter++;',
'_counter++; throw "an error message";',
);
libMain.writeAsStringSync(source);
// Analyze in the current directory - no arguments
await runCommand(
arguments: <String>['analyze', '--no-pub'],
statusTextContains: <String>[
'Analyzing',
'unused_element',
'only_throw_errors',
'missing_required_argument',
],
exitMessageContains: '3 issues found.',
exitCode: 1,
);
});
testWithoutContext('analyze once no duplicate issues', () async {
final File foo = fileSystem.file(fileSystem.path.join(projectPath, 'foo.dart'));
foo.writeAsStringSync('''
import 'bar.dart';
void foo() => bar();
''');
final File bar = fileSystem.file(fileSystem.path.join(projectPath, 'bar.dart'));
bar.writeAsStringSync('''
import 'dart:async'; // unused
void bar() {
}
''');
// Analyze in the current directory - no arguments
await runCommand(
arguments: <String>['analyze', '--no-pub'],
statusTextContains: <String>[
'Analyzing',
],
exitMessageContains: '1 issue found.',
exitCode: 1
);
});
testWithoutContext('analyze once returns no issues when source is error-free', () async {
const String contents = '''
StringBuffer bar = StringBuffer('baz');
''';
fileSystem.directory(projectPath).childFile('main.dart').writeAsStringSync(contents);
await runCommand(
arguments: <String>['analyze', '--no-pub'],
statusTextContains: <String>['No issues found!'],
);
});
testWithoutContext('analyze once returns no issues for todo comments', () async {
const String contents = '''
// TODO(foobar):
StringBuffer bar = StringBuffer('baz');
''';
fileSystem.directory(projectPath).childFile('main.dart').writeAsStringSync(contents);
await runCommand(
arguments: <String>['analyze', '--no-pub'],
statusTextContains: <String>['No issues found!'],
);
});
testWithoutContext('analyze once with default options has info issue finally exit code 1.', () async {
const String infoSourceCode = '''
void _analyze() {}
''';
fileSystem.directory(projectPath).childFile('main.dart').writeAsStringSync(infoSourceCode);
await runCommand(
arguments: <String>['analyze', '--no-pub'],
statusTextContains: <String>[
'info',
'unused_element',
],
exitMessageContains: '1 issue found.',
exitCode: 1,
);
});
testWithoutContext('analyze once with no-fatal-infos has info issue finally exit code 0.', () async {
const String infoSourceCode = '''
void _analyze() {}
''';
final File optionsFile = fileSystem.file(fileSystem.path.join(projectPath, 'analysis_options.yaml'));
optionsFile.writeAsStringSync('''
analyzer:
errors:
unused_element: info
''');
fileSystem.directory(projectPath).childFile('main.dart').writeAsStringSync(infoSourceCode);
await runCommand(
arguments: <String>['analyze', '--no-pub', '--no-fatal-infos'],
statusTextContains: <String>[
'info',
'unused_element',
],
exitMessageContains: '1 issue found.',
);
});
testWithoutContext('analyze once only fatal-warnings has info issue finally exit code 0.', () async {
const String infoSourceCode = '''
void _analyze() {}
''';
final File optionsFile = fileSystem.file(fileSystem.path.join(projectPath, 'analysis_options.yaml'));
optionsFile.writeAsStringSync('''
analyzer:
errors:
unused_element: info
''');
fileSystem.directory(projectPath).childFile('main.dart').writeAsStringSync(infoSourceCode);
await runCommand(
arguments: <String>['analyze', '--no-pub', '--fatal-warnings', '--no-fatal-infos'],
statusTextContains: <String>[
'info',
'unused_element',
],
exitMessageContains: '1 issue found.',
);
});
testWithoutContext('analyze once only fatal-infos has warning issue finally exit code 0.', () async {
const String warningSourceCode = '''
void _analyze() {}
''';
final File optionsFile = fileSystem.file(fileSystem.path.join(projectPath, 'analysis_options.yaml'));
optionsFile.writeAsStringSync('''
analyzer:
errors:
unused_element: warning
''');
fileSystem.directory(projectPath).childFile('main.dart').writeAsStringSync(warningSourceCode);
await runCommand(
arguments: <String>['analyze','--no-pub', '--fatal-infos', '--no-fatal-warnings'],
statusTextContains: <String>[
'warning',
'unused_element',
],
exitMessageContains: '1 issue found.',
);
});
testWithoutContext('analyze once only fatal-warnings has warning issue finally exit code 1.', () async {
const String warningSourceCode = '''
void _analyze() {}
''';
final File optionsFile = fileSystem.file(fileSystem.path.join(projectPath, 'analysis_options.yaml'));
optionsFile.writeAsStringSync('''
analyzer:
errors:
unused_element: warning
''');
fileSystem.directory(projectPath).childFile('main.dart').writeAsStringSync(warningSourceCode);
await runCommand(
arguments: <String>['analyze','--no-pub', '--no-fatal-infos', '--fatal-warnings'],
statusTextContains: <String>[
'warning',
'unused_element',
],
exitMessageContains: '1 issue found.',
exitCode: 1,
);
});
}
void assertContains(String text, List<String> patterns) {
for (final String pattern in patterns) {
expect(text, contains(pattern));
}
}
const String mainDartSrc = r'''
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
),
);
}
}
''';
const String pubspecYamlSrc = r'''
name: flutter_project
environment:
sdk: '>=3.2.0-0 <4.0.0'
dependencies:
flutter:
sdk: flutter
''';
| 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';
import 'test_utils.dart';
final String flutterRootPath = getFlutterRoot();
final Directory flutterRoot = fileSystem.directory(flutterRootPath);
Future<void> main() async {
test('verify terminating flutter/bin/dart terminates the underlying dart process', () async {
final Completer<void> childReadyCompleter = Completer<void>();
String stdout = '';
final Process process = await processManager.start(
<String>[
dartBash.path,
listenForSigtermScript.path,
],
);
final Future<Object?> stdoutFuture = process.stdout
.transform<String>(utf8.decoder)
.forEach((String str) {
stdout += str;
if (stdout.contains('Ready to receive signals') && !childReadyCompleter.isCompleted) {
childReadyCompleter.complete();
}
});
// Ensure that the child app has registered its signal handler
await childReadyCompleter.future;
final bool killSuccess = process.kill();
expect(killSuccess, true);
// Wait for stdout to complete
await stdoutFuture;
// Ensure child exited successfully
expect(
await process.exitCode,
0,
reason: 'child process exited with code ${await process.exitCode}, and '
'stdout:\n$stdout',
);
expect(stdout, contains('Successfully received SIGTERM!'));
},
skip: platform.isWindows); // [intended] Windows does not use the bash entrypoint
test('shared.sh does not compile flutter tool if PROG_NAME=dart', () async {
final Directory tempDir = fileSystem.systemTempDirectory.createTempSync('bash_entrypoint_test');
try {
// bash script checks it is in a git repo
ProcessResult result = await processManager.run(<String>['git', 'init'], workingDirectory: tempDir.path);
expect(result, const ProcessResultMatcher());
result = await processManager.run(<String>['git', 'commit', '--allow-empty', '-m', 'init commit'], workingDirectory: tempDir.path);
expect(result, const ProcessResultMatcher());
// copy dart and shared.sh to temp dir
final File trueSharedSh = flutterRoot.childDirectory('bin').childDirectory('internal').childFile('shared.sh');
final File fakeSharedSh = (tempDir.childDirectory('bin').childDirectory('internal')
..createSync(recursive: true))
.childFile('shared.sh');
trueSharedSh.copySync(fakeSharedSh.path);
final File fakeDartBash = tempDir.childDirectory('bin').childFile('dart');
dartBash.copySync(fakeDartBash.path);
// mark dart executable
makeExecutable(fakeDartBash);
// create no-op fake update_dart_sdk.sh script
final File updateDartSdk = tempDir.childDirectory('bin').childDirectory('internal').childFile('update_dart_sdk.sh')..writeAsStringSync('''
#!/usr/bin/env bash
echo downloaded dart sdk
''');
makeExecutable(updateDartSdk);
// create a fake dart runtime
final File dartBin = (tempDir.childDirectory('bin')
.childDirectory('cache')
.childDirectory('dart-sdk')
.childDirectory('bin')
..createSync(recursive: true))
.childFile('dart');
dartBin.writeAsStringSync('''
#!/usr/bin/env bash
echo executed dart binary
''');
makeExecutable(dartBin);
result = await processManager.run(<String>[fakeDartBash.path]);
expect(result, const ProcessResultMatcher());
expect(
(result.stdout as String).split('\n'),
// verify we ran updateDartSdk and dartBin
containsAll(<String>['downloaded dart sdk', 'executed dart binary']),
);
// Verify we did not try to compile the flutter_tool
expect(result.stderr, isNot(contains('Building flutter tool...')));
} finally {
tryToDelete(tempDir);
}
},
skip: platform.isWindows); // [intended] Windows does not use the bash entrypoint
}
// A test Dart app that will run until it receives SIGTERM
File get listenForSigtermScript {
return flutterRoot
.childDirectory('packages')
.childDirectory('flutter_tools')
.childDirectory('test')
.childDirectory('integration.shard')
.childDirectory('test_data')
.childFile('listen_for_sigterm.dart')
.absolute;
}
// The executable bash entrypoint for the Dart binary.
File get dartBash {
return flutterRoot
.childDirectory('bin')
.childFile('dart')
.absolute;
}
void makeExecutable(File file) {
final ProcessResult result = processManager.runSync(<String>['chmod', '+x', file.path]);
expect(result, const ProcessResultMatcher());
}
| 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/base/io.dart';
import '../src/common.dart';
import 'test_data/deferred_components_project.dart';
import 'test_driver.dart';
import 'test_utils.dart';
void main() {
late Directory tempDir;
late FlutterRunTestDriver flutter;
setUp(() async {
tempDir = createResolvedTempDirectorySync('run_test.');
flutter = FlutterRunTestDriver(tempDir);
});
tearDown(() async {
await flutter.stop();
tryToDelete(tempDir);
});
testWithoutContext('simple build appbundle android-arm64 target succeeds', () async {
final DeferredComponentsProject project = DeferredComponentsProject(BasicDeferredComponentsConfig());
await project.setUpIn(tempDir);
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
final ProcessResult result = await processManager.run(<String>[
flutterBin,
...getLocalEngineArguments(),
'build',
'appbundle',
'--target-platform=android-arm64',
], workingDirectory: tempDir.path);
expect(result, const ProcessResultMatcher(stdoutPattern: 'app-release.aab'));
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
expect(result.stdout.toString(), contains('Deferred components gen_snapshot validation passed.'));
final String line = result.stdout.toString()
.split('\n')
.firstWhere((String line) => line.contains('app-release.aab'));
final String outputFilePath = line.split(' ')[2].trim();
final File outputFile = fileSystem.file(fileSystem.path.join(tempDir.path, outputFilePath));
expect(outputFile, exists);
final Archive archive = ZipDecoder().decodeBytes(outputFile.readAsBytesSync());
expect(archive.findFile('base/lib/arm64-v8a/libapp.so') != null, true);
expect(archive.findFile('base/lib/arm64-v8a/libflutter.so') != null, true);
expect(archive.findFile('component1/lib/arm64-v8a/libapp.so-2.part.so') != null, true);
expect(archive.findFile('component1/assets/flutter_assets/test_assets/asset2.txt') != null, true);
expect(archive.findFile('base/assets/flutter_assets/test_assets/asset1.txt') != null, true);
});
testWithoutContext('simple build appbundle all targets succeeds', () async {
final DeferredComponentsProject project = DeferredComponentsProject(BasicDeferredComponentsConfig());
await project.setUpIn(tempDir);
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
final ProcessResult result = await processManager.run(<String>[
flutterBin,
...getLocalEngineArguments(),
'build',
'appbundle',
], workingDirectory: tempDir.path);
printOnFailure('stdout:\n${result.stdout}');
printOnFailure('stderr:\n${result.stderr}');
expect(result.stdout.toString(), contains('app-release.aab'));
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
expect(result.stdout.toString(), contains('Deferred components gen_snapshot validation passed.'));
final String line = result.stdout.toString()
.split('\n')
.firstWhere((String line) => line.contains('app-release.aab'));
final String outputFilePath = line.split(' ')[2].trim();
final File outputFile = fileSystem.file(fileSystem.path.join(tempDir.path, outputFilePath));
expect(outputFile, exists);
final Archive archive = ZipDecoder().decodeBytes(outputFile.readAsBytesSync());
expect(archive.findFile('base/lib/arm64-v8a/libapp.so') != null, true);
expect(archive.findFile('base/lib/arm64-v8a/libflutter.so') != null, true);
expect(archive.findFile('component1/lib/arm64-v8a/libapp.so-2.part.so') != null, true);
expect(archive.findFile('base/lib/armeabi-v7a/libapp.so') != null, true);
expect(archive.findFile('base/lib/armeabi-v7a/libflutter.so') != null, true);
expect(archive.findFile('component1/lib/armeabi-v7a/libapp.so-2.part.so') != null, true);
expect(archive.findFile('base/lib/x86_64/libapp.so') != null, true);
expect(archive.findFile('base/lib/x86_64/libflutter.so') != null, true);
expect(archive.findFile('component1/lib/x86_64/libapp.so-2.part.so') != null, true);
expect(archive.findFile('component1/assets/flutter_assets/test_assets/asset2.txt') != null, true);
expect(archive.findFile('base/assets/flutter_assets/test_assets/asset1.txt') != null, true);
expect(result, const ProcessResultMatcher());
});
testWithoutContext('simple build appbundle no-deferred-components succeeds', () async {
final DeferredComponentsProject project = DeferredComponentsProject(BasicDeferredComponentsConfig());
await project.setUpIn(tempDir);
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
final ProcessResult result = await processManager.run(<String>[
flutterBin,
...getLocalEngineArguments(),
'build',
'appbundle',
'--no-deferred-components',
], workingDirectory: tempDir.path);
expect(result, const ProcessResultMatcher(stdoutPattern: 'app-release.aab'));
expect(result.stdout.toString(), isNot(contains('Deferred components prebuild validation passed.')));
expect(result.stdout.toString(), isNot(contains('Deferred components gen_snapshot validation passed.')));
final String line = result.stdout.toString()
.split('\n')
.firstWhere((String line) => line.contains('app-release.aab'));
final String outputFilePath = line.split(' ')[2].trim();
final File outputFile = fileSystem.file(fileSystem.path.join(tempDir.path, outputFilePath));
expect(outputFile, exists);
final Archive archive = ZipDecoder().decodeBytes(outputFile.readAsBytesSync());
expect(archive.findFile('base/lib/arm64-v8a/libapp.so') != null, true);
expect(archive.findFile('base/lib/arm64-v8a/libflutter.so') != null, true);
expect(archive.findFile('component1/lib/arm64-v8a/libapp.so-2.part.so') != null, false);
expect(archive.findFile('base/lib/armeabi-v7a/libapp.so') != null, true);
expect(archive.findFile('base/lib/armeabi-v7a/libflutter.so') != null, true);
expect(archive.findFile('component1/lib/armeabi-v7a/libapp.so-2.part.so') != null, false);
expect(archive.findFile('base/lib/x86_64/libapp.so') != null, true);
expect(archive.findFile('base/lib/x86_64/libflutter.so') != null, true);
expect(archive.findFile('component1/lib/x86_64/libapp.so-2.part.so') != null, false);
// Asset 2 is merged into the base module assets.
expect(archive.findFile('component1/assets/flutter_assets/test_assets/asset2.txt') != null, false);
expect(archive.findFile('base/assets/flutter_assets/test_assets/asset2.txt') != null, true);
expect(archive.findFile('base/assets/flutter_assets/test_assets/asset1.txt') != null, true);
});
testWithoutContext('simple build appbundle mismatched golden no-validate-deferred-components succeeds', () async {
final DeferredComponentsProject project = DeferredComponentsProject(MismatchedGoldenDeferredComponentsConfig());
await project.setUpIn(tempDir);
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
final ProcessResult result = await processManager.run(<String>[
flutterBin,
...getLocalEngineArguments(),
'build',
'appbundle',
'--no-validate-deferred-components',
], workingDirectory: tempDir.path);
expect(result, const ProcessResultMatcher(stdoutPattern: 'app-release.aab'));
printOnFailure('stdout:\n${result.stdout}');
printOnFailure('stderr:\n${result.stderr}');
expect(result.stdout.toString(), isNot(contains('Deferred components prebuild validation passed.')));
expect(result.stdout.toString(), isNot(contains('Deferred components gen_snapshot validation passed.')));
expect(result.stdout.toString(), isNot(contains('New loading units were found:')));
expect(result.stdout.toString(), isNot(contains('Previously existing loading units no longer exist:')));
final String line = result.stdout.toString()
.split('\n')
.firstWhere((String line) => line.contains('app-release.aab'));
final String outputFilePath = line.split(' ')[2].trim();
final File outputFile = fileSystem.file(fileSystem.path.join(tempDir.path, outputFilePath));
expect(outputFile, exists);
final Archive archive = ZipDecoder().decodeBytes(outputFile.readAsBytesSync());
expect(archive.findFile('base/lib/arm64-v8a/libapp.so') != null, true);
expect(archive.findFile('base/lib/arm64-v8a/libflutter.so') != null, true);
expect(archive.findFile('component1/lib/arm64-v8a/libapp.so-2.part.so') != null, true);
expect(archive.findFile('base/lib/armeabi-v7a/libapp.so') != null, true);
expect(archive.findFile('base/lib/armeabi-v7a/libflutter.so') != null, true);
expect(archive.findFile('component1/lib/armeabi-v7a/libapp.so-2.part.so') != null, true);
expect(archive.findFile('base/lib/x86_64/libapp.so') != null, true);
expect(archive.findFile('base/lib/x86_64/libflutter.so') != null, true);
expect(archive.findFile('component1/lib/x86_64/libapp.so-2.part.so') != null, true);
expect(archive.findFile('component1/assets/flutter_assets/test_assets/asset2.txt') != null, true);
expect(archive.findFile('base/assets/flutter_assets/test_assets/asset1.txt') != null, true);
});
testWithoutContext('simple build appbundle missing android dynamic feature module fails', () async {
final DeferredComponentsProject project = DeferredComponentsProject(NoAndroidDynamicFeatureModuleDeferredComponentsConfig());
await project.setUpIn(tempDir);
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
final ProcessResult result = await processManager.run(<String>[
flutterBin,
...getLocalEngineArguments(),
'build',
'appbundle',
], workingDirectory: tempDir.path);
expect(result, const ProcessResultMatcher(exitCode: 1, stdoutPattern: 'Newly generated android files:'));
expect(result.stdout.toString(), isNot(contains('app-release.aab')));
expect(result.stdout.toString(), isNot(contains('Deferred components prebuild validation passed.')));
expect(result.stdout.toString(), isNot(contains('Deferred components gen_snapshot validation passed.')));
final String pathSeparator = fileSystem.path.separator;
expect(result.stdout.toString(), contains('build${pathSeparator}android_deferred_components_setup_files${pathSeparator}component1${pathSeparator}build.gradle'));
expect(result.stdout.toString(), contains('build${pathSeparator}android_deferred_components_setup_files${pathSeparator}component1${pathSeparator}src${pathSeparator}main${pathSeparator}AndroidManifest.xml'));
});
testWithoutContext('simple build appbundle missing golden fails', () async {
final DeferredComponentsProject project = DeferredComponentsProject(NoGoldenDeferredComponentsConfig());
await project.setUpIn(tempDir);
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
final ProcessResult result = await processManager.run(<String>[
flutterBin,
...getLocalEngineArguments(),
'build',
'appbundle',
], workingDirectory: tempDir.path);
expect(result, const ProcessResultMatcher(exitCode: 1));
expect(result.stdout.toString(), isNot(contains('app-release.aab')));
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
expect(result.stdout.toString(), isNot(contains('Deferred components gen_snapshot validation passed.')));
expect(result.stdout.toString(), contains('New loading units were found:'));
expect(result.stdout.toString(), contains('- package:test/deferred_library.dart'));
expect(result.stdout.toString(), isNot(contains('Previously existing loading units no longer exist:')));
});
testWithoutContext('simple build appbundle mismatched golden fails', () async {
final DeferredComponentsProject project = DeferredComponentsProject(MismatchedGoldenDeferredComponentsConfig());
await project.setUpIn(tempDir);
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
final ProcessResult result = await processManager.run(<String>[
flutterBin,
...getLocalEngineArguments(),
'build',
'appbundle',
], workingDirectory: tempDir.path);
expect(
result,
const ProcessResultMatcher(
exitCode: 1,
stdoutPattern: 'Deferred components prebuild validation passed.',
),
);
expect(result.stdout.toString(), isNot(contains('app-release.aab')));
expect(result.stdout.toString(), isNot(contains('Deferred components gen_snapshot validation passed.')));
expect(result.stdout.toString(), contains('New loading units were found:'));
expect(result.stdout.toString(), contains('- package:test/deferred_library.dart'));
expect(result.stdout.toString(), contains('Previously existing loading units no longer exist:'));
expect(result.stdout.toString(), contains('- package:test/invalid_lib_name.dart'));
expect(result.stdout.toString(), contains('This loading unit check will not fail again on the next build attempt'));
});
}
| 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(getFlutterRoot(), 'packages', 'flutter_tools');
test('no imports of commands/* or test/* in lib/src/*', () {
final List<String> skippedPaths = <String> [
fileSystem.path.join(flutterTools, 'lib', 'src', 'commands'),
fileSystem.path.join(flutterTools, 'lib', 'src', 'test'),
];
bool isNotSkipped(FileSystemEntity entity) => skippedPaths.every((String path) => !entity.path.startsWith(path));
final Iterable<File> files = fileSystem.directory(fileSystem.path.join(flutterTools, 'lib', 'src'))
.listSync(recursive: true)
.where(_isDartFile)
.where(isNotSkipped)
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {
if (line.startsWith(RegExp(r'import.*package:'))) {
continue;
}
if (line.startsWith(RegExp(r'import.*commands/'))
|| line.startsWith(RegExp(r'import.*test/'))) {
final String relativePath = fileSystem.path.relative(file.path, from:flutterTools);
fail('$relativePath imports $line. This import introduces a layering violation. '
'Please find another way to access the information you are using.');
}
}
}
});
test('no imports of globals without a global prefix', () {
final List<String> skippedPaths = <String> [];
bool isNotSkipped(FileSystemEntity entity) => skippedPaths.every((String path) => !entity.path.startsWith(path));
final Iterable<File> files = fileSystem.directory(fileSystem.path.join(flutterTools, 'lib', 'src'))
.listSync(recursive: true)
.followedBy(fileSystem.directory(fileSystem.path.join(flutterTools, 'test',)).listSync(recursive: true))
.where(_isDartFile)
.where(isNotSkipped)
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {
if ((line.startsWith(RegExp(r'import.*globals.dart')) ||
line.startsWith(RegExp(r'import.*globals_null_migrated.dart'))) &&
!line.contains(r'as globals')) {
final String relativePath = fileSystem.path.relative(file.path, from:flutterTools);
fail('$relativePath imports globals_null_migrated.dart or globals.dart without a globals prefix.');
}
}
}
});
test('no unauthorized imports of dart:io', () {
final List<String> allowedPaths = <String>[
// This is a standalone script invoked by xcode, not part of the tool
fileSystem.path.join(flutterTools, 'bin', 'xcode_backend.dart'),
fileSystem.path.join(flutterTools, 'lib', 'src', 'base', 'io.dart'),
fileSystem.path.join(flutterTools, 'lib', 'src', 'base', 'platform.dart'),
fileSystem.path.join(flutterTools, 'lib', 'src', 'base', 'error_handling_io.dart'),
fileSystem.path.join(flutterTools, 'lib', 'src', 'base', 'multi_root_file_system.dart'),
];
bool isNotAllowed(FileSystemEntity entity) => allowedPaths.every((String path) => path != entity.path);
for (final String dirName in <String>['lib', 'bin']) {
final Iterable<File> files = fileSystem.directory(fileSystem.path.join(flutterTools, dirName))
.listSync(recursive: true)
.where(_isDartFile)
.where(isNotAllowed)
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {
if (line.startsWith(RegExp(r'import.*dart:io')) &&
!line.contains('flutter_ignore: dart_io_import')) {
final String relativePath = fileSystem.path.relative(file.path, from:flutterTools);
fail("$relativePath imports 'dart:io'; import 'lib/src/base/io.dart' instead");
}
}
}
}
});
test('no unauthorized imports of package:http', () {
final List<String> allowedPaths = <String>[
// Used only for multi-part file uploads, which are non-trivial to reimplement.
fileSystem.path.join(flutterTools, 'lib', 'src', 'reporting', 'crash_reporting.dart'),
];
bool isNotAllowed(FileSystemEntity entity) => allowedPaths.every((String path) => path != entity.path);
for (final String dirName in <String>['lib', 'bin']) {
final Iterable<File> files = fileSystem.directory(fileSystem.path.join(flutterTools, dirName))
.listSync(recursive: true)
.where(_isDartFile)
.where(isNotAllowed)
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {
if (line.startsWith(RegExp(r'import.*package:http/')) &&
!line.contains('flutter_ignore: package_http_import')) {
final String relativePath = fileSystem.path.relative(file.path, from:flutterTools);
fail("$relativePath imports 'package:http'; import 'lib/src/base/io.dart' instead");
}
}
}
}
});
test('no unauthorized imports of test_api', () {
final List<String> allowedPaths = <String>[
fileSystem.path.join(flutterTools, 'lib', 'src', 'test', 'flutter_platform.dart'),
fileSystem.path.join(flutterTools, 'lib', 'src', 'test', 'flutter_web_platform.dart'),
fileSystem.path.join(flutterTools, 'lib', 'src', 'test', 'test_wrapper.dart'),
];
bool isNotAllowed(FileSystemEntity entity) => allowedPaths.every((String path) => path != entity.path);
for (final String dirName in <String>['lib']) {
final Iterable<File> files = fileSystem.directory(fileSystem.path.join(flutterTools, dirName))
.listSync(recursive: true)
.where(_isDartFile)
.where(isNotAllowed)
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {
if (line.startsWith(RegExp(r'import.*package:test_api')) &&
!line.contains('flutter_ignore: test_api_import')) {
final String relativePath = fileSystem.path.relative(file.path, from:flutterTools);
fail("$relativePath imports 'package:test_api/test_api.dart';");
}
}
}
}
});
test('no unauthorized imports of package:path', () {
final List<String> allowedPath = <String>[
fileSystem.path.join(flutterTools, 'lib', 'src', 'isolated', 'web_compilation_delegate.dart'),
fileSystem.path.join(flutterTools, 'test', 'general.shard', 'platform_plugins_test.dart'),
];
for (final String dirName in <String>['lib', 'bin', 'test']) {
final Iterable<File> files = fileSystem.directory(fileSystem.path.join(flutterTools, dirName))
.listSync(recursive: true)
.where(_isDartFile)
.where((FileSystemEntity entity) => !allowedPath.contains(entity.path))
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {
if (line.startsWith(RegExp(r'import.*package:path/path.dart')) &&
!line.contains('flutter_ignore: package_path_import')) {
final String relativePath = fileSystem.path.relative(file.path, from:flutterTools);
fail("$relativePath imports 'package:path/path.dart'; use 'fileSystem.path' instead");
}
}
}
}
});
test('no unauthorized imports of package:file/local.dart', () {
final List<String> allowedPath = <String>[
fileSystem.path.join(flutterTools, 'test', 'integration.shard', 'test_utils.dart'),
fileSystem.path.join(flutterTools, 'lib', 'src', 'base', 'file_system.dart'),
];
for (final String dirName in <String>['lib', 'bin', 'test']) {
final Iterable<File> files = fileSystem.directory(fileSystem.path.join(flutterTools, dirName))
.listSync(recursive: true)
.where(_isDartFile)
.where((FileSystemEntity entity) => !allowedPath.contains(entity.path))
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {
if (line.startsWith(RegExp(r'import.*package:file/local.dart'))) {
final String relativePath = fileSystem.path.relative(file.path, from:flutterTools);
fail("$relativePath imports 'package:file/local.dart'; use 'lib/src/base/file_system.dart' instead");
}
}
}
}
});
test('no unauthorized imports of dart:convert', () {
final List<String> allowedPaths = <String>[
fileSystem.path.join(flutterTools, 'lib', 'src', 'convert.dart'),
fileSystem.path.join(flutterTools, 'lib', 'src', 'base', 'error_handling_io.dart'),
];
bool isNotAllowed(FileSystemEntity entity) => allowedPaths.every((String path) => path != entity.path);
for (final String dirName in <String>['lib']) {
final Iterable<File> files = fileSystem.directory(fileSystem.path.join(flutterTools, dirName))
.listSync(recursive: true)
.where(_isDartFile)
.where(isNotAllowed)
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {
if (line.startsWith(RegExp(r'import.*dart:convert')) &&
!line.contains('flutter_ignore: dart_convert_import')) {
final String relativePath = fileSystem.path.relative(file.path, from:flutterTools);
fail("$relativePath imports 'dart:convert'; import 'lib/src/convert.dart' instead");
}
}
}
}
});
test('no unauthorized imports of build_runner/dwds/devtools', () {
final List<String> allowedPaths = <String>[
fileSystem.path.join(flutterTools, 'test', 'src', 'isolated'),
fileSystem.path.join(flutterTools, 'lib', 'src', 'isolated'),
fileSystem.path.join(flutterTools, 'lib', 'executable.dart'),
fileSystem.path.join(flutterTools, 'lib', 'devfs_web.dart'),
fileSystem.path.join(flutterTools, 'lib', 'resident_web_runner.dart'),
];
bool isNotAllowed(FileSystemEntity entity) => allowedPaths.every((String path) => !entity.path.contains(path));
for (final String dirName in <String>['lib']) {
final Iterable<File> files = fileSystem.directory(fileSystem.path.join(flutterTools, dirName))
.listSync(recursive: true)
.where(_isDartFile)
.where(isNotAllowed)
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {
if (line.startsWith(RegExp(r'import.*package:build_runner_core/build_runner_core.dart')) ||
line.startsWith(RegExp(r'import.*package:build_runner/build_runner.dart')) ||
line.startsWith(RegExp(r'import.*package:build_config/build_config.dart')) ||
line.startsWith(RegExp(r'import.*dwds:*.dart')) ||
line.startsWith(RegExp(r'import.*devtools_server:*.dart')) ||
line.startsWith(RegExp(r'import.*build_runner/.*.dart'))) {
final String relativePath = fileSystem.path.relative(file.path, from:flutterTools);
fail('$relativePath imports a build_runner/dwds/devtools package');
}
}
}
}
});
test('no import of packages in tool_backend.dart', () {
final File file = fileSystem.file(fileSystem.path.join(flutterTools, 'bin', 'tool_backend.dart'));
for (final String line in file.readAsLinesSync()) {
if (line.startsWith(RegExp(r'import.*package:.*'))) {
final String relativePath = fileSystem.path.relative(file.path, from:flutterTools);
fail('$relativePath imports a package');
}
}
});
}
bool _isDartFile(FileSystemEntity entity) => entity is File && entity.path.endsWith('.dart');
File _asFile(FileSystemEntity entity) => entity as File;
| 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.0.0'
dependencies:
flutter:
sdk: flutter
''';
@override
final String main = r'''
import 'dart:async';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
doAsyncStuff();
super.initState();
}
Future<void> doAsyncStuff() async {
print("test"); // BREAKPOINT
await Future.value(true); // STEP 1 // STEP 2
await Future.microtask(() => true); // STEP 3 // STEP 4
await Future.delayed(const Duration(milliseconds: 1)); // STEP 5 // STEP 6
print("done!"); // STEP 7
} // STEP 8
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
home: Container(),
);
}
}
''';
Uri get breakpointUri => mainDart;
int get breakpointLine => lineContaining(main, '// BREAKPOINT');
int lineForStep(int i) => lineContaining(main, '// STEP $i');
final int numberOfSteps = 8;
}
class WebSteppingProject extends Project {
@override
final String pubspec = '''
name: test
environment:
sdk: '>=3.2.0-0 <4.0.0'
dependencies:
flutter:
sdk: flutter
''';
@override
final String main = r'''
import 'dart:async';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
doAsyncStuff();
super.initState();
}
Future<void> doAsyncStuff() async {
print("test"); // BREAKPOINT
await Future.value(true); // STEP 1
await Future.microtask(() => true); // STEP 2
await Future.delayed(const Duration(milliseconds: 1)); // STEP 3
print("done!"); // STEP 4
} // STEP 5
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
home: Container(),
);
}
}
''';
Uri get breakpointUri => mainDart;
int get breakpointLine => lineContaining(main, '// BREAKPOINT');
int lineForStep(int i) => lineContaining(main, '// STEP $i');
final int numberOfSteps = 5;
}
| 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 'package:flutter_tools/src/base/common.dart';
import 'package:flutter_tools/src/base/context.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/io.dart';
import 'package:flutter_tools/src/base/platform.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:meta/meta.dart';
import 'package:path/path.dart' as path; // flutter_ignore: package_path_import
import 'package:test/test.dart' as test_package show test;
import 'package:test/test.dart' hide test;
import 'package:unified_analytics/testing.dart';
import 'package:unified_analytics/unified_analytics.dart';
import 'fakes.dart';
export 'package:path/path.dart' show Context; // flutter_ignore: package_path_import
export 'package:test/test.dart' hide isInstanceOf, test;
void tryToDelete(FileSystemEntity fileEntity) {
// This should not be necessary, but it turns out that
// on Windows it's common for deletions to fail due to
// bogus (we think) "access denied" errors.
try {
if (fileEntity.existsSync()) {
fileEntity.deleteSync(recursive: true);
}
} on FileSystemException catch (error) {
// We print this so that it's visible in the logs, to get an idea of how
// common this problem is, and if any patterns are ever noticed by anyone.
// ignore: avoid_print
print('Failed to delete ${fileEntity.path}: $error');
}
}
/// Gets the path to the root of the Flutter repository.
///
/// This will first look for a `FLUTTER_ROOT` environment variable. If the
/// environment variable is set, it will be returned. Otherwise, this will
/// deduce the path from `platform.script`.
String getFlutterRoot() {
const Platform platform = LocalPlatform();
if (platform.environment.containsKey('FLUTTER_ROOT')) {
return platform.environment['FLUTTER_ROOT']!;
}
Error invalidScript() => StateError('Could not determine flutter_tools/ path from script URL (${globals.platform.script}); consider setting FLUTTER_ROOT explicitly.');
Uri scriptUri;
switch (platform.script.scheme) {
case 'file':
scriptUri = platform.script;
case 'data':
final RegExp flutterTools = RegExp(r'(file://[^"]*[/\\]flutter_tools[/\\][^"]+\.dart)', multiLine: true);
final Match? match = flutterTools.firstMatch(Uri.decodeFull(platform.script.path));
if (match == null) {
throw invalidScript();
}
scriptUri = Uri.parse(match.group(1)!);
default:
throw invalidScript();
}
final List<String> parts = path.split(globals.localFileSystem.path.fromUri(scriptUri));
final int toolsIndex = parts.indexOf('flutter_tools');
if (toolsIndex == -1) {
throw invalidScript();
}
final String toolsPath = path.joinAll(parts.sublist(0, toolsIndex + 1));
return path.normalize(path.join(toolsPath, '..', '..'));
}
/// Capture console print events into a string buffer.
Future<StringBuffer> capturedConsolePrint(Future<void> Function() body) async {
final StringBuffer buffer = StringBuffer();
await runZoned<Future<void>>(() async {
// Service the event loop.
await body();
}, zoneSpecification: ZoneSpecification(print: (Zone self, ZoneDelegate parent, Zone zone, String line) {
buffer.writeln(line);
}));
return buffer;
}
/// Matcher for functions that throw [AssertionError].
final Matcher throwsAssertionError = throwsA(isA<AssertionError>());
/// Matcher for functions that throw [ToolExit].
///
/// [message] is matched using the [contains] matcher.
Matcher throwsToolExit({ int? exitCode, Pattern? message }) {
TypeMatcher<ToolExit> result = const TypeMatcher<ToolExit>();
if (exitCode != null) {
result = result.having((ToolExit e) => e.exitCode, 'exitCode', equals(exitCode));
}
if (message != null) {
result = result.having((ToolExit e) => e.message, 'message', contains(message));
}
return throwsA(result);
}
/// Matcher for functions that throw [UsageException].
Matcher throwsUsageException({Pattern? message }) {
Matcher matcher = _isUsageException;
if (message != null) {
matcher = allOf(matcher, (UsageException e) => e.message.contains(message));
}
return throwsA(matcher);
}
/// Matcher for [UsageException]s.
final TypeMatcher<UsageException> _isUsageException = isA<UsageException>();
/// Matcher for functions that throw [ProcessException].
Matcher throwsProcessException({ Pattern? message }) {
Matcher matcher = _isProcessException;
if (message != null) {
matcher = allOf(matcher, (ProcessException e) => e.message.contains(message));
}
return throwsA(matcher);
}
/// Matcher for [ProcessException]s.
final TypeMatcher<ProcessException> _isProcessException = isA<ProcessException>();
Future<void> expectToolExitLater(Future<dynamic> future, Matcher messageMatcher) async {
try {
await future;
fail('ToolExit expected, but nothing thrown');
} on ToolExit catch (e) {
expect(e.message, messageMatcher);
// Catch all exceptions to give a better test failure message.
} catch (e, trace) { // ignore: avoid_catches_without_on_clauses
fail('ToolExit expected, got $e\n$trace');
}
}
Future<void> expectReturnsNormallyLater(Future<dynamic> future) async {
try {
await future;
// Catch all exceptions to give a better test failure message.
} catch (e, trace) { // ignore: avoid_catches_without_on_clauses
fail('Expected to run with no exceptions, got $e\n$trace');
}
}
Matcher containsIgnoringWhitespace(String toSearch) {
return predicate(
(String source) {
return collapseWhitespace(source).contains(collapseWhitespace(toSearch));
},
'contains "$toSearch" ignoring whitespace.',
);
}
/// The tool overrides `test` to ensure that files created under the
/// system temporary directory are deleted after each test by calling
/// `LocalFileSystem.dispose()`.
@isTest
void test(String description, FutureOr<void> Function() body, {
String? testOn,
dynamic skip,
List<String>? tags,
Map<String, dynamic>? onPlatform,
int? retry,
}) {
test_package.test(
description,
() async {
addTearDown(() async {
await globals.localFileSystem.dispose();
});
return body();
},
skip: skip,
tags: tags,
onPlatform: onPlatform,
retry: retry,
testOn: testOn,
// We don't support "timeout"; see ../../dart_test.yaml which
// configures all tests to have a 15 minute timeout which should
// definitely be enough.
);
}
/// Executes a test body in zone that does not allow context-based injection.
///
/// For classes which have been refactored to exclude context-based injection
/// or globals like [fs] or [platform], prefer using this test method as it
/// will prevent accidentally including these context getters in future code
/// changes.
///
/// For more information, see https://github.com/flutter/flutter/issues/47161
@isTest
void testWithoutContext(String description, FutureOr<void> Function() body, {
String? testOn,
dynamic skip,
List<String>? tags,
Map<String, dynamic>? onPlatform,
int? retry,
}) {
return test(
description, () async {
return runZoned(body, zoneValues: <Object, Object>{
contextKey: const _NoContext(),
});
},
skip: skip,
tags: tags,
onPlatform: onPlatform,
retry: retry,
testOn: testOn,
// We don't support "timeout"; see ../../dart_test.yaml which
// configures all tests to have a 15 minute timeout which should
// definitely be enough.
);
}
/// An implementation of [AppContext] that throws if context.get is called in the test.
///
/// The intention of the class is to ensure we do not accidentally regress when
/// moving towards more explicit dependency injection by accidentally using
/// a Zone value in place of a constructor parameter.
class _NoContext implements AppContext {
const _NoContext();
@override
T get<T>() {
throw UnsupportedError(
'context.get<$T> is not supported in test methods. '
'Use Testbed or testUsingContext if accessing Zone injected '
'values.'
);
}
@override
String get name => 'No Context';
@override
Future<V> run<V>({
required FutureOr<V> Function() body,
String? name,
Map<Type, Generator>? overrides,
Map<Type, Generator>? fallbacks,
ZoneSpecification? zoneSpecification,
}) async {
return body();
}
}
/// Allows inserting file system exceptions into certain
/// [MemoryFileSystem] operations by tagging path/op combinations.
///
/// Example use:
///
/// ```
/// void main() {
/// var handler = FileExceptionHandler();
/// var fs = MemoryFileSystem(opHandle: handler.opHandle);
///
/// var file = fs.file('foo')..createSync();
/// handler.addError(file, FileSystemOp.read, FileSystemException('Error Reading foo'));
///
/// expect(() => file.writeAsStringSync('A'), throwsA(isA<FileSystemException>()));
/// }
/// ```
class FileExceptionHandler {
final Map<String, Map<FileSystemOp, FileSystemException>> _contextErrors = <String, Map<FileSystemOp, FileSystemException>>{};
final Map<FileSystemOp, FileSystemException> _tempErrors = <FileSystemOp, FileSystemException>{};
static final RegExp _tempDirectoryEnd = RegExp('rand[0-9]+');
/// Add an exception that will be thrown whenever the file system attached to this
/// handler performs the [operation] on the [entity].
void addError(FileSystemEntity entity, FileSystemOp operation, FileSystemException exception) {
final String path = entity.path;
_contextErrors[path] ??= <FileSystemOp, FileSystemException>{};
_contextErrors[path]![operation] = exception;
}
void addTempError(FileSystemOp operation, FileSystemException exception) {
_tempErrors[operation] = exception;
}
/// Tear-off this method and pass it to the memory filesystem `opHandle` parameter.
void opHandle(String path, FileSystemOp operation) {
if (path.startsWith('.tmp_') || _tempDirectoryEnd.firstMatch(path) != null) {
final FileSystemException? exception = _tempErrors[operation];
if (exception != null) {
throw exception;
}
}
final Map<FileSystemOp, FileSystemException>? exceptions = _contextErrors[path];
if (exceptions == null) {
return;
}
final FileSystemException? exception = exceptions[operation];
if (exception == null) {
return;
}
throw exception;
}
}
/// This method is required to fetch an instance of [FakeAnalytics]
/// because there is initialization logic that is required. An initial
/// instance will first be created and will let package:unified_analytics
/// know that the consent message has been shown. After confirming on the first
/// instance, then a second instance will be generated and returned. This second
/// instance will be cleared to send events.
FakeAnalytics getInitializedFakeAnalyticsInstance({
required FileSystem fs,
required FakeFlutterVersion fakeFlutterVersion,
String? clientIde,
String? enabledFeatures,
}) {
final Directory homeDirectory = fs.directory('/');
final FakeAnalytics initialAnalytics = FakeAnalytics(
tool: DashTool.flutterTool,
homeDirectory: homeDirectory,
dartVersion: fakeFlutterVersion.dartSdkVersion,
platform: DevicePlatform.linux,
fs: fs,
surveyHandler: SurveyHandler(homeDirectory: homeDirectory, fs: fs),
flutterChannel: fakeFlutterVersion.channel,
flutterVersion: fakeFlutterVersion.getVersionString(),
);
initialAnalytics.clientShowedMessage();
return FakeAnalytics(
tool: DashTool.flutterTool,
homeDirectory: homeDirectory,
dartVersion: fakeFlutterVersion.dartSdkVersion,
platform: DevicePlatform.linux,
fs: fs,
surveyHandler: SurveyHandler(homeDirectory: homeDirectory, fs: fs),
flutterChannel: fakeFlutterVersion.channel,
flutterVersion: fakeFlutterVersion.getVersionString(),
clientIde: clientIde,
enabledFeatures: enabledFeatures,
);
}
/// Returns "true" if the timing event searched for exists in [sentEvents].
///
/// This utility function allows us to check for an instance of
/// [Event.timing] within a [FakeAnalytics] instance. Normally, we can
/// use the equality operator for [Event] to check if the event exists, but
/// we are unable to do so for the timing event because the elapsed time
/// is variable so we cannot predict what that value will be in tests.
///
/// This function allows us to check for the other keys that have
/// string values by removing the `elapsedMilliseconds` from the
/// [Event.eventData] map and checking for a match.
bool analyticsTimingEventExists({
required List<Event> sentEvents,
required String workflow,
required String variableName,
String? label,
}) {
final Map<String, String> lookup = <String, String>{
'workflow': workflow,
'variableName': variableName,
if (label != null) 'label': label,
};
for (final Event e in sentEvents) {
final Map<String, Object?> eventData = <String, Object?>{...e.eventData};
eventData.remove('elapsedMilliseconds');
if (const DeepCollectionEquality().equals(lookup, eventData)) {
return true;
}
}
return false;
}
| 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/dart run test test/web.shard
```
These tests are expensive to run and do not give meaningful coverage
information for the flutter tool (since they are black-box tests that
run the tool as a subprocess, rather than being unit tests). For this
reason, they are in a separate shard when running on continuous
integration and are not run when calculating coverage.
| 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 extractPathname(String url) {
return ensureLeadingSlash(Uri.parse(url).path);
}
/// Checks that [baseHref] is set.
///
/// Throws an exception otherwise.
String checkBaseHref(String? baseHref) {
if (baseHref == null) {
throw Exception('Please add a <base> element to your index.html');
}
if (!baseHref.endsWith('/')) {
throw Exception('The base href has to end with a "/" to work correctly');
}
return baseHref;
}
/// Prepends a forward slash to [path] if it doesn't start with one already.
///
/// Returns [path] unchanged if it already starts with a forward slash.
String ensureLeadingSlash(String path) {
if (!path.startsWith('/')) {
return '/$path';
}
return path;
}
/// Removes the trailing forward slash from [path] if any.
String stripTrailingSlash(String path) {
if (path.endsWith('/')) {
return path.substring(0, path.length - 1);
}
return path;
}
| 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 validateAddress(String address) {
if (!(isIpV4Address(address) || isIpV6Address(address))) {
throw ArgumentError(
'"$address" is neither a valid IPv4 nor IPv6 address');
}
}
/// Returns true if `address` is a valid IPv6 address.
bool isIpV6Address(String address) {
try {
// parseIpv6Address fails if there's a zone ID. Since this is still a valid
// IP, remove any zone ID before parsing.
final List<String> addressParts = address.split('%');
Uri.parseIPv6Address(addressParts[0]);
return true;
} on FormatException {
return false;
}
}
/// Returns true if `address` is a valid IPv4 address.
bool isIpV4Address(String address) {
try {
Uri.parseIPv4Address(address);
return true;
} on FormatException {
return false;
}
}
| 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. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'dart:html' as html;
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:integration_test_example/main.dart' as app;
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
testWidgets('verify text', (WidgetTester tester) async {
// Build our app and trigger a frame.
app.main();
// Trigger a frame.
await tester.pumpAndSettle();
// Verify that platform is retrieved.
expect(
find.byWidgetPredicate(
(Widget widget) =>
widget is Text &&
widget.data!
.startsWith('Platform: ${html.window.navigator.platform}\n'),
),
findsOneWidget,
);
});
}
| 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 'package:integration_test_example/main.dart' as app;
/// This file is placed in `test_driver/` instead of `integration_test/`, so
/// that the CI tooling of flutter/plugins only uses this together with
/// `failure_test.dart` as the driver. It is only used for testing of
/// `package:integration_test` – do not follow the conventions here if you are a
/// user of `package:integration_test`.
// Tests the failure behavior of the IntegrationTestWidgetsFlutterBinding
//
// This test fails intentionally! It should be run using a test runner that
// expects failure.
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
testWidgets('success', (WidgetTester tester) async {
expect(1 + 1, 2); // This should pass
});
testWidgets('failure 1', (WidgetTester tester) async {
// Build our app and trigger a frame.
app.main();
// Verify that platform version is retrieved.
await expectLater(
find.byWidgetPredicate(
(Widget widget) =>
widget is Text && widget.data!.startsWith('This should fail'),
),
findsOneWidget,
);
});
testWidgets('failure 2', (WidgetTester tester) async {
expect(1 + 1, 3); // This should fail
});
}
| 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 *_Nullable failureMessage);
@interface FLTIntegrationTestRunner : NSObject
/**
* Any screenshots captured by the plugin.
*/
@property (copy, readonly) NSDictionary<NSString *, UIImage *> *capturedScreenshotsByName;
/**
* Starts dart tests and waits for results.
*
* @param testResult Will be called once per every completed dart test.
*/
- (void)testIntegrationTestWithResults:(NS_NOESCAPE FLTIntegrationTestResults)testResult;
/**
* An appropriate XCTest method name based on the dart test name.
*
* Example: dart test "verify widget-ABC123" becomes "testVerifyWidgetABC123"
*/
+ (NSString *)testCaseNameFromDartTestName:(NSString *)dartTestName;
@end
NS_ASSUME_NONNULL_END
| 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.gif' width='350'>
Example [Digital Clock](digital_clock)
<img src='digital_clock/digital.gif' width='350'>
| 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 ([email protected]), 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
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
| 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
### android test
```sh
[bundle exec] fastlane android test
```
Runs all the tests
### android beta
```sh
[bundle exec] fastlane android beta
```
Submit a new beta build to Google Play
### android promote_to_production
```sh
[bundle exec] fastlane android promote_to_production
```
Promote beta track to prod
----
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
| 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: 'GalleryIcons',
);
static const IconData textFieldsAlt = IconData(
0xe901,
fontFamily: 'GalleryIcons',
);
static const IconData tabs = IconData(
0xe902,
fontFamily: 'GalleryIcons',
);
static const IconData switches = IconData(
0xe903,
fontFamily: 'GalleryIcons',
);
static const IconData sliders = IconData(
0xe904,
fontFamily: 'GalleryIcons',
);
static const IconData shrine = IconData(
0xe905,
fontFamily: 'GalleryIcons',
);
static const IconData sentimentVerySatisfied = IconData(
0xe906,
fontFamily: 'GalleryIcons',
);
static const IconData refresh = IconData(
0xe907,
fontFamily: 'GalleryIcons',
);
static const IconData progressActivity = IconData(
0xe908,
fontFamily: 'GalleryIcons',
);
static const IconData phoneIphone = IconData(
0xe909,
fontFamily: 'GalleryIcons',
);
static const IconData pageControl = IconData(
0xe90a,
fontFamily: 'GalleryIcons',
);
static const IconData moreVert = IconData(
0xe90b,
fontFamily: 'GalleryIcons',
);
static const IconData menu = IconData(
0xe90c,
fontFamily: 'GalleryIcons',
);
static const IconData listAlt = IconData(
0xe90d,
fontFamily: 'GalleryIcons',
);
static const IconData gridOn = IconData(
0xe90e,
fontFamily: 'GalleryIcons',
);
static const IconData expandAll = IconData(
0xe90f,
fontFamily: 'GalleryIcons',
);
static const IconData event = IconData(
0xe910,
fontFamily: 'GalleryIcons',
);
static const IconData driveVideo = IconData(
0xe911,
fontFamily: 'GalleryIcons',
);
static const IconData dialogs = IconData(
0xe912,
fontFamily: 'GalleryIcons',
);
static const IconData dataTable = IconData(
0xe913,
fontFamily: 'GalleryIcons',
);
static const IconData customTypography = IconData(
0xe914,
fontFamily: 'GalleryIcons',
);
static const IconData colors = IconData(
0xe915,
fontFamily: 'GalleryIcons',
);
static const IconData chips = IconData(
0xe916,
fontFamily: 'GalleryIcons',
);
static const IconData checkBox = IconData(
0xe917,
fontFamily: 'GalleryIcons',
);
static const IconData cards = IconData(
0xe918,
fontFamily: 'GalleryIcons',
);
static const IconData buttons = IconData(
0xe919,
fontFamily: 'GalleryIcons',
);
static const IconData bottomSheets = IconData(
0xe91a,
fontFamily: 'GalleryIcons',
);
static const IconData bottomNavigation = IconData(
0xe91b,
fontFamily: 'GalleryIcons',
);
static const IconData animation = IconData(
0xe91c,
fontFamily: 'GalleryIcons',
);
static const IconData accountBox = IconData(
0xe91d,
fontFamily: 'GalleryIcons',
);
static const IconData snackbar = IconData(
0xe91e,
fontFamily: 'GalleryIcons',
);
static const IconData categoryMdc = IconData(
0xe91f,
fontFamily: 'GalleryIcons',
);
static const IconData cupertinoProgress = IconData(
0xe920,
fontFamily: 'GalleryIcons',
);
static const IconData cupertinoPullToRefresh = IconData(
0xe921,
fontFamily: 'GalleryIcons',
);
static const IconData cupertinoSwitch = IconData(
0xe922,
fontFamily: 'GalleryIcons',
);
static const IconData genericButtons = IconData(
0xe923,
fontFamily: 'GalleryIcons',
);
static const IconData backdrop = IconData(
0xe924,
fontFamily: 'GalleryIcons',
);
static const IconData bottomAppBar = IconData(
0xe925,
fontFamily: 'GalleryIcons',
);
static const IconData bottomSheetPersistent = IconData(
0xe926,
fontFamily: 'GalleryIcons',
);
static const IconData listsLeaveBehind = IconData(
0xe927,
fontFamily: 'GalleryIcons',
);
static const IconData navigationRail = Icons.vertical_split;
static const IconData appbar = Icons.web_asset;
static const IconData divider = Icons.credit_card;
static const IconData search = Icons.search;
}
| 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_demo_types.dart';
enum SimpleValue {
one,
two,
three,
}
enum CheckedValue {
one,
two,
three,
four,
}
class MenuDemo extends StatefulWidget {
const MenuDemo({super.key, required this.type});
final MenuDemoType type;
@override
State<MenuDemo> createState() => _MenuDemoState();
}
class _MenuDemoState extends State<MenuDemo> {
void showInSnackBar(String value) {
ScaffoldMessenger.of(context).hideCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(value),
));
}
@override
Widget build(BuildContext context) {
Widget demo;
switch (widget.type) {
case MenuDemoType.contextMenu:
demo = _ContextMenuDemo(showInSnackBar: showInSnackBar);
break;
case MenuDemoType.sectionedMenu:
demo = _SectionedMenuDemo(showInSnackBar: showInSnackBar);
break;
case MenuDemoType.simpleMenu:
demo = _SimpleMenuDemo(showInSnackBar: showInSnackBar);
break;
case MenuDemoType.checklistMenu:
demo = _ChecklistMenuDemo(showInSnackBar: showInSnackBar);
break;
}
return Scaffold(
appBar: AppBar(
title: Text(GalleryLocalizations.of(context)!.demoMenuTitle),
automaticallyImplyLeading: false,
),
body: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Center(
child: demo,
),
),
);
}
}
// BEGIN menuDemoContext
// Pressing the PopupMenuButton on the right of this item shows
// a simple menu with one disabled item. Typically the contents
// of this "contextual menu" would reflect the app's state.
class _ContextMenuDemo extends StatelessWidget {
const _ContextMenuDemo({required this.showInSnackBar});
final void Function(String value) showInSnackBar;
@override
Widget build(BuildContext context) {
final localizations = GalleryLocalizations.of(context)!;
return ListTile(
title: Text(localizations.demoMenuAnItemWithAContextMenuButton),
trailing: PopupMenuButton<String>(
padding: EdgeInsets.zero,
onSelected: (value) => showInSnackBar(
localizations.demoMenuSelected(value),
),
itemBuilder: (context) => <PopupMenuItem<String>>[
PopupMenuItem<String>(
value: localizations.demoMenuContextMenuItemOne,
child: Text(
localizations.demoMenuContextMenuItemOne,
),
),
PopupMenuItem<String>(
enabled: false,
child: Text(
localizations.demoMenuADisabledMenuItem,
),
),
PopupMenuItem<String>(
value: localizations.demoMenuContextMenuItemThree,
child: Text(
localizations.demoMenuContextMenuItemThree,
),
),
],
),
);
}
}
// END
// BEGIN menuDemoSectioned
// Pressing the PopupMenuButton on the right of this item shows
// a menu whose items have text labels and icons and a divider
// That separates the first three items from the last one.
class _SectionedMenuDemo extends StatelessWidget {
const _SectionedMenuDemo({required this.showInSnackBar});
final void Function(String value) showInSnackBar;
@override
Widget build(BuildContext context) {
final localizations = GalleryLocalizations.of(context)!;
return ListTile(
title: Text(localizations.demoMenuAnItemWithASectionedMenu),
trailing: PopupMenuButton<String>(
padding: EdgeInsets.zero,
onSelected: (value) =>
showInSnackBar(localizations.demoMenuSelected(value)),
itemBuilder: (context) => <PopupMenuEntry<String>>[
PopupMenuItem<String>(
value: localizations.demoMenuPreview,
child: ListTile(
leading: const Icon(Icons.visibility),
title: Text(
localizations.demoMenuPreview,
),
),
),
PopupMenuItem<String>(
value: localizations.demoMenuShare,
child: ListTile(
leading: const Icon(Icons.person_add),
title: Text(
localizations.demoMenuShare,
),
),
),
PopupMenuItem<String>(
value: localizations.demoMenuGetLink,
child: ListTile(
leading: const Icon(Icons.link),
title: Text(
localizations.demoMenuGetLink,
),
),
),
const PopupMenuDivider(),
PopupMenuItem<String>(
value: localizations.demoMenuRemove,
child: ListTile(
leading: const Icon(Icons.delete),
title: Text(
localizations.demoMenuRemove,
),
),
),
],
),
);
}
}
// END
// BEGIN menuDemoSimple
// This entire list item is a PopupMenuButton. Tapping anywhere shows
// a menu whose current value is highlighted and aligned over the
// list item's center line.
class _SimpleMenuDemo extends StatefulWidget {
const _SimpleMenuDemo({required this.showInSnackBar});
final void Function(String value) showInSnackBar;
@override
_SimpleMenuDemoState createState() => _SimpleMenuDemoState();
}
class _SimpleMenuDemoState extends State<_SimpleMenuDemo> {
late SimpleValue _simpleValue;
void showAndSetMenuSelection(BuildContext context, SimpleValue value) {
setState(() {
_simpleValue = value;
});
widget.showInSnackBar(
GalleryLocalizations.of(context)!
.demoMenuSelected(simpleValueToString(context, value)),
);
}
String simpleValueToString(BuildContext context, SimpleValue value) {
final localizations = GalleryLocalizations.of(context)!;
return {
SimpleValue.one: localizations.demoMenuItemValueOne,
SimpleValue.two: localizations.demoMenuItemValueTwo,
SimpleValue.three: localizations.demoMenuItemValueThree,
}[value]!;
}
@override
void initState() {
super.initState();
_simpleValue = SimpleValue.two;
}
@override
Widget build(BuildContext context) {
return PopupMenuButton<SimpleValue>(
padding: EdgeInsets.zero,
initialValue: _simpleValue,
onSelected: (value) => showAndSetMenuSelection(context, value),
itemBuilder: (context) => <PopupMenuItem<SimpleValue>>[
PopupMenuItem<SimpleValue>(
value: SimpleValue.one,
child: Text(simpleValueToString(
context,
SimpleValue.one,
)),
),
PopupMenuItem<SimpleValue>(
value: SimpleValue.two,
child: Text(simpleValueToString(
context,
SimpleValue.two,
)),
),
PopupMenuItem<SimpleValue>(
value: SimpleValue.three,
child: Text(simpleValueToString(
context,
SimpleValue.three,
)),
),
],
child: ListTile(
title: Text(
GalleryLocalizations.of(context)!.demoMenuAnItemWithASimpleMenu),
subtitle: Text(simpleValueToString(context, _simpleValue)),
),
);
}
}
// END
// BEGIN menuDemoChecklist
// Pressing the PopupMenuButton on the right of this item shows a menu
// whose items have checked icons that reflect this app's state.
class _ChecklistMenuDemo extends StatefulWidget {
const _ChecklistMenuDemo({required this.showInSnackBar});
final void Function(String value) showInSnackBar;
@override
_ChecklistMenuDemoState createState() => _ChecklistMenuDemoState();
}
class _RestorableCheckedValues extends RestorableProperty<Set<CheckedValue>> {
Set<CheckedValue> _checked = <CheckedValue>{};
void check(CheckedValue value) {
_checked.add(value);
notifyListeners();
}
void uncheck(CheckedValue value) {
_checked.remove(value);
notifyListeners();
}
bool isChecked(CheckedValue value) => _checked.contains(value);
Iterable<String> checkedValuesToString(BuildContext context) {
final localizations = GalleryLocalizations.of(context)!;
return _checked.map((value) {
return {
CheckedValue.one: localizations.demoMenuOne,
CheckedValue.two: localizations.demoMenuTwo,
CheckedValue.three: localizations.demoMenuThree,
CheckedValue.four: localizations.demoMenuFour,
}[value]!;
});
}
@override
Set<CheckedValue> createDefaultValue() => _checked;
@override
Set<CheckedValue> initWithValue(Set<CheckedValue> a) {
_checked = a;
return _checked;
}
@override
Object toPrimitives() => _checked.map((value) => value.index).toList();
@override
Set<CheckedValue> fromPrimitives(Object? data) {
final checkedValues = data as List<dynamic>;
return Set.from(checkedValues.map<CheckedValue>((dynamic id) {
return CheckedValue.values[id as int];
}));
}
}
class _ChecklistMenuDemoState extends State<_ChecklistMenuDemo>
with RestorationMixin {
final _RestorableCheckedValues _checkedValues = _RestorableCheckedValues()
..check(CheckedValue.three);
@override
String get restorationId => 'checklist_menu_demo';
@override
void restoreState(RestorationBucket? oldBucket, bool initialRestore) {
registerForRestoration(_checkedValues, 'checked_values');
}
void showCheckedMenuSelections(BuildContext context, CheckedValue value) {
if (_checkedValues.isChecked(value)) {
setState(() {
_checkedValues.uncheck(value);
});
} else {
setState(() {
_checkedValues.check(value);
});
}
widget.showInSnackBar(
GalleryLocalizations.of(context)!.demoMenuChecked(
_checkedValues.checkedValuesToString(context),
),
);
}
String checkedValueToString(BuildContext context, CheckedValue value) {
final localizations = GalleryLocalizations.of(context)!;
return {
CheckedValue.one: localizations.demoMenuOne,
CheckedValue.two: localizations.demoMenuTwo,
CheckedValue.three: localizations.demoMenuThree,
CheckedValue.four: localizations.demoMenuFour,
}[value]!;
}
@override
void dispose() {
_checkedValues.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return ListTile(
title: Text(
GalleryLocalizations.of(context)!.demoMenuAnItemWithAChecklistMenu,
),
trailing: PopupMenuButton<CheckedValue>(
padding: EdgeInsets.zero,
onSelected: (value) => showCheckedMenuSelections(context, value),
itemBuilder: (context) => <PopupMenuItem<CheckedValue>>[
CheckedPopupMenuItem<CheckedValue>(
value: CheckedValue.one,
checked: _checkedValues.isChecked(CheckedValue.one),
child: Text(
checkedValueToString(context, CheckedValue.one),
),
),
CheckedPopupMenuItem<CheckedValue>(
value: CheckedValue.two,
enabled: false,
checked: _checkedValues.isChecked(CheckedValue.two),
child: Text(
checkedValueToString(context, CheckedValue.two),
),
),
CheckedPopupMenuItem<CheckedValue>(
value: CheckedValue.three,
checked: _checkedValues.isChecked(CheckedValue.three),
child: Text(
checkedValueToString(context, CheckedValue.three),
),
),
CheckedPopupMenuItem<CheckedValue>(
value: CheckedValue.four,
checked: _checkedValues.isChecked(CheckedValue.four),
child: Text(
checkedValueToString(context, CheckedValue.four),
),
),
],
),
);
}
}
// END
| 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});
@override
State<SharedYAxisTransitionDemo> createState() =>
_SharedYAxisTransitionDemoState();
}
class _SharedYAxisTransitionDemoState extends State<SharedYAxisTransitionDemo>
with SingleTickerProviderStateMixin {
bool _isAlphabetical = false;
late AnimationController _controller;
@override
void initState() {
super.initState();
_controller = AnimationController(
duration: const Duration(milliseconds: 300),
vsync: this,
);
}
final _recentList = ListView(
// Adding [UniqueKey] to make sure the widget rebuilds when transitioning.
key: UniqueKey(),
children: [
for (int i = 0; i < 10; i++) _AlbumTile((i + 1).toString()),
],
);
final _alphabeticalList = ListView(
// Adding [UniqueKey] to make sure the widget rebuilds when transitioning.
key: UniqueKey(),
children: [
for (final letter in _alphabet) _AlbumTile(letter),
],
);
static const _alphabet = [
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'I',
'J',
];
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
final localizations = GalleryLocalizations.of(context)!;
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
title: Column(
children: [
Text(localizations.demoSharedYAxisTitle),
Text(
'(${localizations.demoSharedYAxisDemoInstructions})',
style: Theme.of(context)
.textTheme
.titleSmall!
.copyWith(color: Colors.white),
),
],
),
),
body: Column(
children: [
const SizedBox(height: 5),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: const EdgeInsets.only(left: 15),
child: Text(localizations.demoSharedYAxisAlbumCount),
),
Padding(
padding: const EdgeInsets.only(right: 7),
child: InkWell(
customBorder: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(4),
),
),
onTap: () {
if (!_isAlphabetical) {
_controller.reset();
_controller.animateTo(0.5);
} else {
_controller.animateTo(1);
}
setState(() {
_isAlphabetical = !_isAlphabetical;
});
},
child: Row(
children: [
Text(_isAlphabetical
? localizations.demoSharedYAxisAlphabeticalSortTitle
: localizations.demoSharedYAxisRecentSortTitle),
RotationTransition(
turns: Tween(begin: 0.0, end: 1.0)
.animate(_controller.view),
child: const Icon(Icons.arrow_drop_down),
),
],
),
),
),
],
),
const SizedBox(height: 10),
Expanded(
child: PageTransitionSwitcher(
reverse: _isAlphabetical,
transitionBuilder: (child, animation, secondaryAnimation) {
return SharedAxisTransition(
animation: animation,
secondaryAnimation: secondaryAnimation,
transitionType: SharedAxisTransitionType.vertical,
child: child,
);
},
child: _isAlphabetical ? _alphabeticalList : _recentList,
),
),
],
),
);
}
}
class _AlbumTile extends StatelessWidget {
const _AlbumTile(this._title);
final String _title;
@override
Widget build(BuildContext context) {
final randomNumberGenerator = Random();
final localizations = GalleryLocalizations.of(context)!;
return Column(
children: [
ListTile(
leading: Container(
height: 60,
width: 60,
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(4),
),
color: Colors.grey,
),
child: Padding(
padding: const EdgeInsets.all(6),
child: Image.asset(
'placeholders/placeholder_image.png',
package: 'flutter_gallery_assets',
),
),
),
title: Text(
'${localizations.demoSharedYAxisAlbumTileTitle} $_title',
),
subtitle: Text(
localizations.demoSharedYAxisAlbumTileSubtitle,
),
trailing: Text(
'${(randomNumberGenerator.nextInt(50) + 10).toString()} '
'${localizations.demoSharedYAxisAlbumTileDurationUnit}',
),
),
const Divider(height: 20, thickness: 1),
],
);
}
}
// END sharedYAxisTransitionDemo
| 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": "Πεδίο κειμένου αναζήτησης",
"demoCupertinoPicker": "Εργαλείο επιλογής",
"demoCupertinoSearchTextFieldSubtitle": "Πεδίο κειμένου αναζήτησης τύπου iOS",
"demoCupertinoSearchTextFieldDescription": "Ένα πεδίο κειμένου αναζήτησης που επιτρέπει στον χρήστη να κάνει αναζητήσεις καταχωρίζοντας κείμενο και το οποίο μπορεί να προσφέρει και να φιλτράρει προτάσεις.",
"demoCupertinoSearchTextFieldPlaceholder": "Καταχωρίστε κείμενο",
"demoCupertinoScrollbarTitle": "Γραμμή κύλισης",
"demoCupertinoScrollbarSubtitle": "Γραμμή κύλισης τύπου iOS",
"demoCupertinoScrollbarDescription": "Μια γραμμή κύλισης που αναδιπλώνει το θυγατρικό στοιχείο",
"demoTwoPaneItem": "Στοιχείο {value}",
"demoTwoPaneList": "Λίστα",
"demoTwoPaneFoldableLabel": "Αναδιπλούμενη",
"demoTwoPaneSmallScreenLabel": "Μικρή οθόνη",
"demoTwoPaneSmallScreenDescription": "Αυτός είναι ο τρόπος με τον οποίο συμπεριφέρεται το TwoPane σε μια συσκευή με μικρή οθόνη.",
"demoTwoPaneTabletLabel": "Tablet/Υπολογιστής",
"demoTwoPaneTabletDescription": "Αυτός είναι ο τρόπος με τον οποίο συμπεριφέρεται το TwoPane σε μια συσκευή με μεγαλύτερη οθόνη όπως tablet ή υπολογιστή.",
"demoTwoPaneTitle": "TwoPane",
"demoTwoPaneSubtitle": "Αποκριτικές διατάξεις σε αναδιπλούμενες συσκευές, συσκευές με μεγάλη και μικρή οθόνη",
"splashSelectDemo": "Επιλογή επίδειξης",
"demoTwoPaneFoldableDescription": "Αυτός είναι ο τρόπος με τον οποίο συμπεριφέρεται το TwoPane σε μια αναδιπλούμενη συσκευή.",
"demoTwoPaneDetails": "Λεπτομέρειες",
"demoTwoPaneSelectItem": "Επιλέξτε ένα στοιχείο",
"demoTwoPaneItemDetails": "Λεπτομέρειες στοιχείου {value}",
"demoCupertinoContextMenuActionText": "Πατήστε παρατεταμένα το λογότυπο Flutter για να δείτε το μενού περιβάλλοντος.",
"demoCupertinoContextMenuDescription": "Ένα μενού περιβάλλοντος πλήρους οθόνης με στιλ iOS, το οποίο εμφανίζεται με το παρατεταμένο πάτημα ενός στοιχείου.",
"demoAppBarTitle": "Γραμμή εφαρμογής",
"demoAppBarDescription": "Η γραμμή εφαρμογής παρέχει περιεχόμενο και ενέργειες που σχετίζονται με την τρέχουσα οθόνη. Χρησιμοποιείται στο πλαίσιο της καθιέρωσης επωνυμίας, των τίτλων οθόνης, της πλοήγησης και των ενεργειών",
"demoDividerTitle": "Διαχωριστικό",
"demoDividerSubtitle": "Ένα διαχωριστικό είναι μια λεπτή γραμμή που ομαδοποιεί το περιεχόμενο σε λίστες και διατάξεις.",
"demoDividerDescription": "Τα διαχωριστικά μπορούν να χρησιμοποιηθούν για τον διαχωρισμό του περιεχομένου σε λίστες, συρτάρια και σε άλλα σημεία.",
"demoVerticalDividerTitle": "Κάθετο διαχωριστικό",
"demoCupertinoContextMenuTitle": "Μενού περιβάλλοντος",
"demoCupertinoContextMenuSubtitle": "Μενού περιβάλλοντος με στιλ iOS",
"demoAppBarSubtitle": "Εμφανίζει πληροφορίες και ενέργειες που σχετίζονται με την τρέχουσα οθόνη",
"demoCupertinoContextMenuActionOne": "Πρώτη ενέργεια",
"demoCupertinoContextMenuActionTwo": "Δεύτερη ενέργεια",
"demoDateRangePickerDescription": "Εμφανίζει ένα παράθυρο διαλόγου που περιέχει ένα εργαλείο επιλογής ημερομηνιών Material design.",
"demoDateRangePickerTitle": "Εργαλείο επιλογής εύρους ημερομηνιών",
"demoNavigationDrawerUserName": "Όνομα Χρήστη",
"demoNavigationDrawerUserEmail": "[email protected]",
"demoNavigationDrawerText": "Σύρετε από την άκρη ή πατήστε το εικονίδιο στην επάνω αριστερή γωνία για να δείτε το συρτάρι.",
"demoNavigationRailTitle": "Στήλη πλοήγησης",
"demoNavigationRailSubtitle": "Προβολή στήλης πλοήγησης σε μια εφαρμογή",
"demoNavigationRailDescription": "Ένα γραφικό στοιχείο υλικού που προορίζεται για προβολή αριστερά ή δεξιά μιας εφαρμογής, για την πλοήγηση μεταξύ ενός μικρού αριθμού προβολών, συνήθως μεταξύ τριών και πέντε.",
"demoNavigationRailFirst": "Πρώτη",
"demoNavigationDrawerTitle": "Συρτάρι πλοήγησης",
"demoNavigationRailThird": "Τρίτη",
"replyStarredLabel": "Με αστέρι",
"demoTextButtonDescription": "Ένα κουμπί κειμένου εμφανίζει μια πιτσιλιά μελανιού κατά το πάτημα, χωρίς ανασήκωμα. Χρησιμοποιήστε κουμπιά κειμένου στις γραμμές εργαλείων, σε παράθυρα διαλόγου και ενσωματωμένα με την αναπλήρωση.",
"demoElevatedButtonTitle": "Ανυψωμένο κουμπί",
"demoElevatedButtonDescription": "Τα ανυψωμένα κουμπιά προσθέτουν διάσταση στις κυρίως επίπεδες διατάξεις. Δίνουν έμφαση σε λειτουργίες σε γεμάτους ή μεγάλους χώρους.",
"demoOutlinedButtonTitle": "Κουμπί με περίγραμμα",
"demoOutlinedButtonDescription": "Τα κουμπιά με περίγραμμα γίνονται αδιαφανή και ανυψώνονται κατά το πάτημα. Συχνά συνδυάζονται με ανυψωμένα κουμπιά για να υποδείξουν μια εναλλακτική, δευτερεύουσα ενέργεια.",
"demoContainerTransformDemoInstructions": "Κάρτες, λίστες και FAB",
"demoNavigationDrawerSubtitle": "Προβολή συρταριού εντός της γραμμής εφαρμογών",
"replyDescription": "Μια αποδοτική και εξειδικευμένη εφαρμογή ηλεκτρονικού ταχυδρομείου",
"demoNavigationDrawerDescription": "Ένα πλαίσιο Material Design που σύρεται οριζόντια από την άκρη της οθόνης για την εμφάνιση συνδέσμων πλοήγησης σε μια εφαρμογή.",
"replyDraftsLabel": "Πρόχειρα",
"demoNavigationDrawerToPageOne": "Στοιχείο ένα",
"replyInboxLabel": "Εισερχόμενα",
"demoSharedXAxisDemoInstructions": "Κουμπιά Επόμενο και Πίσω",
"replySpamLabel": "Ανεπιθύμητο περιεχόμενο",
"replyTrashLabel": "Κάδος",
"replySentLabel": "Απεσταλμένα",
"demoNavigationRailSecond": "Δεύτερη",
"demoNavigationDrawerToPageTwo": "Στοιχείο δύο",
"demoFadeScaleDemoInstructions": "Αποκλειστικό παράθυρο και FAB",
"demoFadeThroughDemoInstructions": "Πλοήγηση κάτω μέρους",
"demoSharedZAxisDemoInstructions": "Κουμπί εικονιδίου ρυθμίσεων",
"demoSharedYAxisDemoInstructions": "Ταξινόμηση κατά Ακούσατε πρόσφατα",
"demoTextButtonTitle": "Κουμπί κειμένου",
"demoSharedZAxisBeefSandwichRecipeTitle": "Σάντουιτς με βοδινό",
"demoSharedZAxisDessertRecipeDescription": "Συνταγή επιδορπίου",
"demoSharedYAxisAlbumTileSubtitle": "Καλλιτέχνης",
"demoSharedYAxisAlbumTileTitle": "Άλμπουμ",
"demoSharedYAxisRecentSortTitle": "Ακούσατε πρόσφατα",
"demoSharedYAxisAlphabeticalSortTitle": "Α-Ω",
"demoSharedYAxisAlbumCount": "268 άλμπουμ",
"demoSharedYAxisTitle": "Κοινόχρηστος άξονας y",
"demoSharedXAxisCreateAccountButtonText": "ΔΗΜΙΟΥΡΓΙΑ ΛΟΓΑΡΙΑΣΜΟΥ",
"demoFadeScaleAlertDialogDiscardButton": "ΑΠΟΡΡΙΨΗ",
"demoSharedXAxisSignInTextFieldLabel": "Διεύθυνση ηλεκτρονικού ταχυδρομείου ή αριθμός τηλεφώνου",
"demoSharedXAxisSignInSubtitleText": "Σύνδεση με τον λογαριασμό σας",
"demoSharedXAxisSignInWelcomeText": "Γεια σας David Park,",
"demoSharedXAxisIndividualCourseSubtitle": "Μεμονωμένο",
"demoSharedXAxisBundledCourseSubtitle": "Ομαδοποιημένο",
"demoFadeThroughAlbumsDestination": "Άλμπουμ",
"demoSharedXAxisDesignCourseTitle": "Σχέδιο",
"demoSharedXAxisIllustrationCourseTitle": "Εικονογράφηση",
"demoSharedXAxisBusinessCourseTitle": "Επιχειρήσεις",
"demoSharedXAxisArtsAndCraftsCourseTitle": "Τέχνη και κατασκευές",
"demoMotionPlaceholderSubtitle": "Δευτερεύον κείμενο",
"demoFadeScaleAlertDialogCancelButton": "ΑΚΥΡΩΣΗ",
"demoFadeScaleAlertDialogHeader": "Παράθυρο διαλόγου προειδοποιήσεων",
"demoFadeScaleHideFabButton": "ΑΠΟΚΡΥΨΗ ΚΙΝΟΥΜΕΝΟΥ ΚΟΥΜΠΙΟΥ ΕΝΕΡΓΕΙΑΣ",
"demoFadeScaleShowFabButton": "ΕΜΦΑΝΙΣΗ ΚΙΝΟΥΜΕΝΟΥ ΚΟΥΜΠΙΟΥ ΕΝΕΡΓΕΙΑΣ",
"demoFadeScaleShowAlertDialogButton": "ΕΜΦΑΝΙΣΗ ΑΠΟΚΛΕΙΣΤΙΚΗΣ ΕΙΔΟΠΟΙΗΣΗΣ",
"demoFadeScaleDescription": "Το μοτίβο σταδιακής εξαφάνισης χρησιμοποιείται για στοιχεία διεπαφής χρήστη που μπαίνουν ή βγαίνουν από τα όρια της οθόνης , όπως ένα παράθυρο διαλόγου που εμφανίζεται σταδιακά στο κέντρο της οθόνης.",
"demoFadeScaleTitle": "Σταδιακή εξαφάνιση",
"demoFadeThroughTextPlaceholder": "123 φωτογραφίες",
"demoFadeThroughSearchDestination": "Αναζήτηση",
"demoFadeThroughPhotosDestination": "Φωτογραφίες",
"demoSharedXAxisCoursePageSubtitle": "Οι ομαδοποιημένες κατηγορίες εμφανίζονται ως ομάδες στη ροή σας. Μπορείτε πάντα να αλλάξετε αυτήν την επιλογή αργότερα.",
"demoFadeThroughDescription": "Το μοτίβο σταδιακής εξαφάνισης στο κέντρο χρησιμοποιείται για μεταβάσεις μεταξύ στοιχείων διεπαφής χρήστη που δεν έχουν μια ισχυρή σχέση ανάμεσά τους.",
"demoFadeThroughTitle": "Σταδιακή εξαφάνιση διά μέσου",
"demoSharedZAxisHelpSettingLabel": "Βοήθεια",
"demoMotionSubtitle": "Όλα τα προκαθορισμένα μοτίβα μετάβασης",
"demoSharedZAxisNotificationSettingLabel": "Ειδοποιήσεις",
"demoSharedZAxisProfileSettingLabel": "Προφίλ",
"demoSharedZAxisSavedRecipesListTitle": "Αποθηκευμένες συνταγές",
"demoSharedZAxisBeefSandwichRecipeDescription": "Συνταγή για σάντουιτς με βοδινό",
"demoSharedZAxisCrabPlateRecipeDescription": "Συνταγή για καβούρι",
"demoSharedXAxisCoursePageTitle": "Συντονισμός των μαθημάτων σας",
"demoSharedZAxisCrabPlateRecipeTitle": "Καβούρι",
"demoSharedZAxisShrimpPlateRecipeDescription": "Συνταγή για γαρίδες",
"demoSharedZAxisShrimpPlateRecipeTitle": "Γαρίδες",
"demoContainerTransformTypeFadeThrough": "ΣΤΑΔΙΑΚΗ ΕΞΑΦΑΝΙΣΗ ΔΙΑ ΜΕΣΟΥ",
"demoSharedZAxisDessertRecipeTitle": "Επιδόρπιο",
"demoSharedZAxisSandwichRecipeDescription": "Συνταγή σάντουιτς",
"demoSharedZAxisSandwichRecipeTitle": "Σάντουιτς",
"demoSharedZAxisBurgerRecipeDescription": "Συνταγή μπέργκερ",
"demoSharedZAxisBurgerRecipeTitle": "Μπέργκερ",
"demoSharedZAxisSettingsPageTitle": "Ρυθμίσεις",
"demoSharedZAxisTitle": "Κοινόχρηστος άξονας z",
"demoSharedZAxisPrivacySettingLabel": "Απόρρητο",
"demoMotionTitle": "Κίνηση",
"demoContainerTransformTitle": "Μετασχηματισμός κοντέινερ",
"demoContainerTransformDescription": "Το μοτίβο μετασχηματισμού κοντέινερ έχει σχεδιαστεί για μεταβάσεις μεταξύ στοιχείων διεπαφής χρήστη που περιλαμβάνουν ένα κοντέινερ. Αυτό το μοτίβο δημιουργεί μια ορατή σύνδεση μεταξύ δύο στοιχείων διεπαφής χρήστη.",
"demoContainerTransformModalBottomSheetTitle": "Λειτουργία σταδιακής εξαφάνισης",
"demoContainerTransformTypeFade": "ΣΤΑΔΙΑΚΗ ΕΞΑΦΑΝΙΣΗ",
"demoSharedYAxisAlbumTileDurationUnit": "λ.",
"demoMotionPlaceholderTitle": "Τίτλος",
"demoSharedXAxisForgotEmailButtonText": "ΞΕΧΑΣΑΤΕ ΤΗ ΔΙΕΥΘΥΝΣΗ ΗΛΕΚΤΡΟΝΙΚΟΥ ΤΑΧΥΔΡΟΜΕΙΟΥ;",
"demoMotionSmallPlaceholderSubtitle": "Δευτερεύον",
"demoMotionDetailsPageTitle": "Σελίδα λεπτομερειών",
"demoMotionListTileTitle": "Στοιχείο λίστας",
"demoSharedAxisDescription": "Το μοτίβο κοινόχρηστου άξονα χρησιμοποιείται για μεταβάσεις μεταξύ στοιχείων διεπαφής χρήστη που συνδέονται με μια χωρική σχέση ή μια σχέση πλοήγησης. Αυτό το μοτίβο χρησιμοποιεί έναν κοινόχρηστο μετασχηματισμό στον άξονα x, y ή z για να ενδυναμώσει τη σχέση μεταξύ των στοιχείων.",
"demoSharedXAxisTitle": "Κοινόχρηστος άξονας x",
"demoSharedXAxisBackButtonText": "ΠΙΣΩ",
"demoSharedXAxisNextButtonText": "ΕΠΟΜΕΝΟ",
"demoSharedXAxisCulinaryCourseTitle": "Μαγειρική",
"githubRepo": "{repoName} Χώρος φύλαξης GitHub",
"fortnightlyMenuUS": "ΗΠΑ",
"fortnightlyMenuBusiness": "Επιχειρήσεις",
"fortnightlyMenuScience": "Επιστήμη",
"fortnightlyMenuSports": "Αθλητικά",
"fortnightlyMenuTravel": "Ταξίδια",
"fortnightlyMenuCulture": "Πολιτισμός",
"fortnightlyTrendingTechDesign": "TechDesign",
"rallyBudgetDetailAmountLeft": "Ποσό που απομένει",
"fortnightlyHeadlineArmy": "Η εκ των έσω μεταρρύθμιση του Πράσινου στρατού",
"fortnightlyDescription": "Μια εφαρμογή ειδήσεων με έμφαση στο περιεχόμενο",
"rallyBillDetailAmountDue": "Οφειλόμενο ποσό",
"rallyBudgetDetailTotalCap": "Συνολικό κεφάλαιο",
"rallyBudgetDetailAmountUsed": "Ποσό που χρησιμοποιείται",
"fortnightlyTrendingHealthcareRevolution": "HealthcareRevolution",
"fortnightlyMenuFrontPage": "Εξώφυλλο",
"fortnightlyMenuWorld": "Κόσμος",
"rallyBillDetailAmountPaid": "Ποσό που καταβλήθηκε",
"fortnightlyMenuPolitics": "Πολιτική",
"fortnightlyHeadlineBees": "Περιορισμένα αποθέματα μελισσιών",
"fortnightlyHeadlineGasoline": "Το μέλλον της βενζίνης",
"fortnightlyTrendingGreenArmy": "GreenArmy",
"fortnightlyHeadlineFeminists": "Η στράτευση των φεμινιστριών",
"fortnightlyHeadlineFabrics": "Οι σχεδιαστές χρησιμοποιούν την τεχνολογία για να δημιουργήσουν φουτουριστικά υφάσματα",
"fortnightlyHeadlineStocks": "Μετοχές σε τέλμα, στροφή στο συνάλλαγμα",
"fortnightlyTrendingReform": "Reform",
"fortnightlyMenuTech": "Τεχνολογία",
"fortnightlyHeadlineWar": "Ο διχασμός στη ζωή των Αμερικανών κατά τη διάρκεια του πολέμου",
"fortnightlyHeadlineHealthcare": "Η αθόρυβη, αλλά ισχυρή επανάσταση στην υγειονομική περίθαλψη",
"fortnightlyLatestUpdates": "Τελευταίες ενημερώσεις",
"fortnightlyTrendingStocks": "Stocks",
"rallyBillDetailTotalAmount": "Συνολικό ποσό",
"demoCupertinoPickerDateTime": "Ημερομηνία και ώρα",
"signIn": "ΣΥΝΔΕΣΗ",
"dataTableRowWithSugar": "{value} με ζάχαρη",
"dataTableRowApplePie": "Apple pie",
"dataTableRowDonut": "Donut",
"dataTableRowHoneycomb": "Honeycomb",
"dataTableRowLollipop": "Lollipop",
"dataTableRowJellyBean": "Jelly bean",
"dataTableRowGingerbread": "Gingerbread",
"dataTableRowCupcake": "Cupcake",
"dataTableRowEclair": "Eclair",
"dataTableRowIceCreamSandwich": "Ice Cream Sandwich",
"dataTableRowFrozenYogurt": "Frozen yogurt",
"dataTableColumnIron": "Σίδηρος (%)",
"dataTableColumnCalcium": "Ασβέστιο (%)",
"dataTableColumnSodium": "Νάτριο (mg)",
"demoTimePickerTitle": "Εργαλείο επιλογής ώρας",
"demo2dTransformationsResetTooltip": "Επαναφορά μετασχηματισμών",
"dataTableColumnFat": "Λίπος (γρ.)",
"dataTableColumnCalories": "Θερμίδες",
"dataTableColumnDessert": "Επιδόρπιο (1 μερίδα)",
"cardsDemoTravelDestinationLocation1": "Τανχαβούρ, Ταμίλ Ναντού",
"demoTimePickerDescription": "Εμφανίζει ένα παράθυρο διαλόγου που περιέχει ένα εργαλείο επιλογής ώρας material design.",
"demoPickersShowPicker": "ΕΜΦΑΝΙΣΗ ΕΡΓΑΛΕΙΟΥ ΕΠΙΛΟΓΗΣ",
"demoTabsScrollingTitle": "Κύλιση",
"demoTabsNonScrollingTitle": "Χωρίς κύλιση",
"craneHours": "{hours,plural,=1{1 ώ.}other{{hours}ώ.}}",
"craneMinutes": "{minutes,plural,=1{1 λ.}other{{minutes}λ.}}",
"craneFlightDuration": "{hoursShortForm} {minutesShortForm}",
"dataTableHeader": "Διατροφή",
"demoDatePickerTitle": "Εργαλείο επιλογής ημερομηνίας",
"demoPickersSubtitle": "Επιλογή ημερομηνίας και ώρας",
"demoPickersTitle": "Εργαλεία επιλογής",
"demo2dTransformationsEditTooltip": "Επεξεργασία πλακιδίου",
"demoDataTableDescription": "Οι πίνακες δεδομένων εμφανίζουν πληροφορίες σε μορφή πλέγματος με σειρές και στήλες. Οργανώνουν τις πληροφορίες με εποπτικό τρόπο, έτσι ώστε οι χρήστες να μπορούν να αναζητούν εύκολα μοτίβα και insight.",
"demo2dTransformationsDescription": "Πατήστε για να επεξεργαστείτε πλακίδια και χρησιμοποιήστε κινήσεις για να μετακινηθείτε σε μια σκηνή. Σύρετε για μετακίνηση, πλησιάστε τα δάχτυλά σας για εστίαση, περιστρέψτε με δύο δάχτυλα. Πατήστε το κουμπί επαναφοράς για να επιστρέψετε στον αρχικό προσανατολισμό.",
"demo2dTransformationsSubtitle": "Μετακίνηση, εστίαση, περιστροφή",
"demo2dTransformationsTitle": "Μετασχηματισμοί 2D",
"demoCupertinoTextFieldPIN": "PIN",
"demoCupertinoTextFieldDescription": "Ένα πεδίο κειμένου που επιτρέπει στον χρήστη να εισάγει κείμενο, είτε με ένα πληκτρολόγιο υλικού είτε με ένα πληκτρολόγιο οθόνης.",
"demoCupertinoTextFieldSubtitle": "Πεδία κειμένου τύπου iOS",
"demoCupertinoTextFieldTitle": "Πεδία κειμένου",
"demoDatePickerDescription": "Εμφανίζει ένα παράθυρο διαλόγου που περιέχει ένα εργαλείο επιλογής ημερομηνίας material design.",
"demoCupertinoPickerTime": "Ώρα",
"demoCupertinoPickerDate": "Ημερομηνία",
"demoCupertinoPickerTimer": "Χρονόμετρο",
"demoCupertinoPickerDescription": "Ένα γραφικό στοιχείο εργαλείου επιλογής τύπου iOS το οποίο μπορεί να χρησιμοποιηθεί για την επιλογή συμβολοσειρών, ημερομηνιών, ωρών ή της ημερομηνίας και της ώρας μαζί.",
"demoCupertinoPickerSubtitle": "Εργαλεία επιλογής τύπου iOS",
"demoCupertinoPickerTitle": "Εργαλεία επιλογής",
"dataTableRowWithHoney": "{value} με μέλι",
"cardsDemoTravelDestinationCity2": "Τσέτιναντ",
"bannerDemoResetText": "Επαναφορά του banner",
"bannerDemoMultipleText": "Πολλές ενέργειες",
"bannerDemoLeadingText": "Εικονίδιο αρχής",
"dismiss": "ΠΑΡΑΒΛΕΨΗ",
"cardsDemoTappable": "Με δυνατότητα πατήματος",
"cardsDemoSelectable": "Με δυνατότητα επιλογής (παρατεταμένο πάτημα)",
"cardsDemoExplore": "Εξερεύνηση",
"cardsDemoExploreSemantics": "Εξερεύνηση {destinationName}",
"cardsDemoShareSemantics": "Κοινοποίηση {destinationName}",
"cardsDemoTravelDestinationTitle1": "Κορυφαίες 10 πόλεις για επίσκεψη στην πολιτεία Ταμίλ Ναντού",
"cardsDemoTravelDestinationDescription1": "Αριθμός 10",
"cardsDemoTravelDestinationCity1": "Τανχαβούρ",
"dataTableColumnProtein": "Πρωτεΐνη (γρ.)",
"cardsDemoTravelDestinationTitle2": "Τεχνίτες της Νότιας Ινδίας",
"cardsDemoTravelDestinationDescription2": "Παραγωγοί μεταξιού",
"bannerDemoText": "Ο κωδικός πρόσβασής σας ενημερώθηκε στην άλλη συσκευή σας. Συνδεθείτε ξανά.",
"cardsDemoTravelDestinationLocation2": "Σιβαγκάνγκα, Ταμίλ Ναντού",
"cardsDemoTravelDestinationTitle3": "Ναός Μπριχαντισβάρα",
"cardsDemoTravelDestinationDescription3": "Ναοί",
"demoBannerTitle": "Banner",
"demoBannerSubtitle": "Εμφάνιση banner μέσα σε μια λίστα",
"demoBannerDescription": "Ένα banner εμφανίζει ένα σημαντικό, συνοπτικό μήνυμα και παρέχει ενέργειες που μπορούν να εκτελέσουν οι χρήστες (ή δυνατότητα παράβλεψης του banner). Απαιτείται ενέργεια χρήστη για την παράβλεψή του.",
"demoCardTitle": "Κάρτες",
"demoCardSubtitle": "Κάρτες γραμμής βάσης με στρογγυλεμένες γωνίες",
"demoCardDescription": "Μια κάρτα είναι ένα φύλλο υλικού που χρησιμοποιείται για την αναπαράσταση ορισμένων σχετικών πληροφοριών, για παράδειγμα ενός άλμπουμ, μιας γεωγραφικής τοποθεσίας, ενός γεύματος, στοιχείων επικοινωνίας κ.λπ.",
"demoDataTableTitle": "Πίνακες δεδομένων",
"demoDataTableSubtitle": "Σειρές και στήλες πληροφοριών",
"dataTableColumnCarbs": "Υδατάνθρακες (γρ.)",
"placeTanjore": "Tanjore",
"demoGridListsTitle": "Λίστες πλέγματος",
"placeFlowerMarket": "Αγορά λουλουδιών",
"placeBronzeWorks": "Χυτήριο χαλκού",
"placeMarket": "Αγορά",
"placeThanjavurTemple": "Ναός Thanjavur",
"placeSaltFarm": "Αλυκή",
"placeScooters": "Σκούτερ",
"placeSilkMaker": "Παραγωγός μεταξιού",
"placeLunchPrep": "Προετοιμασία γεύματος",
"placeBeach": "Παραλία",
"placeFisherman": "Ψαράς",
"demoMenuSelected": "Επιλέχθηκε: {value}",
"demoMenuRemove": "Κατάργηση",
"demoMenuGetLink": "Λήψη συνδέσμου",
"demoMenuShare": "Κοινοποίηση",
"demoBottomAppBarSubtitle": "Προβάλλει πλοήγηση και ενέργειες στο κάτω μέρος",
"demoMenuAnItemWithASectionedMenu": "Ένα στοιχείο με μενού χωρισμένο σε ενότητες",
"demoMenuADisabledMenuItem": "Απενεργοποιημένο στοιχείο μενού",
"demoLinearProgressIndicatorTitle": "Γραμμική ένδειξη προόδου",
"demoMenuContextMenuItemOne": "Στοιχείο μενού περιβάλλοντος ένα",
"demoMenuAnItemWithASimpleMenu": "Ένα στοιχείο με απλό μενού",
"demoCustomSlidersTitle": "Προσαρμοσμένα ρυθμιστικά",
"demoMenuAnItemWithAChecklistMenu": "Ένα στοιχείο με μενού λίστας ελέγχου",
"demoCupertinoActivityIndicatorTitle": "Ένδειξη δραστηριότητας",
"demoCupertinoActivityIndicatorSubtitle": "Ενδείξεις δραστηριότητας σε στιλ iOS",
"demoCupertinoActivityIndicatorDescription": "Ένδειξη δραστηριότητας σε στιλ iOS που περιστρέφεται δεξιόστροφα.",
"demoCupertinoNavigationBarTitle": "Γραμμή πλοήγησης",
"demoCupertinoNavigationBarSubtitle": "Γραμμή πλοήγησης τύπου iOS",
"demoCupertinoNavigationBarDescription": "Μια γραμμή πλοήγησης τύπου iOS. Η γραμμή πλοήγησης είναι μια γραμμή εργαλείων που αποτελείται, κατά το ελάχιστο, από έναν τίτλο σελίδας στο μέσο της γραμμής εργαλείων.",
"demoCupertinoPullToRefreshTitle": "Σύρετε προς τα κάτω για ανανέωση",
"demoCupertinoPullToRefreshSubtitle": "Στοιχείο ελέγχου τύπου iOS για ανανέωση με σύρσιμο προς τα κάτω",
"demoCupertinoPullToRefreshDescription": "Ένα γραφικό στοιχείο που χρησιμοποιεί το στοιχείο ελέγχου περιεχομένου τύπου iOS για ανανέωση με σύρσιμο προς τα κάτω.",
"demoProgressIndicatorTitle": "Ενδείξεις προόδου",
"demoProgressIndicatorSubtitle": "Γραμμική, κυκλική, απροσδιόριστη",
"demoCircularProgressIndicatorTitle": "Κυκλική ένδειξη προόδου",
"demoCircularProgressIndicatorDescription": "Μια κυκλική ένδειξη προόδου του Material Design, που περιστρέφεται για να υποδείξει ότι η εφαρμογή είναι απασχολημένη.",
"demoMenuFour": "Τέσσερα",
"demoLinearProgressIndicatorDescription": "Μια γραμμική ένδειξη προόδου του Material Design, η οποία είναι επίσης γνωστή ως γραμμή προόδου.",
"demoTooltipTitle": "Επεξηγήσεις εργαλείου",
"demoTooltipSubtitle": "Σύντομο μήνυμα που εμφανίζεται με παρατεταμένο πάτημα ή τοποθέτηση του δείκτη",
"demoTooltipDescription": "Οι επεξηγήσεις εργαλείου παρέχουν ετικέτες κειμένου που βοηθούν με την επεξήγηση της λειτουργίας ενός κουμπιού ή άλλης ενέργειας της διεπαφής χρήστη. Οι επεξηγήσεις εργαλείου προβάλουν ενημερωτικό κείμενο όταν οι χρήστες τοποθετούν τον δείκτη πάνω από ένα στοιχείο, εστιάζουν ή πατούν παρατεταμένα σε ένα στοιχείο.",
"demoTooltipInstructions": "Παρατεταμένο πάτημα ή τοποθέτηση του δείκτη για εμφάνιση της επεξήγησης εργαλείου.",
"placeChennai": "Τσενάι",
"demoMenuChecked": "Ελέγχθηκε: {value}",
"placeChettinad": "Τσέτιναντ",
"demoMenuPreview": "Προεπισκόπηση",
"demoBottomAppBarTitle": "Γραμμή εφαρμογής στο κάτω μέρος",
"demoBottomAppBarDescription": "Οι γραμμές εφαρμογών στο κάτω μέρος παρέχουν πρόσβαση σε ένα συρτάρι πλοήγησης στο κάτω μέρος και έως τέσσερις ενέργειες, συμπεριλαμβανομένου του κινούμενου κουμπιού ενεργειών.",
"bottomAppBarNotch": "Εγκοπή",
"bottomAppBarPosition": "Θέση κινούμενου κουμπιού ενεργειών",
"bottomAppBarPositionDockedEnd": "Προσδεδεμένο - Τέλος",
"bottomAppBarPositionDockedCenter": "Προσδεδεμένο - Κέντρο",
"bottomAppBarPositionFloatingEnd": "Κινούμενο - Τέλος",
"bottomAppBarPositionFloatingCenter": "Κινούμενο - Κέντρο",
"demoSlidersEditableNumericalValue": "Αριθμητική τιμή με δυνατότητα επεξεργασίας",
"demoGridListsSubtitle": "Διάταξη σειράς και στήλης",
"demoGridListsDescription": "Οι λίστες πλέγματος είναι κατάλληλες για παρουσίαση ομοιογενών δεδομένων, συνήθως εικόνων. Κάθε στοιχείο σε μια λίστα πλέγματος ονομάζεται πλακίδιο.",
"demoGridListsImageOnlyTitle": "Μόνο εικόνα",
"demoGridListsHeaderTitle": "Με κεφαλίδα",
"demoGridListsFooterTitle": "Με υποσέλιδο",
"demoSlidersTitle": "Ρυθμιστικά",
"demoSlidersSubtitle": "Γραφικά στοιχεία για επιλογή μιας τιμής μέσω σάρωσης",
"demoSlidersDescription": "Τα ρυθμιστικά αντικατοπτρίζουν ένα εύρος τιμών κατά μήκος μιας γραμμής, μέσω της οποίας οι χρήστες μπορούν να επιλέξουν μία τιμή. Είναι ιδανικά για προσαρμογή ρυθμίσεων, όπως η ένταση ήχου, η φωτεινότητα και η εφαρμογή φίλτρων εικόνας.",
"demoRangeSlidersTitle": "Ρυθμιστικά εύρους",
"demoRangeSlidersDescription": "Τα ρυθμιστικά αντικατοπτρίζουν ένα εύρος τιμών κατά μήκος μιας γραμμής. Διαθέτουν εικονίδια και στα δύο άκρα της γραμμής, τα οποία αντικατοπτρίζουν ένα εύρος τιμών. Είναι ιδανικά για προσαρμογή ρυθμίσεων, όπως η ένταση ήχου, η φωτεινότητα και η εφαρμογή φίλτρων εικόνας.",
"demoMenuAnItemWithAContextMenuButton": "Ένα στοιχείο με μενού περιβάλλοντος",
"demoCustomSlidersDescription": "Τα ρυθμιστικά αντικατοπτρίζουν ένα εύρος τιμών κατά μήκος μιας γραμμής, μέσω της οποίας οι χρήστες μπορούν να επιλέξουν μία τιμή ή ένα εύρος τιμών. Μπορείτε να προσαρμόσετε ή να προσθέσετε θέμα στα ρυθμιστικά.",
"demoSlidersContinuousWithEditableNumericalValue": "Συνεχές με αριθμητική τιμή με δυνατότητα επεξεργασίας",
"demoSlidersDiscrete": "Διακριτό",
"demoSlidersDiscreteSliderWithCustomTheme": "Διακριτό ρυθμιστικό με προσαρμοσμένο θέμα",
"demoSlidersContinuousRangeSliderWithCustomTheme": "Συνεχές ρυθμιστικό εύρους με προσαρμοσμένο θέμα",
"demoSlidersContinuous": "Συνεχές",
"placePondicherry": "Pondicherry",
"demoMenuTitle": "Μενού",
"demoContextMenuTitle": "Μενού περιβάλλοντος",
"demoSectionedMenuTitle": "Μενού με ενότητες",
"demoSimpleMenuTitle": "Απλό μενού",
"demoChecklistMenuTitle": "Μενού λίστας ελέγχου",
"demoMenuSubtitle": "Κουμπιά μενού και απλά μενού",
"demoMenuDescription": "Ένα μενού παρουσιάζει μια λίστα επιλογών σε μια προσωρινή επιφάνεια. Εμφανίζονται όταν οι χρήστες αλληλεπιδρούν με ένα κουμπί, μια ενέργεια ή άλλο στοιχείο ελέγχου.",
"demoMenuItemValueOne": "Στοιχείο μενού ένα",
"demoMenuItemValueTwo": "Στοιχείο μενού δύο",
"demoMenuItemValueThree": "Στοιχείο μενού τρία",
"demoMenuOne": "Ένα",
"demoMenuTwo": "Δύο",
"demoMenuThree": "Τρία",
"demoMenuContextMenuItemThree": "Στοιχείο μενού περιβάλλοντος τρία",
"demoCupertinoSwitchSubtitle": "Διακόπτης σε στιλ iOS",
"demoSnackbarsText": "Αυτή είναι μια αναδυόμενη ειδοποίηση χωρίς δυνατότητα παράβλεψης.",
"demoCupertinoSliderSubtitle": "Ρυθμιστικό σε στιλ iOS",
"demoCupertinoSliderDescription": "Ένα ρυθμιστικό που μπορεί να χρησιμοποιηθεί για την επιλογή ανάμεσα σε ένα συνεχές ή διακριτό σύνολο τιμών.",
"demoCupertinoSliderContinuous": "Συνεχές: {value}",
"demoCupertinoSliderDiscrete": "Διακριτό: {value}",
"demoSnackbarsAction": "Πατήσατε την ενέργεια της αναδυόμενης ειδοποίησης χωρίς δυνατότητα παράβλεψης.",
"backToGallery": "Πίσω στη Συλλογή",
"demoCupertinoTabBarTitle": "Γραμμή καρτελών",
"demoCupertinoSwitchDescription": "Ένας διακόπτης που χρησιμοποιείται για την εναλλαγή της κατάστασης ενεργοποίησης/απενεργοποίησης μιας μεμονωμένης ρύθμισης.",
"demoSnackbarsActionButtonLabel": "ΕΝΕΡΓΕΙΑ",
"cupertinoTabBarProfileTab": "Προφίλ",
"demoSnackbarsButtonLabel": "ΕΜΦΑΝΙΣΗ ΑΝΑΔΥΟΜΕΝΗΣ ΕΙΔΟΠΟΙΗΣΗΣ ΧΩΡΙΣ ΔΥΝΑΤΟΤΗΤΑ ΠΑΡΑΒΛΕΨΗΣ",
"demoSnackbarsDescription": "Οι αναδυόμενες ειδοποιήσεις χωρίς δυνατότητα παράβλεψης ενημερώνουν τους χρήστες σχετικά με μια διεργασία που εκτέλεσε ή πρόκειται να εκτελέσει μια εφαρμογή. Εμφανίζονται προσωρινά, στο κάτω μέρος της οθόνης. Δεν διακόπτουν την εμπειρία χρήστη και δεν απαιτούν κάποια ενέργεια από τον χρήστη για να εξαφανιστούν.",
"demoSnackbarsSubtitle": "Οι αναδυόμενες ειδοποιήσεις χωρίς δυνατότητα παράβλεψης εμφανίζουν μηνύματα στο κάτω μέρος της οθόνης.",
"demoSnackbarsTitle": "Αναδυόμενες ειδοποιήσεις χωρίς δυνατότητα παράβλεψης",
"demoCupertinoSliderTitle": "Ρυθμιστικό",
"cupertinoTabBarChatTab": "Συζήτηση",
"cupertinoTabBarHomeTab": "Αρχική σελίδα",
"demoCupertinoTabBarDescription": "Μια κάτω γραμμή πλοήγησης καρτελών σε στιλ iOS. Εμφανίζει πολλές καρτέλες, από τις οποίες μία είναι ενεργή, από προεπιλογή η πρώτη.",
"demoCupertinoTabBarSubtitle": "Κάτω γραμμή καρτελών σε στιλ iOS",
"demoOptionsFeatureTitle": "Επιλογές προβολής",
"demoOptionsFeatureDescription": "Πατήστε εδώ για να δείτε διαθέσιμες επιλογές για αυτήν την επίδειξη.",
"demoCodeViewerCopyAll": "ΑΝΤΙΓΡΑΦΗ ΟΛΩΝ",
"shrineScreenReaderRemoveProductButton": "Κατάργηση {product}",
"shrineScreenReaderProductAddToCart": "Προσθήκη στο καλάθι",
"shrineScreenReaderCart": "{quantity,plural,=0{Καλάθι αγορών, κανένα στοιχείο}=1{Καλάθι αγορών, 1 στοιχείο}other{Καλάθι αγορών, {quantity} στοιχεία}}",
"demoCodeViewerFailedToCopyToClipboardMessage": "Η αντιγραφή στο πρόχειρο απέτυχε: {error}",
"demoCodeViewerCopiedToClipboardMessage": "Αντιγράφηκε στο πρόχειρο.",
"craneSleep8SemanticLabel": "Ερείπια των Μάγια σε έναν γκρεμό πάνω από μια παραλία",
"craneSleep4SemanticLabel": "Ξενοδοχείο δίπλα στη λίμνη μπροστά από βουνά",
"craneSleep2SemanticLabel": "Φρούριο Μάτσου Πίτσου",
"craneSleep1SemanticLabel": "Σαλέ σε χιονισμένο τοπίο με αειθαλή δέντρα",
"craneSleep0SemanticLabel": "Μπανγκαλόου πάνω στο νερό",
"craneFly13SemanticLabel": "Πισίνα δίπλα στη θάλασσα με φοινικόδεντρα",
"craneFly12SemanticLabel": "Λιμνούλα με φοινικόδεντρα",
"craneFly11SemanticLabel": "Φάρος από τούβλα στη θάλασσα",
"craneFly10SemanticLabel": "Οι πύργοι του τεμένους Αλ-Αζχάρ στο ηλιοβασίλεμα",
"craneFly9SemanticLabel": "Άνδρας που ακουμπάει σε αυτοκίνητο αντίκα",
"craneFly8SemanticLabel": "Supertree Grove",
"craneEat9SemanticLabel": "Πάγκος καφετέριας με αρτοσκευάσματα",
"craneEat2SemanticLabel": "Μπέργκερ",
"craneFly5SemanticLabel": "Ξενοδοχείο δίπλα στη λίμνη μπροστά από βουνά",
"demoSelectionControlsSubtitle": "Πλαίσια ελέγχου, κουμπιά επιλογής και διακόπτες",
"craneEat10SemanticLabel": "Γυναίκα που κρατάει ένα τεράστιο σάντουιτς παστράμι",
"craneFly4SemanticLabel": "Μπανγκαλόου πάνω στο νερό",
"craneEat7SemanticLabel": "Είσοδος φούρνου",
"craneEat6SemanticLabel": "Πιάτο με γαρίδες",
"craneEat5SemanticLabel": "Χώρος καθήμενων καλλιτεχνικού εστιατορίου",
"craneEat4SemanticLabel": "Επιδόρπιο σοκολάτας",
"craneEat3SemanticLabel": "Κορεατικό τάκο",
"craneFly3SemanticLabel": "Φρούριο Μάτσου Πίτσου",
"craneEat1SemanticLabel": "Άδειο μπαρ με σκαμπό εστιατορίου",
"craneEat0SemanticLabel": "Πίτσα σε ξυλόφουρνο",
"craneSleep11SemanticLabel": "Ουρανοξύστης Taipei 101",
"craneSleep10SemanticLabel": "Οι πύργοι του τεμένους Αλ-Αζχάρ στο ηλιοβασίλεμα",
"craneSleep9SemanticLabel": "Φάρος από τούβλα στη θάλασσα",
"craneEat8SemanticLabel": "Πιάτο με καραβίδες",
"craneSleep7SemanticLabel": "Πολύχρωμα διαμερίσματα στην πλατεία Riberia",
"craneSleep6SemanticLabel": "Λιμνούλα με φοινικόδεντρα",
"craneSleep5SemanticLabel": "Μια σκηνή σε ένα λιβάδι",
"settingsButtonCloseLabel": "Κλείσιμο ρυθμίσεων",
"demoSelectionControlsCheckboxDescription": "Τα πλαίσια ελέγχου επιτρέπουν στον χρήστη να επιλέξει πολλές επιλογές από ένα σύνολο. Μια τιμή ενός κανονικού πλαισίου ελέγχου είναι είτε true είτε false και η τιμή ενός πλαισίου ελέγχου τριπλής κατάστασης μπορεί, επίσης, να είναι null.",
"settingsButtonLabel": "Ρυθμίσεις",
"demoListsTitle": "Λίστες",
"demoListsSubtitle": "Διατάξεις κυλιόμενων λιστών",
"demoListsDescription": "Μία γραμμή σταθερού ύψους που συνήθως περιέχει κείμενο καθώς και ένα εικονίδιο στην αρχή ή στο τέλος.",
"demoOneLineListsTitle": "Μία γραμμή",
"demoTwoLineListsTitle": "Δύο γραμμές",
"demoListsSecondary": "Δευτερεύον κείμενο",
"demoSelectionControlsTitle": "Στοιχεία ελέγχου επιλογής",
"craneFly7SemanticLabel": "Όρος Ράσμορ",
"demoSelectionControlsCheckboxTitle": "Πλαίσιο ελέγχου",
"craneSleep3SemanticLabel": "Άνδρας που ακουμπάει σε αυτοκίνητο αντίκα",
"demoSelectionControlsRadioTitle": "Ραδιόφωνο",
"demoSelectionControlsRadioDescription": "Τα κουμπιά επιλογής επιτρέπουν στον χρήστη να επιλέξει μια επιλογή από ένα σύνολο. Χρησιμοποιήστε τα κουμπιά επιλογής για αποκλειστική επιλογή, εάν πιστεύετε ότι ο χρήστης πρέπει να βλέπει όλες τις διαθέσιμες επιλογές δίπλα-δίπλα.",
"demoSelectionControlsSwitchTitle": "Εναλλαγή",
"demoSelectionControlsSwitchDescription": "Οι διακόπτες ενεργοποίησης/απενεργοποίησης εναλλάσσουν την κατάσταση μιας μεμονωμένης ρύθμισης. Η επιλογή που ελέγχει ο διακόπτης, καθώς και η κατάσταση στην οποία βρίσκεται, θα πρέπει να αποσαφηνίζεται από την αντίστοιχη ενσωματωμένη ετικέτα.",
"craneFly0SemanticLabel": "Σαλέ σε χιονισμένο τοπίο με αειθαλή δέντρα",
"craneFly1SemanticLabel": "Μια σκηνή σε ένα λιβάδι",
"craneFly2SemanticLabel": "Σημαίες προσευχής μπροστά από ένα χιονισμένο βουνό",
"craneFly6SemanticLabel": "Αεροφωτογραφία του Palacio de Bellas Artes",
"rallySeeAllAccounts": "Εμφάνιση όλων των λογαριασμών",
"rallyBillAmount": "Λογαριασμός {billName} με προθεσμία στις {date} και ποσό {amount}.",
"shrineTooltipCloseCart": "Κλείσιμο καλαθιού",
"shrineTooltipCloseMenu": "Κλείσιμο μενού",
"shrineTooltipOpenMenu": "Άνοιγμα μενού",
"shrineTooltipSettings": "Ρυθμίσεις",
"shrineTooltipSearch": "Αναζήτηση",
"demoTabsDescription": "Οι καρτέλες οργανώνουν το περιεχόμενο σε διαφορετικές οθόνες, σύνολα δεδομένων και άλλες αλληλεπιδράσεις.",
"demoTabsSubtitle": "Καρτέλες με προβολές ανεξάρτητης κύλισης",
"demoTabsTitle": "Καρτέλες",
"rallyBudgetAmount": "Προϋπολογισμός {budgetName} από τον οποίο έχουν χρησιμοποιηθεί {amountUsed} από το συνολικό ποσό των {amountTotal}, απομένουν {amountLeft}",
"shrineTooltipRemoveItem": "Κατάργηση στοιχείου",
"rallyAccountAmount": "Λογαριασμός {accountName} με αριθμό {accountNumber} και ποσό {amount}.",
"rallySeeAllBudgets": "Εμφάνιση όλων των προϋπολογισμών",
"rallySeeAllBills": "Εμφάνιση όλων των λογαριασμών",
"craneFormDate": "Επιλογή ημερομηνίας",
"craneFormOrigin": "Επιλογή προέλευσης",
"craneFly2": "Κοιλάδα Κούμπου, Νεπάλ",
"craneFly3": "Μάτσου Πίτσου, Περού",
"craneFly4": "Μαλέ, Μαλδίβες",
"craneFly5": "Βιτζνάου, Ελβετία",
"craneFly6": "Πόλη του Μεξικού, Μεξικό",
"craneFly7": "Όρος Ράσμορ, Ηνωμένες Πολιτείες",
"settingsTextDirectionLocaleBased": "Με βάση τις τοπικές ρυθμίσεις",
"craneFly9": "Αβάνα, Κούβα",
"craneFly10": "Κάιρο, Αίγυπτος",
"craneFly11": "Λισαβόνα, Πορτογαλία",
"craneFly12": "Νάπα, Ηνωμένες Πολιτείες",
"craneFly13": "Μπαλί, Ινδονησία",
"craneSleep0": "Μαλέ, Μαλδίβες",
"craneSleep1": "Άσπεν, Ηνωμένες Πολιτείες",
"craneSleep2": "Μάτσου Πίτσου, Περού",
"demoCupertinoSegmentedControlTitle": "Τμηματοποιημένος έλεγχος",
"craneSleep4": "Βιτζνάου, Ελβετία",
"craneSleep5": "Μπιγκ Σερ, Ηνωμένες Πολιτείες",
"craneSleep6": "Νάπα, Ηνωμένες Πολιτείες",
"craneSleep7": "Πόρτο, Πορτογαλία",
"craneSleep8": "Τουλούμ, Μεξικό",
"craneEat5": "Σεούλ, Νότια Κορέα",
"demoChipTitle": "Τσιπ",
"demoChipSubtitle": "Συμπαγή στοιχεία που αντιπροσωπεύουν μια εισαγωγή, ένα χαρακτηριστικό ή μια δράση",
"demoActionChipTitle": "Τσιπ δράσης",
"demoActionChipDescription": "Τα τσιπ δράσης είναι ένα σύνολο επιλογών που ενεργοποιούν μια δράση που σχετίζεται με το αρχικό περιεχόμενο. Τα τσιπ δράσης θα πρέπει να εμφανίζονται δυναμικά και με βάση τα συμφραζόμενα στη διεπαφή χρήστη.",
"demoChoiceChipTitle": "Τσιπ επιλογής",
"demoChoiceChipDescription": "Τα τσιπ επιλογής αντιπροσωπεύουν μία επιλογή από ένα σύνολο. Τα τσιπ επιλογής περιέχουν σχετικό περιγραφικό κείμενο ή κατηγορίες.",
"demoFilterChipTitle": "Τσιπ φίλτρου",
"demoFilterChipDescription": "Τα τσιπ φίλτρου χρησιμοποιούν ετικέτες ή περιγραφικές λέξεις για το φιλτράρισμα περιεχομένου.",
"demoInputChipTitle": "Τσιπ εισαγωγής",
"demoInputChipDescription": "Τα τσιπ εισαγωγής αντιπροσωπεύουν ένα περίπλοκο τμήμα πληροφοριών, όπως μια οντότητα (άτομο, μέρος ή πράγμα) ή κείμενο συνομιλίας, σε συμπαγή μορφή.",
"craneSleep9": "Λισαβόνα, Πορτογαλία",
"craneEat10": "Λισαβόνα, Πορτογαλία",
"demoCupertinoSegmentedControlDescription": "Χρησιμοποιείται για τον ορισμό μιας επιλογής μέσα από έναν αριθμό επιλογών που αποκλείουν η μία την άλλη. Όταν ορίζεται μία επιλογή στον τμηματοποιημένο έλεγχο, καταργείται ο ορισμός των άλλων επιλογών στον τμηματοποιημένο έλεγχο.",
"chipTurnOnLights": "Ενεργοποίηση φωτισμού",
"chipSmall": "Μικρό",
"chipMedium": "Μέτριο",
"chipLarge": "Μεγάλο",
"chipElevator": "Ανελκυστήρας",
"chipWasher": "Πλυντήριο",
"chipFireplace": "Τζάκι",
"chipBiking": "Ποδηλασία",
"craneFormDiners": "Εστιατόρια",
"rallyAlertsMessageUnassignedTransactions": "{count,plural,=1{Αυξήστε την πιθανή έκπτωση φόρου! Εκχωρήστε κατηγορίες σε 1 μη εκχωρημένη συναλλαγή.}other{Αυξήστε την πιθανή έκπτωση φόρου! Εκχωρήστε κατηγορίες σε {count} μη εκχωρημένες συναλλαγές.}}",
"craneFormTime": "Επιλογή ώρας",
"craneFormLocation": "Επιλογή τοποθεσίας",
"craneFormTravelers": "Ταξιδιώτες",
"craneEat8": "Ατλάντα, Ηνωμένες Πολιτείες",
"craneFormDestination": "Επιλογή προορισμού",
"craneFormDates": "Επιλογή ημερομηνιών",
"craneFly": "ΠΤΗΣΗ",
"craneSleep": "ΥΠΝΟΣ",
"craneEat": "ΦΑΓΗΤΟ",
"craneFlySubhead": "Αναζητήστε πτήσεις κατά προορισμό",
"craneSleepSubhead": "Αναζήτηση ιδιοκτησιών κατά προορισμό",
"craneEatSubhead": "Αναζήτηση εστιατορίων κατά προορισμό",
"craneFlyStops": "{numberOfStops,plural,=0{Απευθείας}=1{1 στάση}other{{numberOfStops} στάσεις}}",
"craneSleepProperties": "{totalProperties,plural,=0{Καμία διαθέσιμη ιδιοκτησία}=1{1 διαθέσιμη ιδιοκτησία}other{{totalProperties} διαθέσιμες ιδιότητες}}",
"craneEatRestaurants": "{totalRestaurants,plural,=0{Κανένα εστιατόριο}=1{1 εστιατόριο}other{{totalRestaurants} εστιατόρια}}",
"craneFly0": "Άσπεν, Ηνωμένες Πολιτείες",
"demoCupertinoSegmentedControlSubtitle": "Τμηματοποιημένος έλεγχος σε στιλ iOS",
"craneSleep10": "Κάιρο, Αίγυπτος",
"craneEat9": "Μαδρίτη, Ισπανία",
"craneFly1": "Μπιγκ Σερ, Ηνωμένες Πολιτείες",
"craneEat7": "Νάσβιλ, Ηνωμένες Πολιτείες",
"craneEat6": "Σιάτλ, Ηνωμένες Πολιτείες",
"craneFly8": "Σιγκαπούρη",
"craneEat4": "Παρίσι, Γαλλία",
"craneEat3": "Πόρτλαντ, Ηνωμένες Πολιτείες",
"craneEat2": "Κόρδοβα, Αργεντινή",
"craneEat1": "Ντάλας, Ηνωμένες Πολιτείες",
"craneEat0": "Νάπολη, Ιταλία",
"craneSleep11": "Ταϊπέι, Ταϊβάν",
"craneSleep3": "Αβάνα, Κούβα",
"shrineLogoutButtonCaption": "ΑΠΟΣΥΝΔΕΣΗ",
"rallyTitleBills": "ΛΟΓΑΡΙΑΣΜΟΙ",
"rallyTitleAccounts": "ΛΟΓΑΡΙΑΣΜΟΙ",
"shrineProductVagabondSack": "Τσάντα Vagabond",
"rallyAccountDetailDataInterestYtd": "Επιτόκιο τρέχοντος έτους",
"shrineProductWhitneyBelt": "Ζώνη Whitney",
"shrineProductGardenStrand": "Garden strand",
"shrineProductStrutEarrings": "Σκουλαρίκια Strut",
"shrineProductVarsitySocks": "Κάλτσες Varsity",
"shrineProductWeaveKeyring": "Μπρελόκ Weave",
"shrineProductGatsbyHat": "Τραγιάσκα Gatsby",
"shrineProductShrugBag": "Τσάντα ώμου",
"shrineProductGiltDeskTrio": "Σετ τριών επιχρυσωμένων τραπεζιών",
"shrineProductCopperWireRack": "Συρμάτινο ράφι από χαλκό",
"shrineProductSootheCeramicSet": "Σετ κεραμικών Soothe",
"shrineProductHurrahsTeaSet": "Σερβίτσιο τσαγιού Hurrahs",
"shrineProductBlueStoneMug": "Κούπα Blue stone",
"shrineProductRainwaterTray": "Δοχείο νερού βροχής",
"shrineProductChambrayNapkins": "Πετσέτες Chambray",
"shrineProductSucculentPlanters": "Γλάστρες παχύφυτων",
"shrineProductQuartetTable": "Τραπέζι Quartet",
"shrineProductKitchenQuattro": "Τραπέζι κουζίνας quattro",
"shrineProductClaySweater": "Πουλόβερ Clay",
"shrineProductSeaTunic": "Τουνίκ θαλάσσης",
"shrineProductPlasterTunic": "Τουνίκ με σχέδια",
"rallyBudgetCategoryRestaurants": "Εστιατόρια",
"shrineProductChambrayShirt": "Μπλούζα Chambray",
"shrineProductSeabreezeSweater": "Πουλόβερ Seabreeze",
"shrineProductGentryJacket": "Μπουφάν Gentry",
"shrineProductNavyTrousers": "Παντελόνια Navy",
"shrineProductWalterHenleyWhite": "Walter henley (λευκό)",
"shrineProductSurfAndPerfShirt": "Μπλούζα Surf and perf",
"shrineProductGingerScarf": "Κασκόλ Ginger",
"shrineProductRamonaCrossover": "Ramona crossover",
"shrineProductClassicWhiteCollar": "Κλασικό στιλ γραφείου",
"shrineProductSunshirtDress": "Φόρεμα παραλίας",
"rallyAccountDetailDataInterestRate": "Επιτόκιο",
"rallyAccountDetailDataAnnualPercentageYield": "Απόδοση ετήσιου ποσοστού",
"rallyAccountDataVacation": "Διακοπές",
"shrineProductFineLinesTee": "Μπλούζα Fine lines",
"rallyAccountDataHomeSavings": "Οικονομίες σπιτιού",
"rallyAccountDataChecking": "Τρεχούμενος",
"rallyAccountDetailDataInterestPaidLastYear": "Τόκοι που πληρώθηκαν το προηγούμενο έτος",
"rallyAccountDetailDataNextStatement": "Επόμενη δήλωση",
"rallyAccountDetailDataAccountOwner": "Κάτοχος λογαριασμού",
"rallyBudgetCategoryCoffeeShops": "Καφετέριες",
"rallyBudgetCategoryGroceries": "Είδη παντοπωλείου",
"shrineProductCeriseScallopTee": "Κοντομάνικο Cerise",
"rallyBudgetCategoryClothing": "Ρουχισμός",
"rallySettingsManageAccounts": "Διαχείριση λογαριασμών",
"rallyAccountDataCarSavings": "Οικονομίες αυτοκινήτου",
"rallySettingsTaxDocuments": "Φορολογικά έγγραφα",
"rallySettingsPasscodeAndTouchId": "Κωδικός πρόσβασης και Touch ID",
"rallySettingsNotifications": "Ειδοποιήσεις",
"rallySettingsPersonalInformation": "Προσωπικά στοιχεία",
"rallySettingsPaperlessSettings": "Ρυθμίσεις Paperless",
"rallySettingsFindAtms": "Εύρεση ATM",
"rallySettingsHelp": "Βοήθεια",
"rallySettingsSignOut": "Αποσύνδεση",
"rallyAccountTotal": "Σύνολο",
"rallyBillsDue": "Προθεσμία",
"rallyBudgetLeft": "Αριστερά",
"rallyAccounts": "Λογαριασμοί",
"rallyBills": "Λογαριασμοί",
"rallyBudgets": "Προϋπολογισμοί",
"rallyAlerts": "Ειδοποιήσεις",
"rallySeeAll": "ΠΡΟΒΟΛΗ ΟΛΩΝ",
"rallyFinanceLeft": "ΑΡΙΣΤΕΡΑ",
"rallyTitleOverview": "ΕΠΙΣΚΟΠΗΣΗ",
"shrineProductShoulderRollsTee": "Μπλούζα με άνοιγμα στους ώμους",
"shrineNextButtonCaption": "ΕΠΟΜΕΝΟ",
"rallyTitleBudgets": "ΠΡΟΥΠΟΛΟΓΙΣΜΟΙ",
"rallyTitleSettings": "ΡΥΘΜΙΣΕΙΣ",
"rallyLoginLoginToRally": "Σύνδεση στην εφαρμογή Rally",
"rallyLoginNoAccount": "Δεν έχετε λογαριασμό;",
"rallyLoginSignUp": "ΕΓΓΡΑΦΗ",
"rallyLoginUsername": "Όνομα χρήστη",
"rallyLoginPassword": "Κωδικός πρόσβασης",
"rallyLoginLabelLogin": "Σύνδεση",
"rallyLoginRememberMe": "Απομνημόνευση των στοιχείων μου",
"rallyLoginButtonLogin": "ΣΥΝΔΕΣΗ",
"rallyAlertsMessageHeadsUpShopping": "Έχετε υπόψη ότι χρησιμοποιήσατε το {percent} του προϋπολογισμού αγορών σας γι' αυτόν τον μήνα.",
"rallyAlertsMessageSpentOnRestaurants": "Δαπανήσατε {amount} σε εστιατόρια αυτήν την εβδομάδα.",
"rallyAlertsMessageATMFees": "Δαπανήσατε {amount} σε προμήθειες ATM αυτόν τον μήνα.",
"rallyAlertsMessageCheckingAccount": "Συγχαρητήρια! Ο τρεχούμενος λογαριασμός σας παρουσιάζει αύξηση {percent} συγκριτικά με τον προηγούμενο μήνα.",
"shrineMenuCaption": "ΜΕΝΟΥ",
"shrineCategoryNameAll": "ΟΛΑ",
"shrineCategoryNameAccessories": "ΑΞΕΣΟΥΑΡ",
"shrineCategoryNameClothing": "ΡΟΥΧΙΣΜΟΣ",
"shrineCategoryNameHome": "ΣΠΙΤΙ",
"shrineLoginUsernameLabel": "Όνομα χρήστη",
"shrineLoginPasswordLabel": "Κωδικός πρόσβασης",
"shrineCancelButtonCaption": "ΑΚΥΡΩΣΗ",
"shrineCartTaxCaption": "Φόρος:",
"shrineCartPageCaption": "ΚΑΛΑΘΙ",
"shrineProductQuantity": "Ποσότητα: {quantity}",
"shrineProductPrice": "x {price}",
"shrineCartItemCount": "{quantity,plural,=0{ΚΑΝΕΝΑ ΣΤΟΙΧΕΙΟ}=1{1 ΣΤΟΙΧΕΙΟ}other{{quantity} ΣΤΟΙΧΕΙΑ}}",
"shrineCartClearButtonCaption": "ΑΔΕΙΑΣΜΑ ΚΑΛΑΘΙΟΥ",
"shrineCartTotalCaption": "ΣΥΝΟΛΟ",
"shrineCartSubtotalCaption": "Υποσύνολο:",
"shrineCartShippingCaption": "Αποστολή:",
"shrineProductGreySlouchTank": "Γκρι αμάνικη μπλούζα",
"shrineProductStellaSunglasses": "Γυαλιά ηλίου Stella",
"shrineProductWhitePinstripeShirt": "Λευκό ριγέ πουκάμισο",
"demoTextFieldWhereCanWeReachYou": "Πώς μπορούμε να επικοινωνήσουμε μαζί σας;",
"settingsTextDirectionLTR": "LTR",
"settingsTextScalingLarge": "Μεγάλο",
"demoBottomSheetHeader": "Κεφαλίδα",
"demoBottomSheetItem": "Στοιχείο {value}",
"demoBottomTextFieldsTitle": "Πεδία κειμένου",
"demoTextFieldTitle": "Πεδία κειμένου",
"demoTextFieldSubtitle": "Μονή γραμμή κειμένου και αριθμών με δυνατότητα επεξεργασίας",
"demoTextFieldDescription": "Τα πεδία κειμένου επιτρέπουν στους χρήστες να εισάγουν κείμενο σε μια διεπαφή χρήστη. Συνήθως, εμφανίζονται σε φόρμες και παράθυρα διαλόγου.",
"demoTextFieldShowPasswordLabel": "Εμφάνιση κωδικού πρόσβασης",
"demoTextFieldHidePasswordLabel": "Απόκρυψη κωδικού πρόσβασης",
"demoTextFieldFormErrors": "Διορθώστε τα σφάλματα που έχουν επισημανθεί με κόκκινο χρώμα πριν την υποβολή.",
"demoTextFieldNameRequired": "Το όνομα είναι υποχρεωτικό.",
"demoTextFieldOnlyAlphabeticalChars": "Εισαγάγετε μόνο αλφαβητικούς χαρακτήρες.",
"demoTextFieldEnterUSPhoneNumber": "(###) ###-#### - Εισαγάγετε έναν αριθμό τηλεφώνου ΗΠΑ.",
"demoTextFieldEnterPassword": "Καταχωρίστε έναν κωδικό πρόσβασης.",
"demoTextFieldPasswordsDoNotMatch": "Οι κωδικοί πρόσβασης δεν ταιριάζουν",
"demoTextFieldWhatDoPeopleCallYou": "Πώς σας λένε;",
"demoTextFieldNameField": "Όνομα*",
"demoBottomSheetButtonText": "ΕΜΦΑΝΙΣΗ ΦΥΛΛΟΥ ΚΑΤΩ ΜΕΡΟΥΣ",
"demoTextFieldPhoneNumber": "Αριθμός τηλεφώνου*",
"demoBottomSheetTitle": "Φύλλο κάτω μέρους",
"demoTextFieldEmail": "Διεύθυνση ηλεκτρονικού ταχυδρομείου",
"demoTextFieldTellUsAboutYourself": "Πείτε μας για τον εαυτό σας (π.χ., γράψτε με τι ασχολείστε ή ποια είναι τα χόμπι σας)",
"demoTextFieldKeepItShort": "Φροντίστε να είστε σύντομοι, αυτή είναι απλώς μια επίδειξη.",
"starterAppGenericButton": "ΚΟΥΜΠΙ",
"demoTextFieldLifeStory": "Βιογραφία",
"demoTextFieldSalary": "Μισθός",
"demoTextFieldUSD": "USD",
"demoTextFieldNoMoreThan": "Μέγιστος αριθμός οκτώ χαρακτήρων.",
"demoTextFieldPassword": "Κωδικός πρόσβασης*",
"demoTextFieldRetypePassword": "Επαναπληκτρολόγηση κωδικού πρόσβασης*",
"demoTextFieldSubmit": "ΥΠΟΒΟΛΗ",
"demoBottomNavigationSubtitle": "Πλοήγηση κάτω μέρους με προβολές σταδιακής μετάβασης",
"demoBottomSheetAddLabel": "Προσθήκη",
"demoBottomSheetModalDescription": "Ένα αποκλειστικό φύλλο στο κάτω μέρος αποτελεί εναλλακτική λύση συγκριτικά με ένα μενού ή παράθυρο διαλόγου και αποτρέπει την αλληλεπίδραση του χρήστη με την υπόλοιπη εφαρμογή.",
"demoBottomSheetModalTitle": "Αποκλειστικό φύλλο κάτω μέρους",
"demoBottomSheetPersistentDescription": "Ένα μόνιμο φύλλο στο κάτω μέρος εμφανίζει πληροφορίες που συμπληρώνουν το κύριο περιεχόμενο της εφαρμογής. Ένα μόνιμο φύλλο στο κάτω μέρος παραμένει ορατό ακόμη και όταν ο χρήστης αλληλεπιδρά με άλλα μέρη της εφαρμογής.",
"demoBottomSheetPersistentTitle": "Μόνιμο φύλλο στο κάτω μέρος",
"demoBottomSheetSubtitle": "Μόνιμα και αποκλειστικά φύλλα κάτω μέρους",
"demoTextFieldNameHasPhoneNumber": "Ο αριθμός τηλεφώνου του χρήστη {name} είναι {phoneNumber}",
"buttonText": "ΚΟΥΜΠΙ",
"demoTypographyDescription": "Ορισμοί για διάφορα τυπογραφικά στιλ που συναντώνται στο material design.",
"demoTypographySubtitle": "Όλα τα προκαθορισμένα στιλ κειμένου",
"demoTypographyTitle": "Τυπογραφία",
"demoFullscreenDialogDescription": "Η ιδιότητα fullscreenDialog καθορίζει εάν η εισερχόμενη σελίδα αποτελεί ένα παράθυρο διαλόγου σε πλήρη οθόνη.",
"demoFlatButtonDescription": "Ένα επίπεδο κουμπί εμφανίζει μια πιτσιλιά μελανιού κατά το πάτημα, χωρίς ανασήκωμα. Χρησιμοποιήστε επίπεδα κουμπιά στις γραμμές εργαλείων, σε παράθυρα διαλόγου και ενσωματωμένα με την αναπλήρωση.",
"demoBottomNavigationDescription": "Οι γραμμές πλοήγησης κάτω μέρους εμφανίζουν από τρεις έως πέντε προορισμούς στο κάτω μέρος μιας οθόνης. Κάθε προορισμός αντιπροσωπεύεται από ένα εικονίδιο και μια προαιρετική ετικέτα κειμένου. Με το πάτημα ενός εικονιδίου πλοήγησης στο κάτω μέρος, ο χρήστης μεταφέρεται στον προορισμό της πλοήγησης ανώτερου επιπέδου που συσχετίζεται με αυτό το εικονίδιο.",
"demoBottomNavigationSelectedLabel": "Επιλεγμένη ετικέτα",
"demoBottomNavigationPersistentLabels": "Μόνιμες ετικέτες",
"starterAppDrawerItem": "Στοιχείο {value}",
"demoTextFieldRequiredField": "Το * υποδεικνύει απαιτούμενο πεδίο",
"demoBottomNavigationTitle": "Πλοήγηση κάτω μέρους",
"settingsLightTheme": "Φωτεινό",
"settingsTheme": "Θέμα",
"settingsPlatformIOS": "iOS",
"settingsPlatformAndroid": "Android",
"settingsTextDirectionRTL": "RTL",
"settingsTextScalingHuge": "Τεράστιο",
"cupertinoButton": "Κουμπί",
"settingsTextScalingNormal": "Κανονικό",
"settingsTextScalingSmall": "Μικρό",
"settingsSystemDefault": "Σύστημα",
"settingsTitle": "Ρυθμίσεις",
"rallyDescription": "Μια εφαρμογή για προσωπικά οικονομικά",
"aboutDialogDescription": "Για να δείτε τον πηγαίο κώδικα για αυτήν την εφαρμογή, επισκεφτείτε το {repoLink}.",
"bottomNavigationCommentsTab": "Σχόλια",
"starterAppGenericBody": "Σώμα",
"starterAppGenericHeadline": "Επικεφαλίδα",
"starterAppGenericSubtitle": "Υπότιτλος",
"starterAppGenericTitle": "Τίτλος",
"starterAppTooltipSearch": "Αναζήτηση",
"starterAppTooltipShare": "Κοινοποίηση",
"starterAppTooltipFavorite": "Αγαπημένο",
"starterAppTooltipAdd": "Προσθήκη",
"bottomNavigationCalendarTab": "Ημερολόγιο",
"starterAppDescription": "Μια αποκριτική διάταξη για την εφαρμογή Starter",
"starterAppTitle": "Εφαρμογή Starter",
"aboutFlutterSamplesRepo": "Χώρος φύλαξης GitHub δειγμάτων Flutter",
"bottomNavigationContentPlaceholder": "Placeholder για την καρτέλα {title}",
"bottomNavigationCameraTab": "Κάμερα",
"bottomNavigationAlarmTab": "Ξυπνητήρι",
"bottomNavigationAccountTab": "Λογαριασμός",
"demoTextFieldYourEmailAddress": "Η διεύθυνση ηλεκτρονικού ταχυδρομείου σας",
"demoToggleButtonDescription": "Μπορείτε να χρησιμοποιήσετε κουμπιά εναλλαγής για να ομαδοποιήσετε τις σχετικές επιλογές. Για να δοθεί έμφαση σε ομάδες σχετικών κουμπιών εναλλαγής, μια ομάδα θα πρέπει να μοιράζεται ένα κοινό κοντέινερ.",
"colorsGrey": "ΓΚΡΙ",
"colorsBrown": "ΚΑΦΕ",
"colorsDeepOrange": "ΒΑΘΥ ΠΟΡΤΟΚΑΛΙ",
"colorsOrange": "ΠΟΡΤΟΚΑΛΙ",
"colorsAmber": "ΚΕΧΡΙΜΠΑΡΙ",
"colorsYellow": "ΚΙΤΡΙΝΟ",
"colorsLime": "ΚΙΤΡΙΝΟ",
"colorsLightGreen": "ΑΝΟΙΧΤΟ ΠΡΑΣΙΝΟ",
"colorsGreen": "ΠΡΑΣΙΝΟ",
"homeHeaderGallery": "Συλλογή",
"homeHeaderCategories": "Κατηγορίες",
"shrineDescription": "Μια μοντέρνα εφαρμογή λιανικής πώλησης",
"craneDescription": "Μια εξατομικευμένη εφαρμογή για ταξίδια",
"homeCategoryReference": "ΣΤΙΛ ΚΑΙ ΑΛΛΑ",
"demoInvalidURL": "Δεν ήταν δυνατή η προβολή του URL:",
"demoOptionsTooltip": "Επιλογές",
"demoInfoTooltip": "Πληροφορίες",
"demoCodeTooltip": "Κωδικός επίδειξης",
"demoDocumentationTooltip": "Τεκμηρίωση API",
"demoFullscreenTooltip": "Πλήρης οθόνη",
"settingsTextScaling": "Κλιμάκωση κειμένου",
"settingsTextDirection": "Κατεύθυνση κειμένου",
"settingsLocale": "Τοπικές ρυθμίσεις",
"settingsPlatformMechanics": "Μηχανική πλατφόρμας",
"settingsDarkTheme": "Σκούρο",
"settingsSlowMotion": "Αργή κίνηση",
"settingsAbout": "Σχετικά με το Flutter Gallery",
"settingsFeedback": "Αποστολή σχολίων",
"settingsAttribution": "Σχεδίαση από TOASTER στο Λονδίνο",
"demoButtonTitle": "Κουμπιά",
"demoButtonSubtitle": "Κειμένου, ανυψωμένα, με περίγραμμα κ.α.",
"demoFlatButtonTitle": "Επίπεδο κουμπί",
"demoRaisedButtonDescription": "Τα ανυψωμένα κουμπιά προσθέτουν διάσταση στις κυρίως επίπεδες διατάξεις. Δίνουν έμφαση σε λειτουργίες σε γεμάτους ή μεγάλους χώρους.",
"demoRaisedButtonTitle": "Ανασηκωμένο κουμπί",
"demoOutlineButtonTitle": "Κουμπί με περίγραμμα",
"demoOutlineButtonDescription": "Τα κουμπιά με περίγραμμα γίνονται αδιαφανή και ανυψώνονται κατά το πάτημα. Συχνά συνδυάζονται με ανυψωμένα κουμπιά για να υποδείξουν μια εναλλακτική, δευτερεύουσα ενέργεια.",
"demoToggleButtonTitle": "Κουμπιά εναλλαγής",
"colorsTeal": "ΓΑΛΑΖΟΠΡΑΣΙΝΟ",
"demoFloatingButtonTitle": "Κινούμενο κουμπί ενεργειών",
"demoFloatingButtonDescription": "Ένα κινούμενο κουμπί ενεργειών είναι ένα κουμπί με κυκλικό εικονίδιο που κινείται πάνω από το περιεχόμενο για να προωθήσει μια κύρια ενέργεια στην εφαρμογή.",
"demoDialogTitle": "Παράθυρα διαλόγου",
"demoDialogSubtitle": "Απλό, ειδοποίηση και σε πλήρη οθόνη",
"demoAlertDialogTitle": "Ειδοποίηση",
"demoAlertDialogDescription": "Ένα παράθυρο διαλόγου ειδοποίησης που ενημερώνει τον χρήστη για καταστάσεις που απαιτούν επιβεβαίωση. Ένα παράθυρο διαλόγου ειδοποίησης με προαιρετικό τίτλο και προαιρετική λίστα ενεργειών.",
"demoAlertTitleDialogTitle": "Ειδοποίηση με τίτλο",
"demoSimpleDialogTitle": "Απλό",
"demoSimpleDialogDescription": "Ένα απλό παράθυρο διαλόγου που προσφέρει στον χρήστη τη δυνατότητα επιλογής μεταξύ διαφόρων επιλογών. Ένα απλό παράθυρο διαλόγου με προαιρετικό τίτλο που εμφανίζεται πάνω από τις επιλογές.",
"demoFullscreenDialogTitle": "Πλήρης οθόνη",
"demoCupertinoButtonsTitle": "Κουμπιά",
"demoCupertinoButtonsSubtitle": "Κουμπιά σε στιλ iOS",
"demoCupertinoButtonsDescription": "Ένα κουμπί σε στιλ iOS. Εμφανίζει κείμενο ή/και ένα εικονίδιο που εξαφανίζεται και εμφανίζεται σταδιακά με το άγγιγμα. Μπορεί να έχει φόντο προαιρετικά.",
"demoCupertinoAlertsTitle": "Ειδοποιήσεις",
"demoCupertinoAlertsSubtitle": "Παράθυρα διαλόγου ειδοποίησης σε στιλ iOS",
"demoCupertinoAlertTitle": "Ειδοποίηση",
"demoCupertinoAlertDescription": "Ένα παράθυρο διαλόγου ειδοποίησης που ενημερώνει τον χρήστη για καταστάσεις που απαιτούν επιβεβαίωση. Ένα παράθυρο διαλόγου ειδοποίησης με προαιρετικό τίτλο, προαιρετικό περιεχόμενο και προαιρετική λίστα ενεργειών. Ο τίτλος εμφανίζεται πάνω από το περιεχόμενο και οι ενέργειες εμφανίζονται κάτω από το περιεχόμενο.",
"demoCupertinoAlertWithTitleTitle": "Ειδοποίηση με τίτλο",
"demoCupertinoAlertButtonsTitle": "Ειδοποίηση με κουμπιά",
"demoCupertinoAlertButtonsOnlyTitle": "Μόνο κουμπιά ειδοποίησης",
"demoCupertinoActionSheetTitle": "Φύλλο ενεργειών",
"demoCupertinoActionSheetDescription": "Ένα φύλλο ενεργειών είναι ένα συγκεκριμένο στιλ ειδοποίησης που παρουσιάζει στον χρήστη ένα σύνολο δύο ή περισσότερων επιλογών που σχετίζονται με το τρέχον περιβάλλον. Ένα φύλλο ενεργειών μπορεί να έχει τίτλο, επιπλέον μήνυμα και μια λίστα ενεργειών.",
"demoColorsTitle": "Χρώματα",
"demoColorsSubtitle": "Όλα τα προκαθορισμένα χρώματα",
"demoColorsDescription": "Χρώματα και δείγματα χρώματος που αντιπροσωπεύουν τη χρωματική παλέτα του material design.",
"buttonTextEnabled": "ENABLED",
"buttonTextDisabled": "DISABLED",
"buttonTextCreate": "Δημιουργία",
"dialogSelectedOption": "Επιλέξατε \"{value}\"",
"dialogDiscardTitle": "Απόρριψη πρόχειρου;",
"dialogLocationTitle": "Χρήση της υπηρεσίας τοποθεσίας της Google;",
"dialogLocationDescription": "Επιτρέψτε στην Google να διευκολύνει τις εφαρμογές να προσδιορίζουν την τοποθεσία σας. Αυτό συνεπάγεται την αποστολή ανώνυμων δεδομένων τοποθεσίας στην Google, ακόμη και όταν δεν εκτελούνται εφαρμογές.",
"dialogCancel": "ΑΚΥΡΩΣΗ",
"dialogDiscard": "ΑΠΟΡΡΙΨΗ",
"dialogDisagree": "ΔΙΑΦΩΝΩ",
"dialogAgree": "ΣΥΜΦΩΝΩ",
"dialogSetBackup": "Ρύθμιση λογαριασμού δημιουργίας αντιγράφων ασφαλείας",
"colorsBlueGrey": "ΜΠΛΕ ΓΚΡΙ",
"dialogShow": "ΕΜΦΑΝΙΣΗ ΠΑΡΑΘΥΡΟΥ ΔΙΑΛΟΓΟΥ",
"dialogFullscreenTitle": "Παράθυρο διαλόγου σε πλήρη οθόνη",
"dialogFullscreenSave": "ΑΠΟΘΗΚΕΥΣΗ",
"dialogFullscreenDescription": "Μια επίδειξη παραθύρου διαλόγου σε πλήρη οθόνη",
"cupertinoButtonEnabled": "Enabled",
"cupertinoButtonDisabled": "Disabled",
"cupertinoButtonWithBackground": "Με φόντο",
"cupertinoAlertCancel": "Ακύρωση",
"cupertinoAlertDiscard": "Απόρριψη",
"cupertinoAlertLocationTitle": "Να επιτρέπεται στους Χάρτες να έχουν πρόσβαση στην τοποθεσία σας, ενώ χρησιμοποιείτε την εφαρμογή;",
"cupertinoAlertLocationDescription": "Η τρέχουσα τοποθεσία σας θα εμφανίζεται στον χάρτη και θα χρησιμοποιείται για εμφάνιση οδηγιών, κοντινών αποτελεσμάτων αναζήτησης και εκτιμώμενη διάρκεια διαδρομής.",
"cupertinoAlertAllow": "Να επιτραπεί",
"cupertinoAlertDontAllow": "Δεν επιτρέπεται",
"cupertinoAlertFavoriteDessert": "Επιλέξτε αγαπημένο επιδόρπιο",
"cupertinoAlertDessertDescription": "Επιλέξτε το αγαπημένο σας επιδόρπιο από την παρακάτω λίστα. Η επιλογή σας θα χρησιμοποιηθεί για την προσαρμογή της προτεινόμενης λίστας εστιατορίων στην περιοχή σας.",
"cupertinoAlertCheesecake": "Τσίζκεϊκ",
"cupertinoAlertTiramisu": "Τιραμισού",
"cupertinoAlertApplePie": "Μηλόπιτα",
"cupertinoAlertChocolateBrownie": "Σοκολατένιο μπράουνι",
"cupertinoShowAlert": "Εμφάνιση ειδοποίησης",
"colorsRed": "ΚΟΚΚΙΝΟ",
"colorsPink": "ΡΟΖ",
"colorsPurple": "ΜΟΒ",
"colorsDeepPurple": "ΒΑΘΥ ΜΟΒ",
"colorsIndigo": "ΛΟΥΛΑΚΙ",
"colorsBlue": "ΜΠΛΕ",
"colorsLightBlue": "ΑΝΟΙΧΤΟ ΜΠΛΕ",
"colorsCyan": "ΚΥΑΝΟ",
"dialogAddAccount": "Προσθήκη λογαριασμού",
"Gallery": "Συλλογή",
"Categories": "Κατηγορίες",
"SHRINE": "SHRINE",
"Basic shopping app": "Βασική εφαρμογή αγορών",
"RALLY": "RALLY",
"CRANE": "CRANE",
"Travel app": "Εφαρμογή για ταξίδια",
"MATERIAL": "ΥΛΙΚΟ",
"CUPERTINO": "CUPERTINO",
"REFERENCE STYLES & MEDIA": "ΣΤΙΛ ΑΝΑΦΟΡΑΣ ΚΑΙ ΠΟΛΥΜΕΣΑ"
}
| 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",
"demoCupertinoPicker": "Valikuvidin",
"demoCupertinoSearchTextFieldSubtitle": "iOS-stiilis otsinguteksti väli",
"demoCupertinoSearchTextFieldDescription": "Otsinguriba, mis võimaldab kasutajal teksti sisestades otsida ning saab pakkuda ja filtreerida soovitusi.",
"demoCupertinoSearchTextFieldPlaceholder": "Sisestage teksti",
"demoCupertinoScrollbarTitle": "Kerimisriba",
"demoCupertinoScrollbarSubtitle": "iOS-stiilis kerimisriba",
"demoCupertinoScrollbarDescription": "Kerimisriba on alati kuvatud",
"demoTwoPaneItem": "Üksus {value}",
"demoTwoPaneList": "Loend",
"demoTwoPaneFoldableLabel": "Volditav",
"demoTwoPaneSmallScreenLabel": "Väike ekraan",
"demoTwoPaneSmallScreenDescription": "Nii käitub vidin TwoPane väikese ekraaniga seadmes.",
"demoTwoPaneTabletLabel": "Tahvelarvuti/lauaarvuti",
"demoTwoPaneTabletDescription": "Nii käitub vidin TwoPane suure ekraaniga seadmes, nt tahvel- või lauaarvutis.",
"demoTwoPaneTitle": "TwoPane",
"demoTwoPaneSubtitle": "Automaatselt kohanduvad paigutused volditavatel, suurtel ja väikestel ekraanidel",
"splashSelectDemo": "Valige demo",
"demoTwoPaneFoldableDescription": "Nii käitub vidin TwoPane volditavas seadmes.",
"demoTwoPaneDetails": "Üksikasjad",
"demoTwoPaneSelectItem": "Valige üksus",
"demoTwoPaneItemDetails": "Üksuse {value} üksikasjad",
"demoCupertinoContextMenuActionText": "Kontekstimenüü nägemiseks puudutage Flutteri logo pikalt.",
"demoCupertinoContextMenuDescription": "iOS-i stiilis täisekraan-kontekstimenüü, mis kuvatakse, kui elementi vajutatakse pikalt.",
"demoAppBarTitle": "Rakenduseriba",
"demoAppBarDescription": "Rakenduseriba hõlmab praeguse kuvaga seotud sisu ja toiminguid. Seda kasutatakse brändingu, kuvapealkirjade, navigeerimise ja toimingute jaoks.",
"demoDividerTitle": "Jaotur",
"demoDividerSubtitle": "Jaotur on peenike joon, mis rühmitab sisu loenditesse ja paigutustesse.",
"demoDividerDescription": "Jaotured võib kasutada loendites, sahtlites ja mujal sisu eraldamiseks.",
"demoVerticalDividerTitle": "Vertikaalne jaotur",
"demoCupertinoContextMenuTitle": "Kontekstimenüü",
"demoCupertinoContextMenuSubtitle": "iOS-i stiilis kontekstimenüü",
"demoAppBarSubtitle": "Näitab praeguse kuvaga seotud teavet ja toiminguid",
"demoCupertinoContextMenuActionOne": "Esimene toiming",
"demoCupertinoContextMenuActionTwo": "Teine toiming",
"demoDateRangePickerDescription": "Kuvatakse dialoog, mis sisaldab materiaalse disaini kuupäevavahemiku valijat.",
"demoDateRangePickerTitle": "Kuupäevavahemiku valija",
"demoNavigationDrawerUserName": "Kasutaja nimi",
"demoNavigationDrawerUserEmail": "kasutaja.nimi@näide.com",
"demoNavigationDrawerText": "Sahtli nägemiseks pühkige servast või puudutage ülal vasakul olevat ikooni",
"demoNavigationRailTitle": "Navigeerimisrada",
"demoNavigationRailSubtitle": "Navigeerimisraja kuvamine rakenduses",
"demoNavigationRailDescription": "Materiaalse disaini vidin, mida kuvatakse rakenduse vasakul või paremal küljel, et navigeerida väikese arvu vaadete vahel, tavaliselt kolme kuni viie.",
"demoNavigationRailFirst": "Esimene",
"demoNavigationDrawerTitle": "Navigeerimissahtel",
"demoNavigationRailThird": "Kolmas",
"replyStarredLabel": "Tärniga",
"demoTextButtonDescription": "Tekstinupp kuvab vajutamisel tindipleki, kuid ei tõuse ülespoole. Kasutage tekstinuppe tööriistaribadel, dialoogides ja tekstisiseselt koos täidisega",
"demoElevatedButtonTitle": "Tõstetud nupud",
"demoElevatedButtonDescription": "Tõstetud nupud pakuvad peamiselt ühetasandiliste nuppude kõrval lisamõõdet. Need tõstavad tihedalt täidetud või suurtel aladel esile funktsioone.",
"demoOutlinedButtonTitle": "Mitmetasandiline nupp",
"demoOutlinedButtonDescription": "Mitmetasandilised nupud muutuvad vajutamisel läbipaistvaks ja tõusevad ülespoole. Need seotakse sageli tõstetud nuppudega, et pakkuda alternatiivset (teisest) toimingut.",
"demoContainerTransformDemoInstructions": "Kaardid, loendid ja hõljuv toimingunupp",
"demoNavigationDrawerSubtitle": "Sahtli kuvamine rakenduste ribal",
"replyDescription": "Tõhus ja pühendatud meilirakendus",
"demoNavigationDrawerDescription": "Materiaalse disaini paneel, mis libiseb horisontaalselt välja ekraani servast ja näitab rakenduse navigeerimislinke.",
"replyDraftsLabel": "Mustandid",
"demoNavigationDrawerToPageOne": "Esimene üksus",
"replyInboxLabel": "Postkast",
"demoSharedXAxisDemoInstructions": "Edasi- ja tagasiliikumise nupud",
"replySpamLabel": "Rämpspost",
"replyTrashLabel": "Prügikast",
"replySentLabel": "Saadetud",
"demoNavigationRailSecond": "Teine",
"demoNavigationDrawerToPageTwo": "Teine üksus",
"demoFadeScaleDemoInstructions": "Modaalleht ja hõljuv toimingunupp",
"demoFadeThroughDemoInstructions": "Alumine navigeerimine",
"demoSharedZAxisDemoInstructions": "Seadete ikooninupp",
"demoSharedYAxisDemoInstructions": "Sortimisalus „Hiljuti esitatud”",
"demoTextButtonTitle": "Tekstinupp",
"demoSharedZAxisBeefSandwichRecipeTitle": "Veiselihavõileib",
"demoSharedZAxisDessertRecipeDescription": "Magustoiduretsept",
"demoSharedYAxisAlbumTileSubtitle": "Esitaja",
"demoSharedYAxisAlbumTileTitle": "Album",
"demoSharedYAxisRecentSortTitle": "Hiljuti esitatud",
"demoSharedYAxisAlphabeticalSortTitle": "A–Z",
"demoSharedYAxisAlbumCount": "268 albumit",
"demoSharedYAxisTitle": "Jagatud Y-telg",
"demoSharedXAxisCreateAccountButtonText": "LOO KONTO",
"demoFadeScaleAlertDialogDiscardButton": "LOOBU",
"demoSharedXAxisSignInTextFieldLabel": "E-post või telefoninumber",
"demoSharedXAxisSignInSubtitleText": "Logige oma kontole sisse",
"demoSharedXAxisSignInWelcomeText": "Tere, David Park!",
"demoSharedXAxisIndividualCourseSubtitle": "Kuvatakse üksikult",
"demoSharedXAxisBundledCourseSubtitle": "Kogumis",
"demoFadeThroughAlbumsDestination": "Albumid",
"demoSharedXAxisDesignCourseTitle": "Disain",
"demoSharedXAxisIllustrationCourseTitle": "Illustratsioon",
"demoSharedXAxisBusinessCourseTitle": "Äri",
"demoSharedXAxisArtsAndCraftsCourseTitle": "Kunst ja käsitöö",
"demoMotionPlaceholderSubtitle": "Teisene tekst",
"demoFadeScaleAlertDialogCancelButton": "TÜHISTA",
"demoFadeScaleAlertDialogHeader": "Märguande dialoogiaken",
"demoFadeScaleHideFabButton": "PEIDA FAB",
"demoFadeScaleShowFabButton": "KUVA FAB",
"demoFadeScaleShowAlertDialogButton": "KUVA MODAALNE",
"demoFadeScaleDescription": "Hajutusmustrit kasutatakse kasutajaliidese elementide puhul, mis ilmuvad või kaovad ekraanikuva piires, nagu dialoog, mis hajub ekraanikuva keskosas sisse.",
"demoFadeScaleTitle": "Hajutus",
"demoFadeThroughTextPlaceholder": "123 fotot",
"demoFadeThroughSearchDestination": "Otsi",
"demoFadeThroughPhotosDestination": "Fotod",
"demoSharedXAxisCoursePageSubtitle": "Kogumis olevad kategooriad kuvatakse teie voos gruppidena. Seda saab alati hiljem muuta.",
"demoFadeThroughDescription": "Läbihajutuse mustrit kasutatakse üleminekuna kasutajaliidese elementide puhul, millel ei ole teineteisega tugevat seost.",
"demoFadeThroughTitle": "Läbihajutus",
"demoSharedZAxisHelpSettingLabel": "Abi",
"demoMotionSubtitle": "Kõik eelmääratud üleminekumustrid",
"demoSharedZAxisNotificationSettingLabel": "Märguanded",
"demoSharedZAxisProfileSettingLabel": "Profiil",
"demoSharedZAxisSavedRecipesListTitle": "Salvestatud retseptid",
"demoSharedZAxisBeefSandwichRecipeDescription": "Veiselihavõileiva retsept",
"demoSharedZAxisCrabPlateRecipeDescription": "Krabitaldriku retsept",
"demoSharedXAxisCoursePageTitle": "Muutke kursused sujuvamaks",
"demoSharedZAxisCrabPlateRecipeTitle": "Krabi",
"demoSharedZAxisShrimpPlateRecipeDescription": "Krevetitaldriku retsept",
"demoSharedZAxisShrimpPlateRecipeTitle": "Krevetid",
"demoContainerTransformTypeFadeThrough": "LÄBIHAJUTUS",
"demoSharedZAxisDessertRecipeTitle": "Magustoit",
"demoSharedZAxisSandwichRecipeDescription": "Võileivaretsept",
"demoSharedZAxisSandwichRecipeTitle": "Võileib",
"demoSharedZAxisBurgerRecipeDescription": "Burgeriretsept",
"demoSharedZAxisBurgerRecipeTitle": "Burger",
"demoSharedZAxisSettingsPageTitle": "Seaded",
"demoSharedZAxisTitle": "Jagatud Z-telg",
"demoSharedZAxisPrivacySettingLabel": "Privaatsus",
"demoMotionTitle": "Liikumine",
"demoContainerTransformTitle": "Konteineri üleminek",
"demoContainerTransformDescription": "Konteineri ülemineku muster on loodud konteinerit sisaldavate kasutajaliidese elementide vaheliste üleminekute jaoks. Muster loob kahe kasutajaliidese elemendi vahel nähtava sideme",
"demoContainerTransformModalBottomSheetTitle": "Hajutusrežiim",
"demoContainerTransformTypeFade": "HAJUTUS",
"demoSharedYAxisAlbumTileDurationUnit": "min",
"demoMotionPlaceholderTitle": "Pealkiri",
"demoSharedXAxisForgotEmailButtonText": "KAS UNUSTASITE E-POSTI AADRESSI?",
"demoMotionSmallPlaceholderSubtitle": "Teisene",
"demoMotionDetailsPageTitle": "Üksikasjade leht",
"demoMotionListTileTitle": "Loendiüksus",
"demoSharedAxisDescription": "Jagatud telje mustrit kasutatakse ruumilise või navigeerimissuhtega kasutajaliidese elementide vaheliste üleminekute jaoks. Muster kasutab X-, Y- või Z-teljel jagatud üleminekut, et elementidevahelist suhet esile tõsta.",
"demoSharedXAxisTitle": "Jagatud X-telg",
"demoSharedXAxisBackButtonText": "TAGASI",
"demoSharedXAxisNextButtonText": "JÄRGMINE",
"demoSharedXAxisCulinaryCourseTitle": "Kokandus",
"githubRepo": "{repoName} GitHubi andmehoidla",
"fortnightlyMenuUS": "USA",
"fortnightlyMenuBusiness": "Äri",
"fortnightlyMenuScience": "Teadus",
"fortnightlyMenuSports": "Sport",
"fortnightlyMenuTravel": "Reisimine",
"fortnightlyMenuCulture": "Kultuur",
"fortnightlyTrendingTechDesign": "TechDesign",
"rallyBudgetDetailAmountLeft": "Järelejäänud summa",
"fortnightlyHeadlineArmy": "Rohelise armee reformimine seestpoolt",
"fortnightlyDescription": "Sisule keskenduv uudisterakendus",
"rallyBillDetailAmountDue": "Tasumisele kuuluv summa",
"rallyBudgetDetailTotalCap": "Kogulimiit",
"rallyBudgetDetailAmountUsed": "Kasutatud summa",
"fortnightlyTrendingHealthcareRevolution": "HealthcareRevolution",
"fortnightlyMenuFrontPage": "Esileht",
"fortnightlyMenuWorld": "Maailm",
"rallyBillDetailAmountPaid": "Makstud summa",
"fortnightlyMenuPolitics": "Poliitika",
"fortnightlyHeadlineBees": "Mesilasi on põllumaadel vähe",
"fortnightlyHeadlineGasoline": "Bensiini tulevik",
"fortnightlyTrendingGreenArmy": "GreenArmy",
"fortnightlyHeadlineFeminists": "Feministid astuvad partisanluse vastu",
"fortnightlyHeadlineFabrics": "Disainerid loovad tehnoloogia abil futuristlikke kangaid",
"fortnightlyHeadlineStocks": "Aktsiate stagneerumise tõttu investeerivad paljud valuutasse",
"fortnightlyTrendingReform": "Reform",
"fortnightlyMenuTech": "Tehnoloogia",
"fortnightlyHeadlineWar": "Ameeriklaste elud, mis sõja tõttu rikuti",
"fortnightlyHeadlineHealthcare": "Vaikne, kuid võimas tervishoiurevolutsioon",
"fortnightlyLatestUpdates": "Viimased värskendused",
"fortnightlyTrendingStocks": "Stocks",
"rallyBillDetailTotalAmount": "Kogusumma",
"demoCupertinoPickerDateTime": "Kuupäev ja kellaaeg",
"signIn": "LOGI SISSE",
"dataTableRowWithSugar": "{value} koos suhkruga",
"dataTableRowApplePie": "Õunakook",
"dataTableRowDonut": "Sõõrik",
"dataTableRowHoneycomb": "Kärjekomm",
"dataTableRowLollipop": "Pulgakomm",
"dataTableRowJellyBean": "Suhkrukomm",
"dataTableRowGingerbread": "Piparkook",
"dataTableRowCupcake": "Tassikook",
"dataTableRowEclair": "Ekleer",
"dataTableRowIceCreamSandwich": "Jäätisemaius",
"dataTableRowFrozenYogurt": "Külmutatud jogurt",
"dataTableColumnIron": "Raud (%)",
"dataTableColumnCalcium": "Kaltsium (%)",
"dataTableColumnSodium": "Naatrium (mg)",
"demoTimePickerTitle": "Kellaajavalija",
"demo2dTransformationsResetTooltip": "Teisendamiste lähtestamine",
"dataTableColumnFat": "Rasv (g)",
"dataTableColumnCalories": "Kalorid",
"dataTableColumnDessert": "Magustoit (1 portsjon)",
"cardsDemoTravelDestinationLocation1": "Thanjavur, Tamil Nadu",
"demoTimePickerDescription": "Kuvatakse dialoog, mis sisaldab materiaalse disaini kellaajavalijat.",
"demoPickersShowPicker": "KUVA VALIJA",
"demoTabsScrollingTitle": "Keritav",
"demoTabsNonScrollingTitle": "Mittekeritav",
"craneHours": "{hours,plural,=1{1 h}other{{hours} h}}",
"craneMinutes": "{minutes,plural,=1{1 min}other{{minutes} min}}",
"craneFlightDuration": "{hoursShortForm} {minutesShortForm}",
"dataTableHeader": "Toitumine",
"demoDatePickerTitle": "Kuupäevavalija",
"demoPickersSubtitle": "Kuupäeva ja kellaaja valimine",
"demoPickersTitle": "Valijad",
"demo2dTransformationsEditTooltip": "Paani muutmine",
"demoDataTableDescription": "Andmetabelites kuvatakse teave ridade ja veergudena ruudustiku vormingus. Need korrastavad teabe nii, et seda oleks lihtne otsida, et kasutajad saaksid otsida mustreid ja statistikat.",
"demo2dTransformationsDescription": "Puudutage paanide muutmiseks ja kasutage stseenis liikumiseks liigutusi. Lohistage paanimiseks, liigutage sõrmi suumimiseks kokku-lahku, pöörake kahe sõrmega. Algsesse suunda naasmiseks vajutage lähtestusnuppu.",
"demo2dTransformationsSubtitle": "Paanimine, suumimine, pööramine",
"demo2dTransformationsTitle": "2D-teisendamised",
"demoCupertinoTextFieldPIN": "PIN-kood",
"demoCupertinoTextFieldDescription": "Tekstiväli võimaldab kasutajal füüsilise või ekraanil kuvatava klaviatuuriga teksti sisestada.",
"demoCupertinoTextFieldSubtitle": "iOS-stiilis tekstiväljad",
"demoCupertinoTextFieldTitle": "Tekstiväljad",
"demoDatePickerDescription": "Kuvatakse dialoog, mis sisaldab materiaalse disaini kuupäevavalijat.",
"demoCupertinoPickerTime": "Aeg",
"demoCupertinoPickerDate": "Kuupäev",
"demoCupertinoPickerTimer": "Taimer",
"demoCupertinoPickerDescription": "iOS-stiilis valikuvidin, mida saab kasutada stringide, kuupäevade, kellaaegade või nii kuupäeva kui ka kellaaja valimiseks.",
"demoCupertinoPickerSubtitle": "iOS-stiilis valikuvidinad",
"demoCupertinoPickerTitle": "Valijad",
"dataTableRowWithHoney": "{value} koos meega",
"cardsDemoTravelDestinationCity2": "Chettinad",
"bannerDemoResetText": "Lähtesta bänner",
"bannerDemoMultipleText": "Mitu toimingut",
"bannerDemoLeadingText": "Juhtikoon",
"dismiss": "LOOBU",
"cardsDemoTappable": "Puudutatav",
"cardsDemoSelectable": "Valitav (pikk vajutus)",
"cardsDemoExplore": "Avastage",
"cardsDemoExploreSemantics": "Avastage sihtkohta {destinationName}",
"cardsDemoShareSemantics": "Jagage sihtkohta {destinationName}",
"cardsDemoTravelDestinationTitle1": "10 populaarseimat linna, mida Tamil Nadus külastada",
"cardsDemoTravelDestinationDescription1": "Number 10",
"cardsDemoTravelDestinationCity1": "Thanjavur",
"dataTableColumnProtein": "Valgud ( g)",
"cardsDemoTravelDestinationTitle2": "Lõuna-India kunstkäsitöölised",
"cardsDemoTravelDestinationDescription2": "Siidiketrajad",
"bannerDemoText": "Parooli värskendati teie muus seadmes. Logige uuesti sisse.",
"cardsDemoTravelDestinationLocation2": "Sivaganga, Tamil Nadu",
"cardsDemoTravelDestinationTitle3": "Brihadisvara tempel",
"cardsDemoTravelDestinationDescription3": "Templid",
"demoBannerTitle": "Bänner",
"demoBannerSubtitle": "Kuvatud on loendis olev bänner",
"demoBannerDescription": "Bänneril kuvatakse oluline ja lakooniline sõnum ning pakutakse kasutajatele toiminguid probleemi lahendamiseks (või bännerist loobumiseks). Bännerist loobumiseks on nõutav kasutaja toiming.",
"demoCardTitle": "Kaardid",
"demoCardSubtitle": "Ümarate nurkadega aluskaardid",
"demoCardDescription": "Kaart on materjali leht, mida kasutatakse mingi seotud teabe (nt albumi, geograafilise asukoha, eine, kontaktandmete jm) esitamiseks.",
"demoDataTableTitle": "Andmetabelid",
"demoDataTableSubtitle": "Teabe read ja veerud",
"dataTableColumnCarbs": "Süsivesikud (g)",
"placeTanjore": "Tanjore",
"demoGridListsTitle": "Ruudustikloendid",
"placeFlowerMarket": "Lilleturg",
"placeBronzeWorks": "Bronzeworks",
"placeMarket": "Turg",
"placeThanjavurTemple": "Thanjavuri tempel",
"placeSaltFarm": "Soolafarm",
"placeScooters": "Motorollerid",
"placeSilkMaker": "Siidimeister",
"placeLunchPrep": "Lõunasöögi valmistamine",
"placeBeach": "Rand",
"placeFisherman": "Kalur",
"demoMenuSelected": "Valitud: {value}",
"demoMenuRemove": "Eemalda",
"demoMenuGetLink": "Hangi link",
"demoMenuShare": "Jaga",
"demoBottomAppBarSubtitle": "Kuvab navigeerimise ja toimingud allosas",
"demoMenuAnItemWithASectionedMenu": "Jaotistega menüüga üksus",
"demoMenuADisabledMenuItem": "Keelatud menüü-üksus",
"demoLinearProgressIndicatorTitle": "Lineaarne edenemisnäidik",
"demoMenuContextMenuItemOne": "Kontekstimenüü üksus 1",
"demoMenuAnItemWithASimpleMenu": "Lihtsa menüüga üksus",
"demoCustomSlidersTitle": "Kohandatud liugurid",
"demoMenuAnItemWithAChecklistMenu": "Kontroll-loendi menüüga üksus",
"demoCupertinoActivityIndicatorTitle": "Tegevuste näidik",
"demoCupertinoActivityIndicatorSubtitle": "iOS-i stiilis tegevuste näidikud",
"demoCupertinoActivityIndicatorDescription": "iOS-i stiilis päripäeva liikuv tegevuste näidik.",
"demoCupertinoNavigationBarTitle": "Navigeerimisriba",
"demoCupertinoNavigationBarSubtitle": "iOS-i stiilis navigeerimisriba",
"demoCupertinoNavigationBarDescription": "iOS-i stiilis navigeerimisriba. Navigeerimisriba on tööriistariba, mis koosneb vähemalt lehe pealkirjast ja asub tööriistariba keskel.",
"demoCupertinoPullToRefreshTitle": "Värskendamiseks allatõmbamine",
"demoCupertinoPullToRefreshSubtitle": "Värskendamiseks allatõmbamise iOS-i stiilis juhtelement",
"demoCupertinoPullToRefreshDescription": "Vidin, mis juurutab värskendamiseks allatõmbamise iOS-i stiilis juhtelemendi.",
"demoProgressIndicatorTitle": "Edenemisnäidikud",
"demoProgressIndicatorSubtitle": "Lineaarne, ringikujuline, määramatu",
"demoCircularProgressIndicatorTitle": "Ringikujuline edenemisnäidik",
"demoCircularProgressIndicatorDescription": "Materiaalse disainiga ringikujuline edenemisnäidik, mille keerlemine näitab, et rakendus on hõivatud.",
"demoMenuFour": "Neli",
"demoLinearProgressIndicatorDescription": "Materiaalse disainiga lineaarne edenemisnäidik, mida nimetatakse ka edenemisribaks.",
"demoTooltipTitle": "Kohtspikrid",
"demoTooltipSubtitle": "Lühike sõnum, mis kuvatakse pika vajutuse või kursori hõljutamise korral",
"demoTooltipDescription": "Kohtspikrid kuvavad tekstisildid, mis aitavad selgitada nupu või muud kasutajaliidese toimingu funktsiooni. Kohtspikrid kuvavad informatiivse teksti, kui kasutaja kursorit elemendil hõljutab, sellele fokuseerib või seda pikalt vajutab.",
"demoTooltipInstructions": "Pika vajutuse või kursori hõljutamise korral kuvatakse kohtspikker.",
"placeChennai": "Chennai",
"demoMenuChecked": "Kontrollitud: {value}",
"placeChettinad": "Chettinad",
"demoMenuPreview": "Eelvaade",
"demoBottomAppBarTitle": "Alumine rakenduseriba",
"demoBottomAppBarDescription": "Alumised rakenduseribad võimaldavad juurdepääsu alumisele navigeerimissahtlile ja kuni neljale toimingule, sealhulgas hõljuvale toimingunupule.",
"bottomAppBarNotch": "Sälk",
"bottomAppBarPosition": "Hõljuva toimingunupu asukoht",
"bottomAppBarPositionDockedEnd": "Dokitud – lõpus",
"bottomAppBarPositionDockedCenter": "Dokitud – keskel",
"bottomAppBarPositionFloatingEnd": "Hõljuv – lõpus",
"bottomAppBarPositionFloatingCenter": "Hõljuv – keskel",
"demoSlidersEditableNumericalValue": "Muudetav arvväärtus",
"demoGridListsSubtitle": "Ridade ja veergudega paigutus",
"demoGridListsDescription": "Ruudustikloendid sobivad kõige paremini homogeensete andmete (nt piltide) esitamiseks. Iga ruudustikloendis olevat üksust nimetatakse paaniks.",
"demoGridListsImageOnlyTitle": "Ainult pilt",
"demoGridListsHeaderTitle": "Päisega",
"demoGridListsFooterTitle": "Jalusega",
"demoSlidersTitle": "Liugurid",
"demoSlidersSubtitle": "Vidinad, millega valida väärtus pühkides",
"demoSlidersDescription": "Liugurid kajastavad väärtuste vahemikku ribal, millest kasutajad saavad valida ühe väärtuse. Need sobivad hästi selliste seadete kohandamiseks nagu helitugevus, heledus või pildifiltrite rakendamine.",
"demoRangeSlidersTitle": "Vahemiku liugurid",
"demoRangeSlidersDescription": "Liugurid kajastavad väärtuste vahemikku ribal. Nende mõlemas otsas võivad olla ikoonid, mis kajastavad väärtuste vahemikku. Need sobivad hästi selliste seadete kohandamiseks nagu helitugevus, heledus või pildifiltrite rakendamine.",
"demoMenuAnItemWithAContextMenuButton": "Kontekstimenüüga üksus",
"demoCustomSlidersDescription": "Liugurid kajastavad väärtuste vahemikku ribal, millest kasutajad saavad valida ühe väärtuse või väärtuste vahemiku. Liuguritele saab teemasid määrata ja neid kohandada.",
"demoSlidersContinuousWithEditableNumericalValue": "Pidev muudetav arvväärtus",
"demoSlidersDiscrete": "Diskreetne",
"demoSlidersDiscreteSliderWithCustomTheme": "Diskreetse vahemiku kohandatud teemaga liugur",
"demoSlidersContinuousRangeSliderWithCustomTheme": "Pideva vahemiku kohandatud teemaga liugur",
"demoSlidersContinuous": "Pidev",
"placePondicherry": "Pondicherry",
"demoMenuTitle": "Menüü",
"demoContextMenuTitle": "Kontekstimenüü",
"demoSectionedMenuTitle": "Jaotistega menüü",
"demoSimpleMenuTitle": "Lihtne menüü",
"demoChecklistMenuTitle": "Kontroll-lehe menüü",
"demoMenuSubtitle": "Menüünupud ja lihtsad menüüd",
"demoMenuDescription": "Menüü kuvab ajutisel pinnal valikute loendi. Need kuvatakse siis, kui kasutajad nuppe, toiminguid või muid juhtelemente kasutavad.",
"demoMenuItemValueOne": "Menüü-üksus 1",
"demoMenuItemValueTwo": "Menüü-üksus 2",
"demoMenuItemValueThree": "Menüü-üksus 3",
"demoMenuOne": "Üks",
"demoMenuTwo": "Kaks",
"demoMenuThree": "Kolm",
"demoMenuContextMenuItemThree": "Kontekstimenüü üksus 3",
"demoCupertinoSwitchSubtitle": "iOS-i stiilis lüliti",
"demoSnackbarsText": "See on teaberiba.",
"demoCupertinoSliderSubtitle": "iOS-i stiilis liugur",
"demoCupertinoSliderDescription": "Liugurit saab kasutada nii pidevate kui ka diskreetsete väärtuste valimiseks.",
"demoCupertinoSliderContinuous": "Pidev: {value}",
"demoCupertinoSliderDiscrete": "Diskreetne: {value}",
"demoSnackbarsAction": "Vajutasite teaberiba toimingut.",
"backToGallery": "Tagasi galeriisse",
"demoCupertinoTabBarTitle": "Vaheleheriba",
"demoCupertinoSwitchDescription": "Lülitit kasutatakse ühe konkreetse seade sisse-/väljalülitatud oleku määramiseks.",
"demoSnackbarsActionButtonLabel": "MÄRUL",
"cupertinoTabBarProfileTab": "Profiil",
"demoSnackbarsButtonLabel": "KUVA TEABERIBA",
"demoSnackbarsDescription": "Teaberibad teavitavad protsessi kasutajaid rakenduse praegustest või tulevastest toimingutest. Need kuvatakse ajutiselt ekraanikuva alaosas. Need ei tohiks kasutuskogemust häirida ja kasutaja ei pea nende eemaldamiseks sekkuma.",
"demoSnackbarsSubtitle": "Teaberibad kuvavad ekraani alaosas sõnumeid",
"demoSnackbarsTitle": "Teaberibad",
"demoCupertinoSliderTitle": "Liugur",
"cupertinoTabBarChatTab": "Chat",
"cupertinoTabBarHomeTab": "Avaleht",
"demoCupertinoTabBarDescription": "iOS-i stiilis alumine vahekaartide navigeerimisriba. Kuvab mitu vahekaarti, millest üks on aktiivne (vaikimisi esimene vahekaart).",
"demoCupertinoTabBarSubtitle": "iOS-i stiilis alumine vahekaardiriba",
"demoOptionsFeatureTitle": "Valikute kuvamine",
"demoOptionsFeatureDescription": "Puudutage siin, et vaadata selles demos saadaolevaid valikuid.",
"demoCodeViewerCopyAll": "KOPEERI KÕIK",
"shrineScreenReaderRemoveProductButton": "Eemalda {product}",
"shrineScreenReaderProductAddToCart": "Lisa ostukorvi",
"shrineScreenReaderCart": "{quantity,plural,=0{Ostukorv, üksusi pole}=1{Ostukorv, 1 üksus}other{Ostukorv, {quantity} üksust}}",
"demoCodeViewerFailedToCopyToClipboardMessage": "Lõikelauale kopeerimine ebaõnnestus: {error}",
"demoCodeViewerCopiedToClipboardMessage": "Kopeeritud lõikelauale.",
"craneSleep8SemanticLabel": "Maiade ehitiste varemed kaljuserval ranna kohal",
"craneSleep4SemanticLabel": "Mägihotell järve kaldal",
"craneSleep2SemanticLabel": "Machu Picchu kadunud linn",
"craneSleep1SemanticLabel": "Mägimajake lumisel maastikul koos igihaljaste puudega",
"craneSleep0SemanticLabel": "Veepeal olevad bangalod",
"craneFly13SemanticLabel": "Mereäärne bassein ja palmid",
"craneFly12SemanticLabel": "Bassein ja palmid",
"craneFly11SemanticLabel": "Kivimajakas merel",
"craneFly10SemanticLabel": "Al-Azhari mošee tornid päikeseloojangus",
"craneFly9SemanticLabel": "Mees nõjatub vanaaegsele sinisele autole",
"craneFly8SemanticLabel": "Supertree Grove",
"craneEat9SemanticLabel": "Küpsetistega kohvikulett",
"craneEat2SemanticLabel": "Burger",
"craneFly5SemanticLabel": "Mägihotell järve kaldal",
"demoSelectionControlsSubtitle": "Märkeruudud, raadionupud ja lülitid",
"craneEat10SemanticLabel": "Naine hoiab käes suurt lihavõileiba",
"craneFly4SemanticLabel": "Veepeal olevad bangalod",
"craneEat7SemanticLabel": "Pagariäri sissekäik",
"craneEat6SemanticLabel": "Krevetiroog",
"craneEat5SemanticLabel": "Kunstipärane restoranisaal",
"craneEat4SemanticLabel": "Šokolaadimagustoit",
"craneEat3SemanticLabel": "Korea tako",
"craneFly3SemanticLabel": "Machu Picchu kadunud linn",
"craneEat1SemanticLabel": "Tühi baar ja baaripukid",
"craneEat0SemanticLabel": "Kiviahjus olev pitsa",
"craneSleep11SemanticLabel": "Taipei 101 pilvelõhkuja",
"craneSleep10SemanticLabel": "Al-Azhari mošee tornid päikeseloojangus",
"craneSleep9SemanticLabel": "Kivimajakas merel",
"craneEat8SemanticLabel": "Taldrik vähkidega",
"craneSleep7SemanticLabel": "Värvikirevad korterid Riberia väljakul",
"craneSleep6SemanticLabel": "Bassein ja palmid",
"craneSleep5SemanticLabel": "Telk väljal",
"settingsButtonCloseLabel": "Sule seaded",
"demoSelectionControlsCheckboxDescription": "Märkeruudud võimaldavad kasutajal teha komplektis mitu valikut. Tavapärane märkeruudu väärtus on Tõene või Väär. Kolme valikuga märkeruudu üks väärtustest võib olla ka Null.",
"settingsButtonLabel": "Seaded",
"demoListsTitle": "Loendid",
"demoListsSubtitle": "Loendi paigutuste kerimine",
"demoListsDescription": "Üks fikseeritud kõrgusega rida, mis sisaldab tavaliselt teksti ja ikooni rea alguses või lõpus.",
"demoOneLineListsTitle": "Üks rida",
"demoTwoLineListsTitle": "Kaks rida",
"demoListsSecondary": "Teisene tekst",
"demoSelectionControlsTitle": "Valiku juhtelemendid",
"craneFly7SemanticLabel": "Rushmore'i mägi",
"demoSelectionControlsCheckboxTitle": "Märkeruut",
"craneSleep3SemanticLabel": "Mees nõjatub vanaaegsele sinisele autole",
"demoSelectionControlsRadioTitle": "Raadio",
"demoSelectionControlsRadioDescription": "Raadionupud võimaldavad kasutajal teha komplektis ühe valiku. Kasutage raadionuppe eksklusiivse valiku pakkumiseks, kui arvate, et kasutaja peab nägema kõiki saadaolevaid valikuid kõrvuti.",
"demoSelectionControlsSwitchTitle": "Lüliti",
"demoSelectionControlsSwitchDescription": "Sees-/väljas-lülititega saab reguleerida konkreetse seade olekut. Valik, mida lülitiga juhitakse, ja ka selle olek, tuleb vastava tekstisisese sildiga sõnaselgelt ära märkida.",
"craneFly0SemanticLabel": "Mägimajake lumisel maastikul koos igihaljaste puudega",
"craneFly1SemanticLabel": "Telk väljal",
"craneFly2SemanticLabel": "Palvelipud ja lumine mägi",
"craneFly6SemanticLabel": "Aerofoto Palacio de Bellas Artesist",
"rallySeeAllAccounts": "Kuva kõik kontod",
"rallyBillAmount": "Arve {billName} summas {amount} tuleb tasuda kuupäevaks {date}.",
"shrineTooltipCloseCart": "Sule ostukorv",
"shrineTooltipCloseMenu": "Sule menüü",
"shrineTooltipOpenMenu": "Ava menüü",
"shrineTooltipSettings": "Seaded",
"shrineTooltipSearch": "Otsing",
"demoTabsDescription": "Vahekaartidega saab korrastada eri kuvadel, andkekogumites ja muudes interaktiivsetes asukohtades olevat sisu.",
"demoTabsSubtitle": "Eraldi keritavate kuvadega vahekaardid",
"demoTabsTitle": "Vahekaardid",
"rallyBudgetAmount": "Eelarve {budgetName} summast {amountTotal} on kasutatud {amountUsed}, järel on {amountLeft}",
"shrineTooltipRemoveItem": "Eemalda üksus",
"rallyAccountAmount": "Konto {accountName} ({accountNumber}) – {amount}.",
"rallySeeAllBudgets": "Kuva kõik eelarved",
"rallySeeAllBills": "Kuva kõik arved",
"craneFormDate": "Valige kuupäev",
"craneFormOrigin": "Valige lähtekoht",
"craneFly2": "Khumbu Valley, Nepal",
"craneFly3": "Machu Picchu, Peruu",
"craneFly4": "Malé, Maldiivid",
"craneFly5": "Vitznau, Šveits",
"craneFly6": "Mexico City, Mehhiko",
"craneFly7": "Mount Rushmore, Ameerika Ühendriigid",
"settingsTextDirectionLocaleBased": "Põhineb lokaadil",
"craneFly9": "Havanna, Kuuba",
"craneFly10": "Kairo, Egiptus",
"craneFly11": "Lissabon, Portugal",
"craneFly12": "Napa, Ameerika Ühendriigid",
"craneFly13": "Bali, Indoneesia",
"craneSleep0": "Malé, Maldiivid",
"craneSleep1": "Aspen, Ameerika Ühendriigid",
"craneSleep2": "Machu Picchu, Peruu",
"demoCupertinoSegmentedControlTitle": "Segmenditud juhtimine",
"craneSleep4": "Vitznau, Šveits",
"craneSleep5": "Big Sur, Ameerika Ühendriigid",
"craneSleep6": "Napa, Ameerika Ühendriigid",
"craneSleep7": "Porto, Portugal",
"craneSleep8": "Tulum, Mehhiko",
"craneEat5": "Seoul, Lõuna-Korea",
"demoChipTitle": "Kiibid",
"demoChipSubtitle": "Kompaktsed elemendid, mis tähistavad sisendit, atribuuti või toimingut",
"demoActionChipTitle": "Toimingukiip",
"demoActionChipDescription": "Toimingukiibid on valikukomplekt, mis käivitab primaarse sisuga seotud toimingu. Toimingukiibid peaksid kasutajaliideses ilmuma dünaamiliselt ja kontekstiliselt.",
"demoChoiceChipTitle": "Valikukiip",
"demoChoiceChipDescription": "Valikukiibid tähistavad komplektist ühte valikut. Valikukiibid sisaldavad seotud kirjeldavat teksti või kategooriaid.",
"demoFilterChipTitle": "Filtrikiip",
"demoFilterChipDescription": "Filtreerimiskiibid kasutavad sisu filtreerimiseks märgendeid või kirjeldavaid sõnu.",
"demoInputChipTitle": "Sisendkiip",
"demoInputChipDescription": "Sisendkiibid tähistavad kompaktsel kujul keerulist teavet, näiteks üksust (isik, koht või asi) või meilivestluse teksti.",
"craneSleep9": "Lissabon, Portugal",
"craneEat10": "Lissabon, Portugal",
"demoCupertinoSegmentedControlDescription": "Kasutatakse mitme üksteist välistava valiku vahel valimiseks. Kui segmenditud juhtimises on üks valik tehtud, siis teisi valikuid segmenditud juhtimises teha ei saa.",
"chipTurnOnLights": "Lülita tuled sisse",
"chipSmall": "Väike",
"chipMedium": "Keskmine",
"chipLarge": "Suur",
"chipElevator": "Lift",
"chipWasher": "Pesumasin",
"chipFireplace": "Kamin",
"chipBiking": "Jalgrattasõit",
"craneFormDiners": "Sööklad",
"rallyAlertsMessageUnassignedTransactions": "{count,plural,=1{Suurendage oma potentsiaalset maksuvabastust! Määrake kategooriad 1 määramata tehingule.}other{Suurendage oma potentsiaalset maksuvabastust! Määrake kategooriad {count} määramata tehingule.}}",
"craneFormTime": "Valige aeg",
"craneFormLocation": "Asukoha valimine",
"craneFormTravelers": "Reisijad",
"craneEat8": "Atlanta, Ameerika Ühendriigid",
"craneFormDestination": "Sihtkoha valimine",
"craneFormDates": "Valige kuupäevad",
"craneFly": "LENDAMINE",
"craneSleep": "UNEREŽIIM",
"craneEat": "SÖÖMINE",
"craneFlySubhead": "Lendude avastamine sihtkoha järgi",
"craneSleepSubhead": "Atribuutide avastamine sihtkoha järgi",
"craneEatSubhead": "Restoranide avastamine sihtkoha järgi",
"craneFlyStops": "{numberOfStops,plural,=0{Otselend}=1{1 ümberistumine}other{{numberOfStops} ümberistumist}}",
"craneSleepProperties": "{totalProperties,plural,=0{Saadaolevaid rendipindu ei ole}=1{1 saadaolev rendipind}other{{totalProperties} saadaolevat rendipinda}}",
"craneEatRestaurants": "{totalRestaurants,plural,=0{Restorane pole}=1{1 restoran}other{{totalRestaurants} restorani}}",
"craneFly0": "Aspen, Ameerika Ühendriigid",
"demoCupertinoSegmentedControlSubtitle": "iOS-i stiilis segmenditud juhtimine",
"craneSleep10": "Kairo, Egiptus",
"craneEat9": "Madrid, Hispaania",
"craneFly1": "Big Sur, Ameerika Ühendriigid",
"craneEat7": "Nashville, Ameerika Ühendriigid",
"craneEat6": "Seattle, Ameerika Ühendriigid",
"craneFly8": "Singapur",
"craneEat4": "Pariis, Prantsusmaa",
"craneEat3": "Portland, Ameerika Ühendriigid",
"craneEat2": "Córdoba, Argentina",
"craneEat1": "Dallas, Ameerika Ühendriigid",
"craneEat0": "Napoli, Itaalia",
"craneSleep11": "Taipei, Taiwan",
"craneSleep3": "Havanna, Kuuba",
"shrineLogoutButtonCaption": "LOGI VÄLJA",
"rallyTitleBills": "ARVED",
"rallyTitleAccounts": "KONTOD",
"shrineProductVagabondSack": "Vagabond sack",
"rallyAccountDetailDataInterestYtd": "Aastane intress tänase kuupäevani",
"shrineProductWhitneyBelt": "Whitney belt",
"shrineProductGardenStrand": "Garden strand",
"shrineProductStrutEarrings": "Strut earrings",
"shrineProductVarsitySocks": "Varsity socks",
"shrineProductWeaveKeyring": "Weave keyring",
"shrineProductGatsbyHat": "Gatsby hat",
"shrineProductShrugBag": "Shrug bag",
"shrineProductGiltDeskTrio": "Gilt desk trio",
"shrineProductCopperWireRack": "Copper wire rack",
"shrineProductSootheCeramicSet": "Soothe ceramic set",
"shrineProductHurrahsTeaSet": "Hurrahs tea set",
"shrineProductBlueStoneMug": "Blue stone mug",
"shrineProductRainwaterTray": "Rainwater tray",
"shrineProductChambrayNapkins": "Chambray napkins",
"shrineProductSucculentPlanters": "Succulent planters",
"shrineProductQuartetTable": "Quartet table",
"shrineProductKitchenQuattro": "Kitchen quattro",
"shrineProductClaySweater": "Clay sweater",
"shrineProductSeaTunic": "Sea tunic",
"shrineProductPlasterTunic": "Plaster tunic",
"rallyBudgetCategoryRestaurants": "Restoranid",
"shrineProductChambrayShirt": "Chambray shirt",
"shrineProductSeabreezeSweater": "Seabreeze sweater",
"shrineProductGentryJacket": "Gentry jacket",
"shrineProductNavyTrousers": "Navy trousers",
"shrineProductWalterHenleyWhite": "Walter henley (white)",
"shrineProductSurfAndPerfShirt": "Surf and perf shirt",
"shrineProductGingerScarf": "Ginger scarf",
"shrineProductRamonaCrossover": "Ramona crossover",
"shrineProductClassicWhiteCollar": "Classic white collar",
"shrineProductSunshirtDress": "Sunshirt dress",
"rallyAccountDetailDataInterestRate": "Intressimäär",
"rallyAccountDetailDataAnnualPercentageYield": "Aastane tuluprotsent",
"rallyAccountDataVacation": "Puhkusekonto",
"shrineProductFineLinesTee": "Fine lines tee",
"rallyAccountDataHomeSavings": "Kodulaenukonto",
"rallyAccountDataChecking": "Tšekikonto",
"rallyAccountDetailDataInterestPaidLastYear": "Eelmisel aastal makstud intress",
"rallyAccountDetailDataNextStatement": "Järgmine väljavõte",
"rallyAccountDetailDataAccountOwner": "Konto omanik",
"rallyBudgetCategoryCoffeeShops": "Kohvikud",
"rallyBudgetCategoryGroceries": "Toiduained",
"shrineProductCeriseScallopTee": "Cerise scallop tee",
"rallyBudgetCategoryClothing": "Riided",
"rallySettingsManageAccounts": "Kontode haldamine",
"rallyAccountDataCarSavings": "Autolaenukonto",
"rallySettingsTaxDocuments": "Maksudokumendid",
"rallySettingsPasscodeAndTouchId": "Pääsukood ja Touch ID",
"rallySettingsNotifications": "Märguanded",
"rallySettingsPersonalInformation": "Isiklikud andmed",
"rallySettingsPaperlessSettings": "Paberivabad arved",
"rallySettingsFindAtms": "Otsige pangaautomaate",
"rallySettingsHelp": "Abi",
"rallySettingsSignOut": "Logi välja",
"rallyAccountTotal": "Kokku",
"rallyBillsDue": "Maksta",
"rallyBudgetLeft": "Järel",
"rallyAccounts": "Kontod",
"rallyBills": "Arved",
"rallyBudgets": "Eelarved",
"rallyAlerts": "Hoiatused",
"rallySeeAll": "KUVA KÕIK",
"rallyFinanceLeft": "JÄREL",
"rallyTitleOverview": "ÜLEVAADE",
"shrineProductShoulderRollsTee": "Shoulder rolls tee",
"shrineNextButtonCaption": "JÄRGMINE",
"rallyTitleBudgets": "EELARVED",
"rallyTitleSettings": "SEADED",
"rallyLoginLoginToRally": "Sisselogimine rakendusse Rally",
"rallyLoginNoAccount": "Kas teil pole kontot?",
"rallyLoginSignUp": "REGISTREERU",
"rallyLoginUsername": "Kasutajanimi",
"rallyLoginPassword": "Parool",
"rallyLoginLabelLogin": "Logi sisse",
"rallyLoginRememberMe": "Mäleta mind",
"rallyLoginButtonLogin": "LOGI SISSE",
"rallyAlertsMessageHeadsUpShopping": "Tähelepanu! Olete sel kuu kulutanud {percent} oma ostueelarvest.",
"rallyAlertsMessageSpentOnRestaurants": "Olete sel nädalal restoranides kulutanud {amount}.",
"rallyAlertsMessageATMFees": "Olete sel kuul pangaautomaatidest välja võtnud {amount}.",
"rallyAlertsMessageCheckingAccount": "Tubli! Teie deposiidikonto saldo on eelmise kuuga võrreldes {percent} suurem.",
"shrineMenuCaption": "MENÜÜ",
"shrineCategoryNameAll": "KÕIK",
"shrineCategoryNameAccessories": "AKSESSUAARID",
"shrineCategoryNameClothing": "RIIDED",
"shrineCategoryNameHome": "KODU",
"shrineLoginUsernameLabel": "Kasutajanimi",
"shrineLoginPasswordLabel": "Parool",
"shrineCancelButtonCaption": "TÜHISTA",
"shrineCartTaxCaption": "Maks:",
"shrineCartPageCaption": "OSTUKORV",
"shrineProductQuantity": "Kogus: {quantity}",
"shrineProductPrice": "x {price}",
"shrineCartItemCount": "{quantity,plural,=0{ÜKSUSI POLE}=1{1 ÜKSUS}other{{quantity} ÜKSUST}}",
"shrineCartClearButtonCaption": "TÜHJENDA KORV",
"shrineCartTotalCaption": "KOKKU",
"shrineCartSubtotalCaption": "Vahesumma:",
"shrineCartShippingCaption": "Tarne:",
"shrineProductGreySlouchTank": "Grey slouch tank",
"shrineProductStellaSunglasses": "Stella sunglasses",
"shrineProductWhitePinstripeShirt": "White pinstripe shirt",
"demoTextFieldWhereCanWeReachYou": "Kuidas saame teiega ühendust võtta?",
"settingsTextDirectionLTR": "vasakult paremale",
"settingsTextScalingLarge": "Suur",
"demoBottomSheetHeader": "Päis",
"demoBottomSheetItem": "Üksus {value}",
"demoBottomTextFieldsTitle": "Tekstiväljad",
"demoTextFieldTitle": "Tekstiväljad",
"demoTextFieldSubtitle": "Üks rida muudetavat teksti ja numbreid",
"demoTextFieldDescription": "Tekstiväljad võimaldavad kasutajatel kasutajaliideses teksti sisestada. Need kuvatakse tavaliselt vormides ja dialoogides.",
"demoTextFieldShowPasswordLabel": "Kuva parool",
"demoTextFieldHidePasswordLabel": "Peida parool",
"demoTextFieldFormErrors": "Enne esitamist parandage punasega märgitud vead.",
"demoTextFieldNameRequired": "Nimi on nõutav.",
"demoTextFieldOnlyAlphabeticalChars": "Sisestage ainult tähestikutähti.",
"demoTextFieldEnterUSPhoneNumber": "(###) ### #### – sisestage USA telefoninumber.",
"demoTextFieldEnterPassword": "Sisestage parool.",
"demoTextFieldPasswordsDoNotMatch": "Paroolid ei ühti",
"demoTextFieldWhatDoPeopleCallYou": "Kuidas inimesed teid kutsuvad?",
"demoTextFieldNameField": "Nimi*",
"demoBottomSheetButtonText": "KUVA ALUMINE LEHT",
"demoTextFieldPhoneNumber": "Telefoninumber*",
"demoBottomSheetTitle": "Alumine leht",
"demoTextFieldEmail": "E-post",
"demoTextFieldTellUsAboutYourself": "Rääkige meile endast (nt kirjutage oma tegevustest või hobidest)",
"demoTextFieldKeepItShort": "Ärge pikalt kirjutage, see on vaid demo.",
"starterAppGenericButton": "NUPP",
"demoTextFieldLifeStory": "Elulugu",
"demoTextFieldSalary": "Palk",
"demoTextFieldUSD": "USD",
"demoTextFieldNoMoreThan": "Mitte üle 8 tähemärgi.",
"demoTextFieldPassword": "Parool*",
"demoTextFieldRetypePassword": "Sisestage parool uuesti*",
"demoTextFieldSubmit": "ESITA",
"demoBottomNavigationSubtitle": "Allossa navigeerimine tuhmuvate kuvadega",
"demoBottomSheetAddLabel": "Lisa",
"demoBottomSheetModalDescription": "Modaalne alumine leht on alternatiiv menüüle või dialoogile ja takistab kasutajal ülejäänud rakendusega suhelda.",
"demoBottomSheetModalTitle": "Modaalne alumine leht",
"demoBottomSheetPersistentDescription": "Püsival alumisel lehel kuvatakse teave, mis täiendab rakenduse peamist sisu. Püsiv alumine leht jääb nähtavale ka siis, kui kasutaja suhtleb rakenduse muu osaga.",
"demoBottomSheetPersistentTitle": "Püsiv alumine leht",
"demoBottomSheetSubtitle": "Püsivad ja modaalsed alumised lehed",
"demoTextFieldNameHasPhoneNumber": "Kontakti {name} telefoninumber on {phoneNumber}",
"buttonText": "NUPP",
"demoTypographyDescription": "Materiaalses disainil leiduvate eri tüpograafiliste stiilide definitsioonid.",
"demoTypographySubtitle": "Kõik eelmääratud tekstistiilid",
"demoTypographyTitle": "Tüpograafia",
"demoFullscreenDialogDescription": "Atribuut fullscreenDialog määrab, kas sissetulev leht on täisekraanil kuvatud modaaldialoog",
"demoFlatButtonDescription": "Samatasandiline nupp kuvab vajutamisel tindipleki, kuid ei tõuse ülespoole. Kasutage samatasandilisi nuppe tööriistaribadel, dialoogides ja tekstisiseselt koos täidisega",
"demoBottomNavigationDescription": "Alumisel navigeerimisribal kuvatakse ekraanikuva allservas 3–5 sihtkohta. Iga sihtkohta esindab ikoon ja valikuline tekstisilt. Alumise navigeerimisikooni puudutamisel suunatakse kasutaja selle ikooniga seotud ülatasemel navigeerimise sihtkohta.",
"demoBottomNavigationSelectedLabel": "Valitud silt",
"demoBottomNavigationPersistentLabels": "Püsivad sildid",
"starterAppDrawerItem": "Üksus {value}",
"demoTextFieldRequiredField": "* tähistab kohustuslikku välja",
"demoBottomNavigationTitle": "Alla liikumine",
"settingsLightTheme": "Hele",
"settingsTheme": "Teema",
"settingsPlatformIOS": "iOS",
"settingsPlatformAndroid": "Android",
"settingsTextDirectionRTL": "Paremalt vasakule",
"settingsTextScalingHuge": "Väga suur",
"cupertinoButton": "Nupp",
"settingsTextScalingNormal": "Tavaline",
"settingsTextScalingSmall": "Väike",
"settingsSystemDefault": "Süsteem",
"settingsTitle": "Seaded",
"rallyDescription": "Isiklik finantsrakendus",
"aboutDialogDescription": "Selle rakenduse lähtekoodi nägemiseks vaadake siia: {repoLink}.",
"bottomNavigationCommentsTab": "Kommentaarid",
"starterAppGenericBody": "Sisu",
"starterAppGenericHeadline": "Pealkiri",
"starterAppGenericSubtitle": "Alapealkiri",
"starterAppGenericTitle": "Pealkiri",
"starterAppTooltipSearch": "Otsing",
"starterAppTooltipShare": "Jaga",
"starterAppTooltipFavorite": "Lisa lemmikutesse",
"starterAppTooltipAdd": "Lisa",
"bottomNavigationCalendarTab": "Kalender",
"starterAppDescription": "Automaatselt kohanduva stardirakenduse paigutus",
"starterAppTitle": "Stardirakendus",
"aboutFlutterSamplesRepo": "Flutteri näidiste GitHubi andmehoidla",
"bottomNavigationContentPlaceholder": "Vahelehe {title} kohatäide",
"bottomNavigationCameraTab": "Kaamera",
"bottomNavigationAlarmTab": "Alarm",
"bottomNavigationAccountTab": "Konto",
"demoTextFieldYourEmailAddress": "Teie e-posti aadress",
"demoToggleButtonDescription": "Lülitusnuppe saab kasutada seotud valikute grupeerimiseks. Seotud lülitusnuppude gruppide esiletõstmiseks peab grupp jagama ühist konteinerit",
"colorsGrey": "HALL",
"colorsBrown": "PRUUN",
"colorsDeepOrange": "SÜGAV ORANŽ",
"colorsOrange": "ORANŽ",
"colorsAmber": "MEREVAIGUKOLLANE",
"colorsYellow": "KOLLANE",
"colorsLime": "LAIMIROHELINE",
"colorsLightGreen": "HELEROHELINE",
"colorsGreen": "ROHELINE",
"homeHeaderGallery": "Galerii",
"homeHeaderCategories": "Kategooriad",
"shrineDescription": "Moodne jaemüügirakendus",
"craneDescription": "Isikupärastatud reisirakendus",
"homeCategoryReference": "STIILID JA MUU",
"demoInvalidURL": "URL-i ei saanud kuvada:",
"demoOptionsTooltip": "Valikud",
"demoInfoTooltip": "Teave",
"demoCodeTooltip": "Demokood",
"demoDocumentationTooltip": "API dokumentatsioon",
"demoFullscreenTooltip": "Täisekraan",
"settingsTextScaling": "Teksti skaleerimine",
"settingsTextDirection": "Teksti suund",
"settingsLocale": "Lokaat",
"settingsPlatformMechanics": "Platvormi mehaanika",
"settingsDarkTheme": "Tume",
"settingsSlowMotion": "Aegluubis",
"settingsAbout": "Teave Flutteri galerii kohta",
"settingsFeedback": "Tagasiside saatmine",
"settingsAttribution": "Londonis kujundanud TOASTER",
"demoButtonTitle": "Nupud",
"demoButtonSubtitle": "Teksti-, tõstetud ja mitmetasandilised nupud ning muu",
"demoFlatButtonTitle": "Samatasandiline nupp",
"demoRaisedButtonDescription": "Tõstetud nupud pakuvad peamiselt ühetasandiliste nuppude kõrval lisamõõdet. Need tõstavad tihedalt täidetud või suurtel aladel esile funktsioone.",
"demoRaisedButtonTitle": "Tõstetud nupp",
"demoOutlineButtonTitle": "Mitmetasandiline nupp",
"demoOutlineButtonDescription": "Mitmetasandilised nupud muutuvad vajutamisel läbipaistvaks ja tõusevad ülespoole. Need seotakse sageli tõstetud nuppudega, et pakkuda alternatiivset (teisest) toimingut.",
"demoToggleButtonTitle": "Lülitusnupp",
"colorsTeal": "SINAKASROHELINE",
"demoFloatingButtonTitle": "Hõljuv toimingunupp",
"demoFloatingButtonDescription": "Hõljuv toimingunupp on ümmargune ikooninupp, mis hõljub sisu kohal, et pakkuda rakenduses peamist toimingut.",
"demoDialogTitle": "Dialoogid",
"demoDialogSubtitle": "Lihtne, hoiatus ja täisekraan",
"demoAlertDialogTitle": "Hoiatus",
"demoAlertDialogDescription": "Hoiatusdialoog teavitab kasutajat olukordadest, mis nõuavad tähelepanu. Hoiatusdialoogil on valikuline pealkiri ja valikuline toimingute loend.",
"demoAlertTitleDialogTitle": "Hoiatus koos pealkirjaga",
"demoSimpleDialogTitle": "Lihtne",
"demoSimpleDialogDescription": "Lihtne dialoog pakub kasutajale valikut mitme võimaluse vahel. Lihtsal dialoogil on valikuline pealkiri, mis kuvatakse valikute kohal.",
"demoFullscreenDialogTitle": "Täisekraan",
"demoCupertinoButtonsTitle": "Nupud",
"demoCupertinoButtonsSubtitle": "iOS-i stiilis nupud",
"demoCupertinoButtonsDescription": "iOS-i stiilis nupp. See tõmbab sisse teksti ja/või ikooni, mis liigub puudutamisel välja ja sisse. Võib hõlmata ka tausta.",
"demoCupertinoAlertsTitle": "Hoiatused",
"demoCupertinoAlertsSubtitle": "iOS-i stiilis teatisedialoogid",
"demoCupertinoAlertTitle": "Märguanne",
"demoCupertinoAlertDescription": "Hoiatusdialoog teavitab kasutajat olukordadest, mis nõuavad tähelepanu. Hoiatusdialoogil on valikuline pealkiri, valikuline sisu ja valikuline toimingute loend. Pealkiri kuvatakse sisu kohal ja toimingud sisu all.",
"demoCupertinoAlertWithTitleTitle": "Hoiatus koos pealkirjaga",
"demoCupertinoAlertButtonsTitle": "Hoiatus koos nuppudega",
"demoCupertinoAlertButtonsOnlyTitle": "Ainult hoiatusnupud",
"demoCupertinoActionSheetTitle": "Toiminguleht",
"demoCupertinoActionSheetDescription": "Toiminguleht on teatud tüüpi hoiatus, mis pakub kasutajale vähemalt kahte valikut, mis on seotud praeguse kontekstiga. Toimingulehel võib olla pealkiri, lisasõnum ja toimingute loend.",
"demoColorsTitle": "Värvid",
"demoColorsSubtitle": "Kõik eelmääratud värvid",
"demoColorsDescription": "Värvide ja värvipaletti püsiväärtused, mis esindavad materiaalse disaini värvipaletti.",
"buttonTextEnabled": "ENABLED",
"buttonTextDisabled": "DISABLED",
"buttonTextCreate": "Loo",
"dialogSelectedOption": "Teie valik: „{value}”",
"dialogDiscardTitle": "Kas loobuda mustandist?",
"dialogLocationTitle": "Kas kasutada Google'i asukohateenuseid?",
"dialogLocationDescription": "Lubage Google'il rakendusi asukoha tuvastamisel aidata. See tähendab, et Google'ile saadetakse anonüümseid asukohaandmeid isegi siis, kui ükski rakendus ei tööta.",
"dialogCancel": "TÜHISTA",
"dialogDiscard": "LOOBU",
"dialogDisagree": "EI NÕUSTU",
"dialogAgree": "NÕUSTU",
"dialogSetBackup": "Varundamiskonto määramine",
"colorsBlueGrey": "SINAKASHALL",
"dialogShow": "KUVA DIALOOG",
"dialogFullscreenTitle": "Täisekraanil kuvatud dialoog",
"dialogFullscreenSave": "SALVESTA",
"dialogFullscreenDescription": "Täisekraanil kuvatud dialoogi demo",
"cupertinoButtonEnabled": "Enabled",
"cupertinoButtonDisabled": "Disabled",
"cupertinoButtonWithBackground": "Koos taustaga",
"cupertinoAlertCancel": "Tühista",
"cupertinoAlertDiscard": "Loobu",
"cupertinoAlertLocationTitle": "Kas anda rakendusele „Maps\" juurdepääs teie asukohale, kui rakendust kasutate?",
"cupertinoAlertLocationDescription": "Teie praegune asukoht kuvatakse kaardil ja seda kasutatakse juhiste, läheduses leiduvate otsingutulemuste ning hinnanguliste reisiaegade pakkumiseks.",
"cupertinoAlertAllow": "Luba",
"cupertinoAlertDontAllow": "Ära luba",
"cupertinoAlertFavoriteDessert": "Valige lemmikmagustoit",
"cupertinoAlertDessertDescription": "Valige allolevast loendist oma lemmikmagustoit. Teie valikut kasutatakse teie piirkonnas soovitatud toidukohtade loendi kohandamiseks.",
"cupertinoAlertCheesecake": "Juustukook",
"cupertinoAlertTiramisu": "Tiramisu",
"cupertinoAlertApplePie": "Õunakook",
"cupertinoAlertChocolateBrownie": "Šokolaadikook",
"cupertinoShowAlert": "Kuva hoiatus",
"colorsRed": "PUNANE",
"colorsPink": "ROOSA",
"colorsPurple": "LILLA",
"colorsDeepPurple": "SÜGAVLILLA",
"colorsIndigo": "INDIGO",
"colorsBlue": "SININE",
"colorsLightBlue": "HELESININE",
"colorsCyan": "TSÜAAN",
"dialogAddAccount": "Lisa konto",
"Gallery": "Galerii",
"Categories": "Kategooriad",
"SHRINE": "SHRINE",
"Basic shopping app": "Ostlemise põhirakendus",
"RALLY": "RALLY",
"CRANE": "CRANE",
"Travel app": "Reisirakendus",
"MATERIAL": "MATERIAL",
"CUPERTINO": "CUPERTINO",
"REFERENCE STYLES & MEDIA": "VÕRDLUSSTIILID JA -MEEDIA"
}
| 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",
"demoCupertinoPicker": "Alat pilih",
"demoCupertinoSearchTextFieldSubtitle": "Kolom teks penelusuran bergaya iOS",
"demoCupertinoSearchTextFieldDescription": "Kolom teks penelusuran yang memungkinkan pengguna melakukan penelusuran dengan memasukkan teks, dan yang dapat menawarkan serta memfilter saran.",
"demoCupertinoSearchTextFieldPlaceholder": "Masukkan beberapa teks",
"demoCupertinoScrollbarTitle": "Scrollbar",
"demoCupertinoScrollbarSubtitle": "Scrollbar bergaya iOS",
"demoCupertinoScrollbarDescription": "Scrollbar yang menggabungkan turunan tertentu",
"demoTwoPaneItem": "Item {value}",
"demoTwoPaneList": "Daftar",
"demoTwoPaneFoldableLabel": "Perangkat foldable",
"demoTwoPaneSmallScreenLabel": "Layar Kecil",
"demoTwoPaneSmallScreenDescription": "Ini adalah perilaku TwoPane di perangkat yang memiliki layar berukuran kecil.",
"demoTwoPaneTabletLabel": "Tablet/Desktop",
"demoTwoPaneTabletDescription": "Ini adalah perilaku TwoPane di perangkat yang memiliki layar lebih besar seperti tablet atau desktop.",
"demoTwoPaneTitle": "TwoPane",
"demoTwoPaneSubtitle": "Layout responsif pada perangkat yang memiliki layar besar, kecil, dan perangkat foldable",
"splashSelectDemo": "Pilih demo",
"demoTwoPaneFoldableDescription": "Ini adalah perilaku TwoPane di perangkat foldable.",
"demoTwoPaneDetails": "Detail",
"demoTwoPaneSelectItem": "Pilih item",
"demoTwoPaneItemDetails": "Detail item {value}",
"demoCupertinoContextMenuActionText": "Sentuh lama logo Flutter untuk melihat menu konteks.",
"demoCupertinoContextMenuDescription": "Menu kontekstual layar penuh bergaya iOS yang muncul saat elemen ditekan lama.",
"demoAppBarTitle": "Panel aplikasi",
"demoAppBarDescription": "Panel aplikasi menyediakan konten dan tindakan yang terkait dengan layar saat ini. Panel aplikasi digunakan untuk branding, judul layar, navigasi, serta tindakan",
"demoDividerTitle": "Pembagi",
"demoDividerSubtitle": "Pembagi merupakan garis tipis yang mengelompokkan konten dalam daftar dan tata letak.",
"demoDividerDescription": "Pembagi dapat digunakan dalam daftar, panel samping, dan tempat lainnya untuk memisahkan konten.",
"demoVerticalDividerTitle": "Pembagi Vertikal",
"demoCupertinoContextMenuTitle": "Menu Konteks",
"demoCupertinoContextMenuSubtitle": "Menu konteks bergaya iOS",
"demoAppBarSubtitle": "Menampilkan informasi dan tindakan yang terkait dengan layar saat ini",
"demoCupertinoContextMenuActionOne": "Tindakan satu",
"demoCupertinoContextMenuActionTwo": "Tindakan dua",
"demoDateRangePickerDescription": "Menampilkan dialog yang berisi pemilih rentang tanggal Desain Material.",
"demoDateRangePickerTitle": "Pemilih Rentang Tanggal",
"demoNavigationDrawerUserName": "Nama Pengguna",
"demoNavigationDrawerUserEmail": "[email protected]",
"demoNavigationDrawerText": "Geser dari pinggir layar atau ketuk ikon di kiri atas untuk melihat panel samping",
"demoNavigationRailTitle": "Kolom Navigasi Samping",
"demoNavigationRailSubtitle": "Menampilkan Kolom Navigasi Samping dalam aplikasi",
"demoNavigationRailDescription": "Widget material yang dimaksudkan untuk ditampilkan di bagian kiri atau kanan aplikasi guna beralih antar-beberapa tampilan, biasanya antara tiga atau lima.",
"demoNavigationRailFirst": "Pertama",
"demoNavigationDrawerTitle": "Panel Navigasi",
"demoNavigationRailThird": "Ketiga",
"replyStarredLabel": "Berbintang",
"demoTextButtonDescription": "Tombol teks menampilkan percikan tinta saat ditekan, tetapi tidak terangkat. Gunakan tombol teks pada toolbar, dalam dialog, dan bagian dari padding",
"demoElevatedButtonTitle": "Tombol Timbul",
"demoElevatedButtonDescription": "Tombol timbul menambahkan dimensi ke sebagian besar tata letak datar. Tombol tersebut mempertegas fungsi pada ruang yang penuh atau lapang.",
"demoOutlinedButtonTitle": "Tombol Outline",
"demoOutlinedButtonDescription": "Tombol outline akan menjadi buram dan terangkat saat ditekan. Tombol tersebut sering dipasangkan dengan tombol timbul untuk menandakan tindakan kedua dan alternatif.",
"demoContainerTransformDemoInstructions": "Kartu, Daftar & FAB",
"demoNavigationDrawerSubtitle": "Menampilkan panel samping dalam panel aplikasi",
"replyDescription": "Aplikasi email yang efisien dan fokus",
"demoNavigationDrawerDescription": "Panel Desain Material yang dapat digeser secara horizontal dari pinggir layar untuk menampilkan link navigasi dalam aplikasi.",
"replyDraftsLabel": "Draf",
"demoNavigationDrawerToPageOne": "Item Satu",
"replyInboxLabel": "Kotak masuk",
"demoSharedXAxisDemoInstructions": "Tombol Berikutnya dan Kembali",
"replySpamLabel": "Spam",
"replyTrashLabel": "Sampah",
"replySentLabel": "Terkirim",
"demoNavigationRailSecond": "Kedua",
"demoNavigationDrawerToPageTwo": "Item Dua",
"demoFadeScaleDemoInstructions": "Modal dan FAB",
"demoFadeThroughDemoInstructions": "Navigasi bawah",
"demoSharedZAxisDemoInstructions": "Tombol ikon setelan",
"demoSharedYAxisDemoInstructions": "Urutkan menurut \"Baru Diputar\"",
"demoTextButtonTitle": "Tombol Teks",
"demoSharedZAxisBeefSandwichRecipeTitle": "Sandwich daging sapi",
"demoSharedZAxisDessertRecipeDescription": "Resep hidangan penutup",
"demoSharedYAxisAlbumTileSubtitle": "Artis",
"demoSharedYAxisAlbumTileTitle": "Album",
"demoSharedYAxisRecentSortTitle": "Baru diputar",
"demoSharedYAxisAlphabeticalSortTitle": "A-Z",
"demoSharedYAxisAlbumCount": "268 album",
"demoSharedYAxisTitle": "Sumbu y merata",
"demoSharedXAxisCreateAccountButtonText": "BUAT AKUN",
"demoFadeScaleAlertDialogDiscardButton": "HAPUS",
"demoSharedXAxisSignInTextFieldLabel": "Email atau nomor telepon",
"demoSharedXAxisSignInSubtitleText": "Login dengan akun Anda",
"demoSharedXAxisSignInWelcomeText": "Halo David Park",
"demoSharedXAxisIndividualCourseSubtitle": "Ditampilkan secara Individual",
"demoSharedXAxisBundledCourseSubtitle": "Gabungan",
"demoFadeThroughAlbumsDestination": "Album",
"demoSharedXAxisDesignCourseTitle": "Desain",
"demoSharedXAxisIllustrationCourseTitle": "Ilustrasi",
"demoSharedXAxisBusinessCourseTitle": "Bisnis",
"demoSharedXAxisArtsAndCraftsCourseTitle": "Seni & Kerajinan",
"demoMotionPlaceholderSubtitle": "Teks sekunder",
"demoFadeScaleAlertDialogCancelButton": "BATAL",
"demoFadeScaleAlertDialogHeader": "Dialog Notifikasi",
"demoFadeScaleHideFabButton": "SEMBUNYIKAN FAB",
"demoFadeScaleShowFabButton": "TAMPILKAN FAB",
"demoFadeScaleShowAlertDialogButton": "TAMPILKAN MODAL",
"demoFadeScaleDescription": "Pola memperjelas digunakan untuk elemen UI yang masuk atau keluar dan masih dalam garis batas layar, misalnya dialog yang memperjelas di tengah layar.",
"demoFadeScaleTitle": "Memperjelas",
"demoFadeThroughTextPlaceholder": "123 foto",
"demoFadeThroughSearchDestination": "Telusuri",
"demoFadeThroughPhotosDestination": "Foto",
"demoSharedXAxisCoursePageSubtitle": "Kategori gabungan muncul sebagai grup di feed Anda. Anda dapat mengubahnya kapan saja.",
"demoFadeThroughDescription": "Pola memudar digunakan untuk transisi antara elemen UI yang tidak memiliki hubungan kuat satu sama lain.",
"demoFadeThroughTitle": "Memudar",
"demoSharedZAxisHelpSettingLabel": "Bantuan",
"demoMotionSubtitle": "Semua pola transisi yang sudah ditentukan",
"demoSharedZAxisNotificationSettingLabel": "Notifikasi",
"demoSharedZAxisProfileSettingLabel": "Profil",
"demoSharedZAxisSavedRecipesListTitle": "Resep yang Tersimpan",
"demoSharedZAxisBeefSandwichRecipeDescription": "Resep Sandwich daging sapi",
"demoSharedZAxisCrabPlateRecipeDescription": "Resep hidangan berbahan kepiting",
"demoSharedXAxisCoursePageTitle": "Mempersingkat kursus Anda",
"demoSharedZAxisCrabPlateRecipeTitle": "Kepiting",
"demoSharedZAxisShrimpPlateRecipeDescription": "Resep hidangan berbahan udang",
"demoSharedZAxisShrimpPlateRecipeTitle": "Udang",
"demoContainerTransformTypeFadeThrough": "MEMUDAR",
"demoSharedZAxisDessertRecipeTitle": "Hidangan penutup",
"demoSharedZAxisSandwichRecipeDescription": "Resep sandwich",
"demoSharedZAxisSandwichRecipeTitle": "Sandwich",
"demoSharedZAxisBurgerRecipeDescription": "Resep burger",
"demoSharedZAxisBurgerRecipeTitle": "Burger",
"demoSharedZAxisSettingsPageTitle": "Setelan",
"demoSharedZAxisTitle": "Sumbu z merata",
"demoSharedZAxisPrivacySettingLabel": "Privasi",
"demoMotionTitle": "Gerakan",
"demoContainerTransformTitle": "Transformasi Container",
"demoContainerTransformDescription": "Pola transformasi container didesain untuk transisi antara elemen UI yang mencakup sebuah container. Pola ini menghasilkan hubungan yang terlihat di antara dua elemen UI",
"demoContainerTransformModalBottomSheetTitle": "Mode memudar dan memperjelas",
"demoContainerTransformTypeFade": "MEMPERJELAS",
"demoSharedYAxisAlbumTileDurationUnit": "mnt",
"demoMotionPlaceholderTitle": "Judul",
"demoSharedXAxisForgotEmailButtonText": "LUPA EMAIL?",
"demoMotionSmallPlaceholderSubtitle": "Sekunder",
"demoMotionDetailsPageTitle": "Halaman Detail",
"demoMotionListTileTitle": "Item daftar",
"demoSharedAxisDescription": "Pola sumbu merata digunakan untuk transisi antara elemen UI yang memiliki hubungan spasial atau navigasi. Pola ini menggunakan transformasi yang sama pada sumbu x, y, atau z untuk memperkuat hubungan antar-elemen.",
"demoSharedXAxisTitle": "Sumbu x merata",
"demoSharedXAxisBackButtonText": "KEMBALI",
"demoSharedXAxisNextButtonText": "BERIKUTNYA",
"demoSharedXAxisCulinaryCourseTitle": "Kuliner",
"githubRepo": "Repositori GitHub {repoName}",
"fortnightlyMenuUS": "AS",
"fortnightlyMenuBusiness": "Bisnis",
"fortnightlyMenuScience": "Sains",
"fortnightlyMenuSports": "Olahraga",
"fortnightlyMenuTravel": "Wisata",
"fortnightlyMenuCulture": "Budaya",
"fortnightlyTrendingTechDesign": "DesainTeknologi",
"rallyBudgetDetailAmountLeft": "Jumlah Tersisa",
"fortnightlyHeadlineArmy": "Reformasi Internal Green Army",
"fortnightlyDescription": "Aplikasi berita yang fokus pada konten",
"rallyBillDetailAmountDue": "Jumlah Terutang",
"rallyBudgetDetailTotalCap": "Total Batasan",
"rallyBudgetDetailAmountUsed": "Jumlah yang Digunakan",
"fortnightlyTrendingHealthcareRevolution": "RevolusiPelayananKesehatan",
"fortnightlyMenuFrontPage": "Halaman Depan",
"fortnightlyMenuWorld": "Dunia",
"rallyBillDetailAmountPaid": "Jumlah yang Dibayarkan",
"fortnightlyMenuPolitics": "Politik",
"fortnightlyHeadlineBees": "Rendahnya Pasokan Lebah Pertanian",
"fortnightlyHeadlineGasoline": "Nasib Bensin di Masa Depan",
"fortnightlyTrendingGreenArmy": "GreenArmy",
"fortnightlyHeadlineFeminists": "Keberpihakan Kaum Feminis",
"fortnightlyHeadlineFabrics": "Desainer Menggunakan Teknologi untuk Membuat Kain Futuristis",
"fortnightlyHeadlineStocks": "Saham Stagnan, Mata Uang Diawasi",
"fortnightlyTrendingReform": "Perubahan",
"fortnightlyMenuTech": "Teknologi",
"fortnightlyHeadlineWar": "Kehidupan Orang Amerika yang Terbagi Selama Perang",
"fortnightlyHeadlineHealthcare": "Revolusi Perawatan Kesehatan yang Diam-Diam Semakin Canggih",
"fortnightlyLatestUpdates": "Kabar Terbaru",
"fortnightlyTrendingStocks": "Saham",
"rallyBillDetailTotalAmount": "Jumlah Total",
"demoCupertinoPickerDateTime": "Tanggal dan Waktu",
"signIn": "LOGIN",
"dataTableRowWithSugar": "{value} dengan gula",
"dataTableRowApplePie": "Pai apel",
"dataTableRowDonut": "Donat",
"dataTableRowHoneycomb": "Sarang lebah",
"dataTableRowLollipop": "Lollipop",
"dataTableRowJellyBean": "Jelly bean",
"dataTableRowGingerbread": "Kue jahe",
"dataTableRowCupcake": "Cupcake",
"dataTableRowEclair": "Eclair",
"dataTableRowIceCreamSandwich": "Sandwich es krim",
"dataTableRowFrozenYogurt": "Yoghurt beku",
"dataTableColumnIron": "Zat Besi (%)",
"dataTableColumnCalcium": "Kalsium (%)",
"dataTableColumnSodium": "Sodium (mg)",
"demoTimePickerTitle": "Alat Pilih Waktu",
"demo2dTransformationsResetTooltip": "Reset transformasi",
"dataTableColumnFat": "Lemak (g)",
"dataTableColumnCalories": "Kalori",
"dataTableColumnDessert": "Makanan penutup (1 porsi)",
"cardsDemoTravelDestinationLocation1": "Thanjavur, Tamil Nadu",
"demoTimePickerDescription": "Menampilkan dialog yang berisi pemilih waktu Desain Material.",
"demoPickersShowPicker": "TAMPILKAN ALAT PILIH",
"demoTabsScrollingTitle": "Scroll",
"demoTabsNonScrollingTitle": "Non-scroll",
"craneHours": "{hours,plural,=1{1 jam}other{{hours} jam}}",
"craneMinutes": "{minutes,plural,=1{1 mnt}other{{minutes} mnt}}",
"craneFlightDuration": "{hoursShortForm} {minutesShortForm}",
"dataTableHeader": "Gizi",
"demoDatePickerTitle": "Alat Pilih Tanggal",
"demoPickersSubtitle": "Pemilihan Tanggal dan Waktu",
"demoPickersTitle": "Alat Pilih",
"demo2dTransformationsEditTooltip": "Edit potongan foto",
"demoDataTableDescription": "Tabel data menampilkan informasi dalam baris dan kolom dengan format seperti petak. Tabel data menyusun informasi dengan format yang mudah dipindai, sehingga pengguna dapat dengan mudah mencari pola dan data.",
"demo2dTransformationsDescription": "Ketuk untuk mengedit potongan foto, dan gunakan gestur untuk berpindah antar-adegan. Tarik untuk menggeser, cubit untuk zoom, putar dengan dua jari. Tekan tombol reset untuk kembali ke orientasi awal.",
"demo2dTransformationsSubtitle": "Geser, zoom, putar",
"demo2dTransformationsTitle": "Transformasi 2D",
"demoCupertinoTextFieldPIN": "PIN",
"demoCupertinoTextFieldDescription": "Kolom teks tempat pengguna memasukkan teks, baik menggunakan keyboard hardware atau dengan keyboard di layar.",
"demoCupertinoTextFieldSubtitle": "Kolom teks gaya iOS",
"demoCupertinoTextFieldTitle": "Kolom teks",
"demoDatePickerDescription": "Menampilkan dialog yang berisi pemilih tanggal Desain Material.",
"demoCupertinoPickerTime": "Waktu",
"demoCupertinoPickerDate": "Tanggal",
"demoCupertinoPickerTimer": "Timer",
"demoCupertinoPickerDescription": "Widget alat pilih bergaya iOS yang dapat digunakan untuk memilih string, tanggal, waktu, atau kedua tanggal dan waktu sekaligus.",
"demoCupertinoPickerSubtitle": "Alat pilih bergaya iOS",
"demoCupertinoPickerTitle": "Alat Pilih",
"dataTableRowWithHoney": "{value} dengan madu",
"cardsDemoTravelDestinationCity2": "Chettinad",
"bannerDemoResetText": "Reset banner",
"bannerDemoMultipleText": "Beberapa tindakan",
"bannerDemoLeadingText": "Ikon Utama",
"dismiss": "TUTUP",
"cardsDemoTappable": "Dapat diketuk",
"cardsDemoSelectable": "Dapat dipilih (tekan lama)",
"cardsDemoExplore": "Temukan",
"cardsDemoExploreSemantics": "Jelajahi {destinationName}",
"cardsDemoShareSemantics": "Bagikan {destinationName}",
"cardsDemoTravelDestinationTitle1": "10 Kota Terpopuler yang Harus Dikunjungi di Tamil Nadu",
"cardsDemoTravelDestinationDescription1": "Nomor 10",
"cardsDemoTravelDestinationCity1": "Thanjavur",
"dataTableColumnProtein": "Protein (g)",
"cardsDemoTravelDestinationTitle2": "Pengrajin dari India Selatan",
"cardsDemoTravelDestinationDescription2": "Pemintal Sutra",
"bannerDemoText": "Sandi Anda diperbarui di perangkat lain. Harap login lagi.",
"cardsDemoTravelDestinationLocation2": "Sivaganga, Tamil Nadu",
"cardsDemoTravelDestinationTitle3": "Kuil Brihadisvara",
"cardsDemoTravelDestinationDescription3": "Kuil",
"demoBannerTitle": "Banner",
"demoBannerSubtitle": "Menampilkan banner dalam daftar",
"demoBannerDescription": "Banner menampilkan pesan penting yang ringkas, dan memberikan tindakan yang perlu dilakukan pengguna (atau menutup banner). Perlu tindakan pengguna untuk menutup banner.",
"demoCardTitle": "Kartu",
"demoCardSubtitle": "Kartu dasar dengan sudut membulat",
"demoCardDescription": "Kartu adalah selembar Bahan yang digunakan untuk menampilkan beberapa informasi terkait, misalnya album, lokasi geografis, makanan, detail kontak, dll.",
"demoDataTableTitle": "Tabel Data",
"demoDataTableSubtitle": "Baris dan kolom informasi",
"dataTableColumnCarbs": "Karbohidrat (g)",
"placeTanjore": "Tanjore",
"demoGridListsTitle": "Daftar Petak",
"placeFlowerMarket": "Pasar Bunga",
"placeBronzeWorks": "Kerajinan Perunggu",
"placeMarket": "Pasar",
"placeThanjavurTemple": "Kuil Thanjavur",
"placeSaltFarm": "Ladang Garam",
"placeScooters": "Skuter",
"placeSilkMaker": "Penenun Sutra",
"placeLunchPrep": "Persiapan Makan Siang",
"placeBeach": "Pantai",
"placeFisherman": "Nelayan",
"demoMenuSelected": "Dipilih: {value}",
"demoMenuRemove": "Hapus",
"demoMenuGetLink": "Dapatkan link",
"demoMenuShare": "Bagikan",
"demoBottomAppBarSubtitle": "Menampilkan navigasi dan tindakan di bagian bawah",
"demoMenuAnItemWithASectionedMenu": "Item dengan menu bagian",
"demoMenuADisabledMenuItem": "Item menu nonaktif",
"demoLinearProgressIndicatorTitle": "Indikator Progres Linear",
"demoMenuContextMenuItemOne": "Item menu konteks satu",
"demoMenuAnItemWithASimpleMenu": "Item dengan menu sederhana",
"demoCustomSlidersTitle": "Penggeser Kustom",
"demoMenuAnItemWithAChecklistMenu": "Item dengan menu checklist",
"demoCupertinoActivityIndicatorTitle": "Indikator aktivitas",
"demoCupertinoActivityIndicatorSubtitle": "Indikator aktivitas gaya iOS",
"demoCupertinoActivityIndicatorDescription": "Indikator aktivitas gaya iOS yang berputar searah jarum jam.",
"demoCupertinoNavigationBarTitle": "Menu navigasi",
"demoCupertinoNavigationBarSubtitle": "Menu navigasi gaya iOS",
"demoCupertinoNavigationBarDescription": "Menu navigasi gaya iOS. Menu navigasi adalah toolbar yang minimal berisi judul halaman, di bagian tengah toolbar.",
"demoCupertinoPullToRefreshTitle": "Tarik untuk memuat ulang",
"demoCupertinoPullToRefreshSubtitle": "Kontrol tarik untuk memuat ulang gaya iOS",
"demoCupertinoPullToRefreshDescription": "Widget yang mengimplementasikan kontrol terhadap konten tarik untuk memuat ulang gaya iOS.",
"demoProgressIndicatorTitle": "Indikator progres",
"demoProgressIndicatorSubtitle": "Linear, putar, tidak tentu",
"demoCircularProgressIndicatorTitle": "Indikator Progres Putar",
"demoCircularProgressIndicatorDescription": "Indikator progres putar Desain Material, yang berputar untuk menunjukkan bahwa aplikasi sedang sibuk.",
"demoMenuFour": "Empat",
"demoLinearProgressIndicatorDescription": "Indikator progres linear Desain Material, disebut juga status progres.",
"demoTooltipTitle": "Tooltip",
"demoTooltipSubtitle": "Pesan singkat yang ditampilkan saat menekan lama atau mengarahkan kursor",
"demoTooltipDescription": "Tooltip memberikan label teks yang membantu menjelaskan fungsi tombol atau tindakan antarmuka pengguna lainnya. Tooltip menampilkan teks informatif saat pengguna mengarahkan kursor, memfokuskan, atau menekan lama pada suatu elemen.",
"demoTooltipInstructions": "Tekan lama atau arahkan kursor untuk menampilkan tooltip.",
"placeChennai": "Chennai",
"demoMenuChecked": "Dicentang: {value}",
"placeChettinad": "Chettinad",
"demoMenuPreview": "Pratinjau",
"demoBottomAppBarTitle": "Panel aplikasi bawah",
"demoBottomAppBarDescription": "Panel aplikasi bawah memberikan akses ke maksimal empat tindakan, termasuk tombol tindakan mengambang, serta ke panel navigasi bawah.",
"bottomAppBarNotch": "Notch",
"bottomAppBarPosition": "Posisi Tombol Tindakan Mengambang",
"bottomAppBarPositionDockedEnd": "Tersemat - Ujung",
"bottomAppBarPositionDockedCenter": "Tersemat - Tengah",
"bottomAppBarPositionFloatingEnd": "Mengambang - Ujung",
"bottomAppBarPositionFloatingCenter": "Mengambang - Tengah",
"demoSlidersEditableNumericalValue": "Nilai angka yang dapat diedit",
"demoGridListsSubtitle": "Tata letak baris dan kolom",
"demoGridListsDescription": "Daftar Petak sangat cocok untuk menyajikan data homogen, biasanya berupa gambar. Setiap item dalam daftar petak disebut kotak.",
"demoGridListsImageOnlyTitle": "Hanya gambar",
"demoGridListsHeaderTitle": "Dengan header",
"demoGridListsFooterTitle": "Dengan footer",
"demoSlidersTitle": "Penggeser",
"demoSlidersSubtitle": "Widget untuk memilih nilai dengan menggeser",
"demoSlidersDescription": "Penggeser menunjukkan rentang nilai di sepanjang panel, tempat pengguna dapat memilih nilai tunggal. Penggeser cocok untuk menyesuaikan setelan seperti volume, kecerahan, atau menerapkan filter gambar.",
"demoRangeSlidersTitle": "Penggeser Rentang",
"demoRangeSlidersDescription": "Penggeser menunjukkan rentang nilai di sepanjang panel. Penggeser bisa memiliki ikon di kedua ujung panel yang menunjukkan rentang nilai. Penggeser cocok untuk menyesuaikan setelan seperti volume, kecerahan, atau menerapkan filter gambar.",
"demoMenuAnItemWithAContextMenuButton": "Item dengan menu konteks",
"demoCustomSlidersDescription": "Penggeser menunjukkan rentang nilai di sepanjang panel, tempat pengguna dapat memilih nilai tunggal atau rentang nilai. Penggeser dapat disesuaikan dan diubah temanya.",
"demoSlidersContinuousWithEditableNumericalValue": "Berkelanjutan dengan Nilai Angka yang Dapat Diedit",
"demoSlidersDiscrete": "Berlainan",
"demoSlidersDiscreteSliderWithCustomTheme": "Penggeser Berlainan dengan Tema Kustom",
"demoSlidersContinuousRangeSliderWithCustomTheme": "Penggeser Rentang Berkelanjutan dengan Tema Kustom",
"demoSlidersContinuous": "Berkelanjutan",
"placePondicherry": "Pondicherry",
"demoMenuTitle": "Menu",
"demoContextMenuTitle": "Menu konteks",
"demoSectionedMenuTitle": "Menu dengan bagian",
"demoSimpleMenuTitle": "Menu sederhana",
"demoChecklistMenuTitle": "Menu checklist",
"demoMenuSubtitle": "Tombol menu dan menu sederhana",
"demoMenuDescription": "Menu menampilkan daftar pilihan pada permukaan sementara Daftar tersebut muncul ketika pengguna berinteraksi dengan tombol, tindakan, atau kontrol lainnya.",
"demoMenuItemValueOne": "Item menu satu",
"demoMenuItemValueTwo": "Item menu dua",
"demoMenuItemValueThree": "Item menu tiga",
"demoMenuOne": "Satu",
"demoMenuTwo": "Dua",
"demoMenuThree": "Tiga",
"demoMenuContextMenuItemThree": "Item menu konteks tiga",
"demoCupertinoSwitchSubtitle": "Tombol akses gaya iOS",
"demoSnackbarsText": "Ini adalah snackbar.",
"demoCupertinoSliderSubtitle": "Penggeser gaya iOS",
"demoCupertinoSliderDescription": "Penggeser dapat digunakan untuk memilih kumpulan nilai berkelanjutan atau yang berlainan.",
"demoCupertinoSliderContinuous": "Berkelanjutan: {value}",
"demoCupertinoSliderDiscrete": "Berlainan: {value}",
"demoSnackbarsAction": "Anda menekan tindakan snackbar.",
"backToGallery": "Kembali ke Galeri",
"demoCupertinoTabBarTitle": "Bilah tab",
"demoCupertinoSwitchDescription": "Tombol akses digunakan untuk mengalihkan status aktif/nonaktif setelan tunggal.",
"demoSnackbarsActionButtonLabel": "TINDAKAN",
"cupertinoTabBarProfileTab": "Profil",
"demoSnackbarsButtonLabel": "TAMPILKAN SNACKBAR",
"demoSnackbarsDescription": "Snackbar memberi tahu pengguna proses yang telah dilakukan atau akan dilakukan aplikasi. Snackbar muncul sementara, di bagian bawah layar. Snackbar tidak akan mengganggu pengalaman pengguna, dan tidak memerlukan masukan pengguna agar dapat menghilang.",
"demoSnackbarsSubtitle": "Snackbar menampilkan pesan di bagian bawah layar",
"demoSnackbarsTitle": "Snackbar",
"demoCupertinoSliderTitle": "Penggeser",
"cupertinoTabBarChatTab": "Chat",
"cupertinoTabBarHomeTab": "Beranda",
"demoCupertinoTabBarDescription": "Panel tab navigasi bawah gaya iOS. Menampilkan beberapa tab dengan satu tab pertama yang aktif secara default.",
"demoCupertinoTabBarSubtitle": "Panel tab bawah gaya iOS",
"demoOptionsFeatureTitle": "Opsi tampilan",
"demoOptionsFeatureDescription": "Ketuk di sini guna melihat opsi yang tersedia untuk demo ini.",
"demoCodeViewerCopyAll": "SALIN SEMUA",
"shrineScreenReaderRemoveProductButton": "Hapus {product}",
"shrineScreenReaderProductAddToCart": "Tambahkan ke keranjang",
"shrineScreenReaderCart": "{quantity,plural,=0{Keranjang belanja, tidak ada item}=1{Keranjang belanja, 1 item}other{Keranjang belanja, {quantity} item}}",
"demoCodeViewerFailedToCopyToClipboardMessage": "Gagal menyalin ke papan klip: {error}",
"demoCodeViewerCopiedToClipboardMessage": "Disalin ke papan klip.",
"craneSleep8SemanticLabel": "Reruntuhan kota suku Maya di tebing di atas pantai",
"craneSleep4SemanticLabel": "Hotel tepi danau yang menghadap pegunungan",
"craneSleep2SemanticLabel": "Benteng Machu Picchu",
"craneSleep1SemanticLabel": "Chalet di lanskap bersalju dengan pepohonan hijau",
"craneSleep0SemanticLabel": "Bungalo apung",
"craneFly13SemanticLabel": "Kolam renang tepi laut yang terdapat pohon palem",
"craneFly12SemanticLabel": "Kolam renang yang terdapat pohon palem",
"craneFly11SemanticLabel": "Mercusuar bata di laut",
"craneFly10SemanticLabel": "Menara Masjid Al-Azhar saat matahari terbenam",
"craneFly9SemanticLabel": "Pria yang bersandar pada mobil antik warna biru",
"craneFly8SemanticLabel": "Supertree Grove",
"craneEat9SemanticLabel": "Meja kafe dengan kue-kue",
"craneEat2SemanticLabel": "Burger",
"craneFly5SemanticLabel": "Hotel tepi danau yang menghadap pegunungan",
"demoSelectionControlsSubtitle": "Kotak centang, tombol pilihan, dan tombol akses",
"craneEat10SemanticLabel": "Wanita yang memegang sandwich pastrami besar",
"craneFly4SemanticLabel": "Bungalo apung",
"craneEat7SemanticLabel": "Pintu masuk toko roti",
"craneEat6SemanticLabel": "Hidangan berbahan udang",
"craneEat5SemanticLabel": "Area tempat duduk restoran yang berseni",
"craneEat4SemanticLabel": "Makanan penutup berbahan cokelat",
"craneEat3SemanticLabel": "Taco korea",
"craneFly3SemanticLabel": "Benteng Machu Picchu",
"craneEat1SemanticLabel": "Bar kosong dengan bangku bergaya rumah makan",
"craneEat0SemanticLabel": "Pizza dalam oven berbahan bakar kayu",
"craneSleep11SemanticLabel": "Gedung pencakar langit Taipei 101",
"craneSleep10SemanticLabel": "Menara Masjid Al-Azhar saat matahari terbenam",
"craneSleep9SemanticLabel": "Mercusuar bata di laut",
"craneEat8SemanticLabel": "Sepiring udang laut",
"craneSleep7SemanticLabel": "Apartemen warna-warni di Ribeira Square",
"craneSleep6SemanticLabel": "Kolam renang yang terdapat pohon palem",
"craneSleep5SemanticLabel": "Tenda di lapangan",
"settingsButtonCloseLabel": "Tutup setelan",
"demoSelectionControlsCheckboxDescription": "Kotak centang memungkinkan pengguna memilih beberapa opsi dari suatu kumpulan. Nilai kotak centang normal adalah true atau false dan nilai kotak centang tristate juga dapat null.",
"settingsButtonLabel": "Setelan",
"demoListsTitle": "Daftar",
"demoListsSubtitle": "Tata letak daftar scroll",
"demoListsDescription": "Baris tunggal dengan ketinggian tetap yang biasanya berisi teks serta ikon di awal atau akhir.",
"demoOneLineListsTitle": "Satu Baris",
"demoTwoLineListsTitle": "Dua Baris",
"demoListsSecondary": "Teks sekunder",
"demoSelectionControlsTitle": "Kontrol pilihan",
"craneFly7SemanticLabel": "Gunung Rushmore",
"demoSelectionControlsCheckboxTitle": "Kotak centang",
"craneSleep3SemanticLabel": "Pria yang bersandar pada mobil antik warna biru",
"demoSelectionControlsRadioTitle": "Radio",
"demoSelectionControlsRadioDescription": "Tombol pilihan memungkinkan pengguna memilih salah satu opsi dari kumpulan. Gunakan tombol pilihan untuk pilihan eksklusif jika Anda merasa bahwa pengguna perlu melihat semua opsi yang tersedia secara berdampingan.",
"demoSelectionControlsSwitchTitle": "Tombol Akses",
"demoSelectionControlsSwitchDescription": "Tombol akses on/off mengalihkan status opsi setelan tunggal. Opsi yang dikontrol tombol akses, serta statusnya, harus dijelaskan dari label inline yang sesuai.",
"craneFly0SemanticLabel": "Chalet di lanskap bersalju dengan pepohonan hijau",
"craneFly1SemanticLabel": "Tenda di lapangan",
"craneFly2SemanticLabel": "Bendera doa menghadap gunung bersalju",
"craneFly6SemanticLabel": "Pemandangan udara Palacio de Bellas Artes",
"rallySeeAllAccounts": "Lihat semua rekening",
"rallyBillAmount": "Tagihan {billName} jatuh tempo pada {date} sejumlah {amount}.",
"shrineTooltipCloseCart": "Tutup keranjang",
"shrineTooltipCloseMenu": "Tutup menu",
"shrineTooltipOpenMenu": "Buka menu",
"shrineTooltipSettings": "Setelan",
"shrineTooltipSearch": "Penelusuran",
"demoTabsDescription": "Tab yang mengatur konten di beragam jenis layar, set data, dan interaksi lainnya.",
"demoTabsSubtitle": "Tab dengan tampilan yang dapat di-scroll secara terpisah",
"demoTabsTitle": "Tab",
"rallyBudgetAmount": "Anggaran {budgetName} dengan {amountUsed} yang digunakan dari jumlah total {amountTotal}, tersisa {amountLeft}",
"shrineTooltipRemoveItem": "Hapus item",
"rallyAccountAmount": "Rekening atas nama {accountName} dengan nomor {accountNumber} sejumlah {amount}.",
"rallySeeAllBudgets": "Lihat semua anggaran",
"rallySeeAllBills": "Lihat semua tagihan",
"craneFormDate": "Pilih Tanggal",
"craneFormOrigin": "Pilih Asal",
"craneFly2": "Khumbu Valley, Nepal",
"craneFly3": "Machu Picchu, Peru",
"craneFly4": "Malé, Maladewa",
"craneFly5": "Vitznau, Swiss",
"craneFly6": "Meksiko, Meksiko",
"craneFly7": "Gunung Rushmore, Amerika Serikat",
"settingsTextDirectionLocaleBased": "Berdasarkan lokal",
"craneFly9": "Havana, Kuba",
"craneFly10": "Kairo, Mesir",
"craneFly11": "Lisbon, Portugal",
"craneFly12": "Napa, Amerika Serikat",
"craneFly13": "Bali, Indonesia",
"craneSleep0": "Malé, Maladewa",
"craneSleep1": "Aspen, Amerika Serikat",
"craneSleep2": "Machu Picchu, Peru",
"demoCupertinoSegmentedControlTitle": "Kontrol tersegmen",
"craneSleep4": "Vitznau, Swiss",
"craneSleep5": "Big Sur, Amerika Serikat",
"craneSleep6": "Napa, Amerika Serikat",
"craneSleep7": "Porto, Portugal",
"craneSleep8": "Tulum, Meksiko",
"craneEat5": "Seoul, Korea Selatan",
"demoChipTitle": "Chip",
"demoChipSubtitle": "Elemen ringkas yang merepresentasikan masukan, atribut, atau tindakan",
"demoActionChipTitle": "Chip Tindakan",
"demoActionChipDescription": "Chip tindakan adalah sekumpulan opsi yang memicu tindakan terkait konten utama. Chip tindakan akan muncul secara dinamis dan kontekstual dalam UI.",
"demoChoiceChipTitle": "Choice Chip",
"demoChoiceChipDescription": "Choice chip merepresentasikan satu pilihan dari sekumpulan pilihan. Choice chip berisi teks deskriptif atau kategori yang terkait.",
"demoFilterChipTitle": "Filter Chip",
"demoFilterChipDescription": "Filter chip menggunakan tag atau kata deskriptif sebagai cara memfilter konten.",
"demoInputChipTitle": "Input Chip",
"demoInputChipDescription": "Input chip merepresentasikan informasi yang kompleks, seperti entitas (orang, tempat, atau barang) atau teks percakapan, dalam bentuk yang ringkas.",
"craneSleep9": "Lisbon, Portugal",
"craneEat10": "Lisbon, Portugal",
"demoCupertinoSegmentedControlDescription": "Digunakan untuk memilih sejumlah opsi yang sama eksklusifnya. Ketika satu opsi di kontrol tersegmen dipilih, opsi lain di kontrol tersegmen tidak lagi tersedia untuk dipilih.",
"chipTurnOnLights": "Nyalakan lampu",
"chipSmall": "Kecil",
"chipMedium": "Sedang",
"chipLarge": "Besar",
"chipElevator": "Elevator",
"chipWasher": "Mesin cuci",
"chipFireplace": "Perapian",
"chipBiking": "Bersepeda",
"craneFormDiners": "Makan Malam",
"rallyAlertsMessageUnassignedTransactions": "{count,plural,=1{Tingkatkan potensi potongan pajak Anda. Tetapkan kategori untuk 1 transaksi yang belum ditetapkan.}other{Tingkatkan potensi potongan pajak Anda. Tetapkan kategori untuk {count} transaksi yang belum ditetapkan.}}",
"craneFormTime": "Pilih Waktu",
"craneFormLocation": "Pilih Lokasi",
"craneFormTravelers": "Pelancong",
"craneEat8": "Atlanta, Amerika Serikat",
"craneFormDestination": "Pilih Tujuan",
"craneFormDates": "Pilih Tanggal",
"craneFly": "TERBANG",
"craneSleep": "TIDUR",
"craneEat": "MAKAN",
"craneFlySubhead": "Jelajahi Penerbangan berdasarkan Tujuan",
"craneSleepSubhead": "Jelajahi Properti berdasarkan Tujuan",
"craneEatSubhead": "Jelajahi Restoran berdasarkan Tujuan",
"craneFlyStops": "{numberOfStops,plural,=0{Nonstop}=1{1 transit}other{{numberOfStops} transit}}",
"craneSleepProperties": "{totalProperties,plural,=0{Tidak Ada Properti yang Tersedia}=1{1 Properti Tersedia}other{{totalProperties} Properti Tersedia}}",
"craneEatRestaurants": "{totalRestaurants,plural,=0{Tidak Ada Restoran}=1{1 Restoran}other{{totalRestaurants} Restoran}}",
"craneFly0": "Aspen, Amerika Serikat",
"demoCupertinoSegmentedControlSubtitle": "Kontrol tersegmen gaya iOS",
"craneSleep10": "Kairo, Mesir",
"craneEat9": "Madrid, Spanyol",
"craneFly1": "Big Sur, Amerika Serikat",
"craneEat7": "Nashville, Amerika Serikat",
"craneEat6": "Seattle, Amerika Serikat",
"craneFly8": "Singapura",
"craneEat4": "Paris, Prancis",
"craneEat3": "Portland, Amerika Serikat",
"craneEat2": "Córdoba, Argentina",
"craneEat1": "Dallas, Amerika Serikat",
"craneEat0": "Naples, Italia",
"craneSleep11": "Taipei, Taiwan",
"craneSleep3": "Havana, Kuba",
"shrineLogoutButtonCaption": "LOGOUT",
"rallyTitleBills": "TAGIHAN",
"rallyTitleAccounts": "REKENING",
"shrineProductVagabondSack": "Ransel vagabond",
"rallyAccountDetailDataInterestYtd": "Bunga YTD",
"shrineProductWhitneyBelt": "Sabuk Whitney",
"shrineProductGardenStrand": "Garden strand",
"shrineProductStrutEarrings": "Anting-anting Strut",
"shrineProductVarsitySocks": "Kaus kaki varsity",
"shrineProductWeaveKeyring": "Gantungan kunci tenun",
"shrineProductGatsbyHat": "Topi gatsby",
"shrineProductShrugBag": "Tas bahu",
"shrineProductGiltDeskTrio": "Gilt desk trio",
"shrineProductCopperWireRack": "Rak kawat tembaga",
"shrineProductSootheCeramicSet": "Set keramik soothe",
"shrineProductHurrahsTeaSet": "Set alat minum teh Hurrahs",
"shrineProductBlueStoneMug": "Mug blue stone",
"shrineProductRainwaterTray": "Penampung air hujan",
"shrineProductChambrayNapkins": "Kain serbet chambray",
"shrineProductSucculentPlanters": "Tanaman sukulen",
"shrineProductQuartetTable": "Meja kuartet",
"shrineProductKitchenQuattro": "Kitchen quattro",
"shrineProductClaySweater": "Sweter warna tanah liat",
"shrineProductSeaTunic": "Tunik warna laut",
"shrineProductPlasterTunic": "Tunik plaster",
"rallyBudgetCategoryRestaurants": "Restoran",
"shrineProductChambrayShirt": "Kemeja chambray",
"shrineProductSeabreezeSweater": "Sweter warna laut",
"shrineProductGentryJacket": "Jaket gentry",
"shrineProductNavyTrousers": "Celana panjang navy",
"shrineProductWalterHenleyWhite": "Walter henley (putih)",
"shrineProductSurfAndPerfShirt": "Kaus surf and perf",
"shrineProductGingerScarf": "Syal warna jahe",
"shrineProductRamonaCrossover": "Crossover Ramona",
"shrineProductClassicWhiteCollar": "Kemeja kerah putih klasik",
"shrineProductSunshirtDress": "Baju terusan sunshirt",
"rallyAccountDetailDataInterestRate": "Suku Bunga",
"rallyAccountDetailDataAnnualPercentageYield": "Persentase Hasil Tahunan",
"rallyAccountDataVacation": "Liburan",
"shrineProductFineLinesTee": "Kaus fine lines",
"rallyAccountDataHomeSavings": "Tabungan untuk Rumah",
"rallyAccountDataChecking": "Giro",
"rallyAccountDetailDataInterestPaidLastYear": "Bunga yang Dibayarkan Tahun Lalu",
"rallyAccountDetailDataNextStatement": "Rekening Koran Selanjutnya",
"rallyAccountDetailDataAccountOwner": "Pemilik Akun",
"rallyBudgetCategoryCoffeeShops": "Kedai Kopi",
"rallyBudgetCategoryGroceries": "Minimarket",
"shrineProductCeriseScallopTee": "Kaus scallop merah ceri",
"rallyBudgetCategoryClothing": "Pakaian",
"rallySettingsManageAccounts": "Kelola Akun",
"rallyAccountDataCarSavings": "Tabungan untuk Mobil",
"rallySettingsTaxDocuments": "Dokumen Pajak",
"rallySettingsPasscodeAndTouchId": "Kode sandi dan Touch ID",
"rallySettingsNotifications": "Notifikasi",
"rallySettingsPersonalInformation": "Informasi Pribadi",
"rallySettingsPaperlessSettings": "Setelan Tanpa Kertas",
"rallySettingsFindAtms": "Temukan ATM",
"rallySettingsHelp": "Bantuan",
"rallySettingsSignOut": "Logout",
"rallyAccountTotal": "Total",
"rallyBillsDue": "Batas Waktu",
"rallyBudgetLeft": "Tersisa",
"rallyAccounts": "Rekening",
"rallyBills": "Tagihan",
"rallyBudgets": "Anggaran",
"rallyAlerts": "Notifikasi",
"rallySeeAll": "LIHAT SEMUA",
"rallyFinanceLeft": "TERSISA",
"rallyTitleOverview": "RINGKASAN",
"shrineProductShoulderRollsTee": "Kaus shoulder rolls",
"shrineNextButtonCaption": "BERIKUTNYA",
"rallyTitleBudgets": "ANGGARAN",
"rallyTitleSettings": "SETELAN",
"rallyLoginLoginToRally": "Login ke Rally",
"rallyLoginNoAccount": "Belum punya akun?",
"rallyLoginSignUp": "DAFTAR",
"rallyLoginUsername": "Nama pengguna",
"rallyLoginPassword": "Sandi",
"rallyLoginLabelLogin": "Login",
"rallyLoginRememberMe": "Ingat Saya",
"rallyLoginButtonLogin": "LOGIN",
"rallyAlertsMessageHeadsUpShopping": "Perhatian, Anda telah menggunakan {percent} dari anggaran Belanja untuk bulan ini.",
"rallyAlertsMessageSpentOnRestaurants": "Anda telah menghabiskan {amount} di Restoran minggu ini.",
"rallyAlertsMessageATMFees": "Anda telah menghabiskan {amount} biaya penggunaan ATM bulan ini",
"rallyAlertsMessageCheckingAccount": "Kerja bagus. Rekening giro Anda {percent} lebih tinggi daripada bulan sebelumnya.",
"shrineMenuCaption": "MENU",
"shrineCategoryNameAll": "SEMUA",
"shrineCategoryNameAccessories": "AKSESORI",
"shrineCategoryNameClothing": "PAKAIAN",
"shrineCategoryNameHome": "RUMAH",
"shrineLoginUsernameLabel": "Nama pengguna",
"shrineLoginPasswordLabel": "Sandi",
"shrineCancelButtonCaption": "BATAL",
"shrineCartTaxCaption": "Pajak:",
"shrineCartPageCaption": "KERANJANG",
"shrineProductQuantity": "Kuantitas: {quantity}",
"shrineProductPrice": "x {price}",
"shrineCartItemCount": "{quantity,plural,=0{TIDAK ADA ITEM}=1{1 ITEM}other{{quantity} ITEM}}",
"shrineCartClearButtonCaption": "KOSONGKAN KERANJANG",
"shrineCartTotalCaption": "TOTAL",
"shrineCartSubtotalCaption": "Subtotal:",
"shrineCartShippingCaption": "Pengiriman:",
"shrineProductGreySlouchTank": "Tank top jatuh warna abu-abu",
"shrineProductStellaSunglasses": "Kacamata hitam Stella",
"shrineProductWhitePinstripeShirt": "Kaus pinstripe putih",
"demoTextFieldWhereCanWeReachYou": "Ke mana kami dapat menghubungi Anda?",
"settingsTextDirectionLTR": "LTR",
"settingsTextScalingLarge": "Besar",
"demoBottomSheetHeader": "Header",
"demoBottomSheetItem": "Item {value}",
"demoBottomTextFieldsTitle": "Kolom teks",
"demoTextFieldTitle": "Kolom teks",
"demoTextFieldSubtitle": "Baris tunggal teks dan angka yang dapat diedit",
"demoTextFieldDescription": "Kolom teks memungkinkan pengguna memasukkan teks menjadi UI. UI tersebut biasanya muncul dalam bentuk formulir dan dialog.",
"demoTextFieldShowPasswordLabel": "Tampilkan sandi",
"demoTextFieldHidePasswordLabel": "Sembunyikan sandi",
"demoTextFieldFormErrors": "Perbaiki error dalam warna merah sebelum mengirim.",
"demoTextFieldNameRequired": "Nama wajib diisi.",
"demoTextFieldOnlyAlphabeticalChars": "Masukkan karakter alfabet saja.",
"demoTextFieldEnterUSPhoneNumber": "(###) ###-#### - Masukkan nomor telepon AS.",
"demoTextFieldEnterPassword": "Masukkan sandi.",
"demoTextFieldPasswordsDoNotMatch": "Sandi tidak cocok",
"demoTextFieldWhatDoPeopleCallYou": "Apa nama panggilan Anda?",
"demoTextFieldNameField": "Nama*",
"demoBottomSheetButtonText": "TAMPILKAN SHEET BAWAH",
"demoTextFieldPhoneNumber": "Nomor telepon*",
"demoBottomSheetTitle": "Sheet bawah",
"demoTextFieldEmail": "Email",
"demoTextFieldTellUsAboutYourself": "Ceritakan diri Anda (misalnya, tuliskan kegiatan atau hobi Anda)",
"demoTextFieldKeepItShort": "Jangan terlalu panjang, ini hanya demo.",
"starterAppGenericButton": "TOMBOL",
"demoTextFieldLifeStory": "Kisah hidup",
"demoTextFieldSalary": "Gaji",
"demoTextFieldUSD": "USD",
"demoTextFieldNoMoreThan": "Maksimal 8 karakter.",
"demoTextFieldPassword": "Sandi*",
"demoTextFieldRetypePassword": "Ketik ulang sandi*",
"demoTextFieldSubmit": "KIRIM",
"demoBottomNavigationSubtitle": "Navigasi bawah dengan tampilan cross-fading",
"demoBottomSheetAddLabel": "Tambahkan",
"demoBottomSheetModalDescription": "Sheet bawah modal adalah alternatif untuk menu atau dialog dan akan mencegah pengguna berinteraksi dengan bagian lain aplikasi.",
"demoBottomSheetModalTitle": "Sheet bawah modal",
"demoBottomSheetPersistentDescription": "Sheet bawah persisten akan menampilkan informasi yang melengkapi konten utama aplikasi. Sheet bawah persisten akan tetap terlihat bahkan saat pengguna berinteraksi dengan bagian lain aplikasi.",
"demoBottomSheetPersistentTitle": "Sheet bawah persisten",
"demoBottomSheetSubtitle": "Sheet bawah persisten dan modal",
"demoTextFieldNameHasPhoneNumber": "Nomor telepon {name} adalah {phoneNumber}",
"buttonText": "TOMBOL",
"demoTypographyDescription": "Definisi berbagai gaya tipografi yang ditemukan dalam Desain Material.",
"demoTypographySubtitle": "Semua gaya teks yang sudah ditentukan",
"demoTypographyTitle": "Tipografi",
"demoFullscreenDialogDescription": "Properti fullscreenDialog akan menentukan apakah halaman selanjutnya adalah dialog modal layar penuh atau bukan",
"demoFlatButtonDescription": "Tombol datar akan menampilkan percikan tinta saat ditekan tetapi tidak terangkat. Gunakan tombol datar pada toolbar, dalam dialog, dan bagian dari padding",
"demoBottomNavigationDescription": "Menu navigasi bawah menampilkan tiga hingga lima tujuan di bagian bawah layar. Tiap tujuan direpresentasikan dengan ikon dan label teks opsional. Jika ikon navigasi bawah diketuk, pengguna akan dialihkan ke tujuan navigasi tingkat teratas yang terkait dengan ikon tersebut.",
"demoBottomNavigationSelectedLabel": "Label terpilih",
"demoBottomNavigationPersistentLabels": "Label persisten",
"starterAppDrawerItem": "Item {value}",
"demoTextFieldRequiredField": "* menunjukkan kolom wajib diisi",
"demoBottomNavigationTitle": "Navigasi bawah",
"settingsLightTheme": "Terang",
"settingsTheme": "Tema",
"settingsPlatformIOS": "iOS",
"settingsPlatformAndroid": "Android",
"settingsTextDirectionRTL": "RTL",
"settingsTextScalingHuge": "Sangat besar",
"cupertinoButton": "Tombol",
"settingsTextScalingNormal": "Normal",
"settingsTextScalingSmall": "Kecil",
"settingsSystemDefault": "Sistem",
"settingsTitle": "Setelan",
"rallyDescription": "Aplikasi keuangan pribadi",
"aboutDialogDescription": "Untuk melihat kode sumber aplikasi ini, buka {repoLink}.",
"bottomNavigationCommentsTab": "Komentar",
"starterAppGenericBody": "Isi",
"starterAppGenericHeadline": "Judul",
"starterAppGenericSubtitle": "Subtitel",
"starterAppGenericTitle": "Judul",
"starterAppTooltipSearch": "Telusuri",
"starterAppTooltipShare": "Bagikan",
"starterAppTooltipFavorite": "Favorit",
"starterAppTooltipAdd": "Tambahkan",
"bottomNavigationCalendarTab": "Kalender",
"starterAppDescription": "Tata letak awal yang responsif",
"starterAppTitle": "Aplikasi awal",
"aboutFlutterSamplesRepo": "Repositori GitHub sampel flutter",
"bottomNavigationContentPlaceholder": "Placeholder untuk tab {title}",
"bottomNavigationCameraTab": "Kamera",
"bottomNavigationAlarmTab": "Alarm",
"bottomNavigationAccountTab": "Akun",
"demoTextFieldYourEmailAddress": "Alamat email Anda",
"demoToggleButtonDescription": "Tombol yang dapat digunakan untuk opsi terkait grup. Untuk mempertegas grup tombol yang terkait, sebuah grup harus berbagi container yang sama",
"colorsGrey": "ABU-ABU",
"colorsBrown": "COKELAT",
"colorsDeepOrange": "ORANYE TUA",
"colorsOrange": "ORANYE",
"colorsAmber": "AMBER",
"colorsYellow": "KUNING",
"colorsLime": "HIJAU LIMAU",
"colorsLightGreen": "HIJAU MUDA",
"colorsGreen": "HIJAU",
"homeHeaderGallery": "Galeri",
"homeHeaderCategories": "Kategori",
"shrineDescription": "Aplikasi retail yang modern",
"craneDescription": "Aplikasi perjalanan yang dipersonalisasi",
"homeCategoryReference": "GAYA & LAINNYA",
"demoInvalidURL": "Tidak dapat menampilkan URL:",
"demoOptionsTooltip": "Opsi",
"demoInfoTooltip": "Info",
"demoCodeTooltip": "Kode Demo",
"demoDocumentationTooltip": "Dokumentasi API",
"demoFullscreenTooltip": "Layar Penuh",
"settingsTextScaling": "Penskalaan teks",
"settingsTextDirection": "Arah teks",
"settingsLocale": "Lokal",
"settingsPlatformMechanics": "Mekanik platform",
"settingsDarkTheme": "Gelap",
"settingsSlowMotion": "Gerak lambat",
"settingsAbout": "Tentang Flutter Gallery",
"settingsFeedback": "Kirimkan masukan",
"settingsAttribution": "Didesain oleh TOASTER di London",
"demoButtonTitle": "Tombol",
"demoButtonSubtitle": "Teks, timbul, outline, dan banyak lagi",
"demoFlatButtonTitle": "Tombol Datar",
"demoRaisedButtonDescription": "Tombol timbul menambahkan dimensi ke sebagian besar tata letak datar. Tombol tersebut mempertegas fungsi pada ruang yang sibuk atau lapang.",
"demoRaisedButtonTitle": "Tombol Timbul",
"demoOutlineButtonTitle": "Tombol Outline",
"demoOutlineButtonDescription": "Tombol outline akan menjadi buram dan terangkat saat ditekan. Tombol tersebut sering dipasangkan dengan tombol timbul untuk menandakan tindakan kedua dan alternatif.",
"demoToggleButtonTitle": "Tombol",
"colorsTeal": "HIJAU KEBIRUAN",
"demoFloatingButtonTitle": "Tombol Tindakan Mengambang",
"demoFloatingButtonDescription": "Tombol tindakan mengambang adalah tombol dengan ikon lingkaran yang mengarahkan kursor ke atas konten untuk melakukan tindakan utama dalam aplikasi.",
"demoDialogTitle": "Dialog",
"demoDialogSubtitle": "Sederhana, notifikasi, dan layar penuh",
"demoAlertDialogTitle": "Notifikasi",
"demoAlertDialogDescription": "Dialog notifikasi akan memberitahukan situasi yang memerlukan konfirmasi kepada pengguna. Dialog notifikasi memiliki judul opsional dan daftar tindakan opsional.",
"demoAlertTitleDialogTitle": "Notifikasi dengan Judul",
"demoSimpleDialogTitle": "Sederhana",
"demoSimpleDialogDescription": "Dialog sederhana akan menawarkan pilihan di antara beberapa opsi kepada pengguna. Dialog sederhana memiliki judul opsional yang ditampilkan di atas pilihan tersebut.",
"demoFullscreenDialogTitle": "Layar Penuh",
"demoCupertinoButtonsTitle": "Tombol",
"demoCupertinoButtonsSubtitle": "Tombol gaya iOS",
"demoCupertinoButtonsDescription": "Tombol gaya iOS. Tombol ini berisi teks dan/atau ikon yang akan memudar saat disentuh. Dapat memiliki latar belakang.",
"demoCupertinoAlertsTitle": "Notifikasi",
"demoCupertinoAlertsSubtitle": "Dialog notifikasi gaya iOS",
"demoCupertinoAlertTitle": "Notifikasi",
"demoCupertinoAlertDescription": "Dialog notifikasi akan memberitahukan situasi yang memerlukan konfirmasi kepada pengguna. Dialog notifikasi memiliki judul, konten, dan daftar tindakan yang opsional. Judul ditampilkan di atas konten dan tindakan ditampilkan di bawah konten.",
"demoCupertinoAlertWithTitleTitle": "Notifikasi dengan Judul",
"demoCupertinoAlertButtonsTitle": "Notifikasi dengan Tombol",
"demoCupertinoAlertButtonsOnlyTitle": "Hanya Tombol Notifikasi",
"demoCupertinoActionSheetTitle": "Sheet Tindakan",
"demoCupertinoActionSheetDescription": "Sheet tindakan adalah gaya khusus notifikasi yang menghadirkan serangkaian dua atau beberapa pilihan terkait dengan konteks saat ini kepada pengguna. Sheet tindakan dapat memiliki judul, pesan tambahan, dan daftar tindakan.",
"demoColorsTitle": "Warna",
"demoColorsSubtitle": "Semua warna yang telah ditentukan",
"demoColorsDescription": "Warna dan konstanta model warna yang merepresentasikan palet warna Desain Material.",
"buttonTextEnabled": "ENABLED",
"buttonTextDisabled": "DISABLED",
"buttonTextCreate": "Buat",
"dialogSelectedOption": "Anda memilih: \"{value}\"",
"dialogDiscardTitle": "Hapus draf?",
"dialogLocationTitle": "Gunakan layanan lokasi Google?",
"dialogLocationDescription": "Izinkan Google membantu aplikasi menentukan lokasi. Ini berarti data lokasi anonim akan dikirimkan ke Google, meskipun tidak ada aplikasi yang berjalan.",
"dialogCancel": "BATAL",
"dialogDiscard": "HAPUS",
"dialogDisagree": "TIDAK SETUJU",
"dialogAgree": "SETUJU",
"dialogSetBackup": "Setel akun pencadangan",
"colorsBlueGrey": "BIRU KEABU-ABUAN",
"dialogShow": "TAMPILKAN DIALOG",
"dialogFullscreenTitle": "Dialog Layar Penuh",
"dialogFullscreenSave": "SIMPAN",
"dialogFullscreenDescription": "Demo dialog layar penuh",
"cupertinoButtonEnabled": "Enabled",
"cupertinoButtonDisabled": "Disabled",
"cupertinoButtonWithBackground": "Dengan Latar Belakang",
"cupertinoAlertCancel": "Batal",
"cupertinoAlertDiscard": "Hapus",
"cupertinoAlertLocationTitle": "Izinkan \"Maps\" mengakses lokasi Anda selagi Anda menggunakan aplikasi?",
"cupertinoAlertLocationDescription": "Lokasi Anda saat ini akan ditampilkan di peta dan digunakan untuk rute, hasil penelusuran di sekitar, dan estimasi waktu tempuh.",
"cupertinoAlertAllow": "Izinkan",
"cupertinoAlertDontAllow": "Jangan Izinkan",
"cupertinoAlertFavoriteDessert": "Pilih Makanan Penutup Favorit",
"cupertinoAlertDessertDescription": "Silakan pilih jenis makanan penutup favorit Anda dari daftar di bawah ini. Pilihan Anda akan digunakan untuk menyesuaikan daftar saran tempat makan di area Anda.",
"cupertinoAlertCheesecake": "Kue Keju",
"cupertinoAlertTiramisu": "Tiramisu",
"cupertinoAlertApplePie": "Pai Apel",
"cupertinoAlertChocolateBrownie": "Brownies Cokelat",
"cupertinoShowAlert": "Tampilkan Notifikasi",
"colorsRed": "MERAH",
"colorsPink": "MERAH MUDA",
"colorsPurple": "UNGU",
"colorsDeepPurple": "UNGU TUA",
"colorsIndigo": "NILA",
"colorsBlue": "BIRU",
"colorsLightBlue": "BIRU MUDA",
"colorsCyan": "BIRU KEHIJAUAN",
"dialogAddAccount": "Tambahkan akun",
"Gallery": "Galeri",
"Categories": "Kategori",
"SHRINE": "TEMPAT ZIARAH",
"Basic shopping app": "Aplikasi belanja dasar",
"RALLY": "RELI",
"CRANE": "CRANE",
"Travel app": "Aplikasi wisata",
"MATERIAL": "MATERIAL",
"CUPERTINO": "CUPERTINO",
"REFERENCE STYLES & MEDIA": "FORMAT PENGUTIPAN & MEDIA"
}
| 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": "शोध फील्ड दर्शवा",
"demoCupertinoPicker": "पिकर",
"demoCupertinoSearchTextFieldSubtitle": "iOS च्या शैलीतील शोध मजकूर फील्ड",
"demoCupertinoSearchTextFieldDescription": "शोध मजकूर फील्ड, जे वापरकर्त्याला मजकूर एंटर करून शोधू देते आणि जे सूचना देऊ व फिल्टर करू शकते.",
"demoCupertinoSearchTextFieldPlaceholder": "काही मजकूर एंटर करा",
"demoCupertinoScrollbarTitle": "स्क्रोलबार",
"demoCupertinoScrollbarSubtitle": "iOS च्या शैलीतील स्क्रोलबार",
"demoCupertinoScrollbarDescription": "दिलेल्या चाइल्डला रॅप करणारा स्क्रोलबार",
"demoTwoPaneItem": "आयटम {value}",
"demoTwoPaneList": "सूची",
"demoTwoPaneFoldableLabel": "फोल्ड करता येण्यासारखे",
"demoTwoPaneSmallScreenLabel": "लहान स्क्रीन",
"demoTwoPaneSmallScreenDescription": "लहान स्क्रीन डिव्हाइसवर TwoPane हे अशाप्रकारे काम करते.",
"demoTwoPaneTabletLabel": "टॅबलेट / डेस्कटॉप",
"demoTwoPaneTabletDescription": "टॅबलेट किंवा डेस्कटॉप यांसारख्या मोठ्या स्क्रीनवर TwoPane हे अशाप्रकारे काम करते.",
"demoTwoPaneTitle": "TwoPane",
"demoTwoPaneSubtitle": "फोल्ड करता येण्यासारख्या, मोठ्या आणि लहान स्क्रीनवरील सत्वर प्रतिसाद देणारे लेआउट",
"splashSelectDemo": "डेमो निवडा",
"demoTwoPaneFoldableDescription": "फोल्ड करता येण्यासारख्या डिव्हाइसवर TwoPane हे अशाप्रकारे काम करते.",
"demoTwoPaneDetails": "तपशील",
"demoTwoPaneSelectItem": "आयटम निवडणे",
"demoTwoPaneItemDetails": "आयटम {value} तपशील",
"demoCupertinoContextMenuActionText": "कॉंटेक्स्ट मेनू पाहण्यासाठी फ्लटर लोगोवर टॅप करून धरून ठेवा.",
"demoCupertinoContextMenuDescription": "iOS शैलीतील फुल स्क्रीन कॉंटेक्स्ट स्वरूपातील मेनू जो एखादा घटक जास्त वेळ प्रेस करून ठेवल्यावर दिसतो.",
"demoAppBarTitle": "अॅप बार",
"demoAppBarDescription": "अॅप बार सध्याच्या स्क्रीनसंबंधित आशय आणि कृती दाखवतो. तो ब्रँडिंग, स्क्रीन शीर्षक, नेव्हिगेशन आणि कृतींसाठी वापरले जातो",
"demoDividerTitle": "विभाजक",
"demoDividerSubtitle": "विभाजक ही एक बारीक रेषा आहे जी सूची आणि लेआउट यांनुसार आशय गटबद्ध करते.",
"demoDividerDescription": "विभाजक सूची, ड्रॉवर आणि इतर ठिकणी आशय वेगळे करण्यासाठी वापरले जाऊ शकतात.",
"demoVerticalDividerTitle": "व्हर्टिकल विभाजक",
"demoCupertinoContextMenuTitle": "काँटेक्स्ट मेनू",
"demoCupertinoContextMenuSubtitle": "iOS शैलीतील कॉंटेक्स्ट मेनू",
"demoAppBarSubtitle": "सध्याच्या स्क्रीनसंबंधित माहिती आणि कृती दाखवते",
"demoCupertinoContextMenuActionOne": "पहिली कृती",
"demoCupertinoContextMenuActionTwo": "दुसरी कृती",
"demoDateRangePickerDescription": "मटेरियल डिझाइन याची तारीख रेंज पिकर असलेला डायलॉग दाखवतो.",
"demoDateRangePickerTitle": "तारीख रेंज पिकर",
"demoNavigationDrawerUserName": "वापरकर्त्याचे नाव",
"demoNavigationDrawerUserEmail": "[email protected]",
"demoNavigationDrawerText": "ड्रॉवर पाहण्यासाठी कडेने स्वाइप करा किंवा डावीकडील वरच्या आयकनवर टॅप करा",
"demoNavigationRailTitle": "नेव्हिगेशन रेल",
"demoNavigationRailSubtitle": "ॲपमध्ये नेव्हिगेशन रेल दाखवत आहे",
"demoNavigationRailDescription": "मटेरियल विजेट हे काही व्ह्यूंमध्ये नेव्हिगेट करण्यासाठी वापरले जाते, हे ॲपच्या डावीकडे किंवा उजवीकडे दाखवले जाणे अपेक्षित आहे तसेच यामध्ये साधारणतः तीन ते पाच व्ह्यू असतात.",
"demoNavigationRailFirst": "पहिले",
"demoNavigationDrawerTitle": "नेव्हिगेशन ड्रॉवर",
"demoNavigationRailThird": "तिसरे",
"replyStarredLabel": "तारांकित",
"demoTextButtonDescription": "मजकुराचे बटण प्रेस केल्यावर ते शाई उडवताना दाखवते पण, ते वर उचलत नाही. टूलबार, डायलॉगमध्ये आणि पॅडिंगसह इनलाइनमध्ये मजकुराची बटणे वापरा",
"demoElevatedButtonTitle": "एलेव्हेटेड बटण",
"demoElevatedButtonDescription": "एलेव्हेटेड बटणे सहसा फ्लॅट लेआउटना डायमेंशन देऊन उत्तम बनवण्यात मदत करतात. ती भरीव किंवा रूंद जागांवर केली जाणारी कार्य उत्तमप्रकारे दाखवतात.",
"demoOutlinedButtonTitle": "आउटलाइन्ड बटण",
"demoOutlinedButtonDescription": "आउटलाइन्ड बटणे दाबल्यानंतर अपारदर्शक होतात आणि वर उचचली जातात. एखादी पर्यायी, दुसरी क्रिया दाखवण्यासाठी ते सहसा उंच बटणांसोबत जोडली जातात.",
"demoContainerTransformDemoInstructions": "कार्ड, सूची आणि FAB",
"demoNavigationDrawerSubtitle": "अॅपबारमध्ये ड्रॉवर दाखवत आहे",
"replyDescription": "कार्यक्षम, उपयुक्त ईमेल अॅप",
"demoNavigationDrawerDescription": "मटेरिअल डिझाइन पॅनल हे एखाद्या अॅप्लिकेशनमधील नेव्हिगेशन लिंक दाखवतात, जे स्क्रीनच्या डाव्या किंंवा उजव्या कडेने स्लाइड केल्यावर दिसते.",
"replyDraftsLabel": "मसुदे",
"demoNavigationDrawerToPageOne": "पहिला आयटम",
"replyInboxLabel": "इनबॉक्स",
"demoSharedXAxisDemoInstructions": "पुढील आणि मागील बटणे",
"replySpamLabel": "स्पॅम",
"replyTrashLabel": "ट्रॅश",
"replySentLabel": "पाठवले",
"demoNavigationRailSecond": "दुसरे",
"demoNavigationDrawerToPageTwo": "दुसरा आयटम",
"demoFadeScaleDemoInstructions": "मोडल आणि FAB",
"demoFadeThroughDemoInstructions": "तळाचे नेव्हिगेशन",
"demoSharedZAxisDemoInstructions": "सेटिंग्ज आयकन बटण",
"demoSharedYAxisDemoInstructions": "\"अलीकडे प्ले केलेली\" यानुसार क्रमाने लावा",
"demoTextButtonTitle": "मजकूर बटण",
"demoSharedZAxisBeefSandwichRecipeTitle": "बीफ सँडविच",
"demoSharedZAxisDessertRecipeDescription": "डेझर्टची पाककृती",
"demoSharedYAxisAlbumTileSubtitle": "कलाकार",
"demoSharedYAxisAlbumTileTitle": "अल्बम",
"demoSharedYAxisRecentSortTitle": "अलीकडे प्ले केलेले",
"demoSharedYAxisAlphabeticalSortTitle": "A-Z",
"demoSharedYAxisAlbumCount": "२६८ अल्बम",
"demoSharedYAxisTitle": "शेअर केलेला y अक्ष",
"demoSharedXAxisCreateAccountButtonText": "खाते तयार करा",
"demoFadeScaleAlertDialogDiscardButton": "काढून टाका",
"demoSharedXAxisSignInTextFieldLabel": "ईमेल किंवा फोन नंबर",
"demoSharedXAxisSignInSubtitleText": "तुमचे खाते वापरून साइन इन करा",
"demoSharedXAxisSignInWelcomeText": "हाय David Park",
"demoSharedXAxisIndividualCourseSubtitle": "वैयक्तिकरित्या दाखवलेला",
"demoSharedXAxisBundledCourseSubtitle": "बंडल केलेले",
"demoFadeThroughAlbumsDestination": "अल्बम",
"demoSharedXAxisDesignCourseTitle": "डिझाइन",
"demoSharedXAxisIllustrationCourseTitle": "इलस्ट्रेशन",
"demoSharedXAxisBusinessCourseTitle": "व्यवसाय",
"demoSharedXAxisArtsAndCraftsCourseTitle": "कला आणि हस्तकला",
"demoMotionPlaceholderSubtitle": "दुय्यम मजकूर",
"demoFadeScaleAlertDialogCancelButton": "रद्द करा",
"demoFadeScaleAlertDialogHeader": "सूचना डायलॉग",
"demoFadeScaleHideFabButton": "फॅब लपवा",
"demoFadeScaleShowFabButton": "फॅब दाखवा",
"demoFadeScaleShowAlertDialogButton": "मोडल दाखवा",
"demoFadeScaleDescription": "फेड पॅटर्न हा स्क्रीनच्या सीमेमध्ये येणाऱ्या किंवा त्याच्या बाहेर जाणाऱ्या UI घटकांसाठी वापरला जातो जसे की, स्क्रीनच्या मध्यभागी फेड होणारा डायलॉग.",
"demoFadeScaleTitle": "फेड",
"demoFadeThroughTextPlaceholder": "१२३ फोटो",
"demoFadeThroughSearchDestination": "Search",
"demoFadeThroughPhotosDestination": "फोटो",
"demoSharedXAxisCoursePageSubtitle": "बंडल केलेल्या वर्गवाऱ्या तुमच्या फीडमध्ये गट म्हणून दिसतात. तुम्ही हे कधीही बदलू शकता.",
"demoFadeThroughDescription": "फेड थ्रू पॅटर्न हा एकमेकांशी घट्ट संबंध नसलेल्या UI घटकांदरम्यान बदल करण्यासाठी वापरला जातो.",
"demoFadeThroughTitle": "फेड थ्रू",
"demoSharedZAxisHelpSettingLabel": "मदत",
"demoMotionSubtitle": "बदलाचे सर्व पूर्वनिर्धारित पॅटर्न",
"demoSharedZAxisNotificationSettingLabel": "सूचना",
"demoSharedZAxisProfileSettingLabel": "प्रोफाइल",
"demoSharedZAxisSavedRecipesListTitle": "सेव्ह केलेल्या पाककृती",
"demoSharedZAxisBeefSandwichRecipeDescription": "बीफ सँडविचची पाककृती",
"demoSharedZAxisCrabPlateRecipeDescription": "खेकड्याची पाककृती",
"demoSharedXAxisCoursePageTitle": "तुमचे कोर्स सुलभ करा",
"demoSharedZAxisCrabPlateRecipeTitle": "खेकडा",
"demoSharedZAxisShrimpPlateRecipeDescription": "कोळंबीची पाककृती",
"demoSharedZAxisShrimpPlateRecipeTitle": "कोळंबी",
"demoContainerTransformTypeFadeThrough": "फेड थ्रू",
"demoSharedZAxisDessertRecipeTitle": "डेझर्ट",
"demoSharedZAxisSandwichRecipeDescription": "सँडविचची पाककृती",
"demoSharedZAxisSandwichRecipeTitle": "सँडविच",
"demoSharedZAxisBurgerRecipeDescription": "बर्गरची पाककृती",
"demoSharedZAxisBurgerRecipeTitle": "बर्गर",
"demoSharedZAxisSettingsPageTitle": "सेटिंग्ज",
"demoSharedZAxisTitle": "शेअर केलेला z अक्ष",
"demoSharedZAxisPrivacySettingLabel": "गोपनीयता",
"demoMotionTitle": "मोशन",
"demoContainerTransformTitle": "कंटेनर ट्रान्सफॉर्म",
"demoContainerTransformDescription": "कंटेनर ट्रान्सफॉर्म पॅटर्न हा कंटेनरचा समावेश असलेल्या UI घटकांदरम्यान बदल करण्यासाठी तयार केला आहे. हा पॅटर्न दोन UI घटकांदरम्यान दृश्यमान कनेक्शन तयार करतो",
"demoContainerTransformModalBottomSheetTitle": "फेड मोड",
"demoContainerTransformTypeFade": "फेड",
"demoSharedYAxisAlbumTileDurationUnit": "मिनिट",
"demoMotionPlaceholderTitle": "शीर्षक",
"demoSharedXAxisForgotEmailButtonText": "ईमेल विसरलात का?",
"demoMotionSmallPlaceholderSubtitle": "दुय्यम",
"demoMotionDetailsPageTitle": "तपशीलांचे पेज",
"demoMotionListTileTitle": "सूची आयटम",
"demoSharedAxisDescription": "अक्षाचा शेअर केलेला पॅटर्न हा जागा आणि नेव्हिगेशनशी संबंध असलेल्या UI घटकांदरम्यान बदल करण्यासाठी वापरला जातो. हा पॅटर्न घटकांमधील संबंध अधिक बळकट करण्यासाठी x, y, किंवा z अक्षावर एक शेअर केलेले रूपांतरण वापरतो.",
"demoSharedXAxisTitle": "शेअर केलेला x अक्ष",
"demoSharedXAxisBackButtonText": "मागे",
"demoSharedXAxisNextButtonText": "पुढे",
"demoSharedXAxisCulinaryCourseTitle": "पाककला",
"githubRepo": "{repoName} GitHub रीपॉझिटरी",
"fortnightlyMenuUS": "यूएस",
"fortnightlyMenuBusiness": "व्यवसाय",
"fortnightlyMenuScience": "विज्ञान",
"fortnightlyMenuSports": "क्रीडा",
"fortnightlyMenuTravel": "प्रवास",
"fortnightlyMenuCulture": "संस्कृती",
"fortnightlyTrendingTechDesign": "TechDesign",
"rallyBudgetDetailAmountLeft": "शिल्लक रक्कम",
"fortnightlyHeadlineArmy": "ग्रीन आर्मीमधील चांगले बदल",
"fortnightlyDescription": "एका आशयावर केंद्रित असलेले बातम्यांचे ॲप",
"rallyBillDetailAmountDue": "भरायची असलेली रक्कम",
"rallyBudgetDetailTotalCap": "खर्चावरील एकूण मर्यादा",
"rallyBudgetDetailAmountUsed": "वापरलेली रक्कम",
"fortnightlyTrendingHealthcareRevolution": "HealthcareRevolution",
"fortnightlyMenuFrontPage": "मुख्य पेज",
"fortnightlyMenuWorld": "विश्व",
"rallyBillDetailAmountPaid": "भरलेली रक्कम",
"fortnightlyMenuPolitics": "राजकारण",
"fortnightlyHeadlineBees": "शेतीसाठी उपयुक्त असणाऱ्या मधमाश्यांच्या संख्येमध्ये घट",
"fortnightlyHeadlineGasoline": "गॅसोलीनचे भविष्य",
"fortnightlyTrendingGreenArmy": "GreenArmy",
"fortnightlyHeadlineFeminists": "पक्षपाताविरूद्ध महिलांचा दृष्टिकोन",
"fortnightlyHeadlineFabrics": "सर्वोत्तम कपडे बनवण्यासाठी डिझाइनर घेतात तंत्रज्ञानाची मदत",
"fortnightlyHeadlineStocks": "शेअर मार्केटचा विकास थांबल्यावर अनेकजण चलन बाजारावर आशा ठेवतात",
"fortnightlyTrendingReform": "Reform",
"fortnightlyMenuTech": "तंत्रज्ञान",
"fortnightlyHeadlineWar": "युद्धाच्या वेळी विभाजित झालेल्या अमेरिकन लोकांचे जीवन",
"fortnightlyHeadlineHealthcare": "आरोग्य क्षेत्रामधील छोटे पण महत्त्वपूर्ण बदल",
"fortnightlyLatestUpdates": "नवीनतम अपडेट",
"fortnightlyTrendingStocks": "Stocks",
"rallyBillDetailTotalAmount": "एकूण रक्कम",
"demoCupertinoPickerDateTime": "तारीख आणि वेळ",
"signIn": "साइन इन करा",
"dataTableRowWithSugar": "साखरेचा समावेश असलेले {value}",
"dataTableRowApplePie": "अॅपल पाय",
"dataTableRowDonut": "डोनट",
"dataTableRowHoneycomb": "हनीकोंब",
"dataTableRowLollipop": "लॉलिपॉप",
"dataTableRowJellyBean": "जेली बीन",
"dataTableRowGingerbread": "जिंजरब्रेड",
"dataTableRowCupcake": "कपकेक",
"dataTableRowEclair": "इक्लेअर",
"dataTableRowIceCreamSandwich": "आइस्क्रीम सँडविच",
"dataTableRowFrozenYogurt": "फ्रोझन योगर्ट",
"dataTableColumnIron": "आयरन (%)",
"dataTableColumnCalcium": "कॅल्शिअम (%)",
"dataTableColumnSodium": "सोडियम (मिग्रॅ)",
"demoTimePickerTitle": "वेळ पिकर",
"demo2dTransformationsResetTooltip": "रुपांतरे रीसेट करा",
"dataTableColumnFat": "चरबी (ग्रॅ)",
"dataTableColumnCalories": "कॅलरी",
"dataTableColumnDessert": "डिझर्ट (१)",
"cardsDemoTravelDestinationLocation1": "तंजावर, तामिळनाडू",
"demoTimePickerDescription": "मटेरियल डिझाइन ची वेळ पिकर असलेला डायलॉग दाखवतो.",
"demoPickersShowPicker": "पिकर दाखवा",
"demoTabsScrollingTitle": "स्क्रोल करणारा",
"demoTabsNonScrollingTitle": "स्क्रोल न करणारा",
"craneHours": "{hours,plural,=1{१ता}other{{hours}ता}}",
"craneMinutes": "{minutes,plural,=1{१मि}other{{minutes}मि}}",
"craneFlightDuration": "{hoursShortForm} {minutesShortForm}",
"dataTableHeader": "पोषण",
"demoDatePickerTitle": "तारीख पिकर",
"demoPickersSubtitle": "तारीख आणि वेळ निवड",
"demoPickersTitle": "पिकर",
"demo2dTransformationsEditTooltip": "टाइल संपादित करा",
"demoDataTableDescription": "डेटा सारण्या पंक्ती आणि स्तंभांच्या ग्रिड सारख्या फॉरमॅटमध्ये माहिती प्रदर्शित करतात. स्कॅन करणे सोपे असेल अशाप्रकारे ते माहिती व्यवस्थापित करतात, जेणेकरून वापरकर्ते नमुने आणि इनसाइट शोधू शकतील.",
"demo2dTransformationsDescription": "टाइल संपादित करण्यासाठी टॅप करा आणि देखाव्याभोवती फिरण्यासाठी जेश्चर वापरा. पॅन करण्यासाठी ड्रॅग करा, झूम करण्यासाठी पिंच करा, दोन बोटांनी फिरवा. सुरुवातीच्या ओरिएंटेशनवर पुन्हा जाण्यासाठी रीसेट बटण प्रेस करा.",
"demo2dTransformationsSubtitle": "पॅन करा, झूम करा, फिरवा",
"demo2dTransformationsTitle": "2D रुपांतरे",
"demoCupertinoTextFieldPIN": "पिन",
"demoCupertinoTextFieldDescription": "मजकूर फील्ड वापरकर्त्याला हार्डवेअर कीबोर्ड किंवा ऑनस्क्रीन कीबोर्ड वापरून मजकूर एंटर करू देते.",
"demoCupertinoTextFieldSubtitle": "iOS-शैलीतील मजकूर भाग",
"demoCupertinoTextFieldTitle": "मजकूर भाग",
"demoDatePickerDescription": "मटेरियल डिझाइन ची तारीख पिकर असलेला डायलॉग दाखवतो.",
"demoCupertinoPickerTime": "वेळ",
"demoCupertinoPickerDate": "तारीख",
"demoCupertinoPickerTimer": "टायमर",
"demoCupertinoPickerDescription": "स्ट्रिंग, तारीख, वेळ किंवा तारीख आणि वेळ हे दोन्ही निवडण्यासाठी वापरले जाणारे एक iOS च्या शैलीतील पिकर विजेट.",
"demoCupertinoPickerSubtitle": "iOS च्या शैलीतील पिकर",
"demoCupertinoPickerTitle": "पिकर",
"dataTableRowWithHoney": "मधाचा समावेश असलेले {value}",
"cardsDemoTravelDestinationCity2": "चेट्टीनाड",
"bannerDemoResetText": "बॅनर रीसेट करा",
"bannerDemoMultipleText": "एकाहून अधिक कृती",
"bannerDemoLeadingText": "सुरुवातीचा आयकन",
"dismiss": "डिसमिस करा",
"cardsDemoTappable": "टॅप करण्यायोग्य",
"cardsDemoSelectable": "निवडण्यायोग्य (दाबून ठेवा)",
"cardsDemoExplore": "एक्सप्लोर करा",
"cardsDemoExploreSemantics": "एक्सप्लोर करा {destinationName}",
"cardsDemoShareSemantics": "शेअर करा {destinationName}",
"cardsDemoTravelDestinationTitle1": "तामिळनाडू मध्ये भेट देण्यासाठी टॉप १० शहरे",
"cardsDemoTravelDestinationDescription1": "नंबर १०",
"cardsDemoTravelDestinationCity1": "तंजावर",
"dataTableColumnProtein": "प्रथिने (ग्रॅ)",
"cardsDemoTravelDestinationTitle2": "दक्षिण भारतातील कारागीर",
"cardsDemoTravelDestinationDescription2": "सिल्क स्पिनर",
"bannerDemoText": "तुमचा पासवर्ड तुमच्या इतर डिव्हाइसवर अपडेट केला गेला आहे. कृपया पुन्हा साइन इन करा.",
"cardsDemoTravelDestinationLocation2": "शिवगंगा, तामिळनाडू",
"cardsDemoTravelDestinationTitle3": "बृहदेश्वर मंदिर",
"cardsDemoTravelDestinationDescription3": "मंदिरे",
"demoBannerTitle": "बॅनर",
"demoBannerSubtitle": "सूचीमध्ये एक बॅनर प्रदर्शित करत आहे",
"demoBannerDescription": "बॅनर एक महत्त्वपूर्ण, संक्षिप्त मेसेज प्रदर्शित करतो आणि वापरकर्त्यांना सांगण्यासाठी क्रिया पुरवतो (किंवा बॅनर डिसमिस करतो). ते डिसमिस करण्यासाठी वापरकर्त्याची कृती आवश्यक आहे.",
"demoCardTitle": "कार्डे",
"demoCardSubtitle": "गोलाकार कोपरे असलेली बेसलाइन कार्डे",
"demoCardDescription": "कार्ड म्हणजे मटेरियल ची एक शीट आहे जी काही संबंधित माहितीचे प्रतिनिधित्व करण्यासाठी वापरली जाते, उदाहरणार्थ एखादा अल्बम, भौगोलिक स्थान, जेवण, संपर्क तपशील इ.",
"demoDataTableTitle": "डेटा सारण्या",
"demoDataTableSubtitle": "माहिती असलेल्या पंक्ती आणि स्तंभ",
"dataTableColumnCarbs": "कर्बोदके (ग्रॅ)",
"placeTanjore": "तंजोर",
"demoGridListsTitle": "ग्रिड सूची",
"placeFlowerMarket": "फुल मार्केट",
"placeBronzeWorks": "काशासंबंधित काम",
"placeMarket": "मार्केट",
"placeThanjavurTemple": "तंजावर मंदिर",
"placeSaltFarm": "मीठागर",
"placeScooters": "स्कूटर",
"placeSilkMaker": "सिल्क मेकर",
"placeLunchPrep": "जेवणासाठी खाद्यपदार्थ",
"placeBeach": "समुद्रकिनारा",
"placeFisherman": "कोळी",
"demoMenuSelected": "निवडलेले: {value}",
"demoMenuRemove": "काढा",
"demoMenuGetLink": "लिंक मिळवा",
"demoMenuShare": "शेअर करा",
"demoBottomAppBarSubtitle": "नेव्हिगेशन आणि अॅक्शन तळाशी दाखवते",
"demoMenuAnItemWithASectionedMenu": "विभागाचा मेनू असलेला एक आयटम",
"demoMenuADisabledMenuItem": "मेनू आयटम बंद केला",
"demoLinearProgressIndicatorTitle": "लिनिअर प्रगती इंडिकेटर",
"demoMenuContextMenuItemOne": "कॉंटेक्स्ट मेनू आयटम एक",
"demoMenuAnItemWithASimpleMenu": "सोपा मेनू असलेला एक आयटम",
"demoCustomSlidersTitle": "कस्टम स्लायडर",
"demoMenuAnItemWithAChecklistMenu": "चेकलिस्ट मेनू असलेला एक आयटम",
"demoCupertinoActivityIndicatorTitle": "अॅक्टिव्हिटी इंडिकेटर",
"demoCupertinoActivityIndicatorSubtitle": "iOS शैलीतील अॅक्टिव्हिटी इंडिकेटर",
"demoCupertinoActivityIndicatorDescription": "एक iOS शैलीतील घड्याळाच्या काट्याच्या दिशेने गोल फिरणारे अॅक्टिव्हिटी इंडिकेटर",
"demoCupertinoNavigationBarTitle": "नॅव्हिगेशन बार",
"demoCupertinoNavigationBarSubtitle": "iOS शैलीतील नेव्हिगेशन बार",
"demoCupertinoNavigationBarDescription": "एक iOS शैलीतील नेव्हिगेशन बार. नेव्हिगेशन बार हा असा टूलबार आहे ज्यामध्ये टूलबारच्या मधोमध किमान पेजच्या शीर्षकाचा समावेश आहे.",
"demoCupertinoPullToRefreshTitle": "रिफ्रेश करण्यासाठी ओढा",
"demoCupertinoPullToRefreshSubtitle": "iOS शैलीचे रिफ्रेश करण्यासाठी ओढा नियंत्रण",
"demoCupertinoPullToRefreshDescription": "iOS शैलीचे रीफ्रेश करण्यासाठी ओढामधील आशय नियंत्रण याची अंमलबजावणी करणारे विजेट.",
"demoProgressIndicatorTitle": "प्रगती इंडिकेटर",
"demoProgressIndicatorSubtitle": "लिनिअर, परिपत्रक, अनिश्चित",
"demoCircularProgressIndicatorTitle": "परिपत्रक प्रगती इंडिकेटर",
"demoCircularProgressIndicatorDescription": "अॅप्लिकेशन काम करत आहे हे दाखवण्यासाठी गोल फिरणारे मटेरिअल डिझाइन परिपत्रक प्रगती इंडिकेटर आहे.",
"demoMenuFour": "चार",
"demoLinearProgressIndicatorDescription": "प्रगती बारला मटेरिअल डिझाइन लिनिअर प्रगती इंडिकेटर म्हणूनदेखील ओळखले जाते.",
"demoTooltipTitle": "टूलटिप",
"demoTooltipSubtitle": "प्रेस करून ठेवल्यावर किंवा फिरवल्यावर लहान मेसेज दाखवला जाईल",
"demoTooltipDescription": "टूलटिप्स मजकूर लेबले पुरवतात जी बटणाचे कार्य किंवा इतर यूझर इंटरफेस कृतीचे स्पष्टीकरण देण्यात मदत करतात. वापरकर्ते एखाद्या घटकावर फिरवतात, त्यावर लक्ष केंद्रित करतात किंवा प्रेस करून ठेवतात तेव्हा टूलटिप्स माहितीपूर्ण मजकूर प्रदर्शित करतात.",
"demoTooltipInstructions": "टूलटिप डिस्प्ले करण्यासाठी प्रेस करून ठेवा किंवा फिरवा.",
"placeChennai": "चेन्नई",
"demoMenuChecked": "तपासलेले: {value}",
"placeChettinad": "चेट्टीनाड",
"demoMenuPreview": "पूर्वावलोकन",
"demoBottomAppBarTitle": "तळाशी ॲप बार",
"demoBottomAppBarDescription": "तळाशी असलेले बार तळाच्या नेव्हिगेशन ड्रॉवरचा आणि फ्लोटिंग अॅक्शन बटणाच्या समावेशासह कमाल चार अॅक्शनचा अॅक्सेस देते.",
"bottomAppBarNotch": "नॉच",
"bottomAppBarPosition": "फ्लोटिंग अॅक्शन बटणाचे स्थान",
"bottomAppBarPositionDockedEnd": "डॉक केलेले - शेवटी",
"bottomAppBarPositionDockedCenter": "डॉक केलेले - मध्यभागी",
"bottomAppBarPositionFloatingEnd": "फ्लोटिंग - शेवटी",
"bottomAppBarPositionFloatingCenter": "फ्लोटिंग - मध्यभागी",
"demoSlidersEditableNumericalValue": "संपादित करण्यायोग्य मूल्य",
"demoGridListsSubtitle": "पंक्ती आणि स्तंभाचा लेआउट",
"demoGridListsDescription": "एकसारखा डेटा खासकरून इमेज सादर करण्यासाठी ग्रिड सूची अधिक योग्य आहेत. ग्रिड सूचीमधील प्रत्येक आयटमला टाइल म्हणतात.",
"demoGridListsImageOnlyTitle": "फक्त इमेज",
"demoGridListsHeaderTitle": "हेडरसह",
"demoGridListsFooterTitle": "फूटरसह",
"demoSlidersTitle": "स्लायडर",
"demoSlidersSubtitle": "स्वाइप करून एखादे मूल्य निवडण्यासाठी विजेट",
"demoSlidersDescription": "स्लाइडर बारच्या बरोबरीने मूल्यांच्या रेंज दाखवतात, ज्यामधून वापरकर्ते एखादे मूल्य निवडू शकतात. व्हॉल्यूम, ब्राइटनेस किंवा इमेज फिल्टर लागू करणे यांसारख्या अॅडजस्ट करणाऱ्या सेटिंग्जसाठी ते उत्तम आहेत.",
"demoRangeSlidersTitle": "रेंज स्लायडर",
"demoRangeSlidersDescription": "स्लाइडर एका बारसह मूल्यांच्या रेंज दाखवतात. त्यांच्याकडे बारच्या दोन्ही टोकांवर मूल्यांच्या रेंज दाखवणारी चिन्हे असू शकतात. व्हॉल्यूम, ब्राइटनेस किंवा इमेज फिल्टर लागू करणे यांसारख्या अॅडजस्ट करणाऱ्या सेटिंग्जसाठी ते उत्तम आहेत.",
"demoMenuAnItemWithAContextMenuButton": "कॉंटेक्स्ट मेनू असलेला एक आयटम",
"demoCustomSlidersDescription": "स्लाइडर बारच्या बरोबरीने मूल्यांच्या रेंज दाखवतात, ज्यामधून वापरकर्ते एखादे मूल्य किंवा मूल्यांची रेंज निवडू शकतात. स्लाइडर थीम आणि कस्टमाइझ केली जाऊ शकतात.",
"demoSlidersContinuousWithEditableNumericalValue": "संपादित करण्यायोग्य सांख्यिकीय मूल्यासह सतत",
"demoSlidersDiscrete": "वेगळे",
"demoSlidersDiscreteSliderWithCustomTheme": "कस्टम थीमसह वेगळे स्लायडर",
"demoSlidersContinuousRangeSliderWithCustomTheme": "कस्टम थीमसह सतत असणारा रेंज स्लायडर",
"demoSlidersContinuous": "सतत",
"placePondicherry": "पाँडिचेरी",
"demoMenuTitle": "मेनू",
"demoContextMenuTitle": "काँटेक्स्ट मेनू",
"demoSectionedMenuTitle": "विभागित मेनू",
"demoSimpleMenuTitle": "सोपा मेनू",
"demoChecklistMenuTitle": "चेकलिस्ट मेनू",
"demoMenuSubtitle": "मेनू बटण आणि सोपा मेनू",
"demoMenuDescription": "मेनू तात्पुरत्या पृष्ठभागावर निवडींची एक सूची दाखवतो. वापरकर्ते बटण, कृती किंवा अन्य नियंत्रणे वापरून संवाद साधतात तेव्हा ते दिसतात.",
"demoMenuItemValueOne": "पहिला मेनू आयटम",
"demoMenuItemValueTwo": "दुसरा मेनू आयटम",
"demoMenuItemValueThree": "तिसरा मेनू आयटम",
"demoMenuOne": "एक",
"demoMenuTwo": "दोन",
"demoMenuThree": "तीन",
"demoMenuContextMenuItemThree": "कॉंटेक्स्ट मेनू आयटम तीन",
"demoCupertinoSwitchSubtitle": "iOS-शैली स्विच",
"demoSnackbarsText": "हा एक स्नॅकबार आहे.",
"demoCupertinoSliderSubtitle": "iOS-शैली स्लायडर",
"demoCupertinoSliderDescription": "स्लायडरचा वापर सलग किंवा भिन्न मूल्यांच्या संचामधून निवडण्यासाठी केला जाऊ शकतो.",
"demoCupertinoSliderContinuous": "सतत: {value}",
"demoCupertinoSliderDiscrete": "भिन्न: {value}",
"demoSnackbarsAction": "तुम्ही स्नॅकबार ॲक्शन दाबले आहे.",
"backToGallery": "गॅलरी मध्ये परत जा",
"demoCupertinoTabBarTitle": "टॅब बार",
"demoCupertinoSwitchDescription": "एका सेटिंगची सुरू/बंद स्थिती टॉगल करण्यासाठी स्विचचा वापर केला जातो.",
"demoSnackbarsActionButtonLabel": "अॅक्शन",
"cupertinoTabBarProfileTab": "प्रोफाइल",
"demoSnackbarsButtonLabel": "स्नॅकबार दाखवा",
"demoSnackbarsDescription": "स्नॅकबार प्रक्रिया वापरकर्त्यांना ॲप काम करत आहे किंवा काम करेल याची माहिती देते. ते स्क्रीनच्या तळाशी तात्पुरते दिसतात. ते वापरकर्त्याच्या अनुभवात व्यत्यय आणत नाही आणि त्यांना वापरकर्ता इनपुट अदृश्य करण्याची आवश्यकता नाही.",
"demoSnackbarsSubtitle": "स्नॅकबार स्क्रीनच्या तळाशी संदेश दाखवतात",
"demoSnackbarsTitle": "स्नॅकबार",
"demoCupertinoSliderTitle": "स्लायडर",
"cupertinoTabBarChatTab": "चॅट",
"cupertinoTabBarHomeTab": "होम",
"demoCupertinoTabBarDescription": "एक iOS-शैलीतील तळाशी नेव्हिगेशन टॅब बार. एक टॅब सुरू असताना एकाहून अधिक टॅब दाखवते, पहिला टॅब बाय डीफॉल्ट असतो.",
"demoCupertinoTabBarSubtitle": "iOS- शैलीतील तळाशी टॅब बार",
"demoOptionsFeatureTitle": "पर्याय पहा",
"demoOptionsFeatureDescription": "या डेमोसाठी उपलब्ध असलेले पर्याय पाहण्यासाठी येथे टॅप करा.",
"demoCodeViewerCopyAll": "सर्व कॉपी करा",
"shrineScreenReaderRemoveProductButton": "{product} काढून टाका",
"shrineScreenReaderProductAddToCart": "कार्टमध्ये जोडा",
"shrineScreenReaderCart": "{quantity,plural,=0{खरेदीचा कार्ट, कोणतेही आयटम नाहीत}=1{खरेदीचा कार्ट, एक आयटम आहे}other{खरेदीचा कार्ट, {quantity} आयटम आहेत}}",
"demoCodeViewerFailedToCopyToClipboardMessage": "क्लिपबोर्डवर कॉपी करता आला नाही: {error}",
"demoCodeViewerCopiedToClipboardMessage": "क्लिपबोर्डवर कॉपी केला.",
"craneSleep8SemanticLabel": "समुद्रकिनाऱ्याच्याबाजूला उंच डोंगरावर असलेले मायन संस्कृतीतील अवशेष",
"craneSleep4SemanticLabel": "डोंगरांसमोर वसलेले तलावाशेजारचे हॉटेल",
"craneSleep2SemanticLabel": "माचू पिचू बालेकिल्ला",
"craneSleep1SemanticLabel": "सदाहरित झाडे असलेल्या बर्फाळ प्रदेशातील शॅले",
"craneSleep0SemanticLabel": "पाण्यावरील तरंगते बंगले",
"craneFly13SemanticLabel": "पामच्या झाडांच्या सान्निध्यातील समुद्रकिनाऱ्याच्या बाजूला असलेला पूल",
"craneFly12SemanticLabel": "पामच्या झाडांच्या सान्निध्यातील पूल",
"craneFly11SemanticLabel": "समुद्रात असलेले विटांचे दीपगृह",
"craneFly10SemanticLabel": "सूर्यास्ताच्या वेळी दिसणारे अल-अजहर मशिदीचे मिनार",
"craneFly9SemanticLabel": "जुन्या काळातील एका निळ्या कारला टेकून उभा असलेला माणूस",
"craneFly8SemanticLabel": "सुपरट्री ग्रोव्ह",
"craneEat9SemanticLabel": "पेस्ट्री ठेवलेला कॅफे काउंटर",
"craneEat2SemanticLabel": "बर्गर",
"craneFly5SemanticLabel": "डोंगरांसमोर वसलेले तलावाशेजारचे हॉटेल",
"demoSelectionControlsSubtitle": "चेकबॉक्स, रेडिओ बटणे आणि स्विच",
"craneEat10SemanticLabel": "भलेमोठे पास्रामी सॅंडविच धरलेली महिला",
"craneFly4SemanticLabel": "पाण्यावरील तरंगते बंगले",
"craneEat7SemanticLabel": "बेकरीचे प्रवेशव्दार",
"craneEat6SemanticLabel": "कोळंबीची डिश",
"craneEat5SemanticLabel": "कलात्मक रेस्टॉरंटमधील बसण्याची जागा",
"craneEat4SemanticLabel": "चॉकलेट डेझर्ट",
"craneEat3SemanticLabel": "कोरियन टाको",
"craneFly3SemanticLabel": "माचू पिचू बालेकिल्ला",
"craneEat1SemanticLabel": "डिनर स्टाइल स्टुल असलेला रिकामा बार",
"craneEat0SemanticLabel": "लाकडाचे इंधन असलेल्या ओव्हनमधील पिझ्झा",
"craneSleep11SemanticLabel": "गगनचुंबी तैपेई १०१ इमारत",
"craneSleep10SemanticLabel": "सूर्यास्ताच्या वेळी दिसणारे अल-अजहर मशिदीचे मिनार",
"craneSleep9SemanticLabel": "समुद्रात असलेले विटांचे दीपगृह",
"craneEat8SemanticLabel": "क्रॉफिशने भरलेली प्लेट",
"craneSleep7SemanticLabel": "रिबेरिया स्क्वेअरमधील रंगीत अपार्टमेंट",
"craneSleep6SemanticLabel": "पामच्या झाडांच्या सान्निध्यातील पूल",
"craneSleep5SemanticLabel": "माळरानावरचा टेंट",
"settingsButtonCloseLabel": "सेटिंग्ज बंद करा",
"demoSelectionControlsCheckboxDescription": "चेकबॉक्स हे संचामधून एकाहून अधिक पर्याय निवडण्याची अनुमती देतात. सामान्य चेकबॉक्सचे मूल्य खरे किंवा खोटे असते आणि ट्रायस्टेट चेकबॉक्सचे मूल्य शून्यदेखील असू शकते.",
"settingsButtonLabel": "सेटिंग्ज",
"demoListsTitle": "सूची",
"demoListsSubtitle": "सूची स्क्रोल करण्याचा लेआउट",
"demoListsDescription": "एका निश्चित केलेल्या उंच पंक्तीमध्ये सामान्यतः थोड्या मजकुराचा तसेच एखादा लीडिंग किंवा ट्रेलिंग आयकनचा समावेश असतो.",
"demoOneLineListsTitle": "एक ओळ",
"demoTwoLineListsTitle": "दोन ओळी",
"demoListsSecondary": "दुय्यम मजकूर",
"demoSelectionControlsTitle": "निवडीची नियंत्रणे",
"craneFly7SemanticLabel": "माउंट रशमोअर",
"demoSelectionControlsCheckboxTitle": "चेकबॉक्स",
"craneSleep3SemanticLabel": "जुन्या काळातील एका निळ्या कारला टेकून उभा असलेला माणूस",
"demoSelectionControlsRadioTitle": "रेडिओ",
"demoSelectionControlsRadioDescription": "रेडिओ बटणे वापरकर्त्याला संचामधून एक पर्याय निवडण्याची अनुमती देतात. वापरकर्त्याला त्याचवेळी सर्व उपलब्ध पर्याय पाहायचे आहेत असे तुम्हाला वाटत असल्यास, विशेष निवडीसाठी रेडिओ बटणे वापरा.",
"demoSelectionControlsSwitchTitle": "स्विच",
"demoSelectionControlsSwitchDescription": "स्विच सुरू/बंद करणे हे सिंगल सेटिंग्ज पर्यायाची स्थिती टॉगल करते. स्विच नियंत्रित करतो तो पर्याय, तसेच त्यामध्ये त्याची स्थिती ही संबंधित इनलाइन लेबलनुसार स्पष्ट करावी.",
"craneFly0SemanticLabel": "सदाहरित झाडे असलेल्या बर्फाळ प्रदेशातील शॅले",
"craneFly1SemanticLabel": "माळरानावरचा टेंट",
"craneFly2SemanticLabel": "बर्फाळ डोंगरासमोरील प्रेअर फ्लॅग",
"craneFly6SemanticLabel": "पलासिओ दे बेयास आर्तेसचे विहंगम दृश्य",
"rallySeeAllAccounts": "सर्व खाती पहा",
"rallyBillAmount": "{billName} च्या {amount} च्या बिलाची शेवटची तारीख {date} आहे.",
"shrineTooltipCloseCart": "कार्ट बंद करा",
"shrineTooltipCloseMenu": "मेनू बंद करा",
"shrineTooltipOpenMenu": "मेनू उघडा",
"shrineTooltipSettings": "सेटिंग्ज",
"shrineTooltipSearch": "Search",
"demoTabsDescription": "टॅब विविध स्क्रीन, डेटा सेट आणि इतर परस्परसंवादावर आशय व्यवस्थापित करतात.",
"demoTabsSubtitle": "स्वतंत्रपणे स्क्रोल करण्यायोग्य व्ह्यूचे टॅब",
"demoTabsTitle": "टॅब",
"rallyBudgetAmount": "{budgetName} च्या बजेटच्या एकूण {amountTotal} मधून {amountUsed} वापरले गेले आणि {amountLeft} शिल्लक आहे",
"shrineTooltipRemoveItem": "आयटम काढून टाका",
"rallyAccountAmount": "{amount} {accountName} चे खाते नंबर {accountNumber} मध्ये जमा केले.",
"rallySeeAllBudgets": "सर्व बजेट पहा",
"rallySeeAllBills": "सर्व बिल पहा",
"craneFormDate": "तारीख निवडा",
"craneFormOrigin": "सुरुवातीचे स्थान निवडा",
"craneFly2": "खुम्बू व्हॅली, नेपाळ",
"craneFly3": "माचू पिचू, पेरू",
"craneFly4": "मेल, मालदीव",
"craneFly5": "फिट्सनाऊ, स्वित्झर्लंड",
"craneFly6": "मेक्सिको शहर, मेक्सिको",
"craneFly7": "माउंट रशमोर, युनायटेड स्टेट्स",
"settingsTextDirectionLocaleBased": "लोकॅलवर आधारित",
"craneFly9": "हवाना, क्यूबा",
"craneFly10": "कैरो, इजिप्त",
"craneFly11": "लिस्बन, पोर्तुगाल",
"craneFly12": "नापा, युनायटेड स्टेट्स",
"craneFly13": "बाली, इंडोनेशिया",
"craneSleep0": "मेल, मालदीव",
"craneSleep1": "ॲस्पेन, युनायटेड स्टेट्स",
"craneSleep2": "माचू पिचू, पेरू",
"demoCupertinoSegmentedControlTitle": "विभाजित नियंत्रण",
"craneSleep4": "फिट्सनाऊ, स्वित्झर्लंड",
"craneSleep5": "बिग सुर, युनायटेड स्टेट्स",
"craneSleep6": "नापा, युनायटेड स्टेट्स",
"craneSleep7": "पोर्तो, पोर्तुगीज",
"craneSleep8": "तुलुम, मेक्सिको",
"craneEat5": "सोल, दक्षिण कोरिया",
"demoChipTitle": "चिप",
"demoChipSubtitle": "संक्षिप्त घटक इनपुट, विशेषता किंवा क्रिया सादर करतात",
"demoActionChipTitle": "ॲक्शन चिप",
"demoActionChipDescription": "अॅक्शन चिप पर्यायांचा एक समूह आहे जो प्राथमिक आशयाशी संबंधित असणाऱ्या कारवाईला ट्रिगर करतो. अॅक्शन चिप सतत बदलणानपसार आणि संदर्भानुसार UI मध्ये दिसल्या पाहिजेत.",
"demoChoiceChipTitle": "चॉइस चिप",
"demoChoiceChipDescription": "चॉईस चिप सेटमधून एकच निवड दाखवते. चॉइस चिपमध्ये संबंधित असणारा वर्णनात्मक मजकूर किंवा वर्गवाऱ्या असतात.",
"demoFilterChipTitle": "फिल्टर चिप",
"demoFilterChipDescription": "फिल्टर चिप टॅग किंवा वर्णनात्मक शब्दांचा वापर आशय फिल्टर करण्याचा एक मार्ग म्हणून करतात.",
"demoInputChipTitle": "इनपुट चिप",
"demoInputChipDescription": "इनपुट चिप या व्यक्ती/संस्था (व्यक्ती, जागा किंवा गोष्टी) किंवा संभाषणाचा एसएमएस यांसारखी क्लिष्ट माहिती संक्षिप्त स्वरुपात सादर करतात.",
"craneSleep9": "लिस्बन, पोर्तुगाल",
"craneEat10": "लिस्बन, पोर्तुगाल",
"demoCupertinoSegmentedControlDescription": "परस्पर अनन्य पर्यायांच्या दरम्यान नंबर निवडण्यासाठी वापरले जाते. विभाजित नियंत्रणामधून एक पर्याय निवडलेले असते तेव्हा विभाजित नियंत्रणातील इतर पर्याय निवडणे जाणे थांबवले जातात.",
"chipTurnOnLights": "लाइट सुरू करा",
"chipSmall": "लहान",
"chipMedium": "मध्यम",
"chipLarge": "मोठे",
"chipElevator": "लिफ्ट",
"chipWasher": "वॉशर",
"chipFireplace": "फायरप्लेस",
"chipBiking": "सायकल चालवणे",
"craneFormDiners": "खाण्याचे प्रकार",
"rallyAlertsMessageUnassignedTransactions": "{count,plural,=1{तुमची संभाव्य कर कपात वाढवा! एका असाइन न केलेल्या व्यवहाराला वर्गवाऱ्या असाइन करा.}other{तुमची संभाव्य कर कपात वाढवा! {count} असाइन न केलेल्या व्यवहारांना वर्गवाऱ्या असाइन करा.}}",
"craneFormTime": "वेळ निवडा",
"craneFormLocation": "स्थान निवडा",
"craneFormTravelers": "प्रवासी",
"craneEat8": "अटलांटा, युनायटेड स्टेट्स",
"craneFormDestination": "गंतव्यस्थान निवडा",
"craneFormDates": "तारखा निवडा",
"craneFly": "उडणे",
"craneSleep": "स्लीप",
"craneEat": "खाण्याची ठिकाणे",
"craneFlySubhead": "गंतव्यस्थानानुसार फ्लाइट शोधा",
"craneSleepSubhead": "गंतव्यस्थानानुसार मालमत्ता शोधा",
"craneEatSubhead": "गंतव्यस्थानानुसार रेस्टॉरंट शोधा",
"craneFlyStops": "{numberOfStops,plural,=0{नॉनस्टॉप}=1{एक थांबा}other{{numberOfStops} थांबे}}",
"craneSleepProperties": "{totalProperties,plural,=0{कोणतीही प्रॉपर्टी उपलब्ध नाही}=1{एक प्रॉपर्टी उपलब्ध आहे}other{{totalProperties} प्रॉपर्टी उपलब्ध आहेत}}",
"craneEatRestaurants": "{totalRestaurants,plural,=0{रेस्टॉरंट नाही}=1{एक रेस्टॉरंट}other{{totalRestaurants} रेस्टॉरंट}}",
"craneFly0": "ॲस्पेन, युनायटेड स्टेट्स",
"demoCupertinoSegmentedControlSubtitle": "iOS शैलीचे विभाजित नियंत्रण",
"craneSleep10": "कैरो, इजिप्त",
"craneEat9": "माद्रिद, स्पेन",
"craneFly1": "बिग सुर, युनायटेड स्टेट्स",
"craneEat7": "नॅशविल, युनायटेड स्टेट्स",
"craneEat6": "सीएटल, युनायटेड स्टेट्स",
"craneFly8": "सिंगापूर",
"craneEat4": "पॅरिस, फ्रान्स",
"craneEat3": "पोर्टलंड, युनायटेड स्टेट्स",
"craneEat2": "कोर्दोबा, अर्जेंटिना",
"craneEat1": "डॅलस, युनायटेड स्टेट्स",
"craneEat0": "नेपल्स, इटली",
"craneSleep11": "ताइपै, तैवान",
"craneSleep3": "हवाना, क्यूबा",
"shrineLogoutButtonCaption": "लॉग आउट करा",
"rallyTitleBills": "बिले",
"rallyTitleAccounts": "खाती",
"shrineProductVagabondSack": "Vagabond sack",
"rallyAccountDetailDataInterestYtd": "व्याज YTD",
"shrineProductWhitneyBelt": "Whitney belt",
"shrineProductGardenStrand": "Garden strand",
"shrineProductStrutEarrings": "Strut earrings",
"shrineProductVarsitySocks": "Varsity socks",
"shrineProductWeaveKeyring": "Weave keyring",
"shrineProductGatsbyHat": "Gatsby hat",
"shrineProductShrugBag": "Shrug bag",
"shrineProductGiltDeskTrio": "Gilt desk trio",
"shrineProductCopperWireRack": "Copper wire rack",
"shrineProductSootheCeramicSet": "Soothe ceramic set",
"shrineProductHurrahsTeaSet": "Hurrahs tea set",
"shrineProductBlueStoneMug": "Blue stone mug",
"shrineProductRainwaterTray": "Rainwater tray",
"shrineProductChambrayNapkins": "Chambray napkins",
"shrineProductSucculentPlanters": "Succulent planters",
"shrineProductQuartetTable": "Quartet table",
"shrineProductKitchenQuattro": "Kitchen quattro",
"shrineProductClaySweater": "Clay sweater",
"shrineProductSeaTunic": "Sea tunic",
"shrineProductPlasterTunic": "Plaster tunic",
"rallyBudgetCategoryRestaurants": "रेस्टॉरंट",
"shrineProductChambrayShirt": "Chambray shirt",
"shrineProductSeabreezeSweater": "Seabreeze sweater",
"shrineProductGentryJacket": "Gentry jacket",
"shrineProductNavyTrousers": "Navy trousers",
"shrineProductWalterHenleyWhite": "Walter henley (white)",
"shrineProductSurfAndPerfShirt": "Surf and perf shirt",
"shrineProductGingerScarf": "Ginger scarf",
"shrineProductRamonaCrossover": "Ramona crossover",
"shrineProductClassicWhiteCollar": "Classic white collar",
"shrineProductSunshirtDress": "Sunshirt dress",
"rallyAccountDetailDataInterestRate": "व्याज दर",
"rallyAccountDetailDataAnnualPercentageYield": "वार्षिक टक्केवारी उत्पन्न",
"rallyAccountDataVacation": "सुट्टी",
"shrineProductFineLinesTee": "Fine lines tee",
"rallyAccountDataHomeSavings": "घर बचत",
"rallyAccountDataChecking": "चेकिंग",
"rallyAccountDetailDataInterestPaidLastYear": "मागील वर्षी दिलेले व्याज",
"rallyAccountDetailDataNextStatement": "पुढील विवरण",
"rallyAccountDetailDataAccountOwner": "खाते मालक",
"rallyBudgetCategoryCoffeeShops": "कॉफीची दुकाने",
"rallyBudgetCategoryGroceries": "किराणा माल",
"shrineProductCeriseScallopTee": "Cerise scallop tee",
"rallyBudgetCategoryClothing": "कपडे",
"rallySettingsManageAccounts": "खाती व्यवस्थापित करा",
"rallyAccountDataCarSavings": "कार बचत",
"rallySettingsTaxDocuments": "कर दस्तऐवज",
"rallySettingsPasscodeAndTouchId": "पासकोड आणि स्पर्श आयडी",
"rallySettingsNotifications": "सूचना",
"rallySettingsPersonalInformation": "वैयक्तिक माहिती",
"rallySettingsPaperlessSettings": "पेपरलेस सेटिंग्ज",
"rallySettingsFindAtms": "ATM शोधा",
"rallySettingsHelp": "मदत",
"rallySettingsSignOut": "साइन आउट करा",
"rallyAccountTotal": "एकूण",
"rallyBillsDue": "शेवटची तारीख",
"rallyBudgetLeft": "शिल्लक",
"rallyAccounts": "खाती",
"rallyBills": "बिले",
"rallyBudgets": "बजेट",
"rallyAlerts": "इशारे",
"rallySeeAll": "सर्व पहा",
"rallyFinanceLeft": "शिल्लक",
"rallyTitleOverview": "अवलोकन",
"shrineProductShoulderRollsTee": "Shoulder rolls tee",
"shrineNextButtonCaption": "पुढील",
"rallyTitleBudgets": "बजेट",
"rallyTitleSettings": "सेटिंग्ज",
"rallyLoginLoginToRally": "Rally साठी लॉग इन करा",
"rallyLoginNoAccount": "तुमच्याकडे खाते नाही?",
"rallyLoginSignUp": "साइन अप करा",
"rallyLoginUsername": "वापरकर्ता नाव",
"rallyLoginPassword": "पासवर्ड",
"rallyLoginLabelLogin": "लॉग इन करा",
"rallyLoginRememberMe": "मला लक्षात ठेवा",
"rallyLoginButtonLogin": "लॉग इन करा",
"rallyAlertsMessageHeadsUpShopping": "पूर्वसूचना, तुम्ही या महिन्यासाठी तुमच्या खरेदीच्या बजेटमधील {percent} वापरले आहेत.",
"rallyAlertsMessageSpentOnRestaurants": "तुम्ही या आठवड्यात रेस्टॉरंटवर {amount} खर्च केले.",
"rallyAlertsMessageATMFees": "तुम्ही या महिन्यात ATM शुल्क म्हणून {amount} खर्च केले",
"rallyAlertsMessageCheckingAccount": "उत्तम कामगिरी! तुमचे चेकिंग खाते मागील महिन्यापेक्षा {percent} वर आहे.",
"shrineMenuCaption": "मेनू",
"shrineCategoryNameAll": "सर्व",
"shrineCategoryNameAccessories": "अॅक्सेसरी",
"shrineCategoryNameClothing": "कपडे",
"shrineCategoryNameHome": "घर",
"shrineLoginUsernameLabel": "वापरकर्ता नाव",
"shrineLoginPasswordLabel": "पासवर्ड",
"shrineCancelButtonCaption": "रद्द करा",
"shrineCartTaxCaption": "कर:",
"shrineCartPageCaption": "कार्ट",
"shrineProductQuantity": "प्रमाण: {quantity}",
"shrineProductPrice": "x {price}",
"shrineCartItemCount": "{quantity,plural,=0{कोणताही आयटम नाही}=1{एक आयटम}other{{quantity} आयटम}}",
"shrineCartClearButtonCaption": "कार्ट साफ करा",
"shrineCartTotalCaption": "एकूण",
"shrineCartSubtotalCaption": "उपबेरीज:",
"shrineCartShippingCaption": "शिपिंग:",
"shrineProductGreySlouchTank": "Grey slouch tank",
"shrineProductStellaSunglasses": "Stella sunglasses",
"shrineProductWhitePinstripeShirt": "White pinstripe shirt",
"demoTextFieldWhereCanWeReachYou": "आम्ही तुमच्याशी कुठे संपर्क साधू करू शकतो?",
"settingsTextDirectionLTR": "LTR",
"settingsTextScalingLarge": "मोठे",
"demoBottomSheetHeader": "शीर्षलेख",
"demoBottomSheetItem": "आयटम {value}",
"demoBottomTextFieldsTitle": "मजकूर भाग",
"demoTextFieldTitle": "मजकूर भाग",
"demoTextFieldSubtitle": "संपादित करता येणार्या मजकूर आणि अंकांची एकच ओळ",
"demoTextFieldDescription": "मजकूर भाग वापरकर्त्यांना UI मध्ये मजकूर एंटर करू देतात. ते सर्वसाधारणपणे फॉर्म आणि डायलॉगमध्ये दिसतात.",
"demoTextFieldShowPasswordLabel": "पासवर्ड दाखवा",
"demoTextFieldHidePasswordLabel": "पासवर्ड लपवा",
"demoTextFieldFormErrors": "सबमिट करण्यापूर्वी लाल रंगातील एरर दुरुस्त करा.",
"demoTextFieldNameRequired": "नाव आवश्यक आहे.",
"demoTextFieldOnlyAlphabeticalChars": "कृपया फक्त वर्णक्रमाने वर्ण एंटर करा.",
"demoTextFieldEnterUSPhoneNumber": "(###) ###-#### - यूएस फोन नंबर एंटर करा.",
"demoTextFieldEnterPassword": "कृपया पासवर्ड एंटर करा.",
"demoTextFieldPasswordsDoNotMatch": "पासवर्ड जुळत नाहीत",
"demoTextFieldWhatDoPeopleCallYou": "लोक तुम्हाला काय म्हणतात?",
"demoTextFieldNameField": "नाव*",
"demoBottomSheetButtonText": "तळाचे शीट दाखवा",
"demoTextFieldPhoneNumber": "फोन नंबर*",
"demoBottomSheetTitle": "तळाचे शीट",
"demoTextFieldEmail": "ईमेल",
"demoTextFieldTellUsAboutYourself": "आम्हाला तुमच्याबद्दल सांगा (उदा., तुम्ही काय करता आणि तुम्हाला कोणते छंद आहेत ते लिहा)",
"demoTextFieldKeepItShort": "ते लहान ठेवा, हा फक्त डेमो आहे.",
"starterAppGenericButton": "बटण",
"demoTextFieldLifeStory": "जीवनकथा",
"demoTextFieldSalary": "पगार",
"demoTextFieldUSD": "USD",
"demoTextFieldNoMoreThan": "८ वर्णांपेक्षा जास्त नको.",
"demoTextFieldPassword": "पासवर्ड*",
"demoTextFieldRetypePassword": "पासवर्ड पुन्हा टाइप करा*",
"demoTextFieldSubmit": "सबमिट करा",
"demoBottomNavigationSubtitle": "क्रॉस फेडिंग दृश्यांसह तळाचे नेव्हिगेशन",
"demoBottomSheetAddLabel": "जोडा",
"demoBottomSheetModalDescription": "मोडल तळाचे शीट मेनू किंवा डायलॉगचा पर्याय आहे आणि ते वापरकर्त्याला बाकीच्या अॅपशी परस्परसंवाद साधण्यापासून रोखते.",
"demoBottomSheetModalTitle": "मोडल तळाचे शीट",
"demoBottomSheetPersistentDescription": "सातत्यपूर्ण तळाचे शीट अॅपच्या प्राथमिक आशयाला पूरक असलेली माहिती दाखवते. वापरकर्ता अॅपच्या इतर भागांसोबत परस्परसंवाद साधत असतानादेखील सातत्यपूर्ण तळाचे शीट दृश्यमान राहते.",
"demoBottomSheetPersistentTitle": "सातत्यपूर्ण तळाचे शीट",
"demoBottomSheetSubtitle": "सातत्यपूर्ण आणि मोडल तळाची पत्रके",
"demoTextFieldNameHasPhoneNumber": "{name} फोन नंबर {phoneNumber} आहे",
"buttonText": "बटण",
"demoTypographyDescription": "मटेरिअल डिझाइन मध्ये सापडणार्या विविध टायपोग्राफिकल शैलींच्या परिभाषा.",
"demoTypographySubtitle": "सर्व पूर्वपरिभाषित मजकूर शैली",
"demoTypographyTitle": "टायपोग्राफी",
"demoFullscreenDialogDescription": "fullscreenDialog प्रॉपर्टी ही येणारे पेज फुलस्क्रीन मोडाल डायलॉग आहे की नाही ते नमूद करते",
"demoFlatButtonDescription": "एक चपटे बटण दाबल्यावर ते शाई उडवताना दाखवते पण ते उचलत नाही. टूलबारवर, डायलॉगमध्ये आणि पॅडिंगसह इनलाइनमध्ये चपटी बटणे वापरा",
"demoBottomNavigationDescription": "तळाचे नेव्हिगेशन बार स्क्रीनच्या तळाशी तीन ते पाच गंतव्यस्थाने दाखवतात. प्रत्येक गंतव्यस्थान आयकन आणि पर्यायी मजकूर लेबलने दर्शवलेले असते. तळाच्या नेव्हिगेशन आयकनवर टॅप केल्यावर, वापरकर्त्याला त्या आयकनशी संबद्ध असलेल्या उच्च स्तराच्या नेव्हिगेशन गंतव्यस्थानावर नेले जाते.",
"demoBottomNavigationSelectedLabel": "लेबल निवडले",
"demoBottomNavigationPersistentLabels": "सातत्यपूर्ण लेबले",
"starterAppDrawerItem": "आयटम {value}",
"demoTextFieldRequiredField": "* आवश्यक फील्ड सूचित करते",
"demoBottomNavigationTitle": "तळाचे नेव्हिगेशन",
"settingsLightTheme": "फिकट",
"settingsTheme": "थीम",
"settingsPlatformIOS": "iOS",
"settingsPlatformAndroid": "Android",
"settingsTextDirectionRTL": "RTL",
"settingsTextScalingHuge": "प्रचंड",
"cupertinoButton": "बटण",
"settingsTextScalingNormal": "सामान्य",
"settingsTextScalingSmall": "लहान",
"settingsSystemDefault": "सिस्टम",
"settingsTitle": "सेटिंग्ज",
"rallyDescription": "वैयक्तिक अर्थसहाय्य अॅप",
"aboutDialogDescription": "या अॅपसाठी स्रोत कोड पाहण्याकरिता, कृपया {repoLink} ला भेट द्या.",
"bottomNavigationCommentsTab": "टिप्पण्या",
"starterAppGenericBody": "मुख्य मजकूर",
"starterAppGenericHeadline": "ठळक शीर्षक",
"starterAppGenericSubtitle": "उपशीर्षक",
"starterAppGenericTitle": "शीर्षक",
"starterAppTooltipSearch": "Search",
"starterAppTooltipShare": "शेअर करा",
"starterAppTooltipFavorite": "आवडते",
"starterAppTooltipAdd": "जोडा",
"bottomNavigationCalendarTab": "Calendar",
"starterAppDescription": "प्रतिसादात्मक स्टार्टर लेआउट",
"starterAppTitle": "स्टार्टर अॅप",
"aboutFlutterSamplesRepo": "Flutter नमुने GitHub रेपो",
"bottomNavigationContentPlaceholder": "{title} टॅबसाठी प्लेसहोल्डर",
"bottomNavigationCameraTab": "कॅमेरा",
"bottomNavigationAlarmTab": "अलार्म",
"bottomNavigationAccountTab": "खाते",
"demoTextFieldYourEmailAddress": "तुमचा ईमेल अॅड्रेस",
"demoToggleButtonDescription": "संबंधित पर्यायांची गटांमध्ये विभागणी करण्यासाठी टॉगल बटणे वापरली जाऊ शकतात. संबंधित टॉगल बटणांच्या गटांवर लक्ष केंद्रीत करण्यासाठी प्रत्येक गटामध्ये एक समान घटक असणे आवश्यक आहे",
"colorsGrey": "राखाडी",
"colorsBrown": "तपकिरी",
"colorsDeepOrange": "गडद नारिंगी",
"colorsOrange": "नारिंगी",
"colorsAmber": "मातकट रंग",
"colorsYellow": "पिवळा",
"colorsLime": "लिंबू रंग",
"colorsLightGreen": "फिकट हिरवा",
"colorsGreen": "हिरवा",
"homeHeaderGallery": "गॅलरी",
"homeHeaderCategories": "वर्गवाऱ्या",
"shrineDescription": "फॅशनेबल रिटेल अॅप",
"craneDescription": "पर्सनलाइझ केलेले प्रवास अॅप",
"homeCategoryReference": "शैली आणि इतर",
"demoInvalidURL": "URL प्रदर्शित करू शकलो नाही:",
"demoOptionsTooltip": "पर्याय",
"demoInfoTooltip": "माहिती",
"demoCodeTooltip": "डेमो कोड",
"demoDocumentationTooltip": "API दस्तऐवजीकरण",
"demoFullscreenTooltip": "फुल-स्क्रीन",
"settingsTextScaling": "मजकूर मापन",
"settingsTextDirection": "मजकूर दिशा",
"settingsLocale": "लोकॅल",
"settingsPlatformMechanics": "प्लॅटफॉर्म यांत्रिकी",
"settingsDarkTheme": "गडद",
"settingsSlowMotion": "स्लो मोशन",
"settingsAbout": "Flutter Gallery बद्दल",
"settingsFeedback": "फीडबॅक पाठवा",
"settingsAttribution": "लंडनच्या TOASTER यांनी डिझाइन केलेले",
"demoButtonTitle": "बटणे",
"demoButtonSubtitle": "मजकूर, एलेव्हेटेड, आउटलाइन्ड आणि अधिक",
"demoFlatButtonTitle": "चपटे बटण",
"demoRaisedButtonDescription": "उंच बटणे सहसा फ्लॅट लेआउटचे आकारमान निर्दिष्ट करतात. ते व्यस्त किंवा रूंद जागांवर फंक्शन लागू करतात.",
"demoRaisedButtonTitle": "उंच बटण",
"demoOutlineButtonTitle": "आउटलाइन बटण",
"demoOutlineButtonDescription": "आउटलाइन बटणे दाबल्यानंतर अपारदर्शक होतात आणि वर येतात. एखादी पर्यायी, दुसरी क्रिया दाखवण्यासाठी ते सहसा उंच बटणांसोबत जोडली जातात.",
"demoToggleButtonTitle": "टॉगल बटणे",
"colorsTeal": "हिरवट निळा",
"demoFloatingButtonTitle": "फ्लोटिंग ॲक्शन बटण",
"demoFloatingButtonDescription": "ॲप्लिकेशनमध्ये प्राथमिक क्रिया करण्याचे सूचित करण्यासाठी आशयावर फिरणारे फ्लोटिंग ॲक्शन बटण हे गोलाकार आयकन बटण आहे.",
"demoDialogTitle": "डायलॉग",
"demoDialogSubtitle": "साधा, सूचना आणि फुलस्क्रीन",
"demoAlertDialogTitle": "सूचना",
"demoAlertDialogDescription": "सूचना डायलॉग हा वापरकर्त्यांना कबुली आवश्यक असलेल्या गोष्टींबद्दल सूचित करतो. सूचना डायलॉगमध्ये एक पर्यायी शीर्षक आणि एक पर्यायी क्रिया सूची असते",
"demoAlertTitleDialogTitle": "शीर्षकाशी संबंधित सूचना",
"demoSimpleDialogTitle": "साधा",
"demoSimpleDialogDescription": "एक साधा डायलॉग अनेक पर्यायांमधून निवडण्याची वापरकर्त्याला संधी देतो. साध्या डायलॉगमध्ये एक पर्यायी शीर्षक असते जे निवडींच्या वरती दाखवले जाते.",
"demoFullscreenDialogTitle": "फुलस्क्रीन",
"demoCupertinoButtonsTitle": "बटणे",
"demoCupertinoButtonsSubtitle": "iOS शैली बटण",
"demoCupertinoButtonsDescription": "एक iOS शैलीतील बटण. स्पर्श केल्यावर फिका होणार्या आणि न होणार्या मजकूरचा आणि/किंवा आयकनचा यामध्ये समावेश आहे यामध्ये पर्यायी एक बॅकग्राउंड असू शकतो.",
"demoCupertinoAlertsTitle": "सूचना",
"demoCupertinoAlertsSubtitle": "iOS शैलीचे सूचना डायलॉग",
"demoCupertinoAlertTitle": "इशारा",
"demoCupertinoAlertDescription": "सूचना डायलॉग हा वापरकर्त्यांना कबुली आवश्यक असलेल्या गोष्टींबद्दल सूचित करतो. एका सूचना डायलॉगमध्ये एक पर्यायी शीर्षक, पर्यायी आशय आणि एक पर्यायी क्रिया सूची असते. शीर्षक हे मजकूराच्या वरती दाखवले जाते आणि क्रिया ही मजकूराच्या खाली दाखवली जाते.",
"demoCupertinoAlertWithTitleTitle": "शीर्षकाशी संबंधित सूचना",
"demoCupertinoAlertButtonsTitle": "बटणांशी संबंधित सूचना",
"demoCupertinoAlertButtonsOnlyTitle": "फक्त सूचना बटणे",
"demoCupertinoActionSheetTitle": "क्रिया शीट",
"demoCupertinoActionSheetDescription": "क्रिया शीट हा सूचनेचा एक विशिष्ट प्रकार आहे जो वापरकर्त्याला सध्याच्या संदर्भाशी संबंधित दोन किंवा त्याहून जास्त निवडी देतो. एका क्रिया शीटामध्ये शीर्षक, एक अतिरिक्त मेसेज आणि क्रियांची सूची असते.",
"demoColorsTitle": "रंग",
"demoColorsSubtitle": "पूर्वानिर्धारित केलेले सर्व रंग",
"demoColorsDescription": "मटेरिअल डिझाइनचे कलर पॅलेट दर्शवणारे रंग आणि कलर स्वॅच स्थिरांक.",
"buttonTextEnabled": "ENABLED",
"buttonTextDisabled": "DISABLED",
"buttonTextCreate": "तयार करा",
"dialogSelectedOption": "तुम्ही निवडली: \"{value}\"",
"dialogDiscardTitle": "मसुदा काढून टाकायचा आहे का?",
"dialogLocationTitle": "Google ची स्थान सेवा वापरायची का?",
"dialogLocationDescription": "अॅप्सना स्थान शोधण्यात Google ला मदत करू द्या. म्हणजेच कोणतीही अॅप्स सुरू नसतानादेखील Google ला अनामित स्थान डेटा पाठवणे.",
"dialogCancel": "रद्द करा",
"dialogDiscard": "काढून टाका",
"dialogDisagree": "सहमत नाही",
"dialogAgree": "सहमत आहे",
"dialogSetBackup": "बॅकअप खाते सेट करा",
"colorsBlueGrey": "निळसर राखाडी",
"dialogShow": "डायलॉग दाखवा",
"dialogFullscreenTitle": "फुल स्क्रीन डायलॉग",
"dialogFullscreenSave": "सेव्ह करा",
"dialogFullscreenDescription": "फुल स्क्रीन डायलॉग डेमो",
"cupertinoButtonEnabled": "Enabled",
"cupertinoButtonDisabled": "Disabled",
"cupertinoButtonWithBackground": "बॅकग्राउंडसह",
"cupertinoAlertCancel": "रद्द करा",
"cupertinoAlertDiscard": "काढून टाका",
"cupertinoAlertLocationTitle": "तुम्ही अॅप वापरत असताना \"Maps\" ला तुमचे स्थान ॲक्सेस करण्याची अनुमती द्यायची का?",
"cupertinoAlertLocationDescription": "तुमचे सध्याचे स्थान नकाशावर दाखवले जाईल आणि दिशानिर्देश, जवळपासचे शोध परिणाम व प्रवासाचा अंदाजे वेळ दाखवण्यासाठी वापरले जाईल.",
"cupertinoAlertAllow": "अनुमती द्या",
"cupertinoAlertDontAllow": "अनुमती देऊ नका",
"cupertinoAlertFavoriteDessert": "आवडते डेझर्ट निवडा",
"cupertinoAlertDessertDescription": "कृपया खालील सूचीमधून तुमच्या आवडत्या डेझर्टचा प्रकार निवडा. तुमच्या परिसरातील सुचवलेल्या उपहारगृहांची सूची कस्टमाइझ करण्यासाठी तुमच्या निवडीचा उपयोग केला जाईल.",
"cupertinoAlertCheesecake": "चीझकेक",
"cupertinoAlertTiramisu": "तिरामिसू",
"cupertinoAlertApplePie": "ॲपल पाय",
"cupertinoAlertChocolateBrownie": "चॉकलेट ब्राउनी",
"cupertinoShowAlert": "सूचना दाखवा",
"colorsRed": "लाल",
"colorsPink": "गुलाबी",
"colorsPurple": "जांभळा",
"colorsDeepPurple": "गडद जांभळा",
"colorsIndigo": "आकाशी निळा",
"colorsBlue": "निळा",
"colorsLightBlue": "फिकट निळा",
"colorsCyan": "निळसर",
"dialogAddAccount": "खाते जोडा",
"Gallery": "गॅलरी",
"Categories": "वर्गवाऱ्या",
"SHRINE": "श्राइन",
"Basic shopping app": "प्राथमिक खरेदीसाठी अॅप",
"RALLY": "रॅली",
"CRANE": "क्रेन",
"Travel app": "प्रवासाचे अॅप",
"MATERIAL": "मटेरियल",
"CUPERTINO": "कूपरटिनो",
"REFERENCE STYLES & MEDIA": "संदर्भ शैली आणि मीडिया"
}
| 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": "Besedilno polje za iskanje",
"demoCupertinoPicker": "Izbirnik",
"demoCupertinoSearchTextFieldSubtitle": "Besedilno polje za iskanje v slogu iOSa.",
"demoCupertinoSearchTextFieldDescription": "Besedilno polje za iskanje, ki uporabniku omogoča iskanje z vnosom besedila, prav tako pa lahko ponudi in filtrira predloge.",
"demoCupertinoSearchTextFieldPlaceholder": "Vnesite nekaj besedila",
"demoCupertinoScrollbarTitle": "Drsna vrstica",
"demoCupertinoScrollbarSubtitle": "Drsna vrstica v slogu iOSa.",
"demoCupertinoScrollbarDescription": "Drsna vrstica, ki združi izbrane podrejene elemente.",
"demoTwoPaneItem": "Element {value}",
"demoTwoPaneList": "Seznam",
"demoTwoPaneFoldableLabel": "Pregibne",
"demoTwoPaneSmallScreenLabel": "Majhen zaslon",
"demoTwoPaneSmallScreenDescription": "Tako TwoPane deluje v napravi z majhnim zaslonom.",
"demoTwoPaneTabletLabel": "Tablični/namizni računalniki",
"demoTwoPaneTabletDescription": "Tako TwoPane deluje v napravi z večjim zaslonom, kot je tablični ali namizni računalnik.",
"demoTwoPaneTitle": "TwoPane",
"demoTwoPaneSubtitle": "Odzivne postavitve na pregibnih, velikih in majhnih zaslonih",
"splashSelectDemo": "Izberite predstavitev",
"demoTwoPaneFoldableDescription": "Tako TwoPane deluje v pregibni napravi.",
"demoTwoPaneDetails": "Podrobnosti",
"demoTwoPaneSelectItem": "Izberite element",
"demoTwoPaneItemDetails": "Podrobnosti elementa {value}",
"demoCupertinoContextMenuActionText": "Pridržite logotip za Flutter, če si želite ogledati kontekstni meni.",
"demoCupertinoContextMenuDescription": "Celozaslonski kontekstni meni v slogu iOSa, ki se pojavi po dolgem pritisku elementa.",
"demoAppBarTitle": "Vrstica aplikacije",
"demoAppBarDescription": "Vrstica aplikacije navaja vsebino in dejanja, povezane s trenutnim zaslonom. Uporablja se za označevanje blagovne znamke, naslove zaslonov, premikanje in dejanja.",
"demoDividerTitle": "Razdelilna črta",
"demoDividerSubtitle": "Razdelilna črta je tanka črta, ki združuje vsebino v seznamih in postavitvah.",
"demoDividerDescription": "Razdelilne črte je mogoče uporabljati za sezname, predale in drugje za ločevanje vsebine.",
"demoVerticalDividerTitle": "Navpična razdelilna črta",
"demoCupertinoContextMenuTitle": "Kontekstni meni",
"demoCupertinoContextMenuSubtitle": "Kontekstni meni v slogu iOSa",
"demoAppBarSubtitle": "Prikazuje podatke in dejanja, povezane s trenutnim zaslonom.",
"demoCupertinoContextMenuActionOne": "Prvo dejanje",
"demoCupertinoContextMenuActionTwo": "Drugo dejanje",
"demoDateRangePickerDescription": "Prikaže pogovorno okno z izbirnikom časovnega obdobja v slogu materialnega oblikovanja.",
"demoDateRangePickerTitle": "Izbirnik časovnega obdobja",
"demoNavigationDrawerUserName": "Uporabniško ime",
"demoNavigationDrawerUserEmail": "uporabniš[email protected]",
"demoNavigationDrawerText": "Povlecite z roba ali se dotaknite ikone v spodnjem levem kotu, če želite prikazati predal.",
"demoNavigationRailTitle": "Črta za krmarjenje",
"demoNavigationRailSubtitle": "Prikaz črte za krmarjenje v aplikaciji.",
"demoNavigationRailDescription": "Pripomoček materialnega oblikovanja, ki naj bi bil prikazan levo ali desno od aplikacije in naj bi omogočal krmarjenje med manjšim številom pogledom – običajno med tremi in petimi.",
"demoNavigationRailFirst": "1.",
"demoNavigationDrawerTitle": "Predal za krmarjenje",
"demoNavigationRailThird": "3.",
"replyStarredLabel": "Z zvezdico",
"demoTextButtonDescription": "Gumb za besedilo prikazuje pljusk črnila ob pritisku, vendar se ne dvigne. Gumbe za besedilo uporabljajte v orodnih vrsticah, v pogovornih oknih in v vrstici z odmikom.",
"demoElevatedButtonTitle": "Dvignjen gumb",
"demoElevatedButtonDescription": "Dvignjeni gumbi dodajo razsežnosti večinoma ravnim postavitvam. Poudarijo funkcije na mestih z veliko elementi ali širokih mestih.",
"demoOutlinedButtonTitle": "Orisan gumb",
"demoOutlinedButtonDescription": "Orisani gumbi ob pritisku postanejo prosojni in dvignjeni. Pogosto so združeni z dvignjenimi gumbi in označujejo nadomestno, sekundarno dejanje.",
"demoContainerTransformDemoInstructions": "Kartice, seznami in plavajoči gumb",
"demoNavigationDrawerSubtitle": "Prikazuje predal v vrstici z aplikacijami.",
"replyDescription": "Učinkovita, osredotočena aplikacija za e-pošto.",
"demoNavigationDrawerDescription": "Podokno materialnega oblikovanja, ki v aplikaciji pridrsa vodoravno z roba zaslona in prikaže povezave za krmarjenje.",
"replyDraftsLabel": "Osnutki",
"demoNavigationDrawerToPageOne": "Element ena",
"replyInboxLabel": "Prejeto",
"demoSharedXAxisDemoInstructions": "Gumba za naprej in nazaj",
"replySpamLabel": "Vsiljena pošta",
"replyTrashLabel": "Smetnjak",
"replySentLabel": "Poslano",
"demoNavigationRailSecond": "2.",
"demoNavigationDrawerToPageTwo": "Element dve",
"demoFadeScaleDemoInstructions": "Modalno okno in plavajoči gumb",
"demoFadeThroughDemoInstructions": "Krmarjenju na dnu zaslona",
"demoSharedZAxisDemoInstructions": "Ikona gumba za nastavitve",
"demoSharedYAxisDemoInstructions": "Razvrščanje glede na »Nedavno predvajano«",
"demoTextButtonTitle": "Gumb za besedilo",
"demoSharedZAxisBeefSandwichRecipeTitle": "Sendvič z govedino",
"demoSharedZAxisDessertRecipeDescription": "Recept za sladico",
"demoSharedYAxisAlbumTileSubtitle": "Izvajalec",
"demoSharedYAxisAlbumTileTitle": "Album",
"demoSharedYAxisRecentSortTitle": "Nedavno predvajano",
"demoSharedYAxisAlphabeticalSortTitle": "A–Ž",
"demoSharedYAxisAlbumCount": "268 albumov",
"demoSharedYAxisTitle": "Skupna os y",
"demoSharedXAxisCreateAccountButtonText": "USTVARI RAČUN",
"demoFadeScaleAlertDialogDiscardButton": "ZAVRZI",
"demoSharedXAxisSignInTextFieldLabel": "E-poštni naslov ali telefonska številka",
"demoSharedXAxisSignInSubtitleText": "Prijavite se s svojim računom",
"demoSharedXAxisSignInWelcomeText": "Pozdravljeni, David Park",
"demoSharedXAxisIndividualCourseSubtitle": "Prikazano posamezno",
"demoSharedXAxisBundledCourseSubtitle": "Združeno",
"demoFadeThroughAlbumsDestination": "Albumi",
"demoSharedXAxisDesignCourseTitle": "Oblikovanje",
"demoSharedXAxisIllustrationCourseTitle": "Ilustracije",
"demoSharedXAxisBusinessCourseTitle": "Posel",
"demoSharedXAxisArtsAndCraftsCourseTitle": "Ročna obrt",
"demoMotionPlaceholderSubtitle": "Sekundarno besedilo",
"demoFadeScaleAlertDialogCancelButton": "PREKLIČI",
"demoFadeScaleAlertDialogHeader": "Opozorilno pogovorno okno",
"demoFadeScaleHideFabButton": "SKRIJ PLAVAJOČI GUMB",
"demoFadeScaleShowFabButton": "PRIKAŽI PLAVAJOČI GUMB",
"demoFadeScaleShowAlertDialogButton": "PRIKAŽI MODALNO OKNO",
"demoFadeScaleDescription": "Vzorec pojemanja se uporablja za elemente uporabniškega vmesnika, ki se prikazujejo ali izginjajo znotraj meja zaslona, kot je pogovorno okno, ki pojenja na sredini zaslona.",
"demoFadeScaleTitle": "Pojemanje",
"demoFadeThroughTextPlaceholder": "123 fotografij",
"demoFadeThroughSearchDestination": "Iskanje",
"demoFadeThroughPhotosDestination": "Fotografije",
"demoSharedXAxisCoursePageSubtitle": "Združene kategorije so prikazane kot skupine v vašem viru. To lahko pozneje kadar koli spremenite.",
"demoFadeThroughDescription": "Vzorec postopnega pojemanja se uporablja za prehode med elementi uporabniškega vmesnika, ki niso v močnem medsebojnem razmerju.",
"demoFadeThroughTitle": "Postopno pojemanje",
"demoSharedZAxisHelpSettingLabel": "Pomoč",
"demoMotionSubtitle": "Vsi vnaprej določeni vzorci prehodov",
"demoSharedZAxisNotificationSettingLabel": "Obvestila",
"demoSharedZAxisProfileSettingLabel": "Profil",
"demoSharedZAxisSavedRecipesListTitle": "Shranjeni recepti",
"demoSharedZAxisBeefSandwichRecipeDescription": "Recept za sendvič z govedino",
"demoSharedZAxisCrabPlateRecipeDescription": "Recept za jed z raki",
"demoSharedXAxisCoursePageTitle": "Izboljšajte tečaje",
"demoSharedZAxisCrabPlateRecipeTitle": "Rak",
"demoSharedZAxisShrimpPlateRecipeDescription": "Recept za jed z rakci",
"demoSharedZAxisShrimpPlateRecipeTitle": "Morski rakec",
"demoContainerTransformTypeFadeThrough": "POSTOPNO POJEMANJE",
"demoSharedZAxisDessertRecipeTitle": "Sladica",
"demoSharedZAxisSandwichRecipeDescription": "Recept za sendvič",
"demoSharedZAxisSandwichRecipeTitle": "Sendvič",
"demoSharedZAxisBurgerRecipeDescription": "Recept za burger",
"demoSharedZAxisBurgerRecipeTitle": "Burger",
"demoSharedZAxisSettingsPageTitle": "Nastavitve",
"demoSharedZAxisTitle": "Skupna os z",
"demoSharedZAxisPrivacySettingLabel": "Zasebnost",
"demoMotionTitle": "Gibanje",
"demoContainerTransformTitle": "Pretvorba vsebnika",
"demoContainerTransformDescription": "Vzorec pretvorbe vsebnika je zasnovan za prehode med elementi uporabniškega vmesnika, ki vključujejo vsebnik. Ta vzorec ustvari vidno povezavo med dvema elementoma uporabniškega vmesnika.",
"demoContainerTransformModalBottomSheetTitle": "Način pojemanja",
"demoContainerTransformTypeFade": "POJEMANJE",
"demoSharedYAxisAlbumTileDurationUnit": "min",
"demoMotionPlaceholderTitle": "Naslov",
"demoSharedXAxisForgotEmailButtonText": "STE POZABILI E-POŠTNI NASLOV?",
"demoMotionSmallPlaceholderSubtitle": "Sekundarno",
"demoMotionDetailsPageTitle": "Stran s podrobnostmi",
"demoMotionListTileTitle": "Element seznama",
"demoSharedAxisDescription": "Vzorec skupne osi se uporablja za prehode med elementi uporabniškega vmesnika, ki so v prostorskem ali navigacijskem razmerju. Ta vzorec uporablja skupno spremembo na osi x, y ali z, da okrepi razmerje med elementi.",
"demoSharedXAxisTitle": "Skupna os x",
"demoSharedXAxisBackButtonText": "NAZAJ",
"demoSharedXAxisNextButtonText": "NAPREJ",
"demoSharedXAxisCulinaryCourseTitle": "Kulinarika",
"githubRepo": "shrambo {repoName} v GitHubu",
"fortnightlyMenuUS": "Združene države",
"fortnightlyMenuBusiness": "Posel",
"fortnightlyMenuScience": "Znanost",
"fortnightlyMenuSports": "Šport",
"fortnightlyMenuTravel": "Potovanja",
"fortnightlyMenuCulture": "Kultura",
"fortnightlyTrendingTechDesign": "Tehnološko oblikovanje",
"rallyBudgetDetailAmountLeft": "Preostali znesek",
"fortnightlyHeadlineArmy": "Reformiranje zelene vojske od znotraj",
"fortnightlyDescription": "Aplikacija za novice s poudarkom na vsebini",
"rallyBillDetailAmountDue": "Neplačan znesek",
"rallyBudgetDetailTotalCap": "Skupna omejitev",
"rallyBudgetDetailAmountUsed": "Porabljeni znesek",
"fortnightlyTrendingHealthcareRevolution": "Revolucija v zdravstvu",
"fortnightlyMenuFrontPage": "Prva stran",
"fortnightlyMenuWorld": "Svet",
"rallyBillDetailAmountPaid": "Plačani znesek",
"fortnightlyMenuPolitics": "Politika",
"fortnightlyHeadlineBees": "Primanjkljaj čebel na deželi",
"fortnightlyHeadlineGasoline": "Prihodnost bencina",
"fortnightlyTrendingGreenArmy": "Zelena vojska",
"fortnightlyHeadlineFeminists": "Feministke nad strankarstvo",
"fortnightlyHeadlineFabrics": "Oblikovalci si s tehnologijo pomagajo do tkanin prihodnosti",
"fortnightlyHeadlineStocks": "Ob stagnaciji delnic se številni ozirajo k valutam",
"fortnightlyTrendingReform": "Reforme",
"fortnightlyMenuTech": "Tehnologija",
"fortnightlyHeadlineWar": "Ločena ameriška življenja med vojno",
"fortnightlyHeadlineHealthcare": "Tiha, vendar krepka revolucija v zdravstvu",
"fortnightlyLatestUpdates": "Zadnje novice",
"fortnightlyTrendingStocks": "Delnice",
"rallyBillDetailTotalAmount": "Skupni znesek",
"demoCupertinoPickerDateTime": "Datum in ura",
"signIn": "PRIJAVA",
"dataTableRowWithSugar": "{value} s sladkorjem",
"dataTableRowApplePie": "Apple pie",
"dataTableRowDonut": "Donut",
"dataTableRowHoneycomb": "Honeycomb",
"dataTableRowLollipop": "Lollipop",
"dataTableRowJellyBean": "Jelly bean",
"dataTableRowGingerbread": "Gingerbread",
"dataTableRowCupcake": "Cupcake",
"dataTableRowEclair": "Eclair",
"dataTableRowIceCreamSandwich": "Ice Cream Sandwich",
"dataTableRowFrozenYogurt": "Frozen yogurt",
"dataTableColumnIron": "Železo (%)",
"dataTableColumnCalcium": "Kalcij (%)",
"dataTableColumnSodium": "Sol (mg)",
"demoTimePickerTitle": "Izbirnik ure",
"demo2dTransformationsResetTooltip": "Ponastavitev preoblikovanj",
"dataTableColumnFat": "Maščobe (g)",
"dataTableColumnCalories": "Kalorije",
"dataTableColumnDessert": "Posladek (1 porcija)",
"cardsDemoTravelDestinationLocation1": "Thanjavur, Tamil Nadu",
"demoTimePickerDescription": "Prikaže pogovorno okno z izbirnikom ure v slogu materialnega oblikovanja.",
"demoPickersShowPicker": "POKAŽI IZBIRNIK",
"demoTabsScrollingTitle": "Omogoča pomikanje",
"demoTabsNonScrollingTitle": "Ne omogoča pomikanja",
"craneHours": "{hours,plural,=1{1 h}two{{hours} h}few{{hours} h}other{{hours} h}}",
"craneMinutes": "{minutes,plural,=1{1 min}two{{minutes} min}few{{minutes} min}other{{minutes} min}}",
"craneFlightDuration": "{hoursShortForm} {minutesShortForm}",
"dataTableHeader": "Prehrana",
"demoDatePickerTitle": "Izbirnik datuma",
"demoPickersSubtitle": "Izbira datuma in ure",
"demoPickersTitle": "Izbirniki",
"demo2dTransformationsEditTooltip": "Urejanje ploščice",
"demoDataTableDescription": "V podatkovnih tabelah so prikazani podatki v vrsticah in stolpcih v obliki mreže. Podatki so razvrščeni na način, ki omogoča preprosto pregledovanje, tako da lahko uporabniki iščejo vzorce in podrobne informacije.",
"demo2dTransformationsDescription": "Dotaknite se, če želite urejati ploščice in uporabljati kretnje za pomikanje po prizoru. Vlecite, če se želite premikati, povlecite s prsti skupaj oz. narazen, če želite pomanjšati oziroma povečati, in sukajte z dvema prstoma. Pritisnite gumb za ponastavitev, če se želite vrniti v začetni položaj.",
"demo2dTransformationsSubtitle": "Premikanje, povečava/pomanjšava, sukanje",
"demo2dTransformationsTitle": "2D-preoblikovanja",
"demoCupertinoTextFieldPIN": "PIN",
"demoCupertinoTextFieldDescription": "Besedilno polje uporabniku omogoča vnos besedila – ali s strojno tipkovnico ali z zaslonsko tipkovnico.",
"demoCupertinoTextFieldSubtitle": "Besedilna polja v slogu iOSa",
"demoCupertinoTextFieldTitle": "Besedilna polja",
"demoDatePickerDescription": "Prikaže pogovorno okno z izbirnikom datuma v slogu materialnega oblikovanja.",
"demoCupertinoPickerTime": "Ura",
"demoCupertinoPickerDate": "Datum",
"demoCupertinoPickerTimer": "Časovnik",
"demoCupertinoPickerDescription": "Pripomoček z izbirnikom v slogu iOSa, s katerim je mogoče izbirati nize, datume, ure ali datum in uro.",
"demoCupertinoPickerSubtitle": "Izbirniki v slogu iOSa",
"demoCupertinoPickerTitle": "Izbirniki",
"dataTableRowWithHoney": "{value} z medom",
"cardsDemoTravelDestinationCity2": "Chettinad",
"bannerDemoResetText": "Ponastavitev pasice",
"bannerDemoMultipleText": "Več dejanj",
"bannerDemoLeadingText": "Ikona na začetku",
"dismiss": "OPUSTI",
"cardsDemoTappable": "Omogoča dotike",
"cardsDemoSelectable": "Omogoča izbiro (dolg pritisk)",
"cardsDemoExplore": "Raziščite",
"cardsDemoExploreSemantics": "Raziskovanje {destinationName}",
"cardsDemoShareSemantics": "Deljenje z drugimi {destinationName}",
"cardsDemoTravelDestinationTitle1": "10 najbolj priljubljenih mest za obisk v indijski zvezni državi Tamil Nadu",
"cardsDemoTravelDestinationDescription1": "Številka 10",
"cardsDemoTravelDestinationCity1": "Thanjavur",
"dataTableColumnProtein": "Beljakovine (g)",
"cardsDemoTravelDestinationTitle2": "Rokodelci južne Indije",
"cardsDemoTravelDestinationDescription2": "Svilarji",
"bannerDemoText": "Geslo je bilo posodobljeno v drugi napravi. Prijavite se znova.",
"cardsDemoTravelDestinationLocation2": "Sivaganga, Tamil Nadu",
"cardsDemoTravelDestinationTitle3": "Tempelj Brihadisvara",
"cardsDemoTravelDestinationDescription3": "Templji",
"demoBannerTitle": "Pasica",
"demoBannerSubtitle": "Prikaz pasice na seznamu",
"demoBannerDescription": "Pasica prikaže pomembno, jedrnato sporočilo in uporabnikom omogoča dejanja za uporabo ali opustitev pasice. Opustitev pasice terja ukrepanje uporabnika.",
"demoCardTitle": "Kartice",
"demoCardSubtitle": "Kartice za osnovno vrstico z zaobljenimi robovi",
"demoCardDescription": "Kartica je list materiala, uporabljenega za ponazoritev povezanih podatkov, na primer albuma, zemljepisne lokacije, obroka, podatkov za stik ipd.",
"demoDataTableTitle": "Podatkovne tabele",
"demoDataTableSubtitle": "Vrstice in stolpci s podatki",
"dataTableColumnCarbs": "Ogljikovi hidrati (g)",
"placeTanjore": "Thanjavur",
"demoGridListsTitle": "Mrežni seznami",
"placeFlowerMarket": "Tržnica s cvetjem",
"placeBronzeWorks": "Bronaste umetnine",
"placeMarket": "Tržnica",
"placeThanjavurTemple": "Tempelj v Thanjavurju",
"placeSaltFarm": "Soline",
"placeScooters": "Skiroji",
"placeSilkMaker": "Svilar",
"placeLunchPrep": "Priprava kosila",
"placeBeach": "Plaža",
"placeFisherman": "Ribič",
"demoMenuSelected": "Izbrano: {value}",
"demoMenuRemove": "Odstrani",
"demoMenuGetLink": "Pridobi povezavo",
"demoMenuShare": "Deli",
"demoBottomAppBarSubtitle": "Prikaže krmarjenje in dejanja na dnu",
"demoMenuAnItemWithASectionedMenu": "Element z menijem z razdelki",
"demoMenuADisabledMenuItem": "Onemogočen menijski element",
"demoLinearProgressIndicatorTitle": "Linearni indikator napredovanja",
"demoMenuContextMenuItemOne": "Prvi element kontekstnega menija",
"demoMenuAnItemWithASimpleMenu": "Element s preprostim menijem",
"demoCustomSlidersTitle": "Drsniki po meri",
"demoMenuAnItemWithAChecklistMenu": "Element z menijem s kontrolnim seznamom",
"demoCupertinoActivityIndicatorTitle": "Indikator dejavnosti",
"demoCupertinoActivityIndicatorSubtitle": "Indikatorji dejavnosti v slogu iOSa",
"demoCupertinoActivityIndicatorDescription": "Indikator dejavnosti v slogu iOSa, ki se vrti v desno.",
"demoCupertinoNavigationBarTitle": "Vrstica za krmarjenje",
"demoCupertinoNavigationBarSubtitle": "Vrstica za krmarjenje v slogu iOSa",
"demoCupertinoNavigationBarDescription": "Vrstica za krmarjenje v slogu iOSa. Vrstica za krmarjenje je orodna vrstica, ki jo sestavlja najmanj naslov strani na sredini orodne vrstice.",
"demoCupertinoPullToRefreshTitle": "Vlečenje navzdol za osvežitev",
"demoCupertinoPullToRefreshSubtitle": "Kontrolnik za vlečenje navzdol za osvežitev v slogu iOSa",
"demoCupertinoPullToRefreshDescription": "Pripomoček z izvedbo kontrolnika za vlečenje navzdol za osvežitev vsebine v slogu iOSa.",
"demoProgressIndicatorTitle": "Indikatorji napredovanja",
"demoProgressIndicatorSubtitle": "Linearno, okroglo, nedoločeno",
"demoCircularProgressIndicatorTitle": "Okrogli indikator napredovanja",
"demoCircularProgressIndicatorDescription": "Okrogli indikator napredovanja z materialnim oblikovanjem, ki z vrtenjem nakazuje, da je aplikacija zasedena.",
"demoMenuFour": "Štiri",
"demoLinearProgressIndicatorDescription": "Linearni indikator napredovanja z materialnim oblikovanjem, znan tudi kot vrstica napredovanja.",
"demoTooltipTitle": "Opisi orodja",
"demoTooltipSubtitle": "Kratko sporočilo, prikazano ob dolgem pritisku ali premiku miškinega kazalca na element",
"demoTooltipDescription": "Opisi orodja zagotavljajo besedilne oznake, ki pomagajo pojasniti funkcijo gumba ali drugega dejanja uporabniškega vmesnika. Opisi orodja prikazujejo informativno besedilo, kadar uporabniki premaknejo miškin kazalec na element, izberejo element ali za dalj časa pritisnejo element.",
"demoTooltipInstructions": "Za dalj časa pritisnite element ali premaknite miškin kazalec nanj, če želite prikazati opis orodja.",
"placeChennai": "Čenaj",
"demoMenuChecked": "Potrjeno: {value}",
"placeChettinad": "Chettinad",
"demoMenuPreview": "Predogled",
"demoBottomAppBarTitle": "Spodnja vrstica aplikacije",
"demoBottomAppBarDescription": "Spodnje vrstice aplikacije omogočajo dostop do spodnjega predala za krmarjenje in do štirih dejanj, vključno s plavajočim interaktivnim gumbom.",
"bottomAppBarNotch": "Izrez",
"bottomAppBarPosition": "Položaj plavajočega interaktivnega gumba",
"bottomAppBarPositionDockedEnd": "Zasidrano – na koncu",
"bottomAppBarPositionDockedCenter": "Zasidrano – v sredini",
"bottomAppBarPositionFloatingEnd": "Plavajoče – na koncu",
"bottomAppBarPositionFloatingCenter": "Plavajoče – na sredini",
"demoSlidersEditableNumericalValue": "Številska vrednost, ki jo je mogoče urediti",
"demoGridListsSubtitle": "Postavitev z vrsticami in stolpci",
"demoGridListsDescription": "Mrežni seznami so najbolj primerni za predstavljanje homogenih podatkov, in sicer običajno slik. Posameznemu elementu na mrežnem seznamu pravimo ploščica.",
"demoGridListsImageOnlyTitle": "Samo slika",
"demoGridListsHeaderTitle": "Z glavo",
"demoGridListsFooterTitle": "Z nogo",
"demoSlidersTitle": "Drsniki",
"demoSlidersSubtitle": "Pripomočki za izbiranje vrednosti z vlečenjem",
"demoSlidersDescription": "Drsniki odražajo niz vrednosti vzdolž vrstice, izmed katerih lahko uporabniki izberejo posamezno vrednost. Kot nalašč so za prilagajanje nastavitev, kot je glasnost ali svetlost, ali uveljavljanje filtrov za slike.",
"demoRangeSlidersTitle": "Drsniki za obseg",
"demoRangeSlidersDescription": "Drsniki odražajo niz vrednosti vzdolž vrstice. Na obeh koncih vrstice imajo lahko ikoni, ki odražata obseg vrednosti. Kot nalašč so za prilagajanje nastavitev, kot je glasnost ali svetlost, ali uveljavljanje filtrov za slike.",
"demoMenuAnItemWithAContextMenuButton": "Element s kontekstnim menijem",
"demoCustomSlidersDescription": "Drsniki odražajo niz vrednosti vzdolž vrstice, izmed katerih lahko uporabniki izberejo posamezno vrednost ali obseg vrednosti. Drsnikom je mogoče določiti temo in jih prilagoditi.",
"demoSlidersContinuousWithEditableNumericalValue": "Neprekinjeno s številsko vrednostjo, ki jo je mogoče urediti",
"demoSlidersDiscrete": "Diskretno",
"demoSlidersDiscreteSliderWithCustomTheme": "Diskretni drsnik s temo po meri",
"demoSlidersContinuousRangeSliderWithCustomTheme": "Drsnik z neprekinjenim obsegom in temo po meri",
"demoSlidersContinuous": "Neprekinjeno",
"placePondicherry": "Pondicherry",
"demoMenuTitle": "Meni",
"demoContextMenuTitle": "Kontekstni meni",
"demoSectionedMenuTitle": "Meni z razdelki",
"demoSimpleMenuTitle": "Preprosti meni",
"demoChecklistMenuTitle": "Meni s kontrolnim seznamom",
"demoMenuSubtitle": "Menijski gumbi in preprosti meniji",
"demoMenuDescription": "Meni prikaže seznam izbir na začasni površini. Prikažejo se, ko uporabniki uporabijo gumb, dejanje ali drug kontrolnik.",
"demoMenuItemValueOne": "Prvi menijski element",
"demoMenuItemValueTwo": "Drugi menijski element",
"demoMenuItemValueThree": "Tretji menijski element",
"demoMenuOne": "Ena",
"demoMenuTwo": "Dve",
"demoMenuThree": "Tri",
"demoMenuContextMenuItemThree": "Tretji element kontekstnega menija",
"demoCupertinoSwitchSubtitle": "Stikalo v slogu iOSa",
"demoSnackbarsText": "To je spodnja obvestilna vrstica.",
"demoCupertinoSliderSubtitle": "Drsnik v slogu iOSa",
"demoCupertinoSliderDescription": "Drsnik je mogoče uporabiti za izbiro neprekinjenih ali diskretnih nizov vrednosti.",
"demoCupertinoSliderContinuous": "Neprekinjeno: {value}",
"demoCupertinoSliderDiscrete": "Diskretno: {value}",
"demoSnackbarsAction": "Pritisnili ste dejanje spodnje obvestilne vrstice.",
"backToGallery": "Nazaj v galerijo",
"demoCupertinoTabBarTitle": "Vrstica z zavihki",
"demoCupertinoSwitchDescription": "Stikalo se uporablja za preklop stanja vklop/izklop posamezne nastavitve.",
"demoSnackbarsActionButtonLabel": "DEJANJE",
"cupertinoTabBarProfileTab": "Profil",
"demoSnackbarsButtonLabel": "PRIKAŽI SPODNJO OBVESTILNO VRSTICO",
"demoSnackbarsDescription": "Spodnje obvestilne vrstice uporabnike obveščajo o procesu, ki ga aplikacija je ali ga bo izvedla. Prikazane so začasno, in sicer blizu dna zaslona. Ne smejo motiti uporabniške izkušnje in uporabniku ni treba ukrepati, da izginejo.",
"demoSnackbarsSubtitle": "Spodnje obvestilne vrstice prikazujejo sporočila na dnu zaslona",
"demoSnackbarsTitle": "Spodnje obvestilne vrstice",
"demoCupertinoSliderTitle": "Drsnik",
"cupertinoTabBarChatTab": "Klepet",
"cupertinoTabBarHomeTab": "Začetek",
"demoCupertinoTabBarDescription": "Spodnja vrstica za krmarjenje z zavihki v slogu iOSa. Prikazuje več zavihkov z enim aktivnim zavihkov – privzeto je to prvi zavihek.",
"demoCupertinoTabBarSubtitle": "Spodnja vrstica z zavihki v slogu iOSa",
"demoOptionsFeatureTitle": "Ogled možnosti",
"demoOptionsFeatureDescription": "Dotaknite se tukaj, če si želite ogledati razpoložljive možnosti za to predstavitev.",
"demoCodeViewerCopyAll": "KOPIRAJ VSE",
"shrineScreenReaderRemoveProductButton": "Odstranitev izdelka {product}",
"shrineScreenReaderProductAddToCart": "Dodaj v košarico",
"shrineScreenReaderCart": "{quantity,plural,=0{Nakupovalni voziček, ni izdelkov}=1{Nakupovalni voziček, 1 izdelek}two{Nakupovalni voziček, {quantity} izdelka}few{Nakupovalni voziček, {quantity} izdelki}other{Nakupovalni voziček, {quantity} izdelkov}}",
"demoCodeViewerFailedToCopyToClipboardMessage": "Kopiranje v odložišče ni uspelo: {error}",
"demoCodeViewerCopiedToClipboardMessage": "Kopirano v odložišče.",
"craneSleep8SemanticLabel": "Majevske razvaline na pečini nad obalo",
"craneSleep4SemanticLabel": "Hotel ob jezeru z gorami v ozadju",
"craneSleep2SemanticLabel": "Trdnjava Machu Picchu",
"craneSleep1SemanticLabel": "Planinska koča v zasneženi pokrajini z zimzelenimi drevesi",
"craneSleep0SemanticLabel": "Bungalovi nad vodo",
"craneFly13SemanticLabel": "Obmorski bazen s palmami",
"craneFly12SemanticLabel": "Bazen s palmami",
"craneFly11SemanticLabel": "Opečnat svetilnik na morju",
"craneFly10SemanticLabel": "Stolpi mošeje al-Azhar ob sončnem zahodu",
"craneFly9SemanticLabel": "Moški, naslonjen na starinski modri avtomobil",
"craneFly8SemanticLabel": "Supertree Grove",
"craneEat9SemanticLabel": "Kavarniški pult s pecivom",
"craneEat2SemanticLabel": "Burger",
"craneFly5SemanticLabel": "Hotel ob jezeru z gorami v ozadju",
"demoSelectionControlsSubtitle": "Potrditvena polja, izbirni gumbi in stikala",
"craneEat10SemanticLabel": "Ženska, ki drži ogromen sendvič s pastramijem",
"craneFly4SemanticLabel": "Bungalovi nad vodo",
"craneEat7SemanticLabel": "Vhod v pekarno",
"craneEat6SemanticLabel": "Jed z rakci",
"craneEat5SemanticLabel": "Prostor za sedenje v restavraciji z umetniškim vzdušjem",
"craneEat4SemanticLabel": "Čokoladni posladek",
"craneEat3SemanticLabel": "Korejski taco",
"craneFly3SemanticLabel": "Trdnjava Machu Picchu",
"craneEat1SemanticLabel": "Prazen bar s stoli v slogu okrepčevalnice",
"craneEat0SemanticLabel": "Pica v krušni peči",
"craneSleep11SemanticLabel": "Nebotičnik Taipei 101",
"craneSleep10SemanticLabel": "Stolpi mošeje al-Azhar ob sončnem zahodu",
"craneSleep9SemanticLabel": "Opečnat svetilnik na morju",
"craneEat8SemanticLabel": "Porcija sladkovodnega raka",
"craneSleep7SemanticLabel": "Barvita stanovanja na trgu Ribeira",
"craneSleep6SemanticLabel": "Bazen s palmami",
"craneSleep5SemanticLabel": "Šotor na polju",
"settingsButtonCloseLabel": "Zapiranje nastavitev",
"demoSelectionControlsCheckboxDescription": "Potrditvena polja omogočajo uporabniku izbiro več možnosti iz nabora. Običajna vrednost potrditvenega polja je True ali False. Vrednost potrditvenega polja za tri stanja je lahko tudi ničelna.",
"settingsButtonLabel": "Nastavitve",
"demoListsTitle": "Seznami",
"demoListsSubtitle": "Postavitve seznama, ki omogoča pomikanje",
"demoListsDescription": "Ena vrstica s fiksno višino, ki običajno vsebuje besedilo in ikono na začetku ali koncu.",
"demoOneLineListsTitle": "Ena vrstica",
"demoTwoLineListsTitle": "Dve vrstici",
"demoListsSecondary": "Sekundarno besedilo",
"demoSelectionControlsTitle": "Kontrolniki za izbiro",
"craneFly7SemanticLabel": "Gora Rushmore",
"demoSelectionControlsCheckboxTitle": "Potrditveno polje",
"craneSleep3SemanticLabel": "Moški, naslonjen na starinski modri avtomobil",
"demoSelectionControlsRadioTitle": "Izbirni gumb",
"demoSelectionControlsRadioDescription": "Z izbirnimi gumbi lahko uporabnik izbere eno možnost iz nabora. Izbirne gumbe uporabite za izključno izbiro, če menite, da mora uporabnik videti vse razpoložljive možnosti drugo ob drugi.",
"demoSelectionControlsSwitchTitle": "Stikalo",
"demoSelectionControlsSwitchDescription": "Stikala za vklop/izklop spremenijo stanje posamezne možnosti nastavitev. Z ustrezno oznako v besedilu mora biti jasno, katero možnost stikalo upravlja in kakšno je njegovo stanje.",
"craneFly0SemanticLabel": "Planinska koča v zasneženi pokrajini z zimzelenimi drevesi",
"craneFly1SemanticLabel": "Šotor na polju",
"craneFly2SemanticLabel": "Molilne zastavice z zasneženo goro v ozadju",
"craneFly6SemanticLabel": "Pogled iz zraka na Palacio de Bellas Artes",
"rallySeeAllAccounts": "Ogled vseh računov",
"rallyBillAmount": "Rok za plačilo položnice »{billName}« z zneskom {amount} je {date}.",
"shrineTooltipCloseCart": "Zapiranje vozička",
"shrineTooltipCloseMenu": "Zapiranje menija",
"shrineTooltipOpenMenu": "Odpiranje menija",
"shrineTooltipSettings": "Nastavitve",
"shrineTooltipSearch": "Iskanje",
"demoTabsDescription": "Na zavihkih je vsebina organizirana na več zaslonih, po naborih podatkov in glede na druge uporabe.",
"demoTabsSubtitle": "Zavihki s pogledi, ki omogočajo neodvisno pomikanje",
"demoTabsTitle": "Zavihki",
"rallyBudgetAmount": "Proračun {budgetName} s porabljenimi sredstvi v višini {amountUsed} od {amountTotal}, na voljo še {amountLeft}",
"shrineTooltipRemoveItem": "Odstranitev elementa",
"rallyAccountAmount": "{amount} na račun »{accountName}« s številko {accountNumber}.",
"rallySeeAllBudgets": "Ogled vseh proračunov",
"rallySeeAllBills": "Ogled vseh položnic",
"craneFormDate": "Izberite datum",
"craneFormOrigin": "Izberite izhodišče",
"craneFly2": "Dolina Khumbu, Nepal",
"craneFly3": "Machu Picchu, Peru",
"craneFly4": "Malé, Maldivi",
"craneFly5": "Vitznau, Švica",
"craneFly6": "Ciudad de Mexico, Mehika",
"craneFly7": "Gora Rushmore, Združene države",
"settingsTextDirectionLocaleBased": "Na podlagi jezika",
"craneFly9": "Havana, Kuba",
"craneFly10": "Kairo, Egipt",
"craneFly11": "Lizbona, Portugalska",
"craneFly12": "Napa, Združene države",
"craneFly13": "Bali, Indonezija",
"craneSleep0": "Malé, Maldivi",
"craneSleep1": "Aspen, Združene države",
"craneSleep2": "Machu Picchu, Peru",
"demoCupertinoSegmentedControlTitle": "Segmentirano upravljanje",
"craneSleep4": "Vitznau, Švica",
"craneSleep5": "Big Sur, Združene države",
"craneSleep6": "Napa, Združene države",
"craneSleep7": "Porto, Portugalska",
"craneSleep8": "Tulum, Mehika",
"craneEat5": "Seul, Južna Koreja",
"demoChipTitle": "Elementi",
"demoChipSubtitle": "Kompaktni elementi, ki predstavljajo vnos, atribut ali dejanje",
"demoActionChipTitle": "Element za dejanja",
"demoActionChipDescription": "Elementi za dejanja so niz možnosti, ki sprožijo dejanje, povezano z glavno vsebino. Elementi za dejanja se morajo v uporabniškem vmesniku pojavljati dinamično in kontekstualno.",
"demoChoiceChipTitle": "Element za izbiro",
"demoChoiceChipDescription": "Elementi za izbiro predstavljajo posamezno izbiro v nizu. Elementi za izbiro vsebujejo povezano opisno besedilo ali kategorije.",
"demoFilterChipTitle": "Element za filtre",
"demoFilterChipDescription": "Elementi za filtre uporabljajo oznake ali opisne besede za filtriranje vsebine.",
"demoInputChipTitle": "Element za vnos",
"demoInputChipDescription": "Elementi za vnos predstavljajo zapletene podatke, na primer o subjektu (osebi, mestu ali predmetu) ali pogovornem besedilu, v zgoščeni obliki.",
"craneSleep9": "Lizbona, Portugalska",
"craneEat10": "Lizbona, Portugalska",
"demoCupertinoSegmentedControlDescription": "Uporablja se za izbiro med več možnostmi, ki se medsebojno izključujejo. Če je izbrana ena možnost segmentiranega upravljanja, druge možnosti segmentiranega upravljanja niso več izbrane.",
"chipTurnOnLights": "Vklop luči",
"chipSmall": "Majhna",
"chipMedium": "Srednja",
"chipLarge": "Velika",
"chipElevator": "Dvigalo",
"chipWasher": "Pralni stroj",
"chipFireplace": "Kamin",
"chipBiking": "Kolesarjenje",
"craneFormDiners": "Okrepčevalnice",
"rallyAlertsMessageUnassignedTransactions": "{count,plural,=1{Povečajte morebitno davčno olajšavo. Dodelite kategorije eni transakciji brez dodelitev.}two{Povečajte morebitno davčno olajšavo. Dodelite kategorije {count} transakcijama brez dodelitev.}few{Povečajte morebitno davčno olajšavo. Dodelite kategorije {count} transakcijam brez dodelitev.}other{Povečajte morebitno davčno olajšavo. Dodelite kategorije {count} transakcijam brez dodelitev.}}",
"craneFormTime": "Izberite čas",
"craneFormLocation": "Izberite lokacijo",
"craneFormTravelers": "Popotniki",
"craneEat8": "Atlanta, Združene države",
"craneFormDestination": "Izberite cilj",
"craneFormDates": "Izberite datume",
"craneFly": "LETENJE",
"craneSleep": "SPANJE",
"craneEat": "HRANA",
"craneFlySubhead": "Raziskovanje letov glede na cilj",
"craneSleepSubhead": "Raziskovanje kapacitet glede na cilj",
"craneEatSubhead": "Raziskovanje restavracij glede na cilj",
"craneFlyStops": "{numberOfStops,plural,=0{Direktni let}=1{1 postanek}two{{numberOfStops} postanka}few{{numberOfStops} postanki}other{{numberOfStops} postankov}}",
"craneSleepProperties": "{totalProperties,plural,=0{Ni razpoložljivih kapacitet}=1{Ena razpoložljiva kapaciteta}two{{totalProperties} razpoložljivi kapaciteti}few{{totalProperties} razpoložljive kapacitete}other{{totalProperties} razpoložljivih kapacitet}}",
"craneEatRestaurants": "{totalRestaurants,plural,=0{Ni restavracij}=1{Ena restavracija}two{{totalRestaurants} restavraciji}few{{totalRestaurants} restavracije}other{{totalRestaurants} restavracij}}",
"craneFly0": "Aspen, Združene države",
"demoCupertinoSegmentedControlSubtitle": "Segmentirano upravljanje v slogu iOSa",
"craneSleep10": "Kairo, Egipt",
"craneEat9": "Madrid, Španija",
"craneFly1": "Big Sur, Združene države",
"craneEat7": "Nashville, Združene države",
"craneEat6": "Seattle, Združene države",
"craneFly8": "Singapur",
"craneEat4": "Pariz, Francija",
"craneEat3": "Portland, Združene države",
"craneEat2": "Córdoba, Argentina",
"craneEat1": "Dallas, Združene države",
"craneEat0": "Neapelj, Italija",
"craneSleep11": "Tajpej, Tajska",
"craneSleep3": "Havana, Kuba",
"shrineLogoutButtonCaption": "ODJAVA",
"rallyTitleBills": "POLOŽNICE",
"rallyTitleAccounts": "RAČUNI",
"shrineProductVagabondSack": "Torba Vagabond",
"rallyAccountDetailDataInterestYtd": "Obresti od začetka leta do danes",
"shrineProductWhitneyBelt": "Pas Whitney",
"shrineProductGardenStrand": "Vrtni okraski na vrvici",
"shrineProductStrutEarrings": "Uhani Strut",
"shrineProductVarsitySocks": "Nogavice z univerzitetnim vzorcem",
"shrineProductWeaveKeyring": "Pleteni obesek za ključe",
"shrineProductGatsbyHat": "Čepica",
"shrineProductShrugBag": "Enoramna torba",
"shrineProductGiltDeskTrio": "Tri pozlačene mizice",
"shrineProductCopperWireRack": "Bakrena žičnata stalaža",
"shrineProductSootheCeramicSet": "Keramični komplet za pomirjanje",
"shrineProductHurrahsTeaSet": "Čajni komplet Hurrahs",
"shrineProductBlueStoneMug": "Lonček v slogu modrega kamna",
"shrineProductRainwaterTray": "Posoda za deževnico",
"shrineProductChambrayNapkins": "Prtički iz kamrika",
"shrineProductSucculentPlanters": "Okrasni lonci za debelolistnice",
"shrineProductQuartetTable": "Miza za štiri",
"shrineProductKitchenQuattro": "Kuhinjski pomočnik",
"shrineProductClaySweater": "Pulover opečnate barve",
"shrineProductSeaTunic": "Tunika z morskim vzorcem",
"shrineProductPlasterTunic": "Umazano bela tunika",
"rallyBudgetCategoryRestaurants": "Restavracije",
"shrineProductChambrayShirt": "Majica iz kamrika",
"shrineProductSeabreezeSweater": "Pulover z vzorcem morskih valov",
"shrineProductGentryJacket": "Jakna gentry",
"shrineProductNavyTrousers": "Mornarsko modre hlače",
"shrineProductWalterHenleyWhite": "Majica z V-izrezom (bela)",
"shrineProductSurfAndPerfShirt": "Surferska majica",
"shrineProductGingerScarf": "Rdečkasti šal",
"shrineProductRamonaCrossover": "Crossover izdelek Ramona",
"shrineProductClassicWhiteCollar": "Klasična bela srajca",
"shrineProductSunshirtDress": "Tunika za na plažo",
"rallyAccountDetailDataInterestRate": "Obrestna mera",
"rallyAccountDetailDataAnnualPercentageYield": "Letni donos v odstotkih",
"rallyAccountDataVacation": "Počitnice",
"shrineProductFineLinesTee": "Majica s črtami",
"rallyAccountDataHomeSavings": "Domači prihranki",
"rallyAccountDataChecking": "Preverjanje",
"rallyAccountDetailDataInterestPaidLastYear": "Lani plačane obresti",
"rallyAccountDetailDataNextStatement": "Naslednji izpisek",
"rallyAccountDetailDataAccountOwner": "Lastnik računa",
"rallyBudgetCategoryCoffeeShops": "Kavarne",
"rallyBudgetCategoryGroceries": "Živila",
"shrineProductCeriseScallopTee": "Svetlordeča majica z volančki",
"rallyBudgetCategoryClothing": "Oblačila",
"rallySettingsManageAccounts": "Upravljanje računov",
"rallyAccountDataCarSavings": "Prihranki pri avtomobilu",
"rallySettingsTaxDocuments": "Davčni dokumenti",
"rallySettingsPasscodeAndTouchId": "Geslo in Touch ID",
"rallySettingsNotifications": "Obvestila",
"rallySettingsPersonalInformation": "Osebni podatki",
"rallySettingsPaperlessSettings": "Nastavitev brez papirja",
"rallySettingsFindAtms": "Iskanje bankomatov",
"rallySettingsHelp": "Pomoč",
"rallySettingsSignOut": "Odjava",
"rallyAccountTotal": "Skupno",
"rallyBillsDue": "Rok",
"rallyBudgetLeft": "preostalih sredstev",
"rallyAccounts": "Računi",
"rallyBills": "Položnice",
"rallyBudgets": "Proračuni",
"rallyAlerts": "Opozorila",
"rallySeeAll": "PRIKAŽI VSE",
"rallyFinanceLeft": "PREOSTALIH SREDSTEV",
"rallyTitleOverview": "PREGLED",
"shrineProductShoulderRollsTee": "Majica z izrezom na ramah",
"shrineNextButtonCaption": "NAPREJ",
"rallyTitleBudgets": "PRORAČUNI",
"rallyTitleSettings": "NASTAVITVE",
"rallyLoginLoginToRally": "Prijava v aplikacijo Rally",
"rallyLoginNoAccount": "Nimate računa?",
"rallyLoginSignUp": "REGISTRACIJA",
"rallyLoginUsername": "Uporabniško ime",
"rallyLoginPassword": "Geslo",
"rallyLoginLabelLogin": "Prijava",
"rallyLoginRememberMe": "Zapomni si me",
"rallyLoginButtonLogin": "PRIJAVA",
"rallyAlertsMessageHeadsUpShopping": "Pozor, porabili ste {percent} proračuna za nakupovanje za ta mesec.",
"rallyAlertsMessageSpentOnRestaurants": "Ta teden ste porabili {amount} za restavracije.",
"rallyAlertsMessageATMFees": "Ta mesec ste porabili {amount} za provizije na bankomatih.",
"rallyAlertsMessageCheckingAccount": "Bravo. Stanje na transakcijskem računu je {percent} višje kot prejšnji mesec.",
"shrineMenuCaption": "MENI",
"shrineCategoryNameAll": "VSE",
"shrineCategoryNameAccessories": "DODATKI",
"shrineCategoryNameClothing": "OBLAČILA",
"shrineCategoryNameHome": "DOM",
"shrineLoginUsernameLabel": "Uporabniško ime",
"shrineLoginPasswordLabel": "Geslo",
"shrineCancelButtonCaption": "PREKLIČI",
"shrineCartTaxCaption": "Davek:",
"shrineCartPageCaption": "VOZIČEK",
"shrineProductQuantity": "Količina: {quantity}",
"shrineProductPrice": "x {price}",
"shrineCartItemCount": "{quantity,plural,=0{NI IZDELKOV}=1{1 IZDELEK}two{{quantity} IZDELKA}few{{quantity} IZDELKI}other{{quantity} IZDELKOV}}",
"shrineCartClearButtonCaption": "POČISTI VOZIČEK",
"shrineCartTotalCaption": "SKUPNO",
"shrineCartSubtotalCaption": "Delna vsota:",
"shrineCartShippingCaption": "Pošiljanje:",
"shrineProductGreySlouchTank": "Sivi ohlapni zgornji del",
"shrineProductStellaSunglasses": "Očala Stella",
"shrineProductWhitePinstripeShirt": "Bela črtasta srajca",
"demoTextFieldWhereCanWeReachYou": "Na kateri številki ste dosegljivi?",
"settingsTextDirectionLTR": "OD LEVE PROTI DESNI",
"settingsTextScalingLarge": "Velika",
"demoBottomSheetHeader": "Glava",
"demoBottomSheetItem": "Element {value}",
"demoBottomTextFieldsTitle": "Besedilna polja",
"demoTextFieldTitle": "Besedilna polja",
"demoTextFieldSubtitle": "Vrstica besedila in številk, ki omogočajo urejanje",
"demoTextFieldDescription": "Besedilna polja uporabnikom omogočajo vnašanje besedila v uporabniški vmesnik. Običajno se pojavilo v obrazcih in pogovornih oknih.",
"demoTextFieldShowPasswordLabel": "Pokaži geslo",
"demoTextFieldHidePasswordLabel": "Skrij geslo",
"demoTextFieldFormErrors": "Pred pošiljanjem popravite rdeče obarvane napake.",
"demoTextFieldNameRequired": "Ime je obvezno.",
"demoTextFieldOnlyAlphabeticalChars": "Vnesite samo abecedne znake.",
"demoTextFieldEnterUSPhoneNumber": "(###) ###-#### – Vnesite telefonsko številko v Združenih državah.",
"demoTextFieldEnterPassword": "Vnesite geslo.",
"demoTextFieldPasswordsDoNotMatch": "Gesli se ne ujemata",
"demoTextFieldWhatDoPeopleCallYou": "Kako vas ljudje kličejo?",
"demoTextFieldNameField": "Ime*",
"demoBottomSheetButtonText": "POKAŽI LIST NA DNU ZASLONA",
"demoTextFieldPhoneNumber": "Telefonska številka*",
"demoBottomSheetTitle": "List na dnu zaslona",
"demoTextFieldEmail": "E-poštni naslov",
"demoTextFieldTellUsAboutYourself": "Povejte nam več o sebi (napišite na primer, s čim se ukvarjate ali katere konjičke imate)",
"demoTextFieldKeepItShort": "Bodite jedrnati, to je zgolj predstavitev.",
"starterAppGenericButton": "GUMB",
"demoTextFieldLifeStory": "Življenjska zgodba",
"demoTextFieldSalary": "Plača",
"demoTextFieldUSD": "USD",
"demoTextFieldNoMoreThan": "Največ 8 znakov.",
"demoTextFieldPassword": "Geslo*",
"demoTextFieldRetypePassword": "Znova vnesite geslo*",
"demoTextFieldSubmit": "POŠLJI",
"demoBottomNavigationSubtitle": "Krmarjenje na dnu zaslona, ki se postopno prikazuje in izginja",
"demoBottomSheetAddLabel": "Dodajanje",
"demoBottomSheetModalDescription": "Modalni list na dnu zaslona je nadomestna možnost za meni ali pogovorno okno in uporabniku preprečuje uporabo preostanka aplikacije.",
"demoBottomSheetModalTitle": "Modalni list na dnu zaslona",
"demoBottomSheetPersistentDescription": "Trajni list na dnu zaslona prikazuje podatke, ki dopolnjujejo glavno vsebino aplikacije. Trajni list na dnu zaslona ostaja viden, tudi ko uporabnik uporablja druge dele aplikacije.",
"demoBottomSheetPersistentTitle": "Trajni list na dnu zaslona",
"demoBottomSheetSubtitle": "Trajni in modalni listi na dnu zaslona",
"demoTextFieldNameHasPhoneNumber": "Telefonska številka osebe {name} je {phoneNumber}",
"buttonText": "GUMB",
"demoTypographyDescription": "Definicije raznih tipografskih slogov v materialnem oblikovanju.",
"demoTypographySubtitle": "Vsi vnaprej določeni besedilni slogi",
"demoTypographyTitle": "Tipografija",
"demoFullscreenDialogDescription": "Element fullscreenDialog določa, ali je dohodna stran celozaslonsko pogovorno okno",
"demoFlatButtonDescription": "Ravni gumb prikazuje pljusk črnila ob pritisku, vendar se ne dvigne. Ravne gumbe uporabljajte v orodnih vrsticah, v pogovornih oknih in v vrstici z odmikom.",
"demoBottomNavigationDescription": "Spodnje vrstice za krmarjenje na dnu zaslona prikazujejo od tri do pet ciljev. Vsak cilj predstavljata ikona in izbirna besedilna oznaka. Ko se uporabnik dotakne ikone za krmarjenje na dnu zaslona, se odpre cilj krmarjenja najvišje ravni, povezan s to ikono.",
"demoBottomNavigationSelectedLabel": "Izbrana oznaka",
"demoBottomNavigationPersistentLabels": "Trajne oznake",
"starterAppDrawerItem": "Element {value}",
"demoTextFieldRequiredField": "* označuje obvezno polje",
"demoBottomNavigationTitle": "Krmarjenju na dnu zaslona",
"settingsLightTheme": "Svetla",
"settingsTheme": "Tema",
"settingsPlatformIOS": "iOS",
"settingsPlatformAndroid": "Android",
"settingsTextDirectionRTL": "OD DESNE PROTI LEVI",
"settingsTextScalingHuge": "Zelo velika",
"cupertinoButton": "Gumb",
"settingsTextScalingNormal": "Navadna",
"settingsTextScalingSmall": "Majhna",
"settingsSystemDefault": "Sistemsko",
"settingsTitle": "Nastavitve",
"rallyDescription": "Aplikacija za osebne finance",
"aboutDialogDescription": "Če si želite ogledati izvorno kodo za to aplikacijo, odprite {repoLink}.",
"bottomNavigationCommentsTab": "Komentarji",
"starterAppGenericBody": "Telo",
"starterAppGenericHeadline": "Naslov",
"starterAppGenericSubtitle": "Podnaslov",
"starterAppGenericTitle": "Naslov",
"starterAppTooltipSearch": "Iskanje",
"starterAppTooltipShare": "Deljenje z drugimi",
"starterAppTooltipFavorite": "Priljubljeno",
"starterAppTooltipAdd": "Dodajanje",
"bottomNavigationCalendarTab": "Koledar",
"starterAppDescription": "Odzivna začetna postavitev",
"starterAppTitle": "Aplikacija za začetek",
"aboutFlutterSamplesRepo": "Shramba vzorcev za Flutter v GitHubu",
"bottomNavigationContentPlaceholder": "Nadomestni znak za zavihek {title}",
"bottomNavigationCameraTab": "Fotoaparat",
"bottomNavigationAlarmTab": "Alarm",
"bottomNavigationAccountTab": "Račun",
"demoTextFieldYourEmailAddress": "Vaš e-poštni naslov",
"demoToggleButtonDescription": "Preklopne gumbe je mogoče uporabiti za združevanje sorodnih možnosti. Če želite poudariti skupine sorodnih preklopnih gumbov, mora imeti skupina skupni vsebnik",
"colorsGrey": "SIVA",
"colorsBrown": "RJAVA",
"colorsDeepOrange": "MOČNO ORANŽNA",
"colorsOrange": "ORANŽNA",
"colorsAmber": "JANTARNA",
"colorsYellow": "RUMENA",
"colorsLime": "RUMENOZELENA",
"colorsLightGreen": "SVETLO ZELENA",
"colorsGreen": "ZELENA",
"homeHeaderGallery": "Galerija",
"homeHeaderCategories": "Kategorije",
"shrineDescription": "Modna aplikacija za nakupovanje",
"craneDescription": "Individualno prilagojena aplikacija za potovanja",
"homeCategoryReference": "SLOGI IN DRUGO",
"demoInvalidURL": "URL-ja ni bilo mogoče prikazati:",
"demoOptionsTooltip": "Možnosti",
"demoInfoTooltip": "Informacije",
"demoCodeTooltip": "Predstavitvena koda",
"demoDocumentationTooltip": "Dokumentacija za API",
"demoFullscreenTooltip": "Celozaslonski način",
"settingsTextScaling": "Prilagajanje besedila",
"settingsTextDirection": "Smer besedila",
"settingsLocale": "Jezik",
"settingsPlatformMechanics": "Mehanika okolja",
"settingsDarkTheme": "Temna",
"settingsSlowMotion": "Počasni posnetek",
"settingsAbout": "O aplikaciji Flutter Gallery",
"settingsFeedback": "Pošiljanje povratnih informacij",
"settingsAttribution": "Oblikovali pri podjetju TOASTER v Londonu",
"demoButtonTitle": "Gumbi",
"demoButtonSubtitle": "Besedilo, dvignjeno, orisano in drugo.",
"demoFlatButtonTitle": "Ravni gumb",
"demoRaisedButtonDescription": "Dvignjeni gumbi dodajo razsežnosti večinoma ravnim postavitvam. Poudarijo funkcije na mestih z veliko elementi ali širokih mestih.",
"demoRaisedButtonTitle": "Dvignjen gumb",
"demoOutlineButtonTitle": "Orisni gumb",
"demoOutlineButtonDescription": "Orisni gumbi ob pritisku postanejo prosojni in dvignjeni. Pogosto so združeni z dvignjenimi gumbi in označujejo nadomestno, sekundarno dejanje.",
"demoToggleButtonTitle": "Preklopni gumbi",
"colorsTeal": "ZELENOMODRA",
"demoFloatingButtonTitle": "Plavajoči interaktivni gumb",
"demoFloatingButtonDescription": "Plavajoči interaktivni gumb je gumb z okroglo ikono, ki se prikaže nad vsebino in označuje primarno dejanje v aplikaciji.",
"demoDialogTitle": "Pogovorna okna",
"demoDialogSubtitle": "Preprosto, opozorila in celozaslonsko",
"demoAlertDialogTitle": "Opozorilo",
"demoAlertDialogDescription": "Opozorilno pogovorno okno obvešča uporabnika o primerih, v katerih se zahteva potrditev. Opozorilno pogovorno okno ima izbirni naslov in izbirni seznam dejanj.",
"demoAlertTitleDialogTitle": "Opozorilo z naslovom",
"demoSimpleDialogTitle": "Preprosto",
"demoSimpleDialogDescription": "Preprosto pogovorno okno omogoča uporabniku izbiro med več možnostmi. Preprosto pogovorno okno ima izbirni naslov, ki je prikazan nad izbirami.",
"demoFullscreenDialogTitle": "Celozaslonsko",
"demoCupertinoButtonsTitle": "Gumbi",
"demoCupertinoButtonsSubtitle": "Gumbi v slogu iOSa",
"demoCupertinoButtonsDescription": "Gumb v slogu iOSa. Vsebuje besedilo in/ali ikono, ki se zatemni ali odtemni ob dotiku. Lahko ima tudi ozadje.",
"demoCupertinoAlertsTitle": "Opozorila",
"demoCupertinoAlertsSubtitle": "Opozorilna pogovorna okna v slogu iOSa",
"demoCupertinoAlertTitle": "Opozorilo",
"demoCupertinoAlertDescription": "Opozorilno pogovorno okno obvešča uporabnika o primerih, v katerih se zahteva potrditev. Opozorilno pogovorno okno ima izbirni naslov, izbirno vsebino in izbirni seznam dejanj. Naslov je prikazan nad vsebino in dejanja so prikazana pod vsebino.",
"demoCupertinoAlertWithTitleTitle": "Opozorilo z naslovom",
"demoCupertinoAlertButtonsTitle": "Opozorilo z gumbi",
"demoCupertinoAlertButtonsOnlyTitle": "Samo opozorilni gumbi",
"demoCupertinoActionSheetTitle": "Preglednica z dejanji",
"demoCupertinoActionSheetDescription": "Preglednica z dejanji je določen slog opozorila, ki uporabniku omogoča najmanj dve možnosti glede trenutnega konteksta. Preglednica z dejanji ima lahko naslov, dodatno sporočilo in seznam dejanj.",
"demoColorsTitle": "Barve",
"demoColorsSubtitle": "Vse vnaprej določene barve",
"demoColorsDescription": "Barvne konstante in konstante barvnih vzorcev, ki predstavljajo barvno paleto materialnega oblikovanja.",
"buttonTextEnabled": "ENABLED",
"buttonTextDisabled": "DISABLED",
"buttonTextCreate": "Ustvari",
"dialogSelectedOption": "Izbrali ste: »{value}«",
"dialogDiscardTitle": "Želite zavreči osnutek?",
"dialogLocationTitle": "Želite uporabljati Googlovo lokacijsko storitev?",
"dialogLocationDescription": "Naj Google pomaga aplikacijam določiti lokacijo. S tem se bodo Googlu pošiljali anonimni podatki o lokaciji, tudi ko se ne izvaja nobena aplikacija.",
"dialogCancel": "PREKLIČI",
"dialogDiscard": "ZAVRZI",
"dialogDisagree": "NE STRINJAM SE",
"dialogAgree": "STRINJAM SE",
"dialogSetBackup": "Nastavite račun za varnostno kopiranje",
"colorsBlueGrey": "MODROSIVA",
"dialogShow": "PRIKAŽI POGOVORNO OKNO",
"dialogFullscreenTitle": "Celozaslonsko pogovorno okno",
"dialogFullscreenSave": "SHRANI",
"dialogFullscreenDescription": "Predstavitev celozaslonskega pogovornega okna",
"cupertinoButtonEnabled": "Enabled",
"cupertinoButtonDisabled": "Disabled",
"cupertinoButtonWithBackground": "Z ozadjem",
"cupertinoAlertCancel": "Prekliči",
"cupertinoAlertDiscard": "Zavrzi",
"cupertinoAlertLocationTitle": "Ali želite Zemljevidom omogočiti dostop do lokacije, ko uporabljate aplikacijo?",
"cupertinoAlertLocationDescription": "Vaša trenutna lokacija bo prikazana na zemljevidu in se bo uporabljala za navodila za pot, rezultate iskanja v bližini in ocenjen čas potovanja.",
"cupertinoAlertAllow": "Dovoli",
"cupertinoAlertDontAllow": "Ne dovoli",
"cupertinoAlertFavoriteDessert": "Izbira priljubljenega posladka",
"cupertinoAlertDessertDescription": "Na spodnjem seznamu izberite priljubljeno vrsto posladka. Na podlagi vaše izbire bomo prilagodili predlagani seznam okrepčevalnic na vašem območju.",
"cupertinoAlertCheesecake": "Skutina torta",
"cupertinoAlertTiramisu": "Tiramisu",
"cupertinoAlertApplePie": "Jabolčna pita",
"cupertinoAlertChocolateBrownie": "Čokoladni brownie",
"cupertinoShowAlert": "Prikaži opozorilo",
"colorsRed": "RDEČA",
"colorsPink": "ROŽNATA",
"colorsPurple": "VIJOLIČNA",
"colorsDeepPurple": "MOČNO VIJOLIČNA",
"colorsIndigo": "INDIGO",
"colorsBlue": "MODRA",
"colorsLightBlue": "SVETLOMODRA",
"colorsCyan": "CIJAN",
"dialogAddAccount": "Dodaj račun",
"Gallery": "Galerija",
"Categories": "Kategorije",
"SHRINE": "SHRINE",
"Basic shopping app": "Osnovna aplikacija za nakupovanje",
"RALLY": "RALLY",
"CRANE": "CRANE",
"Travel app": "Potovalna aplikacija",
"MATERIAL": "MATERIALNO",
"CUPERTINO": "CUPERTINO",
"REFERENCE STYLES & MEDIA": "REFERENČNI SLOGI IN PREDSTAVNOST"
}
| 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 StatelessWidget {
const SettingsIcon(this.time, {super.key});
final double time;
@override
Widget build(BuildContext context) {
return CustomPaint(
painter: _SettingsIconPainter(time: time, context: context),
);
}
}
class _SettingsIconPainter extends CustomPainter {
_SettingsIconPainter({required this.time, required this.context});
final double time;
final BuildContext context;
late Offset _center;
late double _scaling;
late Canvas _canvas;
/// Computes [_center] and [_scaling], parameters used to convert offsets
/// and lengths in relative units into logical pixels.
///
/// The icon is aligned to the bottom-start corner.
void _computeCenterAndScaling(Size size) {
_scaling = min(size.width / unitWidth, size.height / unitHeight);
_center = Directionality.of(context) == TextDirection.ltr
? Offset(
unitWidth * _scaling / 2, size.height - unitHeight * _scaling / 2)
: Offset(size.width - unitWidth * _scaling / 2,
size.height - unitHeight * _scaling / 2);
}
/// Transforms an offset in relative units into an offset in logical pixels.
Offset _transform(Offset offset) {
return _center + offset * _scaling;
}
/// Transforms a length in relative units into a dimension in logical pixels.
double _size(double length) {
return length * _scaling;
}
/// A rectangle with a fixed location, used to locate gradients.
Rect get _fixedRect {
final topLeft = Offset(-_size(stickLength / 2), -_size(stickWidth / 2));
final bottomRight = Offset(_size(stickLength / 2), _size(stickWidth / 2));
return Rect.fromPoints(topLeft, bottomRight);
}
/// Black or white paint, depending on brightness.
Paint get _monoPaint {
final monoColor =
Theme.of(context).colorScheme.brightness == Brightness.light
? Colors.black
: Colors.white;
return Paint()..color = monoColor;
}
/// Pink paint with horizontal gradient.
Paint get _pinkPaint {
const shader = LinearGradient(colors: [pinkLeft, pinkRight]);
final shaderRect = _fixedRect.translate(
_size(-(stickLength - colorLength(time)) / 2),
0,
);
return Paint()..shader = shader.createShader(shaderRect);
}
/// Teal paint with horizontal gradient.
Paint get _tealPaint {
const shader = LinearGradient(colors: [tealLeft, tealRight]);
final shaderRect = _fixedRect.translate(
_size((stickLength - colorLength(time)) / 2),
0,
);
return Paint()..shader = shader.createShader(shaderRect);
}
/// Paints a stadium-shaped stick.
void _paintStick({
required Offset center,
required double length,
required double width,
double angle = 0,
required Paint paint,
}) {
// Convert to pixels.
center = _transform(center);
length = _size(length);
width = _size(width);
// Paint.
width = min(width, length);
final stretch = length / 2;
final radius = width / 2;
_canvas.save();
_canvas.translate(center.dx, center.dy);
_canvas.rotate(angle);
final leftOval = Rect.fromCircle(
center: Offset(-stretch + radius, 0),
radius: radius,
);
final rightOval = Rect.fromCircle(
center: Offset(stretch - radius, 0),
radius: radius,
);
_canvas.drawPath(
Path()
..arcTo(leftOval, pi / 2, pi, false)
..arcTo(rightOval, -pi / 2, pi, false),
paint,
);
_canvas.restore();
}
@override
void paint(Canvas canvas, Size size) {
_computeCenterAndScaling(size);
_canvas = canvas;
if (isTransitionPhase(time)) {
_paintStick(
center: upperColorOffset(time),
length: colorLength(time),
width: stickWidth,
paint: _pinkPaint,
);
_paintStick(
center: lowerColorOffset(time),
length: colorLength(time),
width: stickWidth,
paint: _tealPaint,
);
_paintStick(
center: upperMonoOffset(time),
length: monoLength(time),
width: knobDiameter,
paint: _monoPaint,
);
_paintStick(
center: lowerMonoOffset(time),
length: monoLength(time),
width: knobDiameter,
paint: _monoPaint,
);
} else {
_paintStick(
center: upperKnobCenter,
length: stickLength,
width: knobDiameter,
angle: -knobRotation(time),
paint: _monoPaint,
);
_paintStick(
center: knobCenter(time),
length: stickLength,
width: knobDiameter,
angle: knobRotation(time),
paint: _monoPaint,
);
}
}
@override
bool shouldRepaint(CustomPainter oldDelegate) =>
oldDelegate is! _SettingsIconPainter || (oldDelegate).time != time;
}
| 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 formattedDuration(BuildContext context, Duration duration,
{bool? abbreviated}) {
final localizations = GalleryLocalizations.of(context)!;
final hoursShortForm = localizations.craneHours(duration.inHours.toInt());
final minutesShortForm = localizations.craneMinutes(duration.inMinutes % 60);
return localizations.craneFlightDuration(hoursShortForm, minutesShortForm);
}
| 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 String message;
final String avatar;
final String recipients;
final bool containsPictures;
}
class InboxEmail extends Email {
InboxEmail({
required super.id,
required super.sender,
super.time,
super.subject,
super.message,
required super.avatar,
super.recipients,
super.containsPictures,
this.inboxType = InboxType.normal,
});
InboxType inboxType;
}
// The different mailbox pages that the Reply app contains.
enum MailboxPageType {
inbox,
starred,
sent,
trash,
spam,
drafts,
}
// Different types of mail that can be sent to the inbox.
enum InboxType {
normal,
spam,
}
| 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('Home page hides settings semantics when closed', (tester) async {
await tester.pumpWidget(const GalleryApp());
await tester.pump(const Duration(seconds: 1));
expect(find.bySemanticsLabel('Settings'), findsOneWidget);
expect(find.bySemanticsLabel('Close settings'), findsNothing);
await tester.tap(find.bySemanticsLabel('Settings'));
await tester.pump(const Duration(seconds: 1));
// The test no longer finds Setting and Close settings since the semantics
// are excluded when settings mode is activated.
expect(find.bySemanticsLabel('Settings'), findsNothing);
expect(find.bySemanticsLabel('Close settings'), findsOneWidget);
});
testWidgets('Home page list view is the primary list view', (tester) async {
await tester.pumpWidget(const GalleryApp());
await tester.pumpAndSettle();
ListView listview =
tester.widget(find.byKey(const ValueKey('HomeListView')));
expect(listview.primary, true);
});
}
| 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';
import 'package:google_fonts/src/google_fonts_variant.dart';
import 'package:path/path.dart' as path;
/// Load fonts to make sure they show up in golden tests.
Future<void> loadFonts() async {
await _load(await loadFontsFromManifest()
..addAll(loadGoogleFonts())
..addAll(loadFontsFromTestingDir()));
}
Future<Map<String?, List<Future<ByteData>>>> loadFontsFromManifest() async {
final List<dynamic> fontManifest =
await (rootBundle.loadStructuredData<List<dynamic>>(
'FontManifest.json',
(data) async => json.decode(data) as List<dynamic>,
));
final fontFamilyToData = <String?, List<Future<ByteData>>>{};
for (final fontData in fontManifest) {
final fontFamily = fontData['family'] as String?;
final fonts = fontData['fonts'] as List<dynamic>;
for (final font in fonts) {
(fontFamilyToData[fontFamily] ??= [])
.add(rootBundle.load(font['asset'] as String));
}
}
return fontFamilyToData;
}
Map<String, List<Future<ByteData>>> loadFontsFromTestingDir() {
final fontFamilyToData = <String, List<Future<ByteData>>>{};
final currentDir = path.dirname(Platform.script.path);
final fontsDirectory = path.join(
currentDir,
'test_goldens',
'testing',
'fonts',
);
for (var file in Directory(fontsDirectory).listSync()) {
if (file is File) {
final fontFamily =
path.basenameWithoutExtension(file.path).split('-').first;
(fontFamilyToData[fontFamily] ??= [])
.add(file.readAsBytes().then((bytes) => ByteData.view(bytes.buffer)));
}
}
return fontFamilyToData;
}
Map<String, List<Future<ByteData>>> loadGoogleFonts() {
final currentDir = path.dirname(Platform.script.path);
final googleFontsDirectory = path.join(currentDir, 'fonts', 'google_fonts');
final fontFamilyToData = <String, List<Future<ByteData>>>{};
final files = Directory(googleFontsDirectory).listSync();
for (final file in files) {
if (file is File) {
final fileName = path.basenameWithoutExtension(file.path);
final googleFontName = GoogleFontsFamilyWithVariant(
family: fileName.split('-').first,
googleFontsVariant: GoogleFontsVariant.fromApiFilenamePart(fileName),
).toString();
fontFamilyToData[googleFontName] = [
file.readAsBytes().then((bytes) => ByteData.view(bytes.buffer))
];
}
}
return fontFamilyToData;
}
Future<void> _load(
Map<String?, List<Future<ByteData>>> fontFamilyToData) async {
final waitList = <Future<void>>[];
for (final entry in fontFamilyToData.entries) {
final loader = FontLoader(entry.key!);
for (final data in entry.value) {
loader.addFont(data);
}
waitList.add(loader.load());
}
await Future.wait(waitList);
}
| 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 = ArgParser()
..addOption(
'target',
help: 'The file path for the output target file.',
defaultsTo: codeSegmentsPath,
);
final argResults = parser.parse(arguments);
final codeSegments = await getCodeSegments();
File(argResults['target'] as String).writeAsStringSync(codeSegments);
}
| 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_BLACKLIST_ID": "MdOoZMhusnJTcwfYE0nL",
"PROMPT_WHITELIST_ID": "MIsaP8zrRVhuR84MLEic",
"FB_STORAGE_BUCKET": "top-dash-dev.appspot.com",
"SCRIPTS_ENABLED": "true"
}
},
"tasks": [
{
"label": "api:start",
"command": "dart_frog dev",
"type": "shell",
"isBackground": true,
"dependsOn": "firebase:emulate",
"presentation": {
"close": true,
},
"problemMatcher": {
"owner": "dart",
"fileLocation": ["relative", "${workspaceFolder}/api"],
"pattern": {
"regexp": ".",
"file": 1,
"line": 2,
"column": 3,
},
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "."
},
"endsPattern": {
"regexp": "^\\[hotreload\\] (\\d{2}:\\d{2}:\\d{2} - Application reloaded\\.|Hot reload is enabled\\.)$"
}
}
},
},
{
"label": "firebase:emulate",
"command": "firebase emulators:start --only auth,firestore,storage,functions",
"type": "shell",
"isBackground": true,
"presentation": {
"close": true,
},
"problemMatcher": [
{
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": "^.+All emulators ready! It is now safe to connect your app\\..*$",
},
}
],
},
{
"label": "api:stop",
"type": "shell",
"command": "pkill -f \"sh $HOME/.pub-cache/bin/dart_frog dev\" && pkill -f \"firebase emulators:start\"",
"presentation": {
"reveal": "silent",
"panel": "dedicated",
"close": true,
}
}
]
}
| 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,
required this.shareUrl,
required this.favIconUrl,
required this.ga,
required this.gameUrl,
required this.image,
});
/// The title of the page.
final String title;
/// The description of the page.
final String description;
/// The share url.
final String shareUrl;
/// The favicon url.
final String favIconUrl;
/// The Google Analytics code.
final String ga;
/// The game url.
final String gameUrl;
/// The image url.
final String image;
/// Returns this instance as a json.
Map<String, dynamic> toJson() {
return _$TemplateMetadataToJson(this);
}
}
| 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);
const _descriptionSize = _Size(width: 263, height: 72);
const _powerSpriteSize = _Size(width: 113, height: 64);
// Component Positions
const _titlePosition = 300;
const _characterPosition = [24, 20];
const _powerSpritePosition = [218, 44];
const _descriptionPosition = [32, 345];
const _elementIconPositions = {
Suit.air: [213, 12],
Suit.earth: [210, 4],
Suit.fire: [225, 2],
Suit.water: [226, 3],
Suit.metal: [220, 24],
};
// Assets
const _powerSpriteAsset = 'http://127.0.0.1:8080/assets/power-sprites.png';
const _titleFontAsset = 'http://127.0.0.1:8080/assets/Saira-Bold-28.ttf.zip';
const _descriptionFontAsset =
'http://127.0.0.1:8080/assets/GoogleSans-14.ttf.zip';
const _elementIconAssets = {
Suit.air: 'http://127.0.0.1:8080/assets/icon-air.png',
Suit.earth: 'http://127.0.0.1:8080/assets/icon-earth.png',
Suit.fire: 'http://127.0.0.1:8080/assets/icon-fire.png',
Suit.water: 'http://127.0.0.1:8080/assets/icon-water.png',
Suit.metal: 'http://127.0.0.1:8080/assets/icon-metal.png',
};
const _elementFrameAssets = {
Suit.air: 'http://127.0.0.1:8080/assets/card-air.png',
Suit.earth: 'http://127.0.0.1:8080/assets/card-earth.png',
Suit.fire: 'http://127.0.0.1:8080/assets/card-fire.png',
Suit.water: 'http://127.0.0.1:8080/assets/card-water.png',
Suit.metal: 'http://127.0.0.1:8080/assets/card-metal.png',
};
const _holoFrameAssets = {
Suit.air: 'http://127.0.0.1:8080/assets/holos/card-air.png',
Suit.earth: 'http://127.0.0.1:8080/assets/holos/card-earth.png',
Suit.fire: 'http://127.0.0.1:8080/assets/holos/card-fire.png',
Suit.water: 'http://127.0.0.1:8080/assets/holos/card-water.png',
Suit.metal: 'http://127.0.0.1:8080/assets/holos/card-metal.png',
};
/// {@template card_renderer_failure}
/// Exception thrown when a card rendering fails.
/// {@endtemplate}
class CardRendererFailure implements Exception {
/// {@macro card_renderer_failure}
CardRendererFailure(this.message, this.stackTrace);
/// Message describing the failure.
final String message;
/// Stack trace of the failure.
final StackTrace stackTrace;
@override
String toString() => '[CardRendererFailure]: $message';
}
/// Function definition to get an image from a [Uri] used by
/// [CardRenderer].
typedef GetCall = Future<Response> Function(Uri uri);
/// Function definition to create a [Command] used by [CardRenderer].
typedef CreateCommand = Command Function();
/// Function definition to parse a [BitmapFont] from a [Uint8List] used by
/// [CardRenderer].
typedef ParseFont = BitmapFont Function(Uint8List);
/// {@template card_renderer}
/// Renders a card based on its metadata and character
/// {@endtemplate}
class CardRenderer {
/// {@macro card_renderer}
CardRenderer({
// Card Frames
CreateCommand createCommand = Command.new,
ParseFont parseFont = BitmapFont.fromZip,
GetCall getCall = get,
}) : _createCommand = createCommand,
_parseFont = parseFont,
_get = getCall;
final GetCall _get;
final CreateCommand _createCommand;
final ParseFont _parseFont;
Future<Uint8List> _getFile(Uri uri) async {
final response = await _get(uri);
if (response.statusCode != 200) {
throw Exception('Failed to get image from $uri');
}
return response.bodyBytes;
}
List<_Line> _splitText(String string, BitmapFont font, int width) {
final words = string.split(RegExp(r'\s+'));
final lines = <_Line>[];
var lineWidth = 0;
var line = '';
for (var w in words) {
final ws = StringBuffer()
..write(w)
..write(' ');
w = ws.toString();
final chars = w.codeUnits;
var wordWidth = 0;
for (final c in chars) {
if (!font.characters.containsKey(c)) {
wordWidth += font.base ~/ 2;
} else {
wordWidth += font.characters[c]!.xAdvance;
}
}
if ((lineWidth + wordWidth) < width) {
line += w;
lineWidth += wordWidth;
} else {
lines.add(_Line(line, lineWidth));
line = w;
lineWidth = wordWidth;
}
}
if (line.isNotEmpty) lines.add(_Line(line, lineWidth));
return lines;
}
/// Renders a [Card] to a [Uint8List] containing the PNG image.
Future<Uint8List> renderCard(Card card) async {
final power = _PowerSprite(power: card.power);
final elementIcon = _ElementIcon(card.suit);
try {
final assets = await Future.wait([
_getFile(Uri.parse(card.image)),
_getFile(
Uri.parse(
card.rarity
? _holoFrameAssets[card.suit]!
: _elementFrameAssets[card.suit]!,
),
),
_getFile(Uri.parse(_elementIconAssets[card.suit]!)),
_getFile(Uri.parse(_powerSpriteAsset)),
_getFile(Uri.parse(_descriptionFontAsset)),
_getFile(Uri.parse(_titleFontAsset)),
]);
final characterCmd = _createCommand()
..decodePng(assets.first)
..copyResize(
width: _characterSize.width,
height: _characterSize.height,
interpolation: Interpolation.cubic,
);
final frameCmd = _createCommand()..decodePng(assets[1]);
final elementIconCmd = _createCommand()..decodePng(assets[2]);
final powerSpriteCmd = _createCommand()..decodePng(assets[3]);
final descriptionFont = _parseFont(assets[4]);
final titleFont = _parseFont(assets[5]);
final compositionCommand = _createCommand()
..createImage(
width: _cardSize.width,
height: _cardSize.height,
numChannels: 4,
)
..convert(numChannels: 4, alpha: 0)
..compositeImage(
characterCmd,
dstX: _characterPosition.first,
dstY: _characterPosition.last,
)
..compositeImage(
frameCmd,
dstX: 0,
dstY: 0,
);
if (card.rarity) {
compositionCommand
..filter(rainbowFilter)
..chromaticAberration(shift: 2);
}
final titleLines = _splitText(card.name, titleFont, _cardSize.width);
final titleLineHeight = titleFont.lineHeight;
var titlePosition = _titlePosition;
if (titleLines.length > 1) titlePosition -= titleLineHeight ~/ 2;
for (var i = 0; i < titleLines.length; i++) {
final line = titleLines[i];
compositionCommand.drawString(
line.text.trimRight(),
font: titleFont,
x: ((_cardSize.width - line.width) / 2).round(),
y: titlePosition + ((titleLineHeight - 15) * i),
);
}
final lineHeight = descriptionFont.lineHeight;
final descriptionLines =
_splitText(card.description, descriptionFont, _descriptionSize.width);
for (var i = 0; i < descriptionLines.length; i++) {
final line = descriptionLines[i];
compositionCommand.drawString(
line.text.trimRight(),
font: descriptionFont,
x: _descriptionPosition.first +
((_descriptionSize.width - line.width) / 2).round(),
y: _descriptionPosition.last + (lineHeight * i),
);
}
compositionCommand
..compositeImage(
elementIconCmd,
dstX: elementIcon.dstX,
dstY: elementIcon.dstY,
)
..compositeImage(
powerSpriteCmd,
dstX: power.dstX,
dstY: power.dstY,
srcX: power.srcX,
srcY: power.srcY,
srcW: power.width,
srcH: power.height,
dstW: power.width,
dstH: power.height,
)
..encodePng();
await compositionCommand.execute();
final output = compositionCommand.outputBytes;
if (output == null) {
throw CardRendererFailure('Failed to render card', StackTrace.current);
}
return output;
} on CardRendererFailure {
rethrow;
} catch (e, s) {
throw CardRendererFailure(e.toString(), s);
}
}
/// Renders a list of [Card] to a [Uint8List] containing the PNG image.
Future<Uint8List> renderDeck(List<Card> cards) async {
try {
final cardBytes = await Future.wait(
cards.map(renderCard),
);
final cardCommands = cardBytes
.map(
(e) => _createCommand()..decodePng(e),
)
.toList();
final compositionCommand = _createCommand()
..createImage(
width: _cardSize.width * cards.length + (20 * (cards.length - 1)),
height: _cardSize.height,
numChannels: 4,
);
for (var i = 0; i < cards.length; i++) {
compositionCommand.compositeImage(
cardCommands[i],
dstX: (_cardSize.width + 20) * i,
);
}
compositionCommand.encodePng();
await compositionCommand.execute();
final output = compositionCommand.outputBytes;
if (output == null) {
throw CardRendererFailure('Failed to render deck', StackTrace.current);
}
return output;
} on CardRendererFailure {
rethrow;
} catch (e, s) {
throw CardRendererFailure(e.toString(), s);
}
}
}
class _Size {
const _Size({required this.height, required this.width});
final int height;
final int width;
}
class _PowerSprite {
const _PowerSprite({
required this.power,
});
final int power;
static const size = _powerSpriteSize;
int get width => size.width;
int get height => size.height;
int get srcX => (power % 10) * size.width;
int get srcY => (power ~/ 10) * size.height;
int get dstX => (power == 100)
? _powerSpritePosition.first - 6
: _powerSpritePosition.first;
int get dstY => _powerSpritePosition.last;
}
class _ElementIcon {
const _ElementIcon(this.suit);
final Suit suit;
int get dstX => _elementIconPositions[suit]!.first;
int get dstY => _elementIconPositions[suit]!.last;
}
class _Line {
const _Line(this.text, this.width);
final String text;
final int width;
}
| 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;
}
/// {@template prompt_term}
/// A term used as a prompt for card generation.
/// {@endtemplate}
@JsonSerializable(ignoreUnannotated: true)
class PromptTerm extends Equatable {
/// {@macro prompt_term}
const PromptTerm({
required this.term,
required this.type,
this.shortenedTerm,
this.id,
});
/// Creates a [PromptTerm] from a JSON object.
factory PromptTerm.fromJson(Map<String, dynamic> json) =>
_$PromptTermFromJson(json);
/// The id of the prompt term.
@JsonKey()
final String? id;
/// The term of the prompt term.
@JsonKey()
final String term;
/// The shortened term of the prompt term.
@JsonKey()
final String? shortenedTerm;
/// The type of the prompt term.
@JsonKey()
final PromptTermType type;
/// Converts a [PromptTerm] to a JSON object.
Map<String, dynamic> toJson() => _$PromptTermToJson(this);
@override
List<Object?> get props => [id, term, shortenedTerm, type];
}
| 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', () {
const data1 = Prompt();
final data2 = data1
.copyWithNewAttribute('characterClass')
.copyWithNewAttribute('power')
.copyWithNewAttribute('secondaryPower');
expect(
data2,
equals(
const Prompt(
characterClass: 'characterClass',
power: 'power',
),
),
);
});
test('toJson returns the instance as json', () {
expect(
Prompt(
characterClass: 'characterClass',
power: 'power',
).toJson(),
equals({
'characterClass': 'characterClass',
'power': 'power',
}),
);
});
test('fromJson returns the correct instance', () {
expect(
Prompt.fromJson(const {
'characterClass': 'characterClass',
'power': 'power',
}),
equals(
Prompt(
characterClass: 'characterClass',
power: 'power',
),
),
);
});
test('supports equality', () {
expect(
Prompt(
characterClass: 'characterClass',
power: '',
),
equals(
Prompt(
characterClass: 'characterClass',
power: '',
),
),
);
expect(
Prompt(
characterClass: '',
power: 'power',
),
equals(
Prompt(
characterClass: '',
power: 'power',
),
),
);
});
test('sets intro seen', () {
final prompt = Prompt();
expect(
prompt.setIntroSeen(),
equals(Prompt(isIntroSeen: true)),
);
});
});
}
| 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 = 'eyJhbGciOiJSUzI1NiIsImtpZCI6IjFlOTczZWUwZTE2ZjdlZWY0ZjkyM'
'WQ1MGRjNjFkNzBiMmVmZWZjMTkiLCJ0eXAiOiJKV1QifQ.eyJwcm92aWRlcl9pZCI6ImFub2'
'55bW91cyIsImlzcyI6Imh0dHBzOi8vc2VjdXJldG9rZW4uZ29vZ2xlLmNvbS90b3AtZGFzaC'
'1kZXYiLCJhdWQiOiJ0b3AtZGFzaC1kZXYiLCJhdXRoX3RpbWUiOjE2NzkwNjUwNTEsInVzZX'
'JfaWQiOiJVUHlnNURKWHFuTmw0OWQ0YUJKV1Z6dmFKeDEyIiwic3ViIjoiVVB5ZzVESlhxbk'
'5sNDlkNGFCSldWenZhSngxMiIsImlhdCI6MTY3OTA2NTA1MiwiZXhwIjoxNjc5MDY4NjUyLC'
'JmaXJlYmFzZSI6eyJpZGVudGl0aWVzIjp7fSwic2lnbl9pbl9wcm92aWRlciI6ImFub255bW'
'91cyJ9fQ.v0DpGE7mKOwg4S6TbG_xxy5Spnfvb_Bdh7c_A_iW8RBPwt_XtN-3XK7h6Rv8-Z6'
'5nkYIuLugJZTuC5rSnnwxb6Kn_p2lhYJZY5c1OdK9EvCfA47E3CIL621ujxcKGHOOUjJUZTr'
'9dd8g0-FDagc0GbYFrGVRvwe5gcEDxRrAOMsbZoJ3D3IJAIiDTYFrQSAyF8LY_Cy6hMrBvdv'
'cpt29UML0rjcWdU5gB6u80rjOg_cgo5y3eWZOsOrYnKQd8iarrKDXFGRzPLgfDWEKJcRduXv'
'H_wIKqaprx2eK3FXiCDfhZDbwANzrfiVuI2HUcrqtdx78ylXTMMWPv4GNqJDodw';
const noSignatureToken =
'eyJhbGciOiJSUzI1NiIsImtpZCI6IjFlOTczZWUwZTE2ZjdlZWY0ZjkyM'
'WQ1MGRjNjFkNzBiMmVmZWZjMTkiLCJ0eXAiOiJKV1QifQ.eyJwcm92aWRlcl9pZCI6ImFub2'
'55bW91cyIsImlzcyI6Imh0dHBzOi8vc2VjdXJldG9rZW4uZ29vZ2xlLmNvbS90b3AtZGFzaC'
'1kZXYiLCJhdWQiOiJ0b3AtZGFzaC1kZXYiLCJhdXRoX3RpbWUiOjE2NzkwNjUwNTEsInVzZX'
'JfaWQiOiJVUHlnNURKWHFuTmw0OWQ0YUJKV1Z6dmFKeDEyIiwic3ViIjoiVVB5ZzVESlhxbk'
'5sNDlkNGFCSldWenZhSngxMiIsImlhdCI6MTY3OTA2NTA1MiwiZXhwIjoxNjc5MDY4NjUyLC'
'JmaXJlYmFzZSI6eyJpZGVudGl0aWVzIjp7fSwic2lnbl9pbl9wcm92aWRlciI6ImFub255bW'
'91cyJ9fQ.';
group('JWT', () {
final body = Uint8List(4);
final signature = Signature(Uint8List(8));
const nowSeconds = 1679079237;
const projectId = 'PROJECT_ID';
final now = DateTime.fromMillisecondsSinceEpoch(nowSeconds * 1000);
final clock = Clock.fixed(now);
JWT buildSubject({
String? alg = 'RS256',
int? exp = nowSeconds + 10800,
int? iat = nowSeconds - 60,
String? aud = projectId,
String? iss = 'https://securetoken.google.com/$projectId',
String? sub = 'userId',
int? authTime = nowSeconds - 60,
String? userId = 'userId',
String? kid = '1e973ee0e16f7eef4f921d50dc61d70b2efefc19',
}) =>
JWT(
body: body,
signature: signature,
payload: {
'exp': exp,
'iat': iat,
'aud': aud,
'iss': iss,
'sub': sub,
'auth_time': authTime,
'user_id': userId,
},
header: {
'alg': alg,
'kid': kid,
},
);
group('from', () {
test('parses a valid token', () {
final jwt = JWT.from(validToken);
expect(jwt.keyId, equals('1e973ee0e16f7eef4f921d50dc61d70b2efefc19'));
expect(jwt.userId, equals('UPyg5DJXqnNl49d4aBJWVzvaJx12'));
});
test('parses a token without a signature', () {
final jwt = JWT.from(noSignatureToken);
expect(jwt.keyId, equals('1e973ee0e16f7eef4f921d50dc61d70b2efefc19'));
expect(jwt.userId, equals('UPyg5DJXqnNl49d4aBJWVzvaJx12'));
});
});
group('userId', () {
test('returns the user id', () {
final jwt = buildSubject();
expect(jwt.userId, equals('userId'));
});
test('returns null when the user id is not in the payload', () {
final jwt = buildSubject(userId: null);
expect(jwt.userId, isNull);
});
});
group('keyId', () {
test('returns the key id', () {
final jwt = buildSubject();
expect(jwt.keyId, equals('1e973ee0e16f7eef4f921d50dc61d70b2efefc19'));
});
test('returns null when the key id is not in the header', () {
final jwt = buildSubject(kid: null);
expect(jwt.keyId, isNull);
});
});
group('verifyWith', () {
test('uses the verifier to verify the signature', () {
final jwt = buildSubject();
final verifier = _MockVerifier();
when(() => verifier.verify(body, signature)).thenReturn(true);
final result = jwt.verifyWith(verifier);
expect(result, isTrue);
verify(() => verifier.verify(body, signature)).called(1);
});
test('returns false when there is no signature', () {
final jwt = JWT.from(noSignatureToken);
final verifier = _MockVerifier();
final result = jwt.verifyWith(verifier);
expect(result, isFalse);
});
});
group('validate', () {
test(
'returns true when valid',
() => withClock(clock, () {
final jwt = buildSubject();
expect(jwt.validate(projectId), isTrue);
}),
);
group('returns false', () {
test('when alg is not RS256', () {
final jwt = buildSubject(alg: 'invalid');
expect(jwt.validate(projectId), isFalse);
});
test('when exp is null', () {
final jwt = buildSubject(exp: null);
expect(jwt.validate(projectId), isFalse);
});
test('when iat is null', () {
final jwt = buildSubject(iat: null);
expect(jwt.validate(projectId), isFalse);
});
test('when aud is null', () {
final jwt = buildSubject(aud: null);
expect(jwt.validate(projectId), isFalse);
});
test('when iss is null', () {
final jwt = buildSubject(iss: null);
expect(jwt.validate(projectId), isFalse);
});
test('when sub is null', () {
final jwt = buildSubject(sub: null);
expect(jwt.validate(projectId), isFalse);
});
test('when auth_time is null', () {
final jwt = buildSubject(authTime: null);
expect(jwt.validate(projectId), isFalse);
});
test('when user_id is null', () {
final jwt = buildSubject(userId: null);
expect(jwt.validate(projectId), isFalse);
});
test(
'when exp is in the past',
() => withClock(clock, () {
final jwt = buildSubject(exp: nowSeconds - 1);
expect(jwt.validate(projectId), isFalse);
}),
);
test(
'when exp is current',
() => withClock(clock, () {
final jwt = buildSubject(exp: nowSeconds);
expect(jwt.validate(projectId), isFalse);
}),
);
test(
'when iat is in the future',
() => withClock(clock, () {
final jwt = buildSubject(iat: nowSeconds + 1);
expect(jwt.validate(projectId), isFalse);
}),
);
test(
'when iat is current',
() => withClock(clock, () {
final jwt = buildSubject(iat: nowSeconds);
expect(jwt.validate(projectId), isTrue);
}),
);
test(
'when auth_time is in the future',
() => withClock(clock, () {
final jwt = buildSubject(authTime: nowSeconds + 1);
expect(jwt.validate(projectId), isFalse);
}),
);
test(
'when auth_time is current',
() => withClock(clock, () {
final jwt = buildSubject(authTime: nowSeconds);
expect(jwt.validate(projectId), isTrue);
}),
);
test(
'when aud is not the project id',
() => withClock(clock, () {
final jwt = buildSubject(aud: 'invalid');
expect(jwt.validate(projectId), isFalse);
}),
);
test(
'when iss is not the expected url',
() => withClock(clock, () {
final jwt = buildSubject(iss: 'invalid');
expect(jwt.validate(projectId), isFalse);
}),
);
test(
'when sub is not the user id',
() => withClock(clock, () {
final jwt = buildSubject(sub: 'invalid');
expect(jwt.validate(projectId), isFalse);
}),
);
test(
'when user_id is not the user id',
() => withClock(clock, () {
final jwt = buildSubject(userId: 'invalid');
expect(jwt.validate(projectId), isFalse);
}),
);
});
});
});
}
| 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 == HttpMethod.post) {
return _createDeck(context);
}
return Response(statusCode: HttpStatus.methodNotAllowed);
}
FutureOr<Response> _createDeck(RequestContext context) async {
final json = await context.request.json() as Map<String, dynamic>;
final cards = json['cards'];
if (!_isListOfString(cards)) {
context.read<Logger>().warning(
'Received invalid payload: $json',
);
return Response(statusCode: HttpStatus.badRequest);
}
final ids = (cards as List).cast<String>();
final cardsRepository = context.read<CardsRepository>();
final user = context.read<AuthenticatedUser>();
final deckId = await cardsRepository.createDeck(
cardIds: ids,
userId: user.id,
);
return Response.json(body: {'id': deckId});
}
bool _isListOfString(dynamic value) {
if (value is! List) {
return false;
}
return value.whereType<String>().length == value.length;
}
| 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 '../../../../routes/game/cards/index.dart' as route;
class _MockRequestContext extends Mock implements RequestContext {}
class _MockCardsRepository extends Mock implements CardsRepository {}
class _MockPromptRepository extends Mock implements PromptRepository {}
class _MockRequest extends Mock implements Request {}
void main() {
group('POST /game/cards', () {
late CardsRepository cardsRepository;
late PromptRepository promptRepository;
late Request request;
late RequestContext context;
final cards = List.generate(
12,
(_) => const Card(
id: '',
name: '',
description: '',
rarity: true,
image: '',
power: 1,
suit: Suit.air,
),
);
const prompt = Prompt(
power: 'baggles',
characterClass: 'mage',
);
setUp(() {
promptRepository = _MockPromptRepository();
cardsRepository = _MockCardsRepository();
when(
() => cardsRepository.generateCards(
characterClass: any(named: 'characterClass'),
characterPower: any(
named: 'characterPower',
),
),
).thenAnswer(
(_) async => cards,
);
request = _MockRequest();
when(() => request.method).thenReturn(HttpMethod.post);
context = _MockRequestContext();
when(() => context.request).thenReturn(request);
when(() => context.request).thenReturn(request);
when(request.json).thenAnswer((_) async => prompt.toJson());
when(() => context.read<CardsRepository>()).thenReturn(cardsRepository);
when(() => context.read<PromptRepository>()).thenReturn(promptRepository);
registerFallbackValue(prompt);
when(() => promptRepository.isValidPrompt(any()))
.thenAnswer((invocation) => Future.value(true));
});
test('responds with a 200', () async {
final response = await route.onRequest(context);
expect(response.statusCode, equals(HttpStatus.ok));
});
test('uses the character class and power from the prompt', () async {
await route.onRequest(context);
verify(
() => cardsRepository.generateCards(
characterClass: 'mage',
characterPower: 'baggles',
),
).called(1);
});
test('responds bad request when class is null', () async {
when(request.json).thenAnswer(
(_) async => const Prompt(power: '').toJson(),
);
final response = await route.onRequest(context);
expect(response.statusCode, equals(HttpStatus.badRequest));
});
test('responds bad request when power is null', () async {
when(request.json).thenAnswer(
(_) async => const Prompt(
characterClass: '',
).toJson(),
);
final response = await route.onRequest(context);
expect(response.statusCode, equals(HttpStatus.badRequest));
});
test('responds with the generated card', () async {
final response = await route.onRequest(context);
final json = await response.json();
expect(
json,
equals({
'cards': List.generate(
12,
(index) => {
'id': '',
'name': '',
'description': '',
'rarity': true,
'image': '',
'power': 1,
'suit': 'air',
'shareImage': null,
},
),
}),
);
});
test('allows only post methods', () async {
when(() => request.method).thenReturn(HttpMethod.get);
final response = await route.onRequest(context);
expect(response.statusCode, equals(HttpStatus.methodNotAllowed));
});
test('invalid prompt returns Bad Request', () async {
when(() => promptRepository.isValidPrompt(any()))
.thenAnswer((invocation) => Future.value(false));
final response = await route.onRequest(context);
expect(response.statusCode, equals(HttpStatus.badRequest));
});
});
}
| 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:game_domain/game_domain.dart';
import 'package:logging/logging.dart';
import 'package:mocktail/mocktail.dart';
import 'package:test/test.dart';
import '../../../../routes/public/decks/[deckId].dart' as route;
class _MockRequestContext extends Mock implements RequestContext {}
class _MockRequest extends Mock implements Request {}
class _MockCardRepository extends Mock implements CardsRepository {}
class _MockCardRenderer extends Mock implements CardRenderer {}
class _MockFirebaseCloudStorage extends Mock implements FirebaseCloudStorage {}
class _MockLogger extends Mock implements Logger {}
void main() {
group('GET /public/decks/[deckId]', () {
late Request request;
late RequestContext context;
late CardsRepository cardsRepository;
late CardRenderer cardRenderer;
late FirebaseCloudStorage firebaseCloudStorage;
late Logger logger;
const gameUrl = GameUrl('https://example.com');
final cards = List.generate(
3,
(i) => Card(
id: 'cardId$i',
name: 'cardName$i',
description: 'cardDescription',
image: 'cardImageUrl',
suit: Suit.fire,
rarity: false,
power: 10,
),
);
final deck = Deck(
id: 'deckId',
cards: cards,
userId: 'userId',
);
setUpAll(() {
registerFallbackValue(Uint8List(0));
registerFallbackValue(deck);
});
setUp(() {
request = _MockRequest();
when(() => request.method).thenReturn(HttpMethod.get);
when(() => request.uri).thenReturn(
Uri.parse('/public/decks/${deck.id}'),
);
logger = _MockLogger();
cardsRepository = _MockCardRepository();
when(() => cardsRepository.getDeck(deck.id)).thenAnswer(
(_) async => deck,
);
when(() => cardsRepository.updateDeck(any())).thenAnswer(
(_) async {},
);
cardRenderer = _MockCardRenderer();
when(() => cardRenderer.renderDeck(deck.cards)).thenAnswer(
(_) async => Uint8List(0),
);
context = _MockRequestContext();
when(() => context.request).thenReturn(request);
when(() => context.read<Logger>()).thenReturn(logger);
when(() => context.read<GameUrl>()).thenReturn(gameUrl);
when(() => context.read<CardsRepository>()).thenReturn(cardsRepository);
when(() => context.read<CardRenderer>()).thenReturn(cardRenderer);
firebaseCloudStorage = _MockFirebaseCloudStorage();
when(() => firebaseCloudStorage.uploadFile(any(), any()))
.thenAnswer((_) async => 'https://example.com/share.png');
when(() => context.read<FirebaseCloudStorage>())
.thenReturn(firebaseCloudStorage);
});
test('responds with a 200', () async {
final response = await route.onRequest(context, deck.id);
expect(response.statusCode, equals(HttpStatus.ok));
});
test('updates the deck with the share image', () async {
await route.onRequest(context, deck.id);
verify(
() => cardsRepository.updateDeck(
deck.copyWithShareImage('https://example.com/share.png'),
),
).called(1);
});
test('redirects with the cached image if present', () async {
when(() => cardsRepository.getDeck(deck.id)).thenAnswer(
(_) async => deck.copyWithShareImage('https://example.com/share.png'),
);
final response = await route.onRequest(context, deck.id);
expect(
response.statusCode,
equals(HttpStatus.movedPermanently),
);
expect(
response.headers['location'],
equals('https://example.com/share.png'),
);
});
test('responds with a 404 if the card is not found', () async {
when(() => cardsRepository.getDeck(deck.id)).thenAnswer(
(_) async => null,
);
final response = await route.onRequest(context, deck.id);
expect(response.statusCode, equals(HttpStatus.notFound));
});
test('only allows get methods', () async {
when(() => request.method).thenReturn(HttpMethod.post);
final response = await route.onRequest(context, deck.id);
expect(response.statusCode, equals(HttpStatus.methodNotAllowed));
});
});
}
| 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 [PromptTermType];
Map<PromptTermType, List<String>> mapCsvToPrompts(List<String> lines) {
final map = {
for (final term in PromptTermType.values) term: <String>[],
};
for (final line in lines.skip(1)) {
final parts = line.split(',');
for (var j = 0; j < promptColumnMap.length; j++) {
final idx = promptColumnMap.keys.elementAt(j);
final type = promptColumnMap.values.elementAt(j);
final value = parts[idx].trim();
if (value.isNotEmpty) {
map[type]!.add(value);
}
}
}
return map;
}
| 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) {
if (kDebugMode) {
js.context['FIREBASE_APPCHECK_DEBUG_TOKEN'] = appCheckDebugToken;
}
},
reload: () {
window.location.reload();
},
),
);
}
| 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 longestStreak: number | undefined = card.longestStreak;
const initials: string | undefined = card.initials;
const docId: string = change.after.id;
if (initials && longestStreak) {
const docRef = firestore.collection('leaderboard').doc(docId);
const snapshot = await docRef.get();
if (snapshot.exists) {
const currentStreak = snapshot.get('longestStreak');
if (longestStreak > currentStreak) {
await docRef.update({
longestStreak: longestStreak,
initials: initials,
});
}
} else {
await docRef.set({
longestStreak: longestStreak,
initials: initials,
});
}
}
});
| 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();
}
class WebSocketMessageReceived extends ConnectionEvent {
const WebSocketMessageReceived(this.message);
final WebSocketMessage message;
@override
List<Object> get props => [message];
}
| 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 const steps = <Widget>[
HowToPlayIntro(),
HowToPlayHandBuilding(),
HowToPlaySuitsIntro(),
];
int get totalSteps => steps.length + wheelSuits.length;
List<int> get affectedIndicatorIndexes {
return wheelSuits.first.suitsAffected
.map((e) => wheelSuits.indexOf(e) - 1)
.toList();
}
@override
List<Object> get props => [position, wheelSuits];
HowToPlayState copyWith({
int? position,
List<Suit>? wheelSuits,
}) {
return HowToPlayState(
position: position ?? this.position,
wheelSuits: wheelSuits ?? this.wheelSuits,
);
}
}
| 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> {
LeaderboardBloc({
required LeaderboardResource leaderboardResource,
}) : _leaderboardResource = leaderboardResource,
super(const LeaderboardState.initial()) {
on<LeaderboardRequested>(_onLeaderboardRequested);
}
final LeaderboardResource _leaderboardResource;
Future<void> _onLeaderboardRequested(
LeaderboardRequested event,
Emitter<LeaderboardState> emit,
) async {
try {
emit(state.copyWith(status: LeaderboardStateStatus.loading));
final leaderboard = await _leaderboardResource.getLeaderboardResults();
emit(
state.copyWith(
leaderboard: leaderboard,
status: LeaderboardStateStatus.loaded,
),
);
} catch (e, s) {
addError(e, s);
emit(state.copyWith(status: LeaderboardStateStatus.failed));
}
}
}
| 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/connection_repository.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/foundation.dart';
import 'package:game_domain/game_domain.dart';
import 'package:game_script_machine/game_script_machine.dart';
import 'package:io_flip/app/app.dart';
import 'package:io_flip/bootstrap.dart';
import 'package:io_flip/firebase_options_development.dart';
import 'package:io_flip/settings/persistence/persistence.dart';
import 'package:match_maker_repository/match_maker_repository.dart';
void main() async {
js.context['FIREBASE_APPCHECK_DEBUG_TOKEN'] =
const String.fromEnvironment('APPCHECK_DEBUG_TOKEN');
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
unawaited(
bootstrap(
(firestore, firebaseAuth, appCheck) async {
await appCheck.activate(
webRecaptchaSiteKey: const String.fromEnvironment('RECAPTCHA_KEY'),
);
await appCheck.setTokenAutoRefreshEnabled(true);
try {
firestore.useFirestoreEmulator('localhost', 8081);
await firebaseAuth.useAuthEmulator('localhost', 9099);
} catch (e) {
debugPrint(e.toString());
}
final authenticationRepository = AuthenticationRepository(
firebaseAuth: firebaseAuth,
);
final apiClient = ApiClient(
baseUrl: 'http://localhost:8080',
idTokenStream: authenticationRepository.idToken,
refreshIdToken: authenticationRepository.refreshIdToken,
appCheckTokenStream: appCheck.onTokenChange,
appCheckToken: await appCheck.getToken(),
);
await authenticationRepository.signInAnonymously();
await authenticationRepository.idToken.first;
final currentScript =
await apiClient.scriptsResource.getCurrentScript();
final gameScriptMachine = GameScriptMachine.initialize(currentScript);
return App(
settingsPersistence: LocalStorageSettingsPersistence(),
apiClient: apiClient,
matchMakerRepository: MatchMakerRepository(db: firestore),
configRepository: ConfigRepository(db: firestore),
connectionRepository: ConnectionRepository(apiClient: apiClient),
matchSolver: MatchSolver(gameScriptMachine: gameScriptMachine),
gameScriptMachine: gameScriptMachine,
user: await authenticationRepository.user.first,
isScriptsEnabled: true,
);
},
),
);
}
| 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 {
const PromptFormIntroView({super.key});
static const _gap = SizedBox(height: IoFlipSpacing.xlg);
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Container(
alignment: Alignment.center,
constraints: const BoxConstraints(maxWidth: 516),
padding: const EdgeInsets.symmetric(horizontal: IoFlipSpacing.xlg),
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Stack(
alignment: Alignment.topCenter,
children: [
const CardMaster(),
Column(
children: [
SizedBox(
height: CardMaster.cardMasterHeight -
(PromptFormIntroView._gap.height! * 2),
),
Text(
l10n.niceToMeetYou,
style: IoFlipTextStyles.headlineH4Light,
textAlign: TextAlign.center,
),
const SizedBox(height: IoFlipSpacing.sm),
Text(
l10n.introTextPromptPage,
style: IoFlipTextStyles.headlineH6Light,
textAlign: TextAlign.center,
),
PromptFormIntroView._gap,
],
)
],
),
],
),
),
),
),
IoFlipBottomBar(
leading: const AudioToggleButton(),
middle: RoundedButton.text(
l10n.letsGetStarted,
onPressed: () => context.updateFlow<Prompt>(
(data) => data.setIntroSeen(),
),
),
),
],
);
}
}
| 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 [SettingsPersistence].
/// Useful for testing.
class MemoryOnlySettingsPersistence implements SettingsPersistence {
bool musicOn = true;
bool soundsOn = true;
bool muted = false;
String playerName = 'Player';
@override
Future<bool> getMusicOn() async => musicOn;
@override
Future<bool> getMuted({required bool defaultValue}) async => muted;
@override
Future<bool> getSoundsOn() async => soundsOn;
@override
Future<void> saveMusicOn({required bool active}) async => musicOn = active;
@override
Future<void> saveMuted({required bool active}) async => muted = active;
@override
Future<void> saveSoundsOn({required bool active}) async => soundsOn = active;
}
| 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(),
refreshIdToken: () async => null,
appCheckTokenStream: const Stream.empty(),
);
final channel = await client.connect('public/connect');
channel.messages.listen(print);
}
| 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.Response {}
void main() {
group('ShareResource', () {
late ApiClient apiClient;
late ShareResource resource;
late http.Response response;
final bytes = Uint8List(8);
setUp(() {
apiClient = _MockApiClient();
response = _MockResponse();
when(() => apiClient.shareHandUrl(any())).thenReturn('handUrl');
when(() => apiClient.shareCardUrl(any())).thenReturn('cardUrl');
when(() => apiClient.getPublic(any())).thenAnswer((_) async => response);
when(() => response.bodyBytes).thenReturn(bytes);
resource = ShareResource(
apiClient: apiClient,
);
});
test('can be instantiated', () {
expect(
resource,
isNotNull,
);
});
test('twitterShareHandUrl returns the correct url', () {
expect(
resource.twitterShareHandUrl('id'),
contains('handUrl'),
);
});
test('twitterShareCardUrl returns the correct url', () {
expect(
resource.twitterShareCardUrl('id'),
contains('cardUrl'),
);
});
test('facebookShareHandUrl returns the correct url', () {
expect(
resource.facebookShareHandUrl('id'),
contains('handUrl'),
);
});
test('facebookShareCardUrl returns the correct url', () {
expect(
resource.facebookShareCardUrl('id'),
contains('cardUrl'),
);
});
group('getShareCardImage', () {
test('returns a Card', () async {
when(() => response.statusCode).thenReturn(HttpStatus.ok);
final imageResponse = await resource.getShareCardImage('');
expect(imageResponse, equals(bytes));
});
test('throws ApiClientError when request fails', () async {
when(() => response.statusCode)
.thenReturn(HttpStatus.internalServerError);
when(() => response.body).thenReturn('Ops');
await expectLater(
resource.getShareCardImage('1'),
throwsA(
isA<ApiClientError>().having(
(e) => e.cause,
'cause',
equals(
'GET public/cards/1 returned status 500 with the following response: "Ops"',
),
),
),
);
});
});
group('getShareDeckImage', () {
test('returns a Card', () async {
when(() => response.statusCode).thenReturn(HttpStatus.ok);
final imageResponse = await resource.getShareDeckImage('');
expect(imageResponse, equals(bytes));
});
test('throws ApiClientError when request fails', () async {
when(() => response.statusCode)
.thenReturn(HttpStatus.internalServerError);
when(() => response.body).thenReturn('Ops');
await expectLater(
resource.getShareDeckImage('1'),
throwsA(
isA<ApiClientError>().having(
(e) => e.cause,
'cause',
equals(
'GET public/decks/1 returned status 500 with the following response: "Ops"',
),
),
),
);
});
});
});
}
| 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
State<StatefulWidget> createState() => _CardLandingPuffStoryState();
}
class _CardLandingPuffStoryState extends State<CardLandingPuffStory> {
AnimatedCardController controller = AnimatedCardController();
bool playing = false;
@override
Widget build(BuildContext context) {
return Provider(
create: (_) => Images(prefix: ''),
child: StoryScaffold(
title: 'Card landing puff',
body: Center(
child: Column(
children: [
Stack(
alignment: Alignment.center,
children: [
CardLandingPuff(
playing: playing,
onComplete: () => setState(() => playing = false),
),
AnimatedCard(
controller: controller,
front: const GameCard(
image:
'https://firebasestorage.googleapis.com/v0/b/top-dash-dev.appspot.com/o/public%2FDash_pirate_trumpets_field.png?alt=media',
name: 'Dash the Great',
description: 'The best Dash in all the Dashland',
suitName: 'earth',
power: 57,
size: GameCardSize.md(),
isRare: false,
),
back: const FlippedGameCard(
size: GameCardSize.md(),
),
),
],
),
const SizedBox(height: IoFlipSpacing.lg),
ElevatedButton(
onPressed: () {
controller.run(bigFlipAnimation);
Future.delayed(
bigFlipAnimation.duration * .85,
() => setState(() => playing = true),
);
},
child: const Text('Replay'),
),
],
),
),
),
);
}
@override
void dispose() {
controller.dispose();
super.dispose();
}
}
| 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 {
/// {@macro fire_damage}
FireDamage({required super.size})
: super(
chargeBackPath:
Assets.images.elements.desktop.fire.chargeBack.keyName,
chargeFrontPath:
Assets.images.elements.desktop.fire.chargeFront.keyName,
damageReceivePath:
Assets.images.elements.desktop.fire.damageReceive.keyName,
damageSendPath:
Assets.images.elements.desktop.fire.damageSend.keyName,
victoryChargeBackPath:
Assets.images.elements.desktop.fire.victoryChargeBack.keyName,
victoryChargeFrontPath:
Assets.images.elements.desktop.fire.victoryChargeFront.keyName,
badgePath: Assets.images.suits.card.fire.keyName,
animationColor: IoFlipColors.seedGold,
);
}
| 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? overrideDefaultTargetPlatform,
});
/// Returns an asset based on the current platform.
T platformAwareAsset<T>({
required T desktop,
required T mobile,
bool isWeb = kIsWeb,
TargetPlatform? overrideDefaultTargetPlatform,
}) {
final platform = overrideDefaultTargetPlatform ?? defaultTargetPlatform;
final isWebMobile = isWeb &&
(platform == TargetPlatform.iOS || platform == TargetPlatform.android);
return isWebMobile ? mobile : desktop;
}
/// {@template device_info}
/// Model with device information.
/// {@endtemplate}
class DeviceInfo extends Equatable {
/// {@macro device_info}
const DeviceInfo({
required this.osVersion,
required this.platform,
});
/// The OS version of the device.
final int osVersion;
/// The platform of the device.
final TargetPlatform platform;
@override
List<Object?> get props => [osVersion, platform];
}
/// A predicate that checks if the device is an older Android.
bool isOlderAndroid(DeviceInfo deviceInfo) {
return deviceInfo.platform == TargetPlatform.android &&
deviceInfo.osVersion <= 11;
}
/// A predicate that checks if the device is an android device.
bool isAndroid(DeviceInfo deviceInfo) {
return deviceInfo.platform == TargetPlatform.android;
}
/// Platform aware predicate.
typedef DeviceInfoPredicate = bool Function(DeviceInfo deviceInfo);
/// Device aware predicate.
typedef DeviceInfoAwareAsset<T> = Future<T> Function({
required DeviceInfoPredicate predicate,
required T Function() asset,
required T Function() orElse,
});
/// Returns an asset based on the device information.
Future<T> deviceInfoAwareAsset<T>({
required DeviceInfoPredicate predicate,
required T Function() asset,
required T Function() orElse,
TargetPlatform? overrideDefaultTargetPlatform,
DeviceInfoPlugin? overrideDeviceInfoPlugin,
}) async {
final deviceInfo = overrideDeviceInfoPlugin ?? DeviceInfoPlugin();
final platform = overrideDefaultTargetPlatform ?? defaultTargetPlatform;
late DeviceInfo info;
if (platform == TargetPlatform.iOS || platform == TargetPlatform.android) {
final webInfo = await deviceInfo.webBrowserInfo;
final userAgent = webInfo.userAgent;
try {
late int version;
if (platform == TargetPlatform.android) {
version = int.parse(
userAgent?.split('Android ')[1].split(';')[0].split('.')[0] ?? '',
);
} else {
version = int.parse(
userAgent?.split('Version/')[1].split(' Mobile')[0].split('.')[0] ??
'',
);
}
info = DeviceInfo(
osVersion: version,
platform: platform,
);
} catch (_) {
return orElse();
}
} else {
return orElse();
}
if (predicate(info)) {
return asset();
} else {
return orElse();
}
}
| 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 StatelessWidget {
/// {@macro foil_shader}
const FoilShader({
required this.child,
super.key,
this.dx = 0,
this.dy = 0,
this.package = 'io_flip_ui',
});
/// The optional x offset of the foil shader.
///
/// This can be used for parallax.
final double dx;
/// The optional y offset of the foil shader.
///
/// This can be used for parallax.
final double dy;
/// The name of the package from which the shader is included.
///
/// This is used to resolve the shader asset key.
final String? package;
/// The child widget to apply the foil shader to.
final Widget child;
static const String _assetPath = 'shaders/foil.frag';
String get _assetKey =>
package == null ? _assetPath : 'packages/$package/$_assetPath';
@override
Widget build(BuildContext context) {
late final devicePixelRatio = MediaQuery.of(context).devicePixelRatio;
return ShaderBuilder(
assetKey: _assetKey,
(context, shader, child) {
return AnimatedSampler(
(image, size, canvas) {
shader
..setFloat(0, image.width.toDouble() / devicePixelRatio)
..setFloat(1, image.height.toDouble() / devicePixelRatio)
..setFloat(2, dx)
..setFloat(3, dy)
..setImageSampler(0, image);
canvas.drawRect(
Offset.zero & size,
Paint()..shader = shader,
);
},
child: child!,
);
},
child: child,
);
}
}
| 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_ui/src/widgets/damages/damages.dart';
import 'package:io_flip_ui/src/widgets/damages/dual_animation.dart';
import 'package:io_flip_ui/src/widgets/game_card.dart';
import 'package:provider/provider.dart';
void main() {
group('ElementalDamageAnimation', () {
final findEmpty = find.byKey(const Key('elementalDamage_empty'));
late Images images;
setUp(() async {
images = Images(prefix: '');
await images.loadAll([
...Assets.images.elements.desktop.air.values.map((e) => e.keyName),
...Assets.images.elements.desktop.earth.values.map((e) => e.keyName),
...Assets.images.elements.desktop.fire.values.map((e) => e.keyName),
...Assets.images.elements.desktop.metal.values.map((e) => e.keyName),
...Assets.images.elements.desktop.water.values.map((e) => e.keyName),
...Assets.images.elements.mobile.air.values.map((e) => e.keyName),
...Assets.images.elements.mobile.earth.values.map((e) => e.keyName),
...Assets.images.elements.mobile.fire.values.map((e) => e.keyName),
...Assets.images.elements.mobile.metal.values.map((e) => e.keyName),
...Assets.images.elements.mobile.water.values.map((e) => e.keyName),
]);
});
group('With large assets', () {
group('MetalDamage', () {
testWidgets('renders entire animations flow', (tester) async {
final stepNotifier = ElementalDamageStepNotifier();
final completer = Completer<void>();
await tester.runAsync(() async {
await tester.pumpWidget(
Provider.value(
value: images,
child: Directionality(
textDirection: TextDirection.ltr,
child: ElementalDamageAnimation(
Element.metal,
direction: DamageDirection.topToBottom,
initialState: DamageAnimationState.charging,
size: const GameCardSize.md(),
stepNotifier: stepNotifier,
pointDeductionCompleter: completer,
),
),
),
);
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsNWidgets(2));
expect(find.byType(ChargeBack), findsOneWidget);
expect(find.byType(ChargeFront), findsOneWidget);
var chargedComplete = false;
unawaited(
stepNotifier.charged.then(
(_) {
chargedComplete = true;
},
),
);
while (!chargedComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(find.byType(DamageSend), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsOneWidget);
var sendComplete = false;
unawaited(
stepNotifier.sent.then(
(_) {
sendComplete = true;
},
),
);
while (!sendComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(find.byType(DamageReceive), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsOneWidget);
var receiveComplete = false;
unawaited(
stepNotifier.received.then(
(_) {
receiveComplete = true;
},
),
);
while (!receiveComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
completer.complete();
await tester.pump();
expect(findEmpty, findsOneWidget);
await tester.pump();
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsNWidgets(2));
expect(find.byType(VictoryChargeBack), findsOneWidget);
expect(find.byType(VictoryChargeFront), findsOneWidget);
var victoryComplete = false;
unawaited(
stepNotifier.victory.then(
(_) {
victoryComplete = true;
},
),
);
while (!victoryComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(findEmpty, findsOneWidget);
});
});
});
group('AirDamage', () {
testWidgets('renders entire animations flow', (tester) async {
final stepNotifier = ElementalDamageStepNotifier();
final completer = Completer<void>();
await tester.runAsync(() async {
await tester.pumpWidget(
Provider.value(
value: images,
child: Directionality(
textDirection: TextDirection.ltr,
child: ElementalDamageAnimation(
Element.air,
direction: DamageDirection.topToBottom,
size: const GameCardSize.md(),
initialState: DamageAnimationState.charging,
stepNotifier: stepNotifier,
pointDeductionCompleter: completer,
),
),
),
);
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsNWidgets(2));
expect(find.byType(ChargeBack), findsOneWidget);
expect(find.byType(ChargeFront), findsOneWidget);
var chargedComplete = false;
unawaited(
stepNotifier.charged.then(
(_) {
chargedComplete = true;
},
),
);
while (!chargedComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(find.byType(DamageSend), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsOneWidget);
var sendComplete = false;
unawaited(
stepNotifier.sent.then(
(_) {
sendComplete = true;
},
),
);
while (!sendComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(find.byType(DamageReceive), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsOneWidget);
var receiveComplete = false;
unawaited(
stepNotifier.received.then(
(_) {
receiveComplete = true;
},
),
);
while (!receiveComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
completer.complete();
await tester.pump();
expect(findEmpty, findsOneWidget);
await tester.pump();
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsNWidgets(2));
expect(find.byType(VictoryChargeBack), findsOneWidget);
expect(find.byType(VictoryChargeFront), findsOneWidget);
var victoryComplete = false;
unawaited(
stepNotifier.victory.then(
(_) {
victoryComplete = true;
},
),
);
while (!victoryComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(findEmpty, findsOneWidget);
});
});
});
group('FireDamage', () {
testWidgets('renders entire animations flow', (tester) async {
final stepNotifier = ElementalDamageStepNotifier();
final completer = Completer<void>();
await tester.runAsync(() async {
await tester.pumpWidget(
Provider.value(
value: images,
child: Directionality(
textDirection: TextDirection.ltr,
child: ElementalDamageAnimation(
Element.fire,
direction: DamageDirection.bottomToTop,
initialState: DamageAnimationState.charging,
size: const GameCardSize.md(),
stepNotifier: stepNotifier,
pointDeductionCompleter: completer,
),
),
),
);
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsNWidgets(2));
expect(find.byType(ChargeBack), findsOneWidget);
expect(find.byType(ChargeFront), findsOneWidget);
var chargedComplete = false;
unawaited(
stepNotifier.charged.then(
(_) {
chargedComplete = true;
},
),
);
while (!chargedComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(find.byType(DamageSend), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsOneWidget);
var sendComplete = false;
unawaited(
stepNotifier.sent.then(
(_) {
sendComplete = true;
},
),
);
while (!sendComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(find.byType(DamageReceive), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsOneWidget);
var receiveComplete = false;
unawaited(
stepNotifier.received.then(
(_) {
receiveComplete = true;
},
),
);
while (!receiveComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
completer.complete();
await tester.pump();
expect(findEmpty, findsOneWidget);
await tester.pump();
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsNWidgets(2));
expect(find.byType(VictoryChargeBack), findsOneWidget);
expect(find.byType(VictoryChargeFront), findsOneWidget);
var victoryComplete = false;
unawaited(
stepNotifier.victory.then(
(_) {
victoryComplete = true;
},
),
);
while (!victoryComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(findEmpty, findsOneWidget);
});
});
});
group('EarthDamage', () {
testWidgets('renders entire animations flow', (tester) async {
final stepNotifier = ElementalDamageStepNotifier();
final completer = Completer<void>();
await tester.runAsync(() async {
await tester.pumpWidget(
Provider.value(
value: images,
child: Directionality(
textDirection: TextDirection.ltr,
child: ElementalDamageAnimation(
Element.earth,
direction: DamageDirection.topToBottom,
initialState: DamageAnimationState.charging,
size: const GameCardSize.md(),
stepNotifier: stepNotifier,
pointDeductionCompleter: completer,
),
),
),
);
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsNWidgets(2));
expect(find.byType(ChargeBack), findsOneWidget);
expect(find.byType(ChargeFront), findsOneWidget);
var chargedComplete = false;
unawaited(
stepNotifier.charged.then(
(_) {
chargedComplete = true;
},
),
);
while (!chargedComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(find.byType(DamageSend), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsOneWidget);
var sendComplete = false;
unawaited(
stepNotifier.sent.then(
(_) {
sendComplete = true;
},
),
);
while (!sendComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(find.byType(DamageReceive), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsOneWidget);
var receiveComplete = false;
unawaited(
stepNotifier.received.then(
(_) {
receiveComplete = true;
},
),
);
while (!receiveComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
completer.complete();
await tester.pump();
expect(findEmpty, findsOneWidget);
await tester.pump();
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsNWidgets(2));
expect(find.byType(VictoryChargeBack), findsOneWidget);
expect(find.byType(VictoryChargeFront), findsOneWidget);
var victoryComplete = false;
unawaited(
stepNotifier.victory.then(
(_) {
victoryComplete = true;
},
),
);
while (!victoryComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(findEmpty, findsOneWidget);
});
});
});
group('WaterDamage', () {
testWidgets('renders entire animations flow', (tester) async {
final stepNotifier = ElementalDamageStepNotifier();
final completer = Completer<void>();
await tester.runAsync(() async {
await tester.pumpWidget(
Provider.value(
value: images,
child: Directionality(
textDirection: TextDirection.ltr,
child: ElementalDamageAnimation(
Element.water,
direction: DamageDirection.topToBottom,
initialState: DamageAnimationState.charging,
size: const GameCardSize.md(),
stepNotifier: stepNotifier,
pointDeductionCompleter: completer,
),
),
),
);
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsNWidgets(2));
expect(find.byType(ChargeBack), findsOneWidget);
expect(find.byType(ChargeFront), findsOneWidget);
var chargedComplete = false;
unawaited(
stepNotifier.charged.then(
(_) {
chargedComplete = true;
},
),
);
while (!chargedComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(find.byType(DamageSend), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsOneWidget);
var sendComplete = false;
unawaited(
stepNotifier.sent.then(
(_) {
sendComplete = true;
},
),
);
while (!sendComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(find.byType(DamageReceive), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsOneWidget);
var receiveComplete = false;
unawaited(
stepNotifier.received.then(
(_) {
receiveComplete = true;
},
),
);
while (!receiveComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
completer.complete();
await tester.pump();
expect(findEmpty, findsOneWidget);
await tester.pump();
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(SpriteAnimationWidget), findsNWidgets(2));
expect(find.byType(VictoryChargeBack), findsOneWidget);
expect(find.byType(VictoryChargeFront), findsOneWidget);
var victoryComplete = false;
unawaited(
stepNotifier.victory.then(
(_) {
victoryComplete = true;
},
),
);
while (!victoryComplete) {
await tester.pump(const Duration(milliseconds: 17));
}
expect(findEmpty, findsOneWidget);
});
});
});
});
group('With small assets', () {
group('MetalDamage', () {
testWidgets('renders entire animations flow', (tester) async {
final stepNotifier = ElementalDamageStepNotifier();
final completer = Completer<void>();
await tester.pumpWidget(
Provider.value(
value: images,
child: Directionality(
textDirection: TextDirection.ltr,
child: ElementalDamageAnimation(
Element.metal,
direction: DamageDirection.bottomToTop,
size: const GameCardSize.md(),
initialState: DamageAnimationState.charging,
assetSize: AssetSize.small,
stepNotifier: stepNotifier,
pointDeductionCompleter: completer,
),
),
),
);
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(ChargeBack), findsOneWidget);
expect(find.byType(ChargeFront), findsOneWidget);
var chargedComplete = false;
unawaited(
stepNotifier.charged.then(
(_) {
chargedComplete = true;
},
),
);
while (!chargedComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
expect(find.byType(DamageSend), findsOneWidget);
var sendComplete = false;
unawaited(
stepNotifier.sent.then(
(_) {
sendComplete = true;
},
),
);
while (!sendComplete) {
await tester.pump(const Duration(milliseconds: 15));
}
expect(find.byType(DamageReceive), findsOneWidget);
var receiveComplete = false;
unawaited(
stepNotifier.received.then(
(_) {
receiveComplete = true;
},
),
);
while (!receiveComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
completer.complete();
await tester.pump();
expect(findEmpty, findsOneWidget);
await tester.pump();
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(VictoryChargeBack), findsOneWidget);
expect(find.byType(VictoryChargeFront), findsOneWidget);
var victoryComplete = false;
unawaited(
stepNotifier.victory.then(
(_) {
victoryComplete = true;
},
),
);
while (!victoryComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
expect(findEmpty, findsOneWidget);
});
});
group('AirDamage', () {
testWidgets('renders entire animations flow', (tester) async {
final stepNotifier = ElementalDamageStepNotifier();
final completer = Completer<void>();
await tester.pumpWidget(
Provider.value(
value: images,
child: Directionality(
textDirection: TextDirection.ltr,
child: ElementalDamageAnimation(
Element.air,
direction: DamageDirection.topToBottom,
size: const GameCardSize.md(),
initialState: DamageAnimationState.charging,
assetSize: AssetSize.small,
stepNotifier: stepNotifier,
pointDeductionCompleter: completer,
),
),
),
);
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(ChargeBack), findsOneWidget);
expect(find.byType(ChargeFront), findsOneWidget);
var chargedComplete = false;
unawaited(
stepNotifier.charged.then(
(_) {
chargedComplete = true;
},
),
);
while (!chargedComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
expect(find.byType(DamageSend), findsOneWidget);
var sendComplete = false;
unawaited(
stepNotifier.sent.then(
(_) {
sendComplete = true;
},
),
);
while (!sendComplete) {
await tester.pump(const Duration(milliseconds: 15));
}
expect(find.byType(DamageReceive), findsOneWidget);
var receiveComplete = false;
unawaited(
stepNotifier.received.then(
(_) {
receiveComplete = true;
},
),
);
while (!receiveComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
completer.complete();
await tester.pump();
expect(findEmpty, findsOneWidget);
await tester.pump();
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(VictoryChargeBack), findsOneWidget);
expect(find.byType(VictoryChargeFront), findsOneWidget);
var victoryComplete = false;
unawaited(
stepNotifier.victory.then(
(_) {
victoryComplete = true;
},
),
);
while (!victoryComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
expect(findEmpty, findsOneWidget);
});
});
group('FireDamage', () {
testWidgets('renders entire animations flow', (tester) async {
final stepNotifier = ElementalDamageStepNotifier();
final completer = Completer<void>();
await tester.pumpWidget(
Provider.value(
value: images,
child: Directionality(
textDirection: TextDirection.ltr,
child: ElementalDamageAnimation(
Element.fire,
direction: DamageDirection.topToBottom,
size: const GameCardSize.md(),
initialState: DamageAnimationState.charging,
assetSize: AssetSize.small,
stepNotifier: stepNotifier,
pointDeductionCompleter: completer,
),
),
),
);
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(ChargeBack), findsOneWidget);
expect(find.byType(ChargeFront), findsOneWidget);
var chargedComplete = false;
unawaited(
stepNotifier.charged.then(
(_) {
chargedComplete = true;
},
),
);
while (!chargedComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
expect(find.byType(DamageSend), findsOneWidget);
var sendComplete = false;
unawaited(
stepNotifier.sent.then(
(_) {
sendComplete = true;
},
),
);
while (!sendComplete) {
await tester.pump(const Duration(milliseconds: 15));
}
expect(find.byType(DamageReceive), findsOneWidget);
var receiveComplete = false;
unawaited(
stepNotifier.received.then(
(_) {
receiveComplete = true;
},
),
);
while (!receiveComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
completer.complete();
await tester.pump();
expect(findEmpty, findsOneWidget);
await tester.pump();
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(VictoryChargeBack), findsOneWidget);
expect(find.byType(VictoryChargeFront), findsOneWidget);
var victoryComplete = false;
unawaited(
stepNotifier.victory.then(
(_) {
victoryComplete = true;
},
),
);
while (!victoryComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
expect(findEmpty, findsOneWidget);
});
});
group('EarthDamage', () {
testWidgets('renders entire animations flow', (tester) async {
final stepNotifier = ElementalDamageStepNotifier();
final completer = Completer<void>();
await tester.pumpWidget(
Provider.value(
value: images,
child: Directionality(
textDirection: TextDirection.ltr,
child: ElementalDamageAnimation(
Element.earth,
direction: DamageDirection.topToBottom,
size: const GameCardSize.md(),
initialState: DamageAnimationState.charging,
assetSize: AssetSize.small,
stepNotifier: stepNotifier,
pointDeductionCompleter: completer,
),
),
),
);
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(ChargeBack), findsOneWidget);
expect(find.byType(ChargeFront), findsOneWidget);
var chargedComplete = false;
unawaited(
stepNotifier.charged.then(
(_) {
chargedComplete = true;
},
),
);
while (!chargedComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
expect(find.byType(DamageSend), findsOneWidget);
var sendComplete = false;
unawaited(
stepNotifier.sent.then(
(_) {
sendComplete = true;
},
),
);
while (!sendComplete) {
await tester.pump(const Duration(milliseconds: 15));
}
expect(find.byType(DamageReceive), findsOneWidget);
var receiveComplete = false;
unawaited(
stepNotifier.received.then(
(_) {
receiveComplete = true;
},
),
);
while (!receiveComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
completer.complete();
await tester.pump();
expect(findEmpty, findsOneWidget);
await tester.pump();
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(VictoryChargeBack), findsOneWidget);
expect(find.byType(VictoryChargeFront), findsOneWidget);
var victoryComplete = false;
unawaited(
stepNotifier.victory.then(
(_) {
victoryComplete = true;
},
),
);
while (!victoryComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
expect(findEmpty, findsOneWidget);
});
});
group('WaterDamage', () {
testWidgets('renders entire animations flow', (tester) async {
final stepNotifier = ElementalDamageStepNotifier();
final completer = Completer<void>();
await tester.pumpWidget(
Provider.value(
value: images,
child: Directionality(
textDirection: TextDirection.ltr,
child: ElementalDamageAnimation(
Element.water,
direction: DamageDirection.topToBottom,
size: const GameCardSize.md(),
initialState: DamageAnimationState.charging,
assetSize: AssetSize.small,
stepNotifier: stepNotifier,
pointDeductionCompleter: completer,
),
),
),
);
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(ChargeBack), findsOneWidget);
expect(find.byType(ChargeFront), findsOneWidget);
var chargedComplete = false;
unawaited(
stepNotifier.charged.then(
(_) {
chargedComplete = true;
},
),
);
while (!chargedComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
expect(find.byType(DamageSend), findsOneWidget);
var sendComplete = false;
unawaited(
stepNotifier.sent.then(
(_) {
sendComplete = true;
},
),
);
while (!sendComplete) {
await tester.pump(const Duration(milliseconds: 15));
}
expect(find.byType(DamageReceive), findsOneWidget);
var receiveComplete = false;
unawaited(
stepNotifier.received.then(
(_) {
receiveComplete = true;
},
),
);
while (!receiveComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
completer.complete();
await tester.pump();
expect(findEmpty, findsOneWidget);
await tester.pump();
expect(find.byType(DualAnimation), findsOneWidget);
expect(find.byType(VictoryChargeBack), findsOneWidget);
expect(find.byType(VictoryChargeFront), findsOneWidget);
var victoryComplete = false;
unawaited(
stepNotifier.victory.then(
(_) {
victoryComplete = true;
},
),
);
while (!victoryComplete) {
await tester.pumpAndSettle(const Duration(milliseconds: 150));
}
expect(findEmpty, findsOneWidget);
});
});
});
});
}
| 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: Scaffold(
body: Center(
child: FadingDotLoader(),
),
),
),
);
await tester.pump(const Duration(milliseconds: 2000));
expect(find.byType(Container), findsNWidgets(3));
});
});
}
| 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(
const MaterialApp(
home: Scaffold(
body: IoFlipDialog(child: child),
),
),
);
expect(find.text('test'), findsOneWidget);
});
testWidgets('calls onClose method', (tester) async {
var onCloseCalled = false;
await tester.pumpWidget(
MaterialApp(
home: Scaffold(
body: IoFlipDialog(
onClose: () => onCloseCalled = true,
child: child,
),
),
),
);
await tester.tap(find.byType(CloseButton));
await tester.pumpAndSettle();
expect(onCloseCalled, isTrue);
});
group('show', () {
testWidgets('renders the dialog with correct child', (tester) async {
await tester.pumpWidget(
MaterialApp(
home: Builder(
builder: (BuildContext context) => Scaffold(
body: Center(
child: ElevatedButton(
onPressed: () => IoFlipDialog.show(
context,
child: child,
),
child: const Text('show'),
),
),
),
),
),
);
await tester.tap(find.byType(ElevatedButton));
await tester.pumpAndSettle();
expect(find.byWidget(child), findsOneWidget);
});
});
});
}
| 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 ENCRYPTION_IV=$ENCRYPTION_IV \
--dart-define RECAPTCHA_KEY=$RECAPTCHA_KEY \
--dart-define APPCHECK_DEBUG_TOKEN=$APPCHECK_DEBUG_TOKEN
| 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: '/',
builder: DraftPage.routeBuilder,
),
],
);
});
group('DraftPage', () {
testWidgets('navigates to draft page', (tester) async {
await tester.pumpSubjectWithRouter(router);
expect(find.byType(DraftPage), findsOneWidget);
});
});
}
extension DraftPageTest on WidgetTester {
Future<void> pumpSubjectWithRouter(GoRouter goRouter) {
return pumpAppWithRouter(goRouter);
}
}
| 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 (visitor is TextSpan && visitor.text == text) {
(visitor.recognizer as TapGestureRecognizer?)?.onTap?.call();
return false;
}
return true;
}
| 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 '../../helpers/helpers.dart';
class _MockLeaderboardResource extends Mock implements LeaderboardResource {}
void main() {
late LeaderboardResource leaderboardResource;
setUp(() {
leaderboardResource = _MockLeaderboardResource();
when(() => leaderboardResource.getInitialsBlacklist())
.thenAnswer((_) async => []);
});
group('LeaderboardEntryView', () {
testWidgets('renders correct title', (tester) async {
await tester.pumpSubject(leaderboardResource);
final l10n = tester.element(find.byType(LeaderboardEntryView)).l10n;
expect(find.text(l10n.enterYourInitials), findsOneWidget);
});
testWidgets('renders initials form', (tester) async {
await tester.pumpSubject(leaderboardResource);
expect(find.byType(InitialsForm), findsOneWidget);
});
});
}
extension LeaderboardEntryViewTest on WidgetTester {
Future<void> pumpSubject(
LeaderboardResource leaderboardResource,
) async {
return pumpApp(
const LeaderboardEntryView(
scoreCardId: 'scoreCardId',
),
leaderboardResource: leaderboardResource,
);
}
}
| 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 {
await tester.pumpSubject();
await tester.pumpAndSettle();
expect(find.byType(CardMaster), findsOneWidget);
});
testWidgets(
'render sprite animation when is newer androids',
(tester) async {
await tester.pumpSubject();
await tester.pumpAndSettle();
expect(find.byType(SpriteAnimationWidget), findsOneWidget);
},
);
testWidgets(
"Don't render the animation when is older androids",
(tester) async {
await tester.pumpSubject(isAndroid: true);
await tester.pumpAndSettle();
expect(find.byType(SpriteAnimationWidget), findsNothing);
},
);
});
}
extension CardMasterTest on WidgetTester {
Future<void> pumpSubject({
bool isAndroid = false,
bool isDesktop = false,
}) async {
Future<String> deviceInfoAwareAsset({
required bool Function(DeviceInfo deviceInfo) predicate,
required String Function() asset,
required String Function() orElse,
}) async {
if (isAndroid) {
return asset();
} else {
return orElse();
}
}
await pumpApp(
CardMaster(deviceInfoAwareAsset: deviceInfoAwareAsset),
);
}
}
| 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/share/widgets/widgets.dart';
import 'package:io_flip/utils/external_links.dart';
import 'package:mocktail/mocktail.dart';
import 'package:mocktail_image_network/mocktail_image_network.dart';
import '../../helpers/helpers.dart';
class _MockDownloadBloc extends MockBloc<DownloadEvent, DownloadState>
implements DownloadBloc {}
String? launchedUrl;
const shareUrl = 'https://example.com';
const card = Card(
id: '',
name: 'name',
description: 'description',
image: '',
rarity: false,
power: 1,
suit: Suit.air,
);
const deck = Deck(id: 'id', userId: 'userId', cards: [card]);
void main() {
group('ShareDialog', () {
late DownloadBloc downloadBloc;
setUp(() {
downloadBloc = _MockDownloadBloc();
when(() => downloadBloc.state).thenReturn(
const DownloadState(),
);
});
setUpAll(() {
launchedUrl = null;
});
testWidgets('renders the content', (tester) async {
await tester.pumpSubject(
downloadBloc: downloadBloc,
content: const Text('test'),
);
expect(find.text('test'), findsOneWidget);
});
testWidgets('renders a Twitter button', (tester) async {
await tester.pumpSubject(
downloadBloc: downloadBloc,
);
expect(find.text(tester.l10n.twitterButtonLabel), findsOneWidget);
});
testWidgets(
'tapping the Twitter button launches the correct url',
(tester) async {
await tester.pumpSubject(
downloadBloc: downloadBloc,
);
await tester.tap(find.text(tester.l10n.twitterButtonLabel));
expect(
launchedUrl,
shareUrl,
);
},
);
testWidgets('renders a Facebook button', (tester) async {
await tester.pumpSubject(
downloadBloc: downloadBloc,
);
expect(find.text(tester.l10n.facebookButtonLabel), findsOneWidget);
});
testWidgets(
'tapping the Facebook button launches the correct url',
(tester) async {
await tester.pumpSubject(
downloadBloc: downloadBloc,
);
await tester.tap(find.text(tester.l10n.facebookButtonLabel));
expect(
launchedUrl,
equals(
shareUrl,
),
);
},
);
testWidgets(
'tapping the Google Developer button launches the correct url',
(tester) async {
await tester.pumpSubject(
downloadBloc: downloadBloc,
);
await tester.tap(find.text(tester.l10n.devButtonLabel));
expect(
launchedUrl,
equals(
ExternalLinks.devAward,
),
);
},
);
testWidgets('renders a save button', (tester) async {
await tester.pumpSubject(
downloadBloc: downloadBloc,
);
expect(find.text(tester.l10n.saveButtonLabel), findsOneWidget);
});
testWidgets('calls save card on save button tap', (tester) async {
await tester.pumpSubject(
downloadBloc: downloadBloc,
);
await tester.tap(find.text(tester.l10n.saveButtonLabel));
verify(
() => downloadBloc.add(const DownloadCardsRequested(cards: [card])),
).called(1);
});
testWidgets('calls save deck on save button tap', (tester) async {
await tester.pumpSubject(
downloadBloc: downloadBloc,
downloadDeck: deck,
);
await tester.tap(find.text(tester.l10n.saveButtonLabel));
verifyNever(
() => downloadBloc.add(const DownloadCardsRequested(cards: [card])),
);
verify(
() => downloadBloc.add(const DownloadDeckRequested(deck: deck)),
).called(1);
});
testWidgets('renders a downloading button while the downloading',
(tester) async {
when(() => downloadBloc.state)
.thenReturn(const DownloadState(status: DownloadStatus.loading));
await tester.pumpSubject(
downloadBloc: downloadBloc,
);
expect(find.text(tester.l10n.downloadingButtonLabel), findsOneWidget);
});
testWidgets('renders a downloaded button on download complete',
(tester) async {
when(() => downloadBloc.state)
.thenReturn(const DownloadState(status: DownloadStatus.completed));
await tester.pumpSubject(
downloadBloc: downloadBloc,
);
expect(
find.text(tester.l10n.downloadCompleteButtonLabel),
findsOneWidget,
);
await tester.tap(find.text(tester.l10n.downloadCompleteButtonLabel));
verifyNever(
() => downloadBloc.add(const DownloadCardsRequested(cards: [card])),
);
verifyNever(
() => downloadBloc.add(const DownloadDeckRequested(deck: deck)),
);
});
testWidgets('renders a success message while on download complete',
(tester) async {
when(() => downloadBloc.state)
.thenReturn(const DownloadState(status: DownloadStatus.completed));
await tester.pumpSubject(
downloadBloc: downloadBloc,
);
expect(find.text(tester.l10n.downloadCompleteLabel), findsOneWidget);
});
testWidgets('renders a fail message while on download failure',
(tester) async {
when(() => downloadBloc.state)
.thenReturn(const DownloadState(status: DownloadStatus.failure));
await tester.pumpSubject(
downloadBloc: downloadBloc,
);
expect(find.text(tester.l10n.downloadFailedLabel), findsOneWidget);
});
});
}
extension ShareCardDialogTest on WidgetTester {
Future<void> pumpSubject({
required DownloadBloc downloadBloc,
Deck? downloadDeck,
Widget? content,
}) async {
await mockNetworkImages(() {
return pumpApp(
BlocProvider<DownloadBloc>.value(
value: downloadBloc,
child: ShareDialogView(
content: content ?? Container(),
twitterShareUrl: shareUrl,
facebookShareUrl: shareUrl,
urlLauncher: (url) async {
launchedUrl = url;
},
downloadCards: const [card],
downloadDeck: downloadDeck,
),
),
);
});
}
}
| 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 retained across app restarts or crashes.
The project relies on `hydrated_bloc` to persist the state of the following blocs:
- `feed_bloc`: Persists the feed state. It contains the list of feed articles fetched from the API.
- `article_bloc` : Persists each article information fetched from the API.
- `categories_bloc`: Persists all feed categories fetched from the API.
- `theme_mode_bloc` : Persists the theme mode of the app selected by the user.
## How it works
The `hydrated_bloc` package uses its own `hydrated_storage` to persist the state of blocs on the application's side. It is enabled by default.
Upon launching the application, if the feed state is empty, it retrieves the feed articles from the API. If the feed state is not empty, it displays the cached feed articles. As the user scrolls to the end of the feed page, older feed articles are fetched from the API and added to the feed state that will be persisted.
Actions such as opening the app from background or terminated state will not affect the state of the blocs. Those will be persisted and restored when the user restarts the app.
In order for the user to see the most recent articles, they must refresh the feed by pulling down the feed page.
If there are any errors while fetching the feed articles, the user will be notified by a 'Network Error' screen. The user can retry fetching the articles by tapping on the 'Retry' button.
## Debug mode caching
In this project, `hydrated_bloc` caching is automatically disabled for debug mode. Every restart of the application will clear the `hydrated_bloc` storage state, so no state will be restored. In order to enable it, the following code must be removed from the `bootstrap.dart` file:
```dart
if (kDebugMode) {
await HydratedBloc.storage.clear();
}
```
| 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://onesignal.com/) for push notifications.
For information on using FCM or OneSignal in your app, refer to the [Push notifications](/flutter_development/push_notifications.md) documentation section.
:::note
Notifications only appear when your app is running on a physical device.
:::
## FCM
[Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) (FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost. A newly-generated Flutter News Toolkit application comes with Firebase Cloud Messaging already installed. To customize app messaging, you must first create a [Firebase project](https://firebase.google.com/docs/android/setup#create-firebase-project) and register your app flavors for [iOS](https://firebase.google.com/docs/ios/setup#register-app) and [Android](https://firebase.google.com/docs/android/setup#register-app) within the Firebase project.
Next, specify your Firebase configuration for [iOS](https://firebase.google.com/docs/ios/setup#add-config-file) and [Android](https://firebase.google.com/docs/android/setup). Download the `google-services.json` file from Firebase for each of your flavors and replace the project's placeholder `google-services.json` files with your newly downloaded versions. Repeat this process with the `GoogleService-Info.plist` file to specify a Firebase configuration for your iOS flavors.
## OneSignal
[OneSignal](https://onesignal.com/) is a free notification service for your app that you can use instead of FCM. To use OneSignal as a notification solution, [create a OneSignal account and note your OneSignal app ID](https://documentation.onesignal.com/docs/flutter-sdk-setup). Then follow the [OneSignal SDK setup instructions](/flutter_development/push_notifications#onesignal).
| 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",
"contador",
"crashlytics",
"cret",
"cupertino",
"Cybersecurity",
"dartanalyzer",
"dartfmt",
"deremer",
"deserializes",
"Dierberger",
"droppable",
"endtemplate",
"felangel",
"firebaserc",
"firestore",
"fluttercommunity",
"fluttergen",
"formz",
"futura",
"gainsboro",
"gapless",
"genhtml",
"gitkeep",
"googleapis",
"GPLAY",
"Grush",
"grygezt",
"Hollister",
"Hypatia",
"infoplist",
"intelli",
"intellij",
"iphoneos",
"iphonesimulator",
"jorgecoca",
"keychain",
"lbird",
"lcov",
"lerp",
"libc",
"lightbridge",
"localizable",
"loopback",
"ltrb",
"mailchimp",
"microtask",
"Microtasks",
"mjohnson",
"mjordan",
"mkdir",
"mockingjay",
"mocktail",
"Morant",
"mostrado",
"msgsend",
"multiline",
"negatable",
"nonnull",
"Noto",
"objc",
"onesignal",
"onone",
"página",
"passcode",
"passw",
"pbxproj",
"plist",
"plists",
"PNGs",
"precompiled",
"presubmit",
"pubspec",
"pubviz",
"Qubit",
"r'Encrypted",
"r'flutter",
"r'Serving",
"RGBO",
"routable",
"runpath",
"rxdart",
"scrollable",
"sdkroot",
"serializable",
"shollister",
"signup",
"Sonifications",
"Stepien",
"sublist",
"templating",
"textfield",
"texto",
"trdlzja",
"unawaited",
"unfocus",
"unfocuses",
"uppercased",
"uuid",
"vgstart",
"vsync",
"wholemodule",
"wifi",
"xcassets",
"xcbuild",
"xcconfig",
"xcode",
"xcodeproj",
"xcscheme",
"xcschemes",
"xcshareddata",
"xcworkspace",
"xxlg",
"xxxlg",
"xxxs"
],
"ignorePaths": [
".github/workflows/**",
"**/api/lib/api/v1/projects/templates/*_bundle.dart",
"**/api/lib/src/data/static_news_data.dart",
"**/lib/terms_of_service/terms_of_service_mock_text.dart"
]
}
| 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()
class RelatedArticles extends Equatable {
/// {@macro related_articles}
const RelatedArticles({required this.blocks, required this.totalBlocks});
/// {@macro related_articles}
const RelatedArticles.empty() : this(blocks: const [], totalBlocks: 0);
/// Converts a `Map<String, dynamic>` into a [RelatedArticles] instance.
factory RelatedArticles.fromJson(Map<String, dynamic> json) =>
_$RelatedArticlesFromJson(json);
/// The list of news blocks for the associated related articles (paginated).
@NewsBlocksConverter()
final List<NewsBlock> blocks;
/// The total number of blocks for the related articles.
final int totalBlocks;
/// Converts the current instance to a `Map<String, dynamic>`.
Map<String, dynamic> toJson() => _$RelatedArticlesToJson(this);
@override
List<Object> get props => [blocks, totalBlocks];
}
| 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(Map<String, dynamic> json) =>
CurrentUserResponse(
user: User.fromJson(json['user'] as Map<String, dynamic>),
);
Map<String, dynamic> _$CurrentUserResponseToJson(
CurrentUserResponse instance) =>
<String, dynamic>{
'user': instance.user.toJson(),
};
| 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,
NavigateToSlideshowAction,
NavigateToVideoArticleAction,
UnknownBlockAction;
export 'src/block_action_converter.dart' show BlockActionConverter;
export 'src/category.dart' show Category;
export 'src/divider_horizontal_block.dart' show DividerHorizontalBlock;
export 'src/html_block.dart' show HtmlBlock;
export 'src/image_block.dart' show ImageBlock;
export 'src/news_block.dart' show NewsBlock;
export 'src/news_blocks_converter.dart' show NewsBlocksConverter;
export 'src/newsletter_block.dart' show NewsletterBlock;
export 'src/post_block.dart' show PostBlock, PostBlockActions;
export 'src/post_category.dart' show PostCategory;
export 'src/post_grid_group_block.dart' show PostGridGroupBlock;
export 'src/post_grid_tile_block.dart'
show PostGridTileBlock, PostGridTileBlockExt;
export 'src/post_large_block.dart' show PostLargeBlock;
export 'src/post_medium_block.dart' show PostMediumBlock;
export 'src/post_small_block.dart' show PostSmallBlock;
export 'src/section_header_block.dart' show SectionHeaderBlock;
export 'src/slide_block.dart' show SlideBlock;
export 'src/slideshow_block.dart' show SlideshowBlock;
export 'src/slideshow_introduction_block.dart' show SlideshowIntroductionBlock;
export 'src/spacer_block.dart' show SpacerBlock, Spacing;
export 'src/text_caption_block.dart' show TextCaptionBlock, TextCaptionColor;
export 'src/text_headline_block.dart' show TextHeadlineBlock;
export 'src/text_lead_paragraph_block.dart' show TextLeadParagraphBlock;
export 'src/text_paragraph_block.dart' show TextParagraphBlock;
export 'src/trending_story_block.dart' show TrendingStoryBlock;
export 'src/unknown_block.dart' show UnknownBlock;
export 'src/video_block.dart' show VideoBlock;
export 'src/video_introduction_block.dart' show VideoIntroductionBlock;
| 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>> {
/// {@macro news_blocks_converter}
const NewsBlocksConverter();
@override
List<Map<String, dynamic>> toJson(List<NewsBlock> blocks) {
return blocks.map((b) => b.toJson()).toList();
}
@override
List<NewsBlock> fromJson(List<dynamic> jsonString) {
return jsonString
.map((dynamic e) => NewsBlock.fromJson(e as Map<String, dynamic>))
.toList();
}
}
| 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';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
SectionHeaderBlock _$SectionHeaderBlockFromJson(Map<String, dynamic> json) =>
$checkedCreate(
'SectionHeaderBlock',
json,
($checkedConvert) {
final val = SectionHeaderBlock(
title: $checkedConvert('title', (v) => v as String),
action: $checkedConvert('action',
(v) => const BlockActionConverter().fromJson(v as Map?)),
type: $checkedConvert(
'type', (v) => v as String? ?? SectionHeaderBlock.identifier),
);
return val;
},
);
Map<String, dynamic> _$SectionHeaderBlockToJson(SectionHeaderBlock instance) {
final val = <String, dynamic>{
'title': instance.title,
};
void writeNotNull(String key, dynamic value) {
if (value != null) {
val[key] = value;
}
}
writeNotNull('action', const BlockActionConverter().toJson(instance.action));
val['type'] = instance.type;
return val;
}
| 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';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
TextParagraphBlock _$TextParagraphBlockFromJson(Map<String, dynamic> json) =>
$checkedCreate(
'TextParagraphBlock',
json,
($checkedConvert) {
final val = TextParagraphBlock(
text: $checkedConvert('text', (v) => v as String),
type: $checkedConvert(
'type', (v) => v as String? ?? TextParagraphBlock.identifier),
);
return val;
},
);
Map<String, dynamic> _$TextParagraphBlockToJson(TextParagraphBlock instance) =>
<String, dynamic>{
'text': instance.text,
'type': instance.type,
};
| 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()), equals(block));
});
});
}
| 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: 'Text caption',
);
expect(TextCaptionBlock.fromJson(block.toJson()), equals(block));
});
});
}
| 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.methodNotAllowed);
}
final newsDataSource = context.read<NewsDataSource>();
final results = await Future.wait([
newsDataSource.getPopularArticles(),
newsDataSource.getPopularTopics(),
]);
final articles = results.first as List<NewsBlock>;
final topics = results.last as List<String>;
final response = PopularSearchResponse(articles: articles, topics: topics);
return Response.json(body: response);
}
| 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? authority, String? path, String? query}) {
return predicate<Uri>((uri) {
authority ??= uri.authority;
path ??= uri.path;
query ??= uri.query;
return uri.authority == authority &&
uri.path == path &&
uri.query == query;
});
}
Matcher areJsonHeaders({String? authorizationToken}) {
return predicate<Map<String, String>?>((headers) {
if (headers?[HttpHeaders.contentTypeHeader] != ContentType.json.value ||
headers?[HttpHeaders.acceptHeader] != ContentType.json.value) {
return false;
}
if (authorizationToken != null &&
headers?[HttpHeaders.authorizationHeader] !=
'Bearer $authorizationToken') {
return false;
}
return true;
});
}
group('FlutterNewsExampleApiClient', () {
late http.Client httpClient;
late FlutterNewsExampleApiClient apiClient;
late TokenProvider tokenProvider;
const token = 'token';
setUpAll(() {
registerFallbackValue(Uri());
});
setUp(() {
httpClient = MockHttpClient();
tokenProvider = () async => null;
apiClient = FlutterNewsExampleApiClient(
httpClient: httpClient,
tokenProvider: tokenProvider,
);
});
group('localhost constructor', () {
test('can be instantiated (no params)', () {
expect(
() => FlutterNewsExampleApiClient.localhost(
tokenProvider: tokenProvider,
),
returnsNormally,
);
});
test('has correct baseUrl', () async {
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(
jsonEncode(const FeedResponse(feed: [], totalCount: 0)),
HttpStatus.ok,
),
);
final apiClient = FlutterNewsExampleApiClient.localhost(
httpClient: httpClient,
tokenProvider: tokenProvider,
);
await apiClient.getFeed();
verify(
() => httpClient.get(
any(that: isAUriHaving(authority: 'localhost:8080')),
headers: any(named: 'headers', that: areJsonHeaders()),
),
).called(1);
});
});
group('default constructor', () {
test('can be instantiated (no params).', () {
expect(
() => FlutterNewsExampleApiClient(tokenProvider: tokenProvider),
returnsNormally,
);
});
test('has correct baseUrl.', () async {
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(
jsonEncode(const FeedResponse(feed: [], totalCount: 0)),
HttpStatus.ok,
),
);
final apiClient = FlutterNewsExampleApiClient(
httpClient: httpClient,
tokenProvider: tokenProvider,
);
await apiClient.getFeed();
verify(
() => httpClient.get(
any(
that: isAUriHaving(
authority: 'example-api.a.run.app',
),
),
headers: any(named: 'headers', that: areJsonHeaders()),
),
).called(1);
});
});
group('getArticle', () {
final articleResponse = ArticleResponse(
title: 'title',
content: const [],
totalCount: 0,
url: Uri.parse('https://dailyglobe.com'),
isPremium: false,
isPreview: false,
);
test('makes correct http request (no query params).', () async {
const articleId = '__article_id__';
const path = '/api/v1/articles/$articleId';
const query = 'preview=false';
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async =>
http.Response(jsonEncode(articleResponse), HttpStatus.ok),
);
await apiClient.getArticle(id: articleId);
verify(
() => httpClient.get(
any(that: isAUriHaving(path: path, query: query)),
headers: any(named: 'headers', that: areJsonHeaders()),
),
).called(1);
});
test('makes correct http request (with query params).', () async {
const limit = 42;
const offset = 7;
const articleId = '__article_id__';
const path = '/api/v1/articles/$articleId';
const query = 'limit=$limit&offset=$offset&preview=true';
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async =>
http.Response(jsonEncode(articleResponse), HttpStatus.ok),
);
await apiClient.getArticle(
id: articleId,
limit: limit,
offset: offset,
preview: true,
);
verify(
() => httpClient.get(
any(that: isAUriHaving(path: path, query: query)),
headers: any(named: 'headers', that: areJsonHeaders()),
),
).called(1);
});
test('makes correct http request (with authorization token).', () async {
const articleId = '__article_id__';
const path = '/api/v1/articles/$articleId';
const query = 'preview=false';
tokenProvider = () async => token;
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async =>
http.Response(jsonEncode(articleResponse), HttpStatus.ok),
);
await FlutterNewsExampleApiClient(
httpClient: httpClient,
tokenProvider: tokenProvider,
).getArticle(id: articleId);
verify(
() => httpClient.get(
any(that: isAUriHaving(path: path, query: query)),
headers: any(
named: 'headers',
that: areJsonHeaders(authorizationToken: token),
),
),
).called(1);
});
test(
'throws FlutterNewsExampleApiMalformedResponse '
'when response body is malformed.', () {
const articleId = '__article_id__';
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response('', HttpStatus.ok),
);
expect(
() => apiClient.getArticle(id: articleId),
throwsA(isA<FlutterNewsExampleApiMalformedResponse>()),
);
});
test(
'throws FlutterNewsExampleApiRequestFailure '
'when response has a non-200 status code.', () {
const articleId = '__article_id__';
const statusCode = HttpStatus.internalServerError;
final body = <String, dynamic>{};
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(json.encode(body), statusCode),
);
expect(
() => apiClient.getArticle(id: articleId),
throwsA(
isA<FlutterNewsExampleApiRequestFailure>()
.having((f) => f.statusCode, 'statusCode', statusCode)
.having((f) => f.body, 'body', body),
),
);
});
test('returns a ArticleResponse on a 200 response.', () {
const articleId = '__article_id__';
final expectedResponse = ArticleResponse(
title: 'title',
content: const [],
totalCount: 0,
url: Uri.parse('http://dailyglobe.com'),
isPremium: false,
isPreview: false,
);
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(
json.encode(expectedResponse.toJson()),
HttpStatus.ok,
),
);
expect(
apiClient.getArticle(id: articleId),
completion(equals(expectedResponse)),
);
});
});
group('getRelatedArticles', () {
const relatedArticlesResponse = RelatedArticlesResponse(
relatedArticles: [],
totalCount: 0,
);
test('makes correct http request (no query params).', () async {
const articleId = '__article_id__';
const path = '/api/v1/articles/$articleId/related';
const query = '';
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async =>
http.Response(jsonEncode(relatedArticlesResponse), HttpStatus.ok),
);
await apiClient.getRelatedArticles(id: articleId);
verify(
() => httpClient.get(
any(that: isAUriHaving(path: path, query: query)),
headers: any(named: 'headers', that: areJsonHeaders()),
),
).called(1);
});
test('makes correct http request (with query params).', () async {
const limit = 42;
const offset = 7;
const articleId = '__article_id__';
const path = '/api/v1/articles/$articleId/related';
const query = 'limit=$limit&offset=$offset';
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async =>
http.Response(jsonEncode(relatedArticlesResponse), HttpStatus.ok),
);
await apiClient.getRelatedArticles(
id: articleId,
limit: limit,
offset: offset,
);
verify(
() => httpClient.get(
any(that: isAUriHaving(path: path, query: query)),
headers: any(named: 'headers', that: areJsonHeaders()),
),
).called(1);
});
test('makes correct http request (with authorization token).', () async {
const articleId = '__article_id__';
const path = '/api/v1/articles/$articleId/related';
const query = '';
tokenProvider = () async => token;
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async =>
http.Response(jsonEncode(relatedArticlesResponse), HttpStatus.ok),
);
await FlutterNewsExampleApiClient(
httpClient: httpClient,
tokenProvider: tokenProvider,
).getRelatedArticles(id: articleId);
verify(
() => httpClient.get(
any(that: isAUriHaving(path: path, query: query)),
headers: any(
named: 'headers',
that: areJsonHeaders(authorizationToken: token),
),
),
).called(1);
});
test(
'throws FlutterNewsExampleApiMalformedResponse '
'when response body is malformed.', () {
const articleId = '__article_id__';
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response('', HttpStatus.ok),
);
expect(
() => apiClient.getRelatedArticles(id: articleId),
throwsA(isA<FlutterNewsExampleApiMalformedResponse>()),
);
});
test(
'throws FlutterNewsExampleApiRequestFailure '
'when response has a non-200 status code.', () {
const articleId = '__article_id__';
const statusCode = HttpStatus.internalServerError;
final body = <String, dynamic>{};
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(json.encode(body), statusCode),
);
expect(
() => apiClient.getRelatedArticles(id: articleId),
throwsA(
isA<FlutterNewsExampleApiRequestFailure>()
.having((f) => f.statusCode, 'statusCode', statusCode)
.having((f) => f.body, 'body', body),
),
);
});
test('returns a RelatedArticlesResponse on a 200 response.', () {
const articleId = '__article_id__';
const expectedResponse = RelatedArticlesResponse(
relatedArticles: [],
totalCount: 0,
);
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(
json.encode(expectedResponse.toJson()),
HttpStatus.ok,
),
);
expect(
apiClient.getRelatedArticles(id: articleId),
completion(equals(expectedResponse)),
);
});
});
group('getFeed', () {
const feedResponse = FeedResponse(
feed: [],
totalCount: 0,
);
test('makes correct http request (no query params).', () async {
const path = '/api/v1/feed';
const query = '';
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(jsonEncode(feedResponse), HttpStatus.ok),
);
await apiClient.getFeed();
verify(
() => httpClient.get(
any(that: isAUriHaving(path: path, query: query)),
headers: any(named: 'headers', that: areJsonHeaders()),
),
).called(1);
});
test('makes correct http request (with query params).', () async {
const category = Category.science;
const limit = 42;
const offset = 7;
const path = '/api/v1/feed';
final query = 'category=${category.name}&limit=$limit&offset=$offset';
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(jsonEncode(feedResponse), HttpStatus.ok),
);
await apiClient.getFeed(
category: category,
limit: limit,
offset: offset,
);
verify(
() => httpClient.get(
any(that: isAUriHaving(path: path, query: query)),
headers: any(named: 'headers', that: areJsonHeaders()),
),
).called(1);
});
test('makes correct http request (with authorization token).', () async {
const path = '/api/v1/feed';
const query = '';
tokenProvider = () async => token;
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(jsonEncode(feedResponse), HttpStatus.ok),
);
await FlutterNewsExampleApiClient(
httpClient: httpClient,
tokenProvider: tokenProvider,
).getFeed();
verify(
() => httpClient.get(
any(that: isAUriHaving(path: path, query: query)),
headers: any(
named: 'headers',
that: areJsonHeaders(authorizationToken: token),
),
),
).called(1);
});
test(
'throws FlutterNewsExampleApiMalformedResponse '
'when response body is malformed.', () {
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response('', HttpStatus.ok),
);
expect(
apiClient.getFeed,
throwsA(isA<FlutterNewsExampleApiMalformedResponse>()),
);
});
test(
'throws FlutterNewsExampleApiRequestFailure '
'when response has a non-200 status code.', () {
const statusCode = HttpStatus.internalServerError;
final body = <String, dynamic>{};
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(json.encode(body), statusCode),
);
expect(
apiClient.getFeed,
throwsA(
isA<FlutterNewsExampleApiRequestFailure>()
.having((f) => f.statusCode, 'statusCode', statusCode)
.having((f) => f.body, 'body', body),
),
);
});
test('returns a FeedResponse on a 200 response.', () {
const expectedResponse = FeedResponse(feed: [], totalCount: 0);
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(
json.encode(expectedResponse.toJson()),
HttpStatus.ok,
),
);
expect(apiClient.getFeed(), completion(equals(expectedResponse)));
});
});
group('getCategories', () {
const categoriesResponse = CategoriesResponse(categories: []);
test('makes correct http request.', () async {
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async =>
http.Response(jsonEncode(categoriesResponse), HttpStatus.ok),
);
await apiClient.getCategories();
verify(
() => httpClient.get(
any(that: isAUriHaving(path: '/api/v1/categories')),
headers: any(named: 'headers', that: areJsonHeaders()),
),
).called(1);
});
test('makes correct http request (with authorization token).', () async {
tokenProvider = () async => token;
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async =>
http.Response(jsonEncode(categoriesResponse), HttpStatus.ok),
);
await FlutterNewsExampleApiClient(
httpClient: httpClient,
tokenProvider: tokenProvider,
).getCategories();
verify(
() => httpClient.get(
any(that: isAUriHaving(path: '/api/v1/categories')),
headers: any(
named: 'headers',
that: areJsonHeaders(authorizationToken: token),
),
),
).called(1);
});
test(
'throws FlutterNewsExampleApiMalformedResponse '
'when response body is malformed.', () {
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response('', HttpStatus.ok),
);
expect(
apiClient.getCategories,
throwsA(isA<FlutterNewsExampleApiMalformedResponse>()),
);
});
test(
'throws FlutterNewsExampleApiRequestFailure '
'when response has a non-200 status code.', () {
const statusCode = HttpStatus.internalServerError;
final body = <String, dynamic>{};
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(json.encode(body), statusCode),
);
expect(
apiClient.getCategories,
throwsA(
isA<FlutterNewsExampleApiRequestFailure>()
.having((f) => f.statusCode, 'statusCode', statusCode)
.having((f) => f.body, 'body', body),
),
);
});
test('returns a CategoriesResponse on a 200 response.', () {
const expectedResponse = CategoriesResponse(
categories: [Category.business, Category.top],
);
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(
json.encode(expectedResponse.toJson()),
HttpStatus.ok,
),
);
expect(apiClient.getCategories(), completion(equals(expectedResponse)));
});
});
group('getCurrentUser', () {
const currentUserResponse = CurrentUserResponse(
user: User(id: 'id', subscription: SubscriptionPlan.basic),
);
test('makes correct http request.', () async {
when(
() => httpClient.get(any(), headers: any(named: 'headers')),
).thenAnswer(
(_) async => http.Response(
jsonEncode(currentUserResponse),
HttpStatus.ok,
),
);
await apiClient.getCurrentUser();
verify(
() => httpClient.get(
any(that: isAUriHaving(path: '/api/v1/users/me')),
headers: any(named: 'headers', that: areJsonHeaders()),
),
).called(1);
});
test('makes correct http request (with authorization token).', () async {
tokenProvider = () async => token;
when(
() => httpClient.get(any(), headers: any(named: 'headers')),
).thenAnswer(
(_) async => http.Response(
jsonEncode(currentUserResponse),
HttpStatus.ok,
),
);
await FlutterNewsExampleApiClient(
httpClient: httpClient,
tokenProvider: tokenProvider,
).getCurrentUser();
verify(
() => httpClient.get(
any(that: isAUriHaving(path: '/api/v1/users/me')),
headers: any(
named: 'headers',
that: areJsonHeaders(authorizationToken: token),
),
),
).called(1);
});
test(
'throws FlutterNewsExampleApiMalformedResponse '
'when response body is malformed.', () {
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response('', HttpStatus.ok),
);
expect(
apiClient.getCurrentUser,
throwsA(isA<FlutterNewsExampleApiMalformedResponse>()),
);
});
test(
'throws FlutterNewsExampleApiRequestFailure '
'when response has a non-200 status code.', () {
const statusCode = HttpStatus.internalServerError;
final body = <String, dynamic>{};
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(json.encode(body), statusCode),
);
expect(
apiClient.getCurrentUser,
throwsA(
isA<FlutterNewsExampleApiRequestFailure>()
.having((f) => f.statusCode, 'statusCode', statusCode)
.having((f) => f.body, 'body', body),
),
);
});
test('returns a CurrentUserResponse on a 200 response.', () {
const expectedResponse = CurrentUserResponse(
user: User(id: 'id', subscription: SubscriptionPlan.basic),
);
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(
json.encode(expectedResponse.toJson()),
HttpStatus.ok,
),
);
expect(
apiClient.getCurrentUser(),
completion(equals(expectedResponse)),
);
});
});
group('getSubscriptions', () {
const subscriptionsResponse = SubscriptionsResponse(subscriptions: []);
test('makes correct http request.', () async {
when(() => httpClient.get(any())).thenAnswer(
(_) async => http.Response(
jsonEncode(subscriptionsResponse),
HttpStatus.ok,
),
);
await apiClient.getSubscriptions();
verify(
() => httpClient.get(
any(that: isAUriHaving(path: '/api/v1/subscriptions')),
),
).called(1);
});
test(
'throws FlutterNewsExampleApiMalformedResponse '
'when response body is malformed.', () {
when(() => httpClient.get(any())).thenAnswer(
(_) async => http.Response('', HttpStatus.ok),
);
expect(
apiClient.getSubscriptions,
throwsA(isA<FlutterNewsExampleApiMalformedResponse>()),
);
});
test(
'throws FlutterNewsExampleApiRequestFailure '
'when response has a non-200 status code.', () {
const statusCode = HttpStatus.internalServerError;
final body = <String, dynamic>{};
when(() => httpClient.get(any())).thenAnswer(
(_) async => http.Response(json.encode(body), statusCode),
);
expect(
apiClient.getSubscriptions,
throwsA(
isA<FlutterNewsExampleApiRequestFailure>()
.having((f) => f.statusCode, 'statusCode', statusCode)
.having((f) => f.body, 'body', body),
),
);
});
test('returns a SubscriptionsResponse on a 200 response.', () {
const expectedResponse = SubscriptionsResponse(
subscriptions: [
Subscription(
id: 'id',
name: SubscriptionPlan.premium,
cost: SubscriptionCost(annual: 4200, monthly: 42),
benefits: ['benefit'],
)
],
);
when(() => httpClient.get(any())).thenAnswer(
(_) async => http.Response(
json.encode(expectedResponse.toJson()),
HttpStatus.ok,
),
);
expect(
apiClient.getSubscriptions(),
completion(equals(expectedResponse)),
);
});
});
group('popularSearch', () {
const popularSearchResponse = PopularSearchResponse(
articles: [],
topics: [],
);
test('makes correct http request.', () async {
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async =>
http.Response(jsonEncode(popularSearchResponse), HttpStatus.ok),
);
await apiClient.popularSearch();
verify(
() => httpClient.get(
any(that: isAUriHaving(path: '/api/v1/search/popular')),
headers: any(named: 'headers', that: areJsonHeaders()),
),
).called(1);
});
test('makes correct http request (with authorization token).', () async {
tokenProvider = () async => token;
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async =>
http.Response(jsonEncode(popularSearchResponse), HttpStatus.ok),
);
await FlutterNewsExampleApiClient(
httpClient: httpClient,
tokenProvider: tokenProvider,
).popularSearch();
verify(
() => httpClient.get(
any(that: isAUriHaving(path: '/api/v1/search/popular')),
headers: any(
named: 'headers',
that: areJsonHeaders(authorizationToken: token),
),
),
).called(1);
});
test(
'throws FlutterNewsExampleApiMalformedResponse '
'when response body is malformed.', () {
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response('', HttpStatus.ok),
);
expect(
apiClient.popularSearch,
throwsA(isA<FlutterNewsExampleApiMalformedResponse>()),
);
});
test(
'throws FlutterNewsExampleApiRequestFailure '
'when response has a non-200 status code.', () {
const statusCode = HttpStatus.internalServerError;
final body = <String, dynamic>{};
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(json.encode(body), statusCode),
);
expect(
apiClient.popularSearch,
throwsA(
isA<FlutterNewsExampleApiRequestFailure>()
.having((f) => f.statusCode, 'statusCode', statusCode)
.having((f) => f.body, 'body', body),
),
);
});
test('returns a PopularSearchResponse on a 200 response.', () {
const expectedResponse = PopularSearchResponse(
articles: [],
topics: [],
);
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(
json.encode(expectedResponse.toJson()),
HttpStatus.ok,
),
);
expect(apiClient.popularSearch(), completion(equals(expectedResponse)));
});
});
group('relevantSearch', () {
const term = '__test_term__';
const relevantSearchResponse = RelevantSearchResponse(
articles: [],
topics: [],
);
test('makes correct http request.', () async {
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async =>
http.Response(jsonEncode(relevantSearchResponse), HttpStatus.ok),
);
await apiClient.relevantSearch(term: term);
verify(
() => httpClient.get(
any(
that: isAUriHaving(
path: '/api/v1/search/relevant',
query: 'q=$term',
),
),
headers: any(named: 'headers', that: areJsonHeaders()),
),
).called(1);
});
test('makes correct http request (with authorization token).', () async {
tokenProvider = () async => token;
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async =>
http.Response(jsonEncode(relevantSearchResponse), HttpStatus.ok),
);
await FlutterNewsExampleApiClient(
httpClient: httpClient,
tokenProvider: tokenProvider,
).relevantSearch(term: term);
verify(
() => httpClient.get(
any(
that: isAUriHaving(
path: '/api/v1/search/relevant',
query: 'q=$term',
),
),
headers: any(
named: 'headers',
that: areJsonHeaders(authorizationToken: token),
),
),
).called(1);
});
test(
'throws FlutterNewsExampleApiMalformedResponse '
'when response body is malformed.', () {
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response('', HttpStatus.ok),
);
expect(
() => apiClient.relevantSearch(term: term),
throwsA(isA<FlutterNewsExampleApiMalformedResponse>()),
);
});
test(
'throws FlutterNewsExampleApiRequestFailure '
'when response has a non-200 status code.', () {
const statusCode = HttpStatus.internalServerError;
final body = <String, dynamic>{};
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(json.encode(body), statusCode),
);
expect(
() => apiClient.relevantSearch(term: term),
throwsA(
isA<FlutterNewsExampleApiRequestFailure>()
.having((f) => f.statusCode, 'statusCode', statusCode)
.having((f) => f.body, 'body', body),
),
);
});
test('returns a RelevantSearchResponse on a 200 response.', () {
const expectedResponse = RelevantSearchResponse(
articles: [],
topics: [],
);
when(() => httpClient.get(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response(
json.encode(expectedResponse.toJson()),
HttpStatus.ok,
),
);
expect(
apiClient.relevantSearch(term: term),
completion(equals(expectedResponse)),
);
});
});
group('subscribeToNewsletter', () {
const email = '[email protected]';
test('makes correct http request.', () async {
when(
() => httpClient.post(
any(),
body: any(named: 'body'),
headers: any(named: 'headers'),
),
).thenAnswer(
(_) async => http.Response('', HttpStatus.created),
);
await apiClient.subscribeToNewsletter(email: email);
verify(
() => httpClient.post(
any(that: isAUriHaving(path: '/api/v1/newsletter/subscription')),
headers: any(named: 'headers', that: areJsonHeaders()),
body: json.encode({'email': email}),
),
).called(1);
});
test('makes correct http request (with authorization token).', () async {
tokenProvider = () async => token;
when(
() => httpClient.post(
any(),
body: any(named: 'body'),
headers: any(named: 'headers'),
),
).thenAnswer(
(_) async => http.Response('', HttpStatus.created),
);
await FlutterNewsExampleApiClient(
httpClient: httpClient,
tokenProvider: tokenProvider,
).subscribeToNewsletter(email: email);
verify(
() => httpClient.post(
any(that: isAUriHaving(path: '/api/v1/newsletter/subscription')),
headers: any(
named: 'headers',
that: areJsonHeaders(authorizationToken: token),
),
body: json.encode({'email': email}),
),
).called(1);
});
test(
'throws FlutterNewsExampleApiRequestFailure '
'when response has a non-201 status code.', () {
const statusCode = HttpStatus.internalServerError;
when(
() => httpClient.post(
any(),
body: any(named: 'body'),
headers: any(named: 'headers'),
),
).thenAnswer(
(_) async => http.Response('', statusCode),
);
expect(
() => apiClient.subscribeToNewsletter(email: email),
throwsA(
isA<FlutterNewsExampleApiRequestFailure>()
.having((f) => f.statusCode, 'statusCode', statusCode)
.having((f) => f.body, 'body', isEmpty),
),
);
});
test('resolves on a 201 response.', () {
when(
() => httpClient.post(
any(),
body: any(named: 'body'),
headers: any(named: 'headers'),
),
).thenAnswer(
(_) async => http.Response('', HttpStatus.created),
);
expect(apiClient.subscribeToNewsletter(email: email), completes);
});
});
group('createSubscription', () {
test('makes correct http request.', () async {
const subscriptionId = 'subscriptionId';
const query = 'subscriptionId=$subscriptionId';
when(
() => httpClient.post(any(), headers: any(named: 'headers')),
).thenAnswer(
(_) async => http.Response('', HttpStatus.created),
);
await apiClient.createSubscription(subscriptionId: subscriptionId);
verify(
() => httpClient.post(
any(
that: isAUriHaving(path: '/api/v1/subscriptions', query: query),
),
headers: any(named: 'headers', that: areJsonHeaders()),
),
).called(1);
});
test('makes correct http request (with authorization token).', () async {
const subscriptionId = 'subscriptionId';
const query = 'subscriptionId=$subscriptionId';
tokenProvider = () async => token;
when(
() => httpClient.post(any(), headers: any(named: 'headers')),
).thenAnswer(
(_) async => http.Response('', HttpStatus.created),
);
await FlutterNewsExampleApiClient(
httpClient: httpClient,
tokenProvider: tokenProvider,
).createSubscription(subscriptionId: subscriptionId);
verify(
() => httpClient.post(
any(
that: isAUriHaving(path: '/api/v1/subscriptions', query: query),
),
headers: any(
named: 'headers',
that: areJsonHeaders(authorizationToken: token),
),
),
).called(1);
});
test(
'throws FlutterNewsExampleApiRequestFailure '
'when response has a non-201 status code.', () {
const statusCode = HttpStatus.internalServerError;
when(() => httpClient.post(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response('', statusCode),
);
expect(
() => apiClient.createSubscription(subscriptionId: 'subscriptionId'),
throwsA(
isA<FlutterNewsExampleApiRequestFailure>()
.having((f) => f.statusCode, 'statusCode', statusCode)
.having((f) => f.body, 'body', isEmpty),
),
);
});
test('resolves on a 201 response.', () {
when(() => httpClient.post(any(), headers: any(named: 'headers')))
.thenAnswer(
(_) async => http.Response('', HttpStatus.created),
);
expect(
apiClient.createSubscription(subscriptionId: 'subscriptionId'),
completes,
);
});
});
});
}
| 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="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
<rect key="frame" x="153" y="440.5" width="108" height="15"/>
</imageView>
</subviews>
<color key="backgroundColor" red="0.0031666669529999999" green="0.0821742788" blue="0.1532291174" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="76.811594202898561" y="251.11607142857142"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="108" height="15"/>
</resources>
</document>
| 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) => FeedState(
status: $enumDecode(_$FeedStatusEnumMap, json['status']),
feed: (json['feed'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry(
$enumDecode(_$CategoryEnumMap, k),
(e as List<dynamic>)
.map((e) => NewsBlock.fromJson(e as Map<String, dynamic>))
.toList()),
) ??
const {},
hasMoreNews: (json['hasMoreNews'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry($enumDecode(_$CategoryEnumMap, k), e as bool),
) ??
const {},
);
Map<String, dynamic> _$FeedStateToJson(FeedState instance) => <String, dynamic>{
'status': _$FeedStatusEnumMap[instance.status]!,
'feed': instance.feed.map((k, e) =>
MapEntry(_$CategoryEnumMap[k]!, e.map((e) => e.toJson()).toList())),
'hasMoreNews': instance.hasMoreNews
.map((k, e) => MapEntry(_$CategoryEnumMap[k]!, e)),
};
const _$FeedStatusEnumMap = {
FeedStatus.initial: 'initial',
FeedStatus.loading: 'loading',
FeedStatus.populated: 'populated',
FeedStatus.failure: 'failure',
};
const _$CategoryEnumMap = {
Category.business: 'business',
Category.entertainment: 'entertainment',
Category.top: 'top',
Category.health: 'health',
Category.science: 'science',
Category.sports: 'sports',
Category.technology: 'technology',
};
| 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": "String",
"placeholders": {}
},
"unexpectedFailure": "An unexpected error occurred. Please try again.",
"@unexpectedFailure": {
"description": "Text displayed when an unexpected error occurs",
"type": "String",
"placeholders": {}
},
"shareFailure": "Problem sharing your content. Please try again.",
"@shareFailure": {
"description": "Text displayed when a share error occurs",
"type": "String",
"placeholders": {}
},
"adLoadFailure": "Failed to load this ad.",
"@adLoadFailure": {
"description": "Text displayed when loading an ad fails",
"type": "String",
"placeholders": {}
},
"loginWelcomeText": "Welcome to\nFlutter News Example",
"@loginWelcomeText": {
"description": "Greeting shown on the login page.",
"type": "String",
"placeholders": {}
},
"loginButtonText": "LOGIN",
"@loginButtonText": {
"description": "Login Button Text",
"type": "String",
"placeholders": {}
},
"loginWithEmailHeaderText": "Please enter your\nemail address.",
"@loginWithEmailHeaderText": {
"description": "Header title shown on Login with email form",
"type": "String",
"placeholders": {}
},
"loginWithEmailTextFieldHint": "Your email address",
"@loginWithEmailTextFieldHint": {
"description": "Hint text shown on the email text field on Login with email form",
"type": "String",
"placeholders": {}
},
"loginWithEmailSubtitleText": "By logging in, you agree to our ",
"@loginWithEmailSubtitleText": {
"description": "Subtitle shown on Login with email form",
"type": "String",
"placeholders": {}
},
"loginWithEmailTermsAndPrivacyPolicyText": "Terms of Use and Privacy Policy",
"@loginWithEmailTermsAndPrivacyPolicyText": {
"description": "Text terms and privacy policy shown on Login with email form",
"type": "String",
"placeholders": {}
},
"loginWithEmailFailure": "Unable to create an account",
"@loginWithEmailFailure": {
"description": "Message shown when there is an error creating an account",
"type": "String",
"placeholders": {}
},
"termsOfServiceModalTitle": "Terms of Use &\nPrivacy Policy",
"@termsOfServiceModalTitle": {
"description": "Title shown on the TOS modal",
"type": "String",
"placeholders": {}
},
"loginWithEmailButtonText": "Continue with Email",
"@loginWithEmailButtonText": {
"description": "Log in with email button text shown on the log in modal",
"type": "String",
"placeholders": {}
},
"systemOption": "System",
"@systemOption": {
"description": "The option to use system-wide theme in the theme selector menu",
"type": "String",
"placeholders": {}
},
"lightModeOption": "Light",
"@lightModeOption": {
"description": "The option for light mode in the theme selector menu",
"type": "String",
"placeholders": {}
},
"darkModeOption": "Dark",
"@darkModeOption": {
"description": "The option for dark mode in the theme selector menu",
"type": "String",
"placeholders": {}
},
"onboardingWelcomeTitle": "Welcome to\nThe Daily Globe!",
"@onboardingWelcomeTitle": {
"description": "Text shown as title on the onboarding page",
"type": "String",
"placeholders": {}
},
"onboardingSubtitle": "Please set your preferences to\nget the app up and running.",
"@onboardingSubtitle": {
"description": "Text shown as subtitle on the onboarding page",
"type": "String",
"placeholders": {}
},
"onboardingItemFirstNumberTitle": "1 OF 2",
"@onboardingItemFirstNumberTitle": {
"description": "Text of the first number page in the onboarding.",
"type": "String",
"placeholders": {}
},
"onboardingItemSecondNumberTitle": "2 OF 2",
"@onboardingItemSecondNumberTitle": {
"description": "Text of the second number page in the onboarding.",
"type": "String",
"placeholders": {}
},
"onboardingItemFirstTitle": "ADD YOUR TITLE FOR\nAD TRACKING PERMISSIONS",
"@onboardingItemFirstTitle": {
"description": "Text of the first page title of the onboarding.",
"type": "String",
"placeholders": {}
},
"onboardingItemFirstSubtitleTitle": "ADD YOUR DESCRIPTION FOR\nAD TRACKING PERMISSIONS",
"@onboardingItemFirstSubtitleTitle": {
"description": "Text of the first page subtitle of the onboarding.",
"type": "String",
"placeholders": {}
},
"onboardingItemFirstButtonTitle": "ADD YOUR CALL TO ACTION",
"@onboardingItemFirstButtonTitle": {
"description": "Text of the primary button on the first page of the onboarding.",
"type": "String",
"placeholders": {}
},
"onboardingItemSecondTitle": "ADD YOUR TITLE FOR\nNOTIFICATION PERMISSIONS",
"@onboardingItemSecondTitle": {
"description": "Text of the primary title on the second page of the onboarding.",
"type": "String",
"placeholders": {}
},
"onboardingItemSecondSubtitleTitle": "ADD YOUR DESCRIPTION FOR\nNOTIFICATION PERMISSIONS",
"@onboardingItemSecondSubtitleTitle": {
"description": "Text of the second page subtitle of the onboarding.",
"type": "String",
"placeholders": {}
},
"onboardingItemSecondButtonTitle": "ADD YOUR CALL TO ACTION",
"@onboardingItemSecondButtonTitle": {
"description": "Text of the primary button on the second page of the onboarding.",
"type": "String",
"placeholders": {}
},
"onboardingItemSecondaryButtonTitle": "ADD YOUR DECLINE TEXT",
"@onboardingItemSecondaryButtonTitle": {
"description": "Text of the secondary button of the onboarding.",
"type": "String",
"placeholders": {}
},
"loginTooltip": "Login",
"@loginTooltip": {
"description": "Tooltip shown on the login button",
"type": "String",
"placeholders": {}
},
"openProfileTooltip": "Open profile",
"@openProfileTooltip": {
"description": "Tooltip shown on the open profile button",
"type": "String",
"placeholders": {}
},
"loginModalTitle": "Log In",
"@loginModalTitle": {
"description": "Log in modal title",
"type": "String",
"placeholders": {}
},
"loginModalSubtitle": "Log in to access articles and save\nyour preferences.",
"@loginModalSubtitle": {
"description": "Log in modal subtitle",
"type": "String",
"placeholders": {}
},
"continueWithEmailButtonText": "Continue with Email",
"@continueWithEmailButtonText": {
"description": "Continue with email button text shown on the log in modal",
"type": "String",
"placeholders": {}
},
"navigationDrawerSectionsTitle": "SECTIONS",
"@navigationDrawerSectionsTitle": {
"description": "Navigation drawer sections title",
"type": "String",
"placeholders": {}
},
"navigationDrawerSubscribeTitle": "Become A Subscriber",
"@navigationDrawerSubscribeTitle": {
"description": "Navigation drawer subscribe title",
"type": "String",
"placeholders": {}
},
"navigationDrawerSubscribeSubtitle": "Subscribe to access premium content and exclusive online events.",
"@navigationDrawerSubscribeSubtitle": {
"description": "Navigation drawer subscribe subtitle",
"type": "String",
"placeholders": {}
},
"subscribeButtonText": "Subscribe",
"@subscribeButtonText": {
"description": "Subscribe button text",
"type": "String",
"placeholders": {}
},
"nextButtonText": "Next",
"@nextButtonText": {
"description": "Log in with email next button shown on the login with email form",
"type": "String",
"placeholders": {}
},
"userProfileTitle": "Your Info",
"@userProfileTitle": {
"description": "User profile page title",
"type": "String",
"placeholders": {}
},
"userProfileLogoutButtonText": "Logout",
"@userProfileLogoutButtonText": {
"description": "User profile logout button text",
"type": "String",
"placeholders": {}
},
"userProfileSettingsSubtitle": "Settings",
"@userProfileSettingsSubtitle": {
"description": "User profile settings section subtitle",
"type": "String",
"placeholders": {}
},
"userProfileSubscriptionDetailsSubtitle": "Subscription Details",
"@userProfileSubscriptionDetailsSubtitle": {
"description": "User profile subscription details section subtitle",
"type": "String",
"placeholders": {}
},
"userProfileSubscribeBoxSubtitle": "You are not currently a subscriber.",
"@userProfileSubscribeBoxSubtitle": {
"description": "User profile not a subscriber subtitle",
"type": "String",
"placeholders": {}
},
"userProfileSubscribeBoxMessage": "Become a subscriber to access premium content and exclusive online events.",
"@userProfileSubscribeBoxMessage": {
"description": "User profile not a subscriber message",
"type": "String",
"placeholders": {}
},
"userProfileSubscribeNowButtonText": "Subscribe Now",
"@userProfileSubscribeNowButtonText": {
"description": "User profile settings subscribe button text",
"type": "String",
"placeholders": {}
},
"manageSubscriptionTile": "Manage Subscription",
"@manageSubscriptionTile": {
"description": "Manage subscription section - subscription item title",
"type": "String",
"placeholders": {}
},
"manageSubscriptionBodyText": "Manage your subscription through the Subscriptions manager on your device.",
"@manageSubscriptionBodyText": {
"description": "Manage subscription section - subscription body text",
"type": "String",
"placeholders": {}
},
"manageSubscriptionLinkText": "Subscriptions",
"@manageSubscriptionLinkText": {
"description": "Manage subscription link text",
"type": "String",
"placeholders": {}
},
"userProfileSettingsNotificationsTitle": "Notifications",
"@userProfileSettingsNotificationsTitle": {
"description": "User profile settings section - notifications item title",
"type": "String",
"placeholders": {}
},
"notificationPreferencesTitle": "Notification Preferences",
"@notificationPreferencesTitle": {
"description": "User profile settings section - notification preferences item title",
"type": "String",
"placeholders": {}
},
"notificationPreferencesCategoriesSubtitle": "Notifications will be sent for all active categories below.",
"@notificationPreferencesCategoriesSubtitle": {
"description": "User profile settings categories notifications subtitle",
"type": "String",
"placeholders": {}
},
"userProfileLegalSubtitle": "Legal",
"@userProfileLegalSubtitle": {
"description": "User profile legal section subtitle",
"type": "String",
"placeholders": {}
},
"userProfileLegalTermsOfUseAndPrivacyPolicyTitle": "Terms of Use & Privacy Policy",
"@userProfileLegalTermsOfUseAndPrivacyPolicyTitle": {
"description": "User profile legal section - terms of use and privacy policy item title",
"type": "String",
"placeholders": {}
},
"userProfileLegalAboutTitle": "About",
"@userProfileLegalAboutTitle": {
"description": "User profile legal section - about item title",
"type": "String",
"placeholders": {}
},
"checkboxOnTitle": "On",
"@checkboxOnTitle": {
"description": "User profile checkbox on title",
"type": "String",
"placeholders": {}
},
"userProfileCheckboxOffTitle": "Off",
"@userProfileCheckboxOffTitle": {
"description": "User profile checkbox off title",
"type": "String",
"placeholders": {}
},
"magicLinkPromptHeader": "Check your email!",
"@magicLinkPromptHeader": {
"description": "Header title shown in the magic link prompt UI",
"type": "String",
"placeholders": {}
},
"magicLinkPromptTitle": "We sent an email to",
"@magicLinkPromptTitle": {
"description": "Title shown in the magic link prompt UI",
"type": "String",
"placeholders": {}
},
"magicLinkPromptSubtitle": "It contains a special link. Click it to\ncomplete the log in process.",
"@magicLinkPromptSubtitle": {
"description": "Subtitle shown in the magic link prompt UI",
"type": "String",
"placeholders": {}
},
"openMailAppButtonText": "Open Mail App",
"@openMailAppButtonText": {
"description": "Open mail app button text shown in the magic link prompt UI",
"type": "String",
"placeholders": {}
},
"newsBlockPremiumText": "Premium",
"@newsBlockPremiumText": {
"description": "Premium text shown on the news block widgets",
"type": "String",
"placeholders": {}
},
"shareText": "Share",
"@shareText": {
"description": "Share text shown on the news block widgets and article page",
"type": "String",
"placeholders": {}
},
"subscribeEmailHeader": "ADD YOUR EMAIL SIGNUP PROMPT TITLE",
"@subscribeEmailHeader": {
"description": "Subscribe header shown in subscribe box",
"type": "String",
"placeholders": {}
},
"subscribeEmailHint": "Email address",
"@subscribeEmailHint": {
"description": "Text shown as a hint in subscribe email text field",
"type": "String",
"placeholders": {}
},
"subscribeEmailBody": "ADD YOUR EMAIL SIGNUP PROMPT DESCRIPTION",
"@subscribeEmailBody": {
"description": "Subscribe body shown in subscribe box",
"type": "String",
"placeholders": {}
},
"subscribeEmailButtonText": "ADD YOUR CALL TO ACTION",
"@subscribeEmailButtonText": {
"description": "Text shown in a button of a subscribe box",
"type": "String",
"placeholders": {}
},
"subscribeSuccessfulHeader": "Thank you for signing up!",
"@subscribeSuccessfulHeader": {
"description": "Subscribe successful header shown in subscribe box",
"type": "String",
"placeholders": {}
},
"subscribeSuccessfulEmailBody": "Check your email for all of your newsletter details. ",
"@subscribeSuccessfulEmailBody": {
"description": "Subscribe body shown in subscribe box",
"type": "String",
"placeholders": {}
},
"subscribeErrorMessage": "Problem ocurred when subscribing to the newsletter",
"@subscribeErrorMessage": {
"description": "Message displayed when error ocurred during subscribing to newsletter",
"type": "String",
"placeholders": {}
},
"searchPopularSearches": "Popular Searches",
"@searchPopularSearches": {
"description": "Text displayed at the top of the popular searches.",
"type": "String",
"placeholders": {}
},
"searchPopularArticles": "Popular Articles",
"@searchPopularArticles": {
"description": "Text displayed at the top of the popular articles.",
"type": "String",
"placeholders": {}
},
"searchRelevantTopics": "Relevant Topics / Sections",
"@searchRelevantTopics": {
"description": "Text displayed at the top of the relevant search.",
"type": "String",
"placeholders": {}
},
"searchRelevantArticles": "Relevant Articles",
"@searchRelevantArticles": {
"description": "Text displayed at the top of the relevant articles.",
"type": "String",
"placeholders": {}
},
"searchByKeyword": "Search by keyword",
"@searchByKeyword": {
"description": "Hint displayed in search text field.",
"type": "String",
"placeholders": {}
},
"searchErrorMessage": "Problem ocurred finding search results.",
"@searchErrorMessage": {
"description": "Message displayed when error occurred during fetching search results.",
"type": "String",
"placeholders": {}
},
"bottomNavBarTopStories": "Top Stories",
"@bottomNavBarTopStories": {
"description": "Top stories text shown in the bottom nav bar widget.",
"type": "String",
"placeholders": {}
},
"bottomNavBarSearch": "Search",
"@bottomNavBarSearch": {
"description": "Search text shown in the bottom nav bar widget.",
"type": "String",
"placeholders": {}
},
"relatedStories": "Related Stories",
"@relatedStories": {
"description": "Header text shown in the bottom of article content.",
"type": "String",
"placeholders": {}
},
"subscribeModalTitle": "ADD YOUR SUBSCRIPTION\nPROMPT TITLE",
"@subscribeModalTitle": {
"description": "Title text shown in the subscribe modal widget.",
"type": "String",
"placeholders": {}
},
"subscribeModalSubtitle": "ADD YOUR SUBSCRIPTION\nPROMPT DESCRIPTION",
"@subscribeModalSubtitle": {
"description": "Subtitle text shown in the subscribe modal widget.",
"type": "String",
"placeholders": {}
},
"subscribeModalLogInButton": "Log In",
"@subscribeModalLogInButton": {
"description": "Text shown in log in button on the subscribe modal widget.",
"type": "String",
"placeholders": {}
},
"subscribeWithArticleLimitModalTitle": "You've reached your\n4 article limit.",
"@subscribeWithArticleLimitModalTitle": {
"description": "Title text shown in the subscribe limit modal widget.",
"type": "String",
"placeholders": {}
},
"subscribeWithArticleLimitModalSubtitle": "ADD YOUR SUBSCRIPTION\nPROMPT DESCRIPTION",
"@subscribeWithArticleLimitModalSubtitle": {
"description": "Subtitle text shown in the subscribe limit modal modal widget.",
"type": "String",
"placeholders": {}
},
"subscribeWithArticleLimitModalLogInButton": "Log In",
"@subscribeWithArticleLimitModalLogInButton": {
"description": "Text shown in log in button on the subscribe limit modal widget.",
"type": "String",
"placeholders": {}
},
"subscribeWithArticleLimitModalWatchVideoButton": "Watch a video to view this article",
"@subscribeWithArticleLimitModalWatchVideoButton": {
"description": "Text shown in watch video button on the subscribe limit modal widget.",
"type": "String",
"placeholders": {}
},
"discussion": "Discussion",
"@discussion": {
"description": "Header text shown in the bottom of article content above comment entry field.",
"type": "String",
"placeholders": {}
},
"commentEntryHint": "Enter comment",
"@commentEntryHint": {
"description": "Text shown inside comment entry text field.",
"type": "String",
"placeholders": {}
},
"trendingStoryTitle": "TRENDING STORY",
"@trendingStoryTitle": {
"description": "Title shown in the header of trending story article.",
"type": "String",
"placeholders": {}
},
"subscriptionPurchaseTitle": "Subscribe today!",
"@subscriptionPurchaseTitle": {
"description": "Text shown in the title of the subscription purchase overlay.",
"type": "String",
"placeholders": {}
},
"subscriptionPurchaseSubtitle": "Become a subscriber to access premium content and exclusive online events.",
"@subscriptionPurchaseSubtitle": {
"description": "Text shown bellow the title of the subscription purchase overlay.",
"type": "String",
"placeholders": {}
},
"subscriptionPurchaseBenefits": "Benefits",
"@subscriptionPurchaseBenefits": {
"description": "Text shown as a header for subscription benefits.",
"type": "String",
"placeholders": {}
},
"subscriptionPurchaseCancelAnytime": "Cancel Anytime",
"@subscriptionPurchaseCancelAnytime": {
"description": "Text shown bellow the subscription benefits.",
"type": "String",
"placeholders": {}
},
"subscriptionPurchaseButton": "Start Free Trial",
"@subscriptionPurchaseButton": {
"description": "Text shown in button on subscription purchase overlay.",
"type": "String",
"placeholders": {}
},
"subscriptionUnauthenticatedPurchaseButton": "Log in to subscribe",
"@subscriptionUnauthenticatedPurchaseButton": {
"description": "Text shown in button on subscription purchase overlay when user is unauthenticated.",
"type": "String",
"placeholders": {}
},
"subscriptionViewDetailsButton": "View Details",
"@subscriptionViewDetailsButton": {
"description": "Text shown in unimplemented button on subscription purchase overlay.",
"type": "String",
"placeholders": {}
},
"subscriptionViewDetailsButtonSnackBar": "Configure additional subscription packages.",
"@subscriptionViewDetailsButtonSnackBar": {
"description": "Text shown when clicked on view details button.",
"type": "String",
"placeholders": {}
},
"subscriptionPurchaseCompleted": "Purchase completed!",
"@subscriptionPurchaseCompleted": {
"description": "Text shown subscription purchase was completed.",
"type": "String",
"placeholders": {}
},
"monthAbbreviation": "mo",
"@monthAbbreviation": {
"description": "Text displayed where month abbreviation is used.",
"type": "String",
"placeholders": {}
},
"yearAbbreviation": "yr",
"@yearAbbreviation": {
"description": "Text displayed where year abbreviation is used.",
"type": "String",
"placeholders": {}
},
"slideshow": "Slideshow",
"@slideshow": {
"description": "Slideshow text shown on slideshow introduction widgets.",
"type": "String",
"placeholders": {}
},
"slideshow_of_title": "of",
"@slideshow_of_title": {
"description": "Text displayed on the number of pages in the slideshow page.",
"type": "String",
"placeholders": {}
},
"networkError": "A network error has occured.\nCheck your connection and try again.",
"@networkError": {
"description": "Text displayed when a network error occurs.",
"type": "String",
"placeholders": {}
},
"networkErrorButton": "Try Again",
"@networkErrorButton": {
"description": "Text displayed on the refresh button when a network error occurs.",
"type": "String",
"placeholders": {}
}
}
| 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.