Skip to content

Commit

Permalink
0.0.10 pre
Browse files Browse the repository at this point in the history
  • Loading branch information
Notsfsssf committed Jul 5, 2020
1 parent 77f50da commit 5503886
Show file tree
Hide file tree
Showing 33 changed files with 417 additions and 279 deletions.
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies

Large diffs are not rendered by default.

17 changes: 3 additions & 14 deletions android/app/src/main/kotlin/com/perol/pixez/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ import android.media.MediaScannerConnection
import android.os.Build
import android.os.Environment
import android.provider.MediaStore
import android.util.Xml
import android.webkit.MimeTypeMap
import android.widget.Toast
import androidx.annotation.NonNull
import androidx.preference.PreferenceManager
import com.waynejo.androidndkgif.GifEncoder
import io.flutter.Log
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
Expand All @@ -27,8 +25,7 @@ import java.lang.Exception

class MainActivity : FlutterActivity() {
private val CHANNEL = "com.perol.dev/save"
private val AUTH_CHANNEL = "com.perol.dev/auth"
private val BIOMETRIC_CHANNEL = "samples.flutter.dev/biometric"
private val ENCODE_CHANNEL = "samples.flutter.dev/battery"
val pref by lazy {
PreferenceManager.getDefaultSharedPreferences(this)
}
Expand Down Expand Up @@ -76,16 +73,8 @@ class MainActivity : FlutterActivity() {
result.success(isFileExist)
}
}
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, BIOMETRIC_CHANNEL).setMethodCallHandler { call, result ->
if (call.method == "auth") {




}
}
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, AUTH_CHANNEL).setMethodCallHandler { call, result ->
if (call.method == "auth") {
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, ENCODE_CHANNEL).setMethodCallHandler { call, result ->
if (call.method == "getBatteryLevel") {
val name = call.argument<String>("name")!!
val path = call.argument<String>("path")!!
val delay = call.argument<Int>("delay")!!
Expand Down
19 changes: 12 additions & 7 deletions lib/component/ugoira_painter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ class _UgoiraWidgetState extends State<UgoiraWidget> {
point++;
if (point >= widget.drawPools.length) point = 0;
final data = await _loadImage(file);
if(!mounted)
setState(() {
image = data;
});
if (mounted) {
setState(() {
image = data;
});
}
});
}

Expand All @@ -94,9 +95,13 @@ class UgoiraPainter extends CustomPainter {

@override
Future<void> paint(Canvas canvas, Size size) async {
Rect dstRect = Rect.fromLTWH(0, 0, image.width.toDouble(), image.height.toDouble());
canvas.drawImageRect(
image, dstRect,Rect.fromLTWH(0, 0,size.width.toDouble(), size.height.toDouble()), _paint);
Rect dstRect =
Rect.fromLTWH(0, 0, image.width.toDouble(), image.height.toDouble());
canvas.drawImageRect(
image,
dstRect,
Rect.fromLTWH(0, 0, size.width.toDouble(), size.height.toDouble()),
_paint);
}

@override
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_en-US.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class MessageLookup extends MessageLookupByLibrary {
"Donation" : MessageLookupByLibrary.simpleMessage("Buy me a coffee"),
"Dont_have_account" : MessageLookupByLibrary.simpleMessage("Don\'t have an account?"),
"Download_Address" : MessageLookupByLibrary.simpleMessage("Download address"),
"Encode" : MessageLookupByLibrary.simpleMessage("Encode"),
"Encode_Message" : MessageLookupByLibrary.simpleMessage("This will take time and may fail"),
"Exact_Match_for_tag" : MessageLookupByLibrary.simpleMessage("Tag perfect match"),
"FeedBack" : MessageLookupByLibrary.simpleMessage("Feedback"),
"Follow" : MessageLookupByLibrary.simpleMessage("Follow"),
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_zh-CN.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class MessageLookup extends MessageLookupByLibrary {
"Donation" : MessageLookupByLibrary.simpleMessage("捐赠"),
"Dont_have_account" : MessageLookupByLibrary.simpleMessage("没有账号?"),
"Download_Address" : MessageLookupByLibrary.simpleMessage("下载地址"),
"Encode" : MessageLookupByLibrary.simpleMessage("合成"),
"Encode_Message" : MessageLookupByLibrary.simpleMessage("这将会消耗一定时间,并可能会失败"),
"Exact_Match_for_tag" : MessageLookupByLibrary.simpleMessage("与标签完全一致"),
"FeedBack" : MessageLookupByLibrary.simpleMessage("反馈"),
"Follow" : MessageLookupByLibrary.simpleMessage("关注"),
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_zh-TW.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class MessageLookup extends MessageLookupByLibrary {
"Donation" : MessageLookupByLibrary.simpleMessage("抖內"),
"Dont_have_account" : MessageLookupByLibrary.simpleMessage("沒有帳戶?"),
"Download_Address" : MessageLookupByLibrary.simpleMessage("下載地址"),
"Encode" : MessageLookupByLibrary.simpleMessage("合成"),
"Encode_Message" : MessageLookupByLibrary.simpleMessage("這將會消耗壹定時間,並可能會失敗"),
"Exact_Match_for_tag" : MessageLookupByLibrary.simpleMessage("與標簽完全一致"),
"FeedBack" : MessageLookupByLibrary.simpleMessage("反饋"),
"Follow" : MessageLookupByLibrary.simpleMessage("關註"),
Expand Down
20 changes: 20 additions & 0 deletions lib/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion lib/l10n/intl_en_US.arb
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,7 @@
"Disable_Sni_Bypass": "Disable Sni Bypass",
"Disable_Sni_Bypass_Message": "Save time of DNS over HTTPS during cold start",
"Go_To_Project_Address": "Go to project address",
"Welcome_Page": "Welcome Page"
"Welcome_Page": "Welcome Page",
"Encode":"Encode",
"Encode_Message":"This will take time and may fail"
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_zh_CN.arb
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,7 @@
"Disable_Sni_Bypass":"不需要Bypass Sni",
"Disable_Sni_Bypass_Message":"节省冷启动时dns over https的时间",
"Go_To_Project_Address":"前往项目地址",
"Welcome_Page":"欢迎页"
"Welcome_Page":"欢迎页",
"Encode":"合成",
"Encode_Message":"这将会消耗一定时间,并可能会失败"
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_zh_TW.arb
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,7 @@
"Disable_Sni_Bypass":"不需要 Bypass Sni",
"Disable_Sni_Bypass_Message":"節省冷啟動時 Dns Over Https 的時間",
"Go_To_Project_Address":"前往項目地址",
"Welcome_Page":"歡迎頁"
"Welcome_Page":"歡迎頁",
"Encode":"合成",
"Encode_Message":"這將會消耗壹些時間,並可能會失敗"
}
Loading

0 comments on commit 5503886

Please sign in to comment.