Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
flutter_plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林生雨
flutter_plugin
Commits
d44d2e62
Commit
d44d2e62
authored
Dec 23, 2019
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
8d292e37
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
18 deletions
+22
-18
workspace.xml
.idea/workspace.xml
+14
-13
ImageRespository.kt
...flutter_plugin/ImagePlugin/repository/ImageRespository.kt
+1
-0
MyUtil.kt
...kotlin/com/example/gengmei_flutter_plugin/utils/MyUtil.kt
+6
-5
gradle.properties
example/android/gradle.properties
+1
-0
No files found.
.idea/workspace.xml
View file @
d44d2e62
...
...
@@ -5,7 +5,9 @@
<option
name=
"TOOL_WINDOW_CONFIGURED_FILTER"
value=
"Show only selected application"
/>
</component>
<component
name=
"ChangeListManager"
>
<list
default=
"$ENABLE_FLUTTER_DESKTOP$"
id=
"5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba"
name=
"Default Changelist"
comment=
""
/>
<list
default=
"$ENABLE_FLUTTER_DESKTOP$"
id=
"5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/example/android/gradle.properties"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/android/gradle.properties"
afterDir=
"false"
/>
</list>
<ignored
path=
"$PROJECT_DIR$/.dart_tool/"
/>
<ignored
path=
"$PROJECT_DIR$/.idea/"
/>
<ignored
path=
"$PROJECT_DIR$/.pub/"
/>
...
...
@@ -21,7 +23,7 @@
<component
name=
"DefaultGradleProjectSettings"
>
<option
name=
"isMigrated"
value=
"$ENABLE_FLUTTER_DESKTOP$"
/>
</component>
<component
name=
"ExecutionTargetManager"
SELECTED_TARGET=
"
c5a90f6
"
/>
<component
name=
"ExecutionTargetManager"
SELECTED_TARGET=
"
Pixel_2_API_25
"
/>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
pinned=
"false"
current-in-tab=
"false"
>
...
...
@@ -98,8 +100,8 @@
<file
pinned=
"false"
current-in-tab=
"$ENABLE_FLUTTER_DESKTOP$"
>
<entry
file=
"file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"
>
<provider
selected=
"$ENABLE_FLUTTER_DESKTOP$"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
70
"
>
<caret
line=
"4
2"
column=
"40"
selection-start-line=
"42"
selection-start-column=
"40"
selection-end-line=
"42"
selection-end-column=
"40
"
/>
<state
relative-caret-position=
"1
48
"
>
<caret
line=
"4
1"
column=
"61"
selection-start-line=
"41"
selection-start-column=
"61"
selection-end-line=
"41"
selection-end-column=
"61
"
/>
<folding>
<element
signature=
"e#0#20#0"
expanded=
"$ENABLE_FLUTTER_DESKTOP$"
/>
</folding>
...
...
@@ -192,8 +194,8 @@
</option>
</component>
<component
name=
"ProjectFrameBounds"
>
<option
name=
"x"
value=
"
3
18"
/>
<option
name=
"y"
value=
"
226
"
/>
<option
name=
"x"
value=
"18"
/>
<option
name=
"y"
value=
"
125
"
/>
<option
name=
"width"
value=
"1440"
/>
<option
name=
"height"
value=
"811"
/>
</component>
...
...
@@ -281,8 +283,7 @@
<servers
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"318"
y=
"226"
width=
"1440"
height=
"811"
extended-state=
"0"
/>
<editor
active=
"$ENABLE_FLUTTER_DESKTOP$"
/>
<frame
x=
"124"
y=
"117"
width=
"1440"
height=
"811"
extended-state=
"0"
/>
<layout>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"$ENABLE_FLUTTER_DESKTOP$"
weight=
"0.19742489"
/>
<window_info
id=
"Captures"
order=
"1"
side_tool=
"$ENABLE_FLUTTER_DESKTOP$"
/>
...
...
@@ -294,12 +295,12 @@
<window_info
id=
"Capture Tool"
order=
"7"
/>
<window_info
id=
"Favorites"
order=
"8"
side_tool=
"$ENABLE_FLUTTER_DESKTOP$"
/>
<window_info
anchor=
"bottom"
id=
"Dart Analysis"
order=
"0"
weight=
"0.32963988"
/>
<window_info
a
nchor=
"bottom"
id=
"Run"
order=
"1"
weight=
"0.5
"
/>
<window_info
a
ctive=
"$ENABLE_FLUTTER_DESKTOP$"
anchor=
"bottom"
id=
"Run"
order=
"1"
visible=
"$ENABLE_FLUTTER_DESKTOP$"
weight=
"0.4993046
"
/>
<window_info
anchor=
"bottom"
id=
"TODO"
order=
"2"
/>
<window_info
anchor=
"bottom"
id=
"Android Profiler"
order=
"3"
show_stripe_button=
"false"
/>
<window_info
anchor=
"bottom"
id=
"Logcat"
order=
"4"
weight=
"0.29639888"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"5"
/>
<window_info
a
ctive=
"$ENABLE_FLUTTER_DESKTOP$"
anchor=
"bottom"
id=
"Terminal"
order=
"6"
visible=
"$ENABLE_FLUTTER_DESKTOP$"
weight=
"0.3254520
3"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"5"
weight=
"0.32962447"
/>
<window_info
a
nchor=
"bottom"
id=
"Terminal"
order=
"6"
weight=
"0.6050069
3"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
order=
"7"
side_tool=
"$ENABLE_FLUTTER_DESKTOP$"
/>
<window_info
anchor=
"bottom"
id=
"Flutter Performance"
order=
"8"
side_tool=
"$ENABLE_FLUTTER_DESKTOP$"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"9"
/>
...
...
@@ -629,8 +630,8 @@
</entry>
<entry
file=
"file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"
>
<provider
selected=
"$ENABLE_FLUTTER_DESKTOP$"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
70
"
>
<caret
line=
"4
2"
column=
"40"
selection-start-line=
"42"
selection-start-column=
"40"
selection-end-line=
"42"
selection-end-column=
"40
"
/>
<state
relative-caret-position=
"1
48
"
>
<caret
line=
"4
1"
column=
"61"
selection-start-line=
"41"
selection-start-column=
"61"
selection-end-line=
"41"
selection-end-column=
"61
"
/>
<folding>
<element
signature=
"e#0#20#0"
expanded=
"$ENABLE_FLUTTER_DESKTOP$"
/>
</folding>
...
...
android/src/main/kotlin/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt
View file @
d44d2e62
...
...
@@ -145,6 +145,7 @@ class ImageRespository {
}
}
}
else
{
Log
.
e
(
"lsy"
,
" !!!! ${realPath} ${getFileName(realPath)==null}"
)
val
tempFilePngString
=
fileDir
+
"/"
+
getFileName
(
realPath
)
!!
+
".png"
;
val
tempFilePngExists
=
File
(
tempFilePngString
).
exists
()
if
(
tempFilePngExists
)
{
...
...
android/src/main/kotlin/com/example/gengmei_flutter_plugin/utils/MyUtil.kt
View file @
d44d2e62
...
...
@@ -26,8 +26,6 @@ import android.opengl.ETC1.getHeight
import
android.opengl.ETC1.getWidth
/**
* @author lsy
* @date 2019-09-10
...
...
@@ -57,6 +55,9 @@ class MyUtil {
fun
getFileName
(
pathandname
:
String
):
String
?
{
val
start
=
pathandname
.
lastIndexOf
(
"/"
)
val
end
=
pathandname
.
lastIndexOf
(
"."
)
if
(
end
==
-
1
)
{
return
pathandname
.
substring
(
start
+
1
,
pathandname
.
length
)
}
return
if
(
start
!=
-
1
&&
end
!=
-
1
)
{
pathandname
.
substring
(
start
+
1
,
end
)
}
else
{
...
...
@@ -95,7 +96,7 @@ class MyUtil {
return
filePath
}
fun
scareImg
(
imgPath
:
String
,
scareSize
:
Float
,
filePath
:
String
,
quality
:
Int
,
degree
:
Int
):
String
{
fun
scareImg
(
imgPath
:
String
,
scareSize
:
Float
,
filePath
:
String
,
quality
:
Int
,
degree
:
Int
):
String
{
val
newOpts
=
BitmapFactory
.
Options
()
// 开始读入图片,此时把options.inJustDecodeBounds 设回true,即只读边不读内容
newOpts
.
inJustDecodeBounds
=
true
...
...
@@ -130,14 +131,14 @@ class MyUtil {
val
file
=
File
(
filePath
)
try
{
val
out
=
FileOutputStream
(
file
)
if
(
degree
!=
0
)
{
if
(
degree
!=
0
)
{
matrix
.
reset
()
matrix
.
postRotate
(
degree
.
toFloat
());
val
resizedBitmap
=
Bitmap
.
createBitmap
(
bitmap
,
0
,
0
,
bitmap
.
width
,
bitmap
.
height
,
matrix
,
true
)
resizedBitmap
.
compress
(
Bitmap
.
CompressFormat
.
PNG
,
quality
,
out
)
resizedBitmap
.
recycle
()
}
else
{
}
else
{
bitmap
.
compress
(
Bitmap
.
CompressFormat
.
PNG
,
quality
,
out
)
}
out
.
flush
()
...
...
example/android/gradle.properties
View file @
d44d2e62
org.gradle.jvmargs
=
-Xmx1536M
android.enableR8
=
true
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment