-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[cross_file] Updates cross_file to a package separated federated plugin #11010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bparrishMines
wants to merge
440
commits into
flutter:main
Choose a base branch
from
bparrishMines:new_crossfile
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
440 commits
Select commit
Hold shift + click to select a range
6a2c35e
add self as codeowner
bparrishMines 2d501a2
update dependabot
bparrishMines 7f40e97
fix project validations
bparrishMines 30b062a
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines e2d0f15
change to scoped storage for darwin
bparrishMines 7b34f3d
formatting and fix excerpts
bparrishMines 52fbbaa
fix readme and add convenience method to scopedstorage files
bparrishMines 4c15493
add more info on scoped storage
bparrishMines 3075896
add darwin tests
bparrishMines 4b0b3e4
update gradle and change to publish_to
bparrishMines 6b721eb
add integration test harness
bparrishMines 789ef71
change web to publish to none
bparrishMines 1b24e78
fix web for wasm
bparrishMines 1d1e949
formatting
bparrishMines b623ad4
change settings file to groovy
bparrishMines f420e80
publish too
bparrishMines 6415ea6
add new files
bparrishMines 00a9f10
add example app
bparrishMines 5fc9cd5
update project gradles
bparrishMines 79a98cb
add dart integration test file
bparrishMines fe48304
improve pubspecs and add test drivers
bparrishMines 8a5d3cc
fix darwin tests
bparrishMines a234ecd
update interface
bparrishMines 9765b61
web update
bparrishMines 54d0668
update darwin
bparrishMines b276f77
update android
bparrishMines 9eeb9ed
update io
bparrishMines ac3dcf0
update cross_file
bparrishMines ae1f8e0
format and excerpts
bparrishMines 409a17d
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines bae2e4d
fix darwin tests
bparrishMines 6ec9c3f
update darwin and io to maybe run on windows
bparrishMines 15f311e
add convenience method for cross_File
bparrishMines b4799e8
remove android integration endpoint
bparrishMines a04ebd4
update baseline
bparrishMines 920bb31
delete old test
bparrishMines 11efbdc
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines f19b74e
remove can read from xfile
bparrishMines f01d4bd
remove old pubspec and example
bparrishMines 9ca64a7
remove runner tests
bparrishMines bd73776
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines b70935c
remove bookmark uri logic
bparrishMines a0c2fd4
add config
bparrishMines c37af83
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines e4d1d26
try global
bparrishMines 28b1679
missing apostrophe
bparrishMines d845bcb
update platform xdirectory
bparrishMines a6f8336
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines c58f31b
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines 7ecfd3a
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines 574eb1a
update gradles to kotlins
bparrishMines a0169fb
add a test
bparrishMines 340c462
remove generated files
bparrishMines a1a621c
remove generated files
bparrishMines 7c2ad19
update project
bparrishMines b3ebbf5
remove ref
bparrishMines bb8b149
remove pods
bparrishMines 48bd7e0
remove runnertests refernces
bparrishMines ef0b7fc
add a is current implementation
bparrishMines 4104693
update exerpts
bparrishMines b4a47f4
change to use maybe get extension
bparrishMines 58678a4
add comment
bparrishMines 784192d
use internal to hide platform use
bparrishMines 8ac420c
typo an extra can read test
bparrishMines 170f6b0
todo and version setting
bparrishMines 7fee973
change version of platform interface
bparrishMines 7390bfc
Pr feedback
bparrishMines 3cf62e9
authors
bparrishMines 08707df
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines 3f2f880
call stop automatically with finalizer
bparrishMines f9ba45a
change all to platformxentity and xentity
bparrishMines 761fba6
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines 4a49a21
formatting
bparrishMines 30210f1
sort exports
bparrishMines 0115b47
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines a388a69
add xcconfig back
bparrishMines a6af73c
add missing xcconfigs
bparrishMines c93bb93
add finalizer to ios directory
bparrishMines 8fecd6a
fix test
bparrishMines 15707ad
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines 531dc5c
remove dupe canread test
bparrishMines 194a323
add dart test yaml
bparrishMines 1a54c91
add comment
bparrishMines 5033f3f
add canread to scopedstoragecrossdirectory
bparrishMines fb21706
remove config file
bparrishMines ff2d369
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines a3994c1
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines 939a1c0
make classes base
bparrishMines c62eb16
fix class name refs
bparrishMines bc28494
add photokit scaffolding in dart
bparrishMines ef08bac
darwin api stuffc
bparrishMines 4c34286
partial impl for darwin
bparrishMines afe1231
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines df66b02
update pubspec sdk versions
bparrishMines c1c066f
update darwin xfile docs
bparrishMines 3d9f91e
update directory to be similar to file
bparrishMines a408ce9
add ffi to pubspec
bparrishMines 71f72fe
update for ffigen
bparrishMines 77a0132
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines 01e5d97
fix compilation
bparrishMines 4f9feb1
fix example
bparrishMines 32c511a
remove api and use ffi
bparrishMines dbee630
add phasset
bparrishMines 9eae34c
add most api
bparrishMines 04621c3
finish adding bindingS
bparrishMines eab82fc
add dynamic library
bparrishMines d43a862
wire up most of it
bparrishMines dfe9ecc
move where the data is passed to main thread
bparrishMines 77c9cf8
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines abb39e2
fix library name maybe
bparrishMines 183844d
support objc
bparrishMines 38b2753
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines b36b01a
formatting and maybe implement length
bparrishMines d088cae
try reading from address
bparrishMines f9edbcd
try unsigned long
bparrishMines eaed7c4
add prints
bparrishMines dfb7ee5
try long again
bparrishMines ba16dfc
try ot use nsnumber
bparrishMines 83ae934
use nsnumber
bparrishMines 148953a
i think working algo
bparrishMines c4e8634
prints
bparrishMines 4a65aa9
add some prints
bparrishMines e6c3e59
look at other resources
bparrishMines f313769
better prints
bparrishMines 99016fe
add contentType
bparrishMines eaede7b
print extractor
bparrishMines 2ebe107
print length
bparrishMines c22d4bc
something something
bparrishMines 4492f9c
something something
bparrishMines c1fddbb
something something
bparrishMines dc66e88
something something
bparrishMines 10cdaa6
something something
bparrishMines 7544671
something something
bparrishMines b38c571
something something
bparrishMines 431cf87
start of chaning open read to proxyapi
bparrishMines eb28858
proxy api for byte reading
bparrishMines 6ac49c5
return true actually
bparrishMines 2c0293d
docs and names
bparrishMines 712bcf3
todo
bparrishMines b72833a
start initial test creation
bparrishMines f99d7ed
start writing tests
bparrishMines b57339c
passing test
bparrishMines f52b220
initial stress test
bparrishMines ae5434c
add tests back
bparrishMines 42e67e6
impl tests
bparrishMines 55eeb13
add macos tests
bparrishMines 89e5428
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines 8e76180
formatting and no import
bparrishMines 4dd921b
excerpts and analyze
bparrishMines b63030a
analyze errors
bparrishMines 6613d68
license
bparrishMines 6a68362
use --platform
bparrishMines aa6e666
dash
bparrishMines 5c26447
add darwin dep
bparrishMines 6c5f597
remove configs
bparrishMines eba22d5
fix license
bparrishMines 77a6224
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines 43b9fb0
fix web test requiring SIGKILL
bparrishMines 0f3283c
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines 49ae634
update to use ffigen
bparrishMines a2d34bd
use ffigen
bparrishMines a7de454
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines 8517b1b
add flutter deps
bparrishMines 44e0676
add dart test yaml
bparrishMines 356487a
rename to actual file name
bparrishMines 1b2f361
delete
bparrishMines 50cffbe
fix integration test macos
bparrishMines ace90a2
remove chrome requirement
bparrishMines a0a4c85
move tests to integration tests
bparrishMines 44d1df6
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines d37cb36
add test for range filter
bparrishMines 1627c9f
Merge branch 'main' of github.com:flutter/packages into new_crossfile
bparrishMines 3082768
Merge branch 'main' of https://github.com/flutter/packages into new_c…
bparrishMines a639f71
TODO for cross_file example
bparrishMines dadac8b
update uri docs
bparrishMines b43a6f4
change to just getextension
bparrishMines d483557
change to entity as base
bparrishMines 70c3058
dot comments encoding
bparrishMines faa0a1a
update name docs
bparrishMines 063d776
name docs clarification path
bparrishMines 4bea365
undo webview change
bparrishMines e8d9d37
fix dependabot location
bparrishMines 568e468
update platform specific in platform interface
bparrishMines 9bc0c65
fix platform specific in other packages
bparrishMines c398f3f
change to make extension sound optional
bparrishMines 0db1cb4
update can read for directories
bparrishMines 6dbe663
set to version 1.0
bparrishMines 78ea879
extra newliine
bparrishMines d3ee6ef
you can find
bparrishMines 0415b2e
update gradle for android to compile
bparrishMines e11124e
android compiles with new kotlin names
bparrishMines dcb56c5
unused imports
bparrishMines f5e8752
update ffigen
bparrishMines 41f3a98
change android openRead to not use length and add argument errors
bparrishMines 7e4cf13
change to exception for input stream
bparrishMines 2cd672f
simplify darwing
bparrishMines 1ebabfc
use reader for open read
bparrishMines 5c95bc6
passing web integration tests
bparrishMines 40dd018
move tests instructions to contributing
bparrishMines 17aa449
cleanup android code a bit
bparrishMines a9326a7
typo
bparrishMines 6a12a0f
remove file selector references
bparrishMines 36822df
move test to cross_file_io
bparrishMines f12a724
add a breaking change
bparrishMines 7dc7720
change to checking with a top level class with functions
bparrishMines 50fc6f8
update changelog
bparrishMines 9a41e2d
update gradle
bparrishMines 2f0648b
remove android underscores
bparrishMines 32cc69a
Merge branch 'main' of https://github.com/flutter/packages into new_c…
bparrishMines 3daca19
remove entity export
bparrishMines 51c4657
change to app facing package wrapper
bparrishMines b388939
remove web limitations
bparrishMines bd3df2a
comment about size chosen
bparrishMines 497ddba
update ffi
bparrishMines 71ac4e0
Merge branch 'main' of https://github.com/flutter/packages into new_c…
bparrishMines a05e328
formatting
bparrishMines 0694a6c
add darwin contributing
bparrishMines 74e629e
remove g
bparrishMines 456ff27
add dispose method
bparrishMines 5b93684
add file system impl and add test for stream errors
bparrishMines 0e6f093
switch to range error and ensure error is sent to stream
bparrishMines c6ee25f
add file system to interface
bparrishMines f828a3b
app facing toString uses uri and change filesystem params to use path…
bparrishMines d33f093
update interface to handle paths
bparrishMines 67b39aa
add path to directory as well
bparrishMines 982e3f0
update io implementation to use file system implementation
bparrishMines c6c12dd
change android and ios to create an instance of io to create file system
bparrishMines 1d884a5
add io test for android and ios
bparrishMines b6dee66
add file system to app facing
bparrishMines 7e2f9a5
file system implementation in app facing
bparrishMines 34dad20
set up file system implementation across everything
bparrishMines c3aeb68
accidental didn't merge
bparrishMines 883514c
Merge branch 'main' of https://github.com/flutter/packages into new_c…
bparrishMines f8a8204
formatting
bparrishMines ab90e7a
add pigeon impl to run on macos
bparrishMines 31348b1
add tests back
bparrishMines cad1509
add readbytes test
bparrishMines 247b770
Merge branch 'main' of https://github.com/flutter/packages into new_c…
bparrishMines feff9f3
update excerpts
bparrishMines cf91564
update readme
bparrishMines 8d7ff92
add breaking changes
bparrishMines 87e5c74
unused import
bparrishMines 71f7ab6
remove darwin tests that aren't used
bparrishMines 1634e7d
formatting
bparrishMines cf58005
Merge branch 'main' of https://github.com/flutter/packages into new_c…
bparrishMines 076e08e
unused import
bparrishMines 3f6f303
add license to darwin ffi
bparrishMines ec62032
Revert "remove darwin tests that aren't used"
bparrishMines 7966743
fix android tests
bparrishMines 74a5fda
add cross_file_web because it uses chrome for flutter
bparrishMines File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
packages/cross_file/CHANGELOG.md → packages/cross_file/cross_file/CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| # cross_file | ||
|
|
||
| An abstraction to allow working with files across multiple platforms. | ||
|
|
||
| <?code-excerpt path-base="example/lib"?> | ||
|
|
||
| [](https://pub.dartlang.org/packages/cross_file) | ||
|
|
||
| | | Android | iOS | Linux | macOS | Web | Windows | | ||
| |-------------|---------|---------|-------|--------|-----|-------------| | ||
| | **Support** | SDK 24+ | iOS 13+ | Any | 10.15+ | Any | Windows 10+ | | ||
|
|
||
| ## Usage | ||
|
|
||
| Instantiate a `XFile` using a uri or path and use its methods and properties to access the file and | ||
| its metadata. | ||
|
|
||
| Example: | ||
|
|
||
| <?code-excerpt "readme_excerpts.dart (Instantiate)"?> | ||
| ```dart | ||
| final file = XFile.fileSystem(path: 'assets/hello.txt'); | ||
|
|
||
| debugPrint('File information:'); | ||
| debugPrint('- URI: ${file.uri}'); | ||
| debugPrint('- Name: ${await file.name()}'); | ||
|
|
||
| if (await file.exists()) { | ||
| final String fileContent = await file.readAsString(); | ||
| debugPrint('Content of the file: $fileContent'); | ||
| } | ||
| ``` | ||
|
|
||
| You can find links to the API docs on the [pub page](https://pub.dev/packages/cross_file). | ||
|
|
||
| ### Implementation-Specific Features | ||
|
|
||
| Classes in this package contain an underlying platform implementation that provides features that | ||
| are specific to an implementation. | ||
|
|
||
| To access implementation-specific features, start by adding the platform implementation packages to | ||
| your app or package: | ||
|
|
||
| * **dart:io** [cross_file_io](https://pub.dev/packages/cross_file_io/install) | ||
| * **Android Scoped Storage**: [cross_file_android](https://pub.dev/packages/cross_file_android/install) | ||
| * **iOS/macOS App Sandbox**: [cross_file_darwin](https://pub.dev/packages/cross_file_darwin/install) | ||
| * **Web**: [cross_file_web](https://pub.dev/packages/cross_file_web/install) | ||
|
|
||
| Next, add the imports of the implementation packages to your app or package: | ||
|
|
||
| <?code-excerpt "readme_excerpts.dart (platform_imports)"?> | ||
| ```dart | ||
| // Import for Darwin App Sandbox features. | ||
| import 'package:cross_file_darwin/cross_file_darwin.dart'; | ||
| // Import for Web features. | ||
| import 'package:cross_file_web/cross_file_web.dart'; | ||
| ``` | ||
|
|
||
| Now, additional features can be accessed through the platform implementations. Classes | ||
| [FileSystemXFile], [FileSystemXDirectory], [ScopedStorageXFile], and [ScopedStorageXDirectory] pass | ||
| their functionality to a class provided by the current platform. Below are a couple of ways to | ||
| access additional functionality provided by the platform and is followed by an example. | ||
|
|
||
| 1. Pass a creation params class provided by a platform implementation to a `fromCreationParams` | ||
| constructor (e.g. `XFile.fromCreationParams`, `XDirectory.fromCreationParams`, etc.). | ||
| 2. Call methods on an implementation of a class by using `getExtension` method (e.g. | ||
| `XFile.getExtension`, `XDirectory.getExtension`, etc.). | ||
|
|
||
| Below is an example of using additional iOS/macOS and Web features for a `XFile`. | ||
|
|
||
| <?code-excerpt "readme_excerpts.dart (platform_features)"?> | ||
| ```dart | ||
| late final XFile file; | ||
|
|
||
| switch (CrossFile.implementation) { | ||
| case CrossFileWeb(): | ||
| final params = WebScopedStorageXFileCreationParams.fromObjectUrl( | ||
| objectUrl: 'blob:https://some/url:for/file', | ||
| ); | ||
| file = ScopedStorageXFile.fromCreationParams(params); | ||
| case CrossFileDarwin(): | ||
| file = ScopedStorageXFile.fromUri(Uri.file('/my/file.txt')); | ||
| default: | ||
| file = XFile.fileSystem(path: '/my/file.txt'); | ||
| } | ||
|
|
||
| await file | ||
| .getExtension<SecurityScopedDarwinScopedStorageXFileExtension>() | ||
| ?.startAccessingSecurityScopedResource(); | ||
|
|
||
| debugPrint(await file.readAsString()); | ||
|
|
||
| await file | ||
| .getExtension<SecurityScopedDarwinScopedStorageXFileExtension>() | ||
| ?.stopAccessingSecurityScopedResource(); | ||
| ``` | ||
|
|
||
| See https://pub.dev/documentation/cross_file_darwin/latest/cross_file_darwin/cross_file_darwin-library.html | ||
| for more details on iOS/macOS App Sandbox features. | ||
|
|
||
| See https://pub.dev/documentation/cross_file_android/latest/cross_file_android/cross_file_android-library.html | ||
| for more details on Android Scoped Storage features. | ||
|
|
||
| See https://pub.dev/documentation/cross_file_io/latest/cross_file_io/cross_file_io-library.html | ||
| for more details on `dart:io` features. | ||
|
|
||
| See https://pub.dev/documentation/cross_file_web/latest/cross_file_web/cross_file_web-library.html | ||
| for more details on Web features. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # cross_file_example | ||
|
|
||
| Demonstrates how to use the cross_file plugin. |
50 changes: 50 additions & 0 deletions
50
packages/cross_file/cross_file/example/android/app/build.gradle.kts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| plugins { | ||
| id("com.android.application") | ||
| id("dev.flutter.flutter-gradle-plugin") | ||
| } | ||
|
|
||
| android { | ||
| namespace = "dev.flutter.packages.crossfileexample" | ||
| compileSdk = flutter.compileSdkVersion | ||
| ndkVersion = flutter.ndkVersion | ||
|
|
||
| compileOptions { | ||
| sourceCompatibility = JavaVersion.VERSION_17 | ||
| targetCompatibility = JavaVersion.VERSION_17 | ||
| } | ||
|
|
||
| defaultConfig { | ||
| applicationId = "dev.flutter.packages.crossfileexample" | ||
| minSdk = flutter.minSdkVersion | ||
| targetSdk = flutter.targetSdkVersion | ||
| versionCode = flutter.versionCode | ||
| versionName = flutter.versionName | ||
| testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
| } | ||
|
|
||
| buildTypes { | ||
| release { | ||
| signingConfig = signingConfigs.getByName("debug") | ||
| } | ||
| } | ||
| lint { | ||
| disable.add("InvalidPackage") | ||
| } | ||
| } | ||
|
|
||
| kotlin { | ||
| compilerOptions { | ||
| jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 | ||
| } | ||
| } | ||
|
|
||
| flutter { | ||
| source = "../.." | ||
| } | ||
|
|
||
| dependencies { | ||
| testImplementation("junit:junit:4.13.2") | ||
| androidTestImplementation("androidx.test:runner:1.2.0") | ||
| androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") | ||
| api("androidx.test:core:1.4.0") | ||
| } |
17 changes: 17 additions & 0 deletions
17
...roid/app/src/androidTest/kotlin/dev/flutter/packages/crossfileexample/MainActivityTest.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| // Copyright 2013 The Flutter Authors | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| package dev.flutter.packages.crossfileexample | ||
|
|
||
| import androidx.test.rule.ActivityTestRule | ||
| import dev.flutter.plugins.integration_test.FlutterTestRunner | ||
| import io.flutter.plugins.DartIntegrationTest | ||
| import org.junit.Rule | ||
| import org.junit.runner.RunWith | ||
|
|
||
| @DartIntegrationTest | ||
| @RunWith(FlutterTestRunner::class) | ||
| class MainActivityTest { | ||
| @JvmField @Rule var rule = ActivityTestRule(MainActivity::class.java) | ||
| } |
20 changes: 20 additions & 0 deletions
20
packages/cross_file/cross_file/example/android/app/src/debug/AndroidManifest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <!-- The INTERNET permission is required for development. Specifically, | ||
| the Flutter tool needs it to communicate with the running application | ||
| to allow setting breakpoints, to provide hot reload, etc. | ||
| --> | ||
| <uses-permission android:name="android.permission.INTERNET"/> | ||
| <application android:usesCleartextTraffic="true"> | ||
| <activity | ||
| android:name="dev.flutter.packages.crossfileexample.DriverExtensionActivity" | ||
| android:launchMode="singleTop" | ||
| android:theme="@style/LaunchTheme" | ||
| android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" | ||
| android:hardwareAccelerated="true" | ||
| android:windowSoftInputMode="adjustResize"> | ||
| <meta-data | ||
| android:name="io.flutter.Entrypoint" | ||
| android:value="integrationTestMain" /> | ||
| </activity> | ||
| </application> | ||
| </manifest> |
45 changes: 45 additions & 0 deletions
45
packages/cross_file/cross_file/example/android/app/src/main/AndroidManifest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <application | ||
| android:label="cross_file_example" | ||
| android:name="${applicationName}" | ||
| android:icon="@mipmap/ic_launcher"> | ||
| <activity | ||
| android:name=".MainActivity" | ||
| android:exported="true" | ||
| android:launchMode="singleTop" | ||
| android:taskAffinity="" | ||
| android:theme="@style/LaunchTheme" | ||
| android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" | ||
| android:hardwareAccelerated="true" | ||
| android:windowSoftInputMode="adjustResize"> | ||
| <!-- Specifies an Android theme to apply to this Activity as soon as | ||
| the Android process has started. This theme is visible to the user | ||
| while the Flutter UI initializes. After that, this theme continues | ||
| to determine the Window background behind the Flutter UI. --> | ||
| <meta-data | ||
| android:name="io.flutter.embedding.android.NormalTheme" | ||
| android:resource="@style/NormalTheme" | ||
| /> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.MAIN"/> | ||
| <category android:name="android.intent.category.LAUNCHER"/> | ||
| </intent-filter> | ||
| </activity> | ||
| <!-- Don't delete the meta-data below. | ||
| This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> | ||
| <meta-data | ||
| android:name="flutterEmbedding" | ||
| android:value="2" /> | ||
| </application> | ||
| <!-- Required to query activities that can process text, see: | ||
| https://developer.android.com/training/package-visibility and | ||
| https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT. | ||
|
|
||
| In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. --> | ||
| <queries> | ||
| <intent> | ||
| <action android:name="android.intent.action.PROCESS_TEXT"/> | ||
| <data android:mimeType="text/plain"/> | ||
| </intent> | ||
| </queries> | ||
| </manifest> |
10 changes: 10 additions & 0 deletions
10
...roid/app/src/main/kotlin/dev/flutter/packages/crossfileexample/DriverExtensionActivity.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // Copyright 2013 The Flutter Authors | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| package dev.flutter.packages.crossfileexample | ||
|
|
||
| import io.flutter.embedding.android.FlutterActivity | ||
|
|
||
| /** Test Activity that sets the name of the Dart method entrypoint in the manifest. */ | ||
| class DriverExtensionActivity : FlutterActivity() |
9 changes: 9 additions & 0 deletions
9
...example/android/app/src/main/kotlin/dev/flutter/packages/crossfileexample/MainActivity.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // Copyright 2013 The Flutter Authors | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| package dev.flutter.packages.crossfileexample | ||
|
|
||
| import io.flutter.embedding.android.FlutterActivity | ||
|
|
||
| class MainActivity : FlutterActivity() |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.