diff --git a/CHANGELOG.md b/CHANGELOG.md index 56f80d2..84ea8e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Version 0.8.* +* ## [0.8.4] + * **[FIX] : By [Anis Alibegić](https://github.com/anisalibegic)** + - Upgrade Intl version + + * ## [0.8.3] * **[FIX] : By [Gerrel](https://github.com/Gerrel)** - Enforce decimal separator initialization. diff --git a/android/build.gradle b/android/build.gradle index 3531771..f69a253 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,34 +1,35 @@ group 'com.octapush.moneyformatter.fluttermoneyformatter' -version '1.0-SNAPSHOT' +version '1.0' buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:7.2.0' } } rootProject.allprojects { repositories { google() - jcenter() + mavenCentral() } } apply plugin: 'com.android.library' android { - compileSdkVersion 28 + compileSdkVersion 31 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } defaultConfig { minSdkVersion 16 - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - lintOptions { - disable 'InvalidPackage' } } diff --git a/android/src/main/java/com/octapush/moneyformatter/fluttermoneyformatter/FlutterMoneyFormatterPlugin.java b/android/src/main/java/com/octapush/moneyformatter/fluttermoneyformatter/FlutterMoneyFormatterPlugin.java index 783e15d..72ec047 100644 --- a/android/src/main/java/com/octapush/moneyformatter/fluttermoneyformatter/FlutterMoneyFormatterPlugin.java +++ b/android/src/main/java/com/octapush/moneyformatter/fluttermoneyformatter/FlutterMoneyFormatterPlugin.java @@ -1,25 +1,33 @@ package com.octapush.moneyformatter.fluttermoneyformatter; +import androidx.annotation.NonNull; + +import io.flutter.embedding.engine.plugins.FlutterPlugin; import io.flutter.plugin.common.MethodCall; import io.flutter.plugin.common.MethodChannel; import io.flutter.plugin.common.MethodChannel.MethodCallHandler; import io.flutter.plugin.common.MethodChannel.Result; -import io.flutter.plugin.common.PluginRegistry.Registrar; -/** FlutterMoneyFormatterPlugin */ -public class FlutterMoneyFormatterPlugin implements MethodCallHandler { - /** Plugin registration. */ - public static void registerWith(Registrar registrar) { - final MethodChannel channel = new MethodChannel(registrar.messenger(), "flutter_money_formatter"); - channel.setMethodCallHandler(new FlutterMoneyFormatterPlugin()); +public class FlutterMoneyFormatterPlugin implements FlutterPlugin, MethodCallHandler { + private MethodChannel channel; + + @Override + public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) { + channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "flutter_money_formatter"); + channel.setMethodCallHandler(this); } @Override - public void onMethodCall(MethodCall call, Result result) { + public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) { if (call.method.equals("getPlatformVersion")) { result.success("Android " + android.os.Build.VERSION.RELEASE); } else { result.notImplemented(); } } -} + + @Override + public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) { + channel.setMethodCallHandler(null); + } +} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index d7ab322..4e95f1c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_money_formatter description: FlutterMoneyFormatter is a Flutter extension to formatting various types of currencies according to the characteristics you like, without having to be tied to any localization. -version: 0.8.3 +version: 0.8.5 author: Fadhly Permata homepage: https://github.com/fadhly-permata/flutter_money_formatter @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - intl: ^0.15.8 + intl: ^0.17.0 # For information on the generic Dart part of this file, see the # following page: https://www.dartlang.org/tools/pub/pubspec @@ -54,4 +54,4 @@ flutter: # weight: 700 # # For details regarding fonts in packages, see - # https://flutter.io/custom-fonts/#from-packages \ No newline at end of file + # https://flutter.io/custom-fonts/#from-packages