Skip to content

Commit 6b2a16a

Browse files
author
liushihao
committed
first commit
0 parents  commit 6b2a16a

File tree

293 files changed

+12687
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

293 files changed

+12687
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea/
2+
bin/

fileshare/.gitignore

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
**/doc/api/
26+
**/ios/Flutter/.last_build_id
27+
.dart_tool/
28+
.flutter-plugins
29+
.flutter-plugins-dependencies
30+
.pub-cache/
31+
.pub/
32+
/build/
33+
34+
# Symbolication related
35+
app.*.symbols
36+
37+
# Obfuscation related
38+
app.*.map.json
39+
40+
# Android Studio will place build artifacts here
41+
/android/app/debug
42+
/android/app/profile
43+
/android/app/release
44+
bin/
45+
46+
pubspec.lock
47+
linux-deb/opt/fileshare/*
48+
lib/*.so
49+
lib/*.h
50+
android/app/jniLibs

fileshare/.metadata

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9"
8+
channel: "stable"
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
17+
base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
18+
- platform: android
19+
create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
20+
base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
21+
- platform: ios
22+
create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
23+
base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
24+
- platform: linux
25+
create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
26+
base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
27+
- platform: macos
28+
create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
29+
base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
30+
- platform: web
31+
create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
32+
base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
33+
- platform: windows
34+
create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
35+
base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

fileshare/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# fileshare
2+
3+
A new Flutter project.
4+
5+
## Getting Started
6+
7+
- 不同的平台一定要指定编译平台,否则flutter报错:比如Linux平台打开安卓平台的so库,报 cannot open shared object file: No such file or directory
8+
- 为了安全,不建议在后台运行。用户需要显式的知道服务在运行。(这可能带来一个问题,就是本机不能传送文件)

fileshare/analysis_options.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at https://dart.dev/lints.
17+
#
18+
# Instead of disabling a lint rule for the entire project in the
19+
# section below, it can also be suppressed for a single line of code
20+
# or a specific dart file by using the `// ignore: name_of_lint` and
21+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
22+
# producing the lint.
23+
rules:
24+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
25+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26+
27+
# Additional information about this file can be found at
28+
# https://dart.dev/guides/language/analysis-options

fileshare/android/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties
12+
**/*.keystore
13+
**/*.jks

fileshare/android/app/build.gradle

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
7+
def localProperties = new Properties()
8+
def localPropertiesFile = rootProject.file('local.properties')
9+
if (localPropertiesFile.exists()) {
10+
localPropertiesFile.withReader('UTF-8') { reader ->
11+
localProperties.load(reader)
12+
}
13+
}
14+
15+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16+
if (flutterVersionCode == null) {
17+
flutterVersionCode = '1'
18+
}
19+
20+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
21+
if (flutterVersionName == null) {
22+
flutterVersionName = '1.0'
23+
}
24+
25+
android {
26+
namespace "com.example.fileshare"
27+
compileSdkVersion flutter.compileSdkVersion
28+
ndkVersion flutter.ndkVersion
29+
30+
compileOptions {
31+
sourceCompatibility JavaVersion.VERSION_1_8
32+
targetCompatibility JavaVersion.VERSION_1_8
33+
}
34+
35+
kotlinOptions {
36+
jvmTarget = '1.8'
37+
}
38+
39+
sourceSets {
40+
main.java.srcDirs += 'src/main/kotlin'
41+
main.jniLibs.srcDirs "jniLibs"
42+
}
43+
44+
defaultConfig {
45+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
46+
applicationId "com.example.fileshare"
47+
// You can update the following values to match your application needs.
48+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
49+
minSdkVersion flutter.minSdkVersion
50+
targetSdkVersion flutter.targetSdkVersion
51+
versionCode flutterVersionCode.toInteger()
52+
versionName flutterVersionName
53+
}
54+
55+
buildTypes {
56+
release {
57+
// TODO: Add your own signing config for the release build.
58+
// Signing with the debug keys for now, so `flutter run --release` works.
59+
signingConfig signingConfigs.debug
60+
}
61+
}
62+
}
63+
64+
flutter {
65+
source '../..'
66+
}
67+
68+
dependencies {}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
3+
<uses-permission android:name="android.permission.INTERNET" />
4+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
5+
<!-- //开启读写权限-->
6+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
7+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
8+
9+
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
10+
11+
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
12+
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
13+
<!--When your app has no need to access audio, remove it or comment it out.-->
14+
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
15+
16+
<application
17+
android:label="fileshare"
18+
android:name="${applicationName}"
19+
android:icon="@mipmap/ic_launcher">
20+
<activity
21+
android:name=".MainActivity"
22+
android:exported="true"
23+
android:launchMode="singleTop"
24+
android:theme="@style/LaunchTheme"
25+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
26+
android:hardwareAccelerated="true"
27+
android:windowSoftInputMode="adjustResize">
28+
<!-- Specifies an Android theme to apply to this Activity as soon as
29+
the Android process has started. This theme is visible to the user
30+
while the Flutter UI initializes. After that, this theme continues
31+
to determine the Window background behind the Flutter UI. -->
32+
<meta-data
33+
android:name="io.flutter.embedding.android.NormalTheme"
34+
android:resource="@style/NormalTheme"
35+
/>
36+
<intent-filter>
37+
<action android:name="android.intent.action.MAIN"/>
38+
<category android:name="android.intent.category.LAUNCHER"/>
39+
</intent-filter>
40+
</activity>
41+
<!-- Don't delete the meta-data below.
42+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
43+
<meta-data
44+
android:name="flutterEmbedding"
45+
android:value="2" />
46+
</application>
47+
</manifest>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.example.fileshare
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity() {
6+
}

0 commit comments

Comments
 (0)