diff --git a/.idea/libraries/Flutter_Plugins.xml b/.idea/libraries/Flutter_Plugins.xml
deleted file mode 100644
index 65bb367..0000000
--- a/.idea/libraries/Flutter_Plugins.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 01d3aa2..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/runConfigurations/example_lib_main_dart.xml b/.idea/runConfigurations/example_lib_main_dart.xml
deleted file mode 100644
index bac2c8a..0000000
--- a/.idea/runConfigurations/example_lib_main_dart.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index b8f9645..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/README.md b/README.md
index 7105db1..b85e62b 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,7 @@
# 使用Flutter实现 仿微信录音的插件
插件支持android 和IOS
+更新Android的build.gradle,修复RecordWav和AndroidAudioConverter库的问题
-------
插件提供的功能
@@ -34,18 +35,8 @@
引入方式1(引入最新的版本)
flutter_plugin_record:
git:
- url: https://github.com/yxwandroid/flutter_plugin_record.git
+ url: https://github.com/szuwest/flutter_plugin_record.git
- 引入方式2 (引入指定某次commit)
- flutter_plugin_record:
- git:
- url: https://github.com/yxwandroid/flutter_plugin_record.git
- ref: 29c02b15835907879451ad9f8f88c357149c6085
-
- 引入方式3 (引入Flutter仓库的library)
-
- dependencies:
- flutter_plugin_record: ^1.0.1
diff --git a/android/build.gradle b/android/build.gradle
index 22bf400..2391123 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -2,8 +2,7 @@ group 'record.wilson.flutter.com.flutter_plugin_record'
version '1.0-SNAPSHOT'
buildscript {
-// ext.kotlin_version = '1.2.71'
- ext.kotlin_version = '1.3.50'
+ ext.kotlin_version = '1.6.10'
repositories {
google()
@@ -11,7 +10,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.2.1'
+ classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
@@ -44,7 +43,9 @@ android {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- implementation 'com.github.shaoshuai904:RecordWav:1.0.2'
+ implementation 'com.github.shaoshuai904:RecordWav:1.2.1'
+// api(name:'RecordWav-1.0.2', ext: 'aar')
implementation "androidx.appcompat:appcompat:1.0.0"
- implementation 'com.github.adrielcafe:AndroidAudioConverter:0.0.8'
+// implementation 'com.github.adrielcafe:AndroidAudioConverter:0.0.8'
+ implementation 'com.github.szuwest:AndroidAudioConverter:0.0.9-2'
}
diff --git a/android/src/main/kotlin/record/wilson/flutter/com/flutter_plugin_record/FlutterPluginRecordPlugin.kt b/android/src/main/kotlin/record/wilson/flutter/com/flutter_plugin_record/FlutterPluginRecordPlugin.kt
index 0a2303b..6880829 100644
--- a/android/src/main/kotlin/record/wilson/flutter/com/flutter_plugin_record/FlutterPluginRecordPlugin.kt
+++ b/android/src/main/kotlin/record/wilson/flutter/com/flutter_plugin_record/FlutterPluginRecordPlugin.kt
@@ -46,7 +46,7 @@ class FlutterPluginRecordPlugin : FlutterPlugin, MethodCallHandler, ActivityAwar
@JvmStatic
fun registerWith(registrar: Registrar) {
val plugin = initPlugin(registrar.messenger())
- plugin.activity=registrar.activity()
+ plugin.activity= registrar.activity()!!
registrar.addRequestPermissionsResultListener(plugin)
}
@@ -63,7 +63,7 @@ class FlutterPluginRecordPlugin : FlutterPlugin, MethodCallHandler, ActivityAwar
}
}
override fun onAttachedToEngine(binding: FlutterPlugin.FlutterPluginBinding) {
- val methodChannel = createMethodChannel(binding.binaryMessenger)
+ val methodChannel = createMethodChannel(binding.binaryMessenger)
methodChannel.setMethodCallHandler(this)
channel=methodChannel
}
@@ -321,10 +321,10 @@ class FlutterPluginRecordPlugin : FlutterPlugin, MethodCallHandler, ActivityAwar
}
}
AndroidAudioConverter.with(activity.applicationContext)
- .setFile(recordFile)
- .setFormat(AudioFormat.MP3)
- .setCallback(callback)
- .convert()
+ .setFile(recordFile)
+ .setFormat(AudioFormat.MP3)
+ .setCallback(callback)
+ .convert()
}else{
val _id = call.argument("id")
@@ -402,10 +402,10 @@ class FlutterPluginRecordPlugin : FlutterPlugin, MethodCallHandler, ActivityAwar
}
}
AndroidAudioConverter.with(activity.applicationContext)
- .setFile(recordFile)
- .setFormat(AudioFormat.MP3)
- .setCallback(callback)
- .convert()
+ .setFile(recordFile)
+ .setFormat(AudioFormat.MP3)
+ .setCallback(callback)
+ .convert()
}else{
val _id = call.argument("id")
@@ -462,9 +462,9 @@ class FlutterPluginRecordPlugin : FlutterPlugin, MethodCallHandler, ActivityAwar
// 权限监听回调
- override fun onRequestPermissionsResult(p0: Int, p1: Array?, p2: IntArray?): Boolean {
+ override fun onRequestPermissionsResult(p0: Int, p1: Array, p2: IntArray): Boolean {
if (p0 == 1) {
- if (p2?.get(0) == PackageManager.PERMISSION_GRANTED) {
+ if (p2[0] == PackageManager.PERMISSION_GRANTED) {
// initRecord()
return true
} else {
@@ -478,6 +478,6 @@ class FlutterPluginRecordPlugin : FlutterPlugin, MethodCallHandler, ActivityAwar
return false
}
-
+
}
diff --git a/android/src/main/kotlin/record/wilson/flutter/com/flutter_plugin_record/utils/RecorderUtil.java b/android/src/main/kotlin/record/wilson/flutter/com/flutter_plugin_record/utils/RecorderUtil.java
index 080ba26..f83b0a6 100644
--- a/android/src/main/kotlin/record/wilson/flutter/com/flutter_plugin_record/utils/RecorderUtil.java
+++ b/android/src/main/kotlin/record/wilson/flutter/com/flutter_plugin_record/utils/RecorderUtil.java
@@ -83,7 +83,7 @@ private void initVoicePath() {
private void initRecorder() {
recorder = MsRecorder.wav(
new File(voicePath),
- new AudioRecordConfig.Default(),
+ new AudioRecordConfig(),
new PullTransport.Default()
.setOnAudioChunkPulledListener(new PullTransport.OnAudioChunkPulledListener() {
@Override
diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies
index fb97029..cb2fde6 100644
--- a/example/.flutter-plugins-dependencies
+++ b/example/.flutter-plugins-dependencies
@@ -1 +1 @@
-{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_plugin_record","path":"/Users/wilson/aochuang/FlutterDemo/flutter_plugin_record/","dependencies":[]},{"name":"path_provider","path":"/Users/wilson/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.24/","dependencies":[]},{"name":"shared_preferences","path":"/Users/wilson/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.12+4/","dependencies":[]}],"android":[{"name":"flutter_plugin_record","path":"/Users/wilson/aochuang/FlutterDemo/flutter_plugin_record/","dependencies":[]},{"name":"path_provider","path":"/Users/wilson/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.24/","dependencies":[]},{"name":"shared_preferences","path":"/Users/wilson/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.12+4/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/wilson/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+6/","dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/wilson/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+11/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/wilson/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-0.0.1+2/","dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/wilson/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-0.0.2+4/","dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/Users/wilson/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-0.0.4+3/","dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/wilson/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_windows-0.0.1+3/","dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/Users/wilson/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+7/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_plugin_record","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2021-03-24 11:27:57.607425","version":"2.0.3"}
\ No newline at end of file
+{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_plugin_record","path":"/Users/kk/Documents/workspace/flutter_plugin_record/","native_build":true,"dependencies":[]},{"name":"path_provider_ios","path":"/Users/kk/.pub-cache/hosted/pub.flutter-io.cn/path_provider_ios-2.0.11/","native_build":true,"dependencies":[]},{"name":"shared_preferences_ios","path":"/Users/kk/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_ios-2.1.1/","native_build":true,"dependencies":[]}],"android":[{"name":"flutter_plugin_record","path":"/Users/kk/Documents/workspace/flutter_plugin_record/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/kk/.pub-cache/hosted/pub.flutter-io.cn/path_provider_android-2.0.21/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/kk/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_android-2.0.14/","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/kk/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-2.0.6/","native_build":true,"dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/kk/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-2.0.4/","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/kk/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-2.1.7/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/kk/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-2.1.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/Users/kk/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-2.1.3/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/kk/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_windows-2.1.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/Users/kk/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-2.0.4/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_plugin_record","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_ios","shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_ios","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2023-04-26 18:10:00.417755","version":"3.7.3"}
\ No newline at end of file
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index 1314b6a..974a754 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 29
+ compileSdkVersion 31
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
diff --git a/example/android/build.gradle b/example/android/build.gradle
index 3f28f4d..56e1cea 100644
--- a/example/android/build.gradle
+++ b/example/android/build.gradle
@@ -1,6 +1,5 @@
buildscript {
-// ext.kotlin_version = '1.2.71'
- ext.kotlin_version = '1.3.50'
+ ext.kotlin_version = '1.6.10'
repositories {
google()
@@ -8,7 +7,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.5.3'
+ classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties
index d95a2e2..decf92d 100644
--- a/example/android/gradle/wrapper/gradle-wrapper.properties
+++ b/example/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
diff --git a/example/lib/generated/i18n.dart b/example/lib/generated/i18n.dart
deleted file mode 100644
index 30fdb7a..0000000
--- a/example/lib/generated/i18n.dart
+++ /dev/null
@@ -1,126 +0,0 @@
-import 'dart:async';
-
-import 'package:flutter/foundation.dart';
-import 'package:flutter/material.dart';
-
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: camel_case_types
-// ignore_for_file: prefer_single_quotes
-
-// This file is automatically generated. DO NOT EDIT, all your changes would be lost.
-class S implements WidgetsLocalizations {
- const S();
-
- static S current;
-
- static const GeneratedLocalizationsDelegate delegate =
- GeneratedLocalizationsDelegate();
-
- static S of(BuildContext context) => Localizations.of(context, S);
-
- @override
- TextDirection get textDirection => TextDirection.ltr;
-
-}
-
-class $en extends S {
- const $en();
-}
-
-class GeneratedLocalizationsDelegate extends LocalizationsDelegate {
- const GeneratedLocalizationsDelegate();
-
- List get supportedLocales {
- return const [
- Locale("en", ""),
- ];
- }
-
- LocaleListResolutionCallback listResolution({Locale fallback, bool withCountry = true}) {
- return (List locales, Iterable supported) {
- if (locales == null || locales.isEmpty) {
- return fallback ?? supported.first;
- } else {
- return _resolve(locales.first, fallback, supported, withCountry);
- }
- };
- }
-
- LocaleResolutionCallback resolution({Locale fallback, bool withCountry = true}) {
- return (Locale locale, Iterable supported) {
- return _resolve(locale, fallback, supported, withCountry);
- };
- }
-
- @override
- Future load(Locale locale) {
- final String lang = getLang(locale);
- if (lang != null) {
- switch (lang) {
- case "en":
- S.current = const $en();
- return SynchronousFuture(S.current);
- default:
- // NO-OP.
- }
- }
- S.current = const S();
- return SynchronousFuture(S.current);
- }
-
- @override
- bool isSupported(Locale locale) => _isSupported(locale, true);
-
- @override
- bool shouldReload(GeneratedLocalizationsDelegate old) => false;
-
- ///
- /// Internal method to resolve a locale from a list of locales.
- ///
- Locale _resolve(Locale locale, Locale fallback, Iterable supported, bool withCountry) {
- if (locale == null || !_isSupported(locale, withCountry)) {
- return fallback ?? supported.first;
- }
-
- final Locale languageLocale = Locale(locale.languageCode, "");
- if (supported.contains(locale)) {
- return locale;
- } else if (supported.contains(languageLocale)) {
- return languageLocale;
- } else {
- final Locale fallbackLocale = fallback ?? supported.first;
- return fallbackLocale;
- }
- }
-
- ///
- /// Returns true if the specified locale is supported, false otherwise.
- ///
- bool _isSupported(Locale locale, bool withCountry) {
- if (locale != null) {
- for (Locale supportedLocale in supportedLocales) {
- // Language must always match both locales.
- if (supportedLocale.languageCode != locale.languageCode) {
- continue;
- }
-
- // If country code matches, return this locale.
- if (supportedLocale.countryCode == locale.countryCode) {
- return true;
- }
-
- // If no country requirement is requested, check if this locale has no country.
- if (true != withCountry && (supportedLocale.countryCode == null || supportedLocale.countryCode.isEmpty)) {
- return true;
- }
- }
- }
- return false;
- }
-}
-
-String getLang(Locale l) => l == null
- ? null
- : l.countryCode != null && l.countryCode.isEmpty
- ? l.languageCode
- : l.toString();
diff --git a/example/lib/main.dart b/example/lib/main.dart
index 6262803..8774cb2 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -21,14 +21,14 @@ class MyApp extends StatelessWidget {
"WeChatRecordScreen": (BuildContext context) =>
new WeChatRecordScreen(),
"PathProviderScreen": (BuildContext context) =>
- new PathProviderScreen(),
+ new PathProviderScreen(title: "PathProviderScreen",),
},
);
}
}
class MyHomePage extends StatefulWidget {
- MyHomePage({Key key, this.title}) : super(key: key);
+ MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
@@ -51,22 +51,22 @@ class _MyHomePageState extends State {
child: new Column(
mainAxisSize: MainAxisSize.min,
children: [
- new FlatButton(
+ new TextButton(
onPressed: () {
Navigator.pushNamed(context, "RecordScreen");
},
child: new Text("进入语音录制界面")),
- new FlatButton(
+ new TextButton(
onPressed: () {
Navigator.pushNamed(context, "RecordMp3Screen");
},
child: new Text("进入录制mp3模式")),
- new FlatButton(
+ new TextButton(
onPressed: () {
Navigator.pushNamed(context, "WeChatRecordScreen");
},
child: new Text("进入仿微信录制界面")),
- new FlatButton(
+ new TextButton(
onPressed: () {
Navigator.pushNamed(context, "PathProviderScreen");
},
diff --git a/example/lib/path_provider_screen.dart b/example/lib/path_provider_screen.dart
index e991935..6a42a6f 100644
--- a/example/lib/path_provider_screen.dart
+++ b/example/lib/path_provider_screen.dart
@@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
import 'package:path_provider/path_provider.dart';
class PathProviderScreen extends StatefulWidget {
- PathProviderScreen({Key key, this.title}) : super(key: key);
+ PathProviderScreen({Key? key, required this.title}) : super(key: key);
final String title;
@override
@@ -12,13 +12,13 @@ class PathProviderScreen extends StatefulWidget {
}
class _PathProviderScreenState extends State {
- Future _tempDirectory;
- Future _appSupportDirectory;
- Future _appLibraryDirectory;
- Future _appDocumentsDirectory;
- Future _externalDocumentsDirectory;
- Future> _externalStorageDirectories;
- Future> _externalCacheDirectories;
+ late Future _tempDirectory;
+ late Future _appSupportDirectory;
+ late Future _appLibraryDirectory;
+ late Future _appDocumentsDirectory;
+ Future? _externalDocumentsDirectory;
+ Future?>? _externalStorageDirectories;
+ Future?>? _externalCacheDirectories;
void _requestTempDirectory() {
setState(() {
@@ -27,13 +27,13 @@ class _PathProviderScreenState extends State {
}
Widget _buildDirectory(
- BuildContext context, AsyncSnapshot snapshot) {
+ BuildContext context, AsyncSnapshot snapshot) {
Text text = const Text('');
if (snapshot.connectionState == ConnectionState.done) {
if (snapshot.hasError) {
text = Text('Error: ${snapshot.error}');
} else if (snapshot.hasData) {
- text = Text('path: ${snapshot.data.path}');
+ text = Text('path: ${snapshot.data?.path}');
} else {
text = const Text('path unavailable');
}
@@ -42,14 +42,14 @@ class _PathProviderScreenState extends State {
}
Widget _buildDirectories(
- BuildContext context, AsyncSnapshot> snapshot) {
+ BuildContext context, AsyncSnapshot?> snapshot) {
Text text = const Text('');
if (snapshot.connectionState == ConnectionState.done) {
if (snapshot.hasError) {
text = Text('Error: ${snapshot.error}');
} else if (snapshot.hasData) {
final String combined =
- snapshot.data.map((Directory d) => d.path).join(', ');
+ snapshot.data!.map((Directory? d) => d?.path).join(', ');
text = Text('paths: $combined');
} else {
text = const Text('path unavailable');
@@ -105,7 +105,7 @@ class _PathProviderScreenState extends State {
children: [
Padding(
padding: const EdgeInsets.all(16.0),
- child: RaisedButton(
+ child: TextButton(
child: const Text('Get Temporary Directory'),
onPressed: _requestTempDirectory,
),
@@ -114,7 +114,7 @@ class _PathProviderScreenState extends State {
future: _tempDirectory, builder: _buildDirectory),
Padding(
padding: const EdgeInsets.all(16.0),
- child: RaisedButton(
+ child: TextButton(
child: const Text('Get Application Documents Directory'),
onPressed: _requestAppDocumentsDirectory,
),
@@ -123,7 +123,7 @@ class _PathProviderScreenState extends State {
future: _appDocumentsDirectory, builder: _buildDirectory),
Padding(
padding: const EdgeInsets.all(16.0),
- child: RaisedButton(
+ child: TextButton(
child: const Text('Get Application Support Directory'),
onPressed: _requestAppSupportDirectory,
),
@@ -132,7 +132,7 @@ class _PathProviderScreenState extends State {
future: _appSupportDirectory, builder: _buildDirectory),
Padding(
padding: const EdgeInsets.all(16.0),
- child: RaisedButton(
+ child: TextButton(
child: const Text('Get Application Library Directory'),
onPressed: _requestAppLibraryDirectory,
),
@@ -141,19 +141,19 @@ class _PathProviderScreenState extends State {
future: _appLibraryDirectory, builder: _buildDirectory),
Padding(
padding: const EdgeInsets.all(16.0),
- child: RaisedButton(
+ child: TextButton(
child: Text(
'${Platform.isIOS ? "External directories are unavailable " "on iOS" : "Get External Storage Directory"}'),
onPressed:
Platform.isIOS ? null : _requestExternalStorageDirectory,
),
),
- FutureBuilder(
+ FutureBuilder(
future: _externalDocumentsDirectory, builder: _buildDirectory),
Column(children: [
Padding(
padding: const EdgeInsets.all(16.0),
- child: RaisedButton(
+ child: TextButton(
child: Text(
'${Platform.isIOS ? "External directories are unavailable " "on iOS" : "Get External Storage Directories"}'),
onPressed: Platform.isIOS
@@ -166,13 +166,13 @@ class _PathProviderScreenState extends State {
),
),
]),
- FutureBuilder>(
- future: _externalStorageDirectories,
+ FutureBuilder?>(
+ future: _externalStorageDirectories!,
builder: _buildDirectories),
Column(children: [
Padding(
padding: const EdgeInsets.all(16.0),
- child: RaisedButton(
+ child: TextButton(
child: Text(
'${Platform.isIOS ? "External directories are unavailable " "on iOS" : "Get External Cache Directories"}'),
onPressed:
@@ -180,7 +180,7 @@ class _PathProviderScreenState extends State {
),
),
]),
- FutureBuilder>(
+ FutureBuilder?>(
future: _externalCacheDirectories, builder: _buildDirectories),
],
),
diff --git a/example/lib/record_mp3_screen.dart b/example/lib/record_mp3_screen.dart
index bac800f..2caedf4 100644
--- a/example/lib/record_mp3_screen.dart
+++ b/example/lib/record_mp3_screen.dart
@@ -32,19 +32,19 @@ class _RecordMp3ScreenState extends State {
recordPlugin.response.listen((data) {
if (data.msg == "onStop") {
///结束录制时会返回录制文件的地址方便上传服务器
- print("onStop 文件路径" + data.path);
- filePath = data.path;
+ print("onStop 文件路径" + data.path!);
+ filePath = data.path!;
print("onStop 时长 " + data.audioTimeLength.toString());
} else if (data.msg == "onStart") {
print("onStart --");
} else {
- print("--" + data.msg);
+ print("--" + (data.msg ?? ""));
}
});
///录制过程监听录制的声音的大小 方便做语音动画显示图片的样式
recordPlugin.responseFromAmplitude.listen((data) {
- var voiceData = double.parse(data.msg);
+ var voiceData = double.parse(data.msg ?? "0");
print("振幅大小 " + voiceData.toString());
});
@@ -63,55 +63,55 @@ class _RecordMp3ScreenState extends State {
body: Center(
child: Column(
children: [
- FlatButton(
+ TextButton(
child: Text("初始化录制mp3"),
onPressed: () {
_initRecordMp3();
},
),
- FlatButton(
+ TextButton(
child: Text("开始录制"),
onPressed: () {
start();
},
),
- FlatButton(
+ TextButton(
child: Text("根据路径录制mp3文件"),
onPressed: () {
_requestAppDocumentsDirectory();
},
),
- FlatButton(
+ TextButton(
child: Text("停止录制"),
onPressed: () {
stop();
},
),
- FlatButton(
+ TextButton(
child: Text("播放"),
onPressed: () {
play();
},
),
- FlatButton(
+ TextButton(
child: Text("播放本地指定路径录音文件"),
onPressed: () {
playByPath(filePath,"file");
},
),
- FlatButton(
+ TextButton(
child: Text("播放网络mp3文件"),
onPressed: () {
playByPath("https://test-1259809289.cos.ap-nanjing.myqcloud.com/temp.mp3","url");
},
),
- FlatButton(
+ TextButton(
child: Text("暂停|继续播放"),
onPressed: () {
pause();
},
),
- FlatButton(
+ TextButton(
child: Text("停止播放"),
onPressed: () {
stopPlay();
diff --git a/example/lib/record_screen.dart b/example/lib/record_screen.dart
index 0d8062b..f7c4333 100644
--- a/example/lib/record_screen.dart
+++ b/example/lib/record_screen.dart
@@ -32,19 +32,19 @@ class _RecordScreenState extends State {
recordPlugin.response.listen((data) {
if (data.msg == "onStop") {
///结束录制时会返回录制文件的地址方便上传服务器
- print("onStop 文件路径" + data.path);
- filePath = data.path;
+ print("onStop 文件路径" + data.path!);
+ filePath = data.path!;
print("onStop 时长 " + data.audioTimeLength.toString());
} else if (data.msg == "onStart") {
print("onStart --");
} else {
- print("--" + data.msg);
+ print("--" + (data.msg ?? ""));
}
});
///录制过程监听录制的声音的大小 方便做语音动画显示图片的样式
recordPlugin.responseFromAmplitude.listen((data) {
- var voiceData = double.parse(data.msg);
+ var voiceData = double.parse(data.msg ?? "0");
print("振幅大小 " + voiceData.toString());
});
@@ -63,55 +63,55 @@ class _RecordScreenState extends State {
body: Center(
child: Column(
children: [
- FlatButton(
+ TextButton(
child: Text("初始化"),
onPressed: () {
_init();
},
),
- FlatButton(
+ TextButton(
child: Text("开始录制"),
onPressed: () {
start();
},
),
- FlatButton(
+ TextButton(
child: Text("根据路径录制wav文件"),
onPressed: () {
_requestAppDocumentsDirectory();
},
),
- FlatButton(
+ TextButton(
child: Text("停止录制"),
onPressed: () {
stop();
},
),
- FlatButton(
+ TextButton(
child: Text("播放"),
onPressed: () {
play();
},
),
- FlatButton(
+ TextButton(
child: Text("播放本地指定路径录音文件"),
onPressed: () {
playByPath(filePath,"file");
},
),
- FlatButton(
+ TextButton(
child: Text("播放网络wav文件"),
onPressed: () {
playByPath("https://test-1259809289.cos.ap-nanjing.myqcloud.com/test.wav","url");
},
),
- FlatButton(
+ TextButton(
child: Text("暂停|继续播放"),
onPressed: () {
pause();
},
),
- FlatButton(
+ TextButton(
child: Text("停止播放"),
onPressed: () {
stopPlay();
diff --git a/example/lib/wechat_record_screen.dart b/example/lib/wechat_record_screen.dart
index 999ee06..fe9a6b9 100644
--- a/example/lib/wechat_record_screen.dart
+++ b/example/lib/wechat_record_screen.dart
@@ -8,7 +8,7 @@ class WeChatRecordScreen extends StatefulWidget {
class _WeChatRecordScreenState extends State {
String toastShow = "悬浮框";
- OverlayEntry overlayEntry;
+ OverlayEntry? overlayEntry;
showView(BuildContext context) {
if (overlayEntry == null) {
@@ -48,7 +48,7 @@ class _WeChatRecordScreenState extends State {
),
);
});
- Overlay.of(context).insert(overlayEntry);
+ Overlay.of(context)?.insert(overlayEntry!);
}
}
@@ -71,25 +71,25 @@ class _WeChatRecordScreenState extends State {
body: Container(
child: Column(
children: [
- new FlatButton(
+ new TextButton(
onPressed: () {
showView(context);
},
child: new Text("悬浮组件")),
- new FlatButton(
+ new TextButton(
onPressed: () {
if (overlayEntry != null) {
- overlayEntry.remove();
+ overlayEntry?.remove();
overlayEntry = null;
}
},
child: new Text("隐藏悬浮组件")),
- new FlatButton(
+ new TextButton(
onPressed: () {
setState(() {
toastShow = "111";
if (overlayEntry != null) {
- overlayEntry.markNeedsBuild();
+ overlayEntry?.markNeedsBuild();
}
});
},
diff --git a/example/pubspec.lock b/example/pubspec.lock
index 6b86837..4a0029c 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -5,62 +5,63 @@ packages:
dependency: transitive
description:
name: async
+ sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
url: "https://pub.flutter-io.cn"
source: hosted
- version: "2.5.0"
+ version: "2.10.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
+ sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "2.1.0"
+ version: "2.1.1"
characters:
dependency: transitive
description:
name: characters
+ sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.1.0"
- charcode:
- dependency: transitive
- description:
- name: charcode
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "1.2.0"
+ version: "1.2.1"
clock:
dependency: transitive
description:
name: clock
+ sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.1.0"
+ version: "1.1.1"
collection:
dependency: transitive
description:
name: collection
+ sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.15.0"
+ version: "1.17.0"
common_utils:
dependency: transitive
description:
name: common_utils
+ sha256: c26884339b13ff99b0739e56f4b02090c84054ed9dd3a045435cd24e7b99c2c1
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.2.1"
+ version: "2.1.0"
convert:
dependency: transitive
description:
name: convert
+ sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "2.1.1"
+ version: "3.1.1"
crypto:
dependency: transitive
description:
name: crypto
+ sha256: "8be10341257b613566fdc9fd073c46f7c032ed329b1c732bda17aca29f2366c8"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
@@ -68,6 +69,7 @@ packages:
dependency: "direct main"
description:
name: cupertino_icons
+ sha256: a937da4c006989739ceb4d10e3bd6cce64ca85d0fe287fc5b2b9f6ee757dcee6
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3"
@@ -75,37 +77,42 @@ packages:
dependency: transitive
description:
name: decimal
+ sha256: "3333c7848a8fc47a07f1b30b477f00bec598ea19c1667f49db646ca5465aa247"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.3.5"
+ version: "2.3.0"
fake_async:
dependency: transitive
description:
name: fake_async
+ sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.2.0"
+ version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
+ sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.1.3"
+ version: "2.0.1"
file:
dependency: transitive
description:
name: file
+ sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "5.2.1"
+ version: "6.1.4"
flustars:
dependency: "direct main"
description:
name: flustars
+ sha256: "7019ab8d68c0d4759ee122644d91a165d450b0492717f9e7e9d0ce277dcf664b"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.3.3"
+ version: "2.0.1"
flutter:
dependency: "direct main"
description: flutter
@@ -117,7 +124,7 @@ packages:
path: ".."
relative: true
source: path
- version: "1.0.0"
+ version: "1.0.1"
flutter_test:
dependency: "direct dev"
description: flutter
@@ -129,145 +136,205 @@ packages:
source: sdk
version: "0.0.0"
intl:
- dependency: transitive
+ dependency: "direct main"
description:
name: intl
+ sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.16.1"
+ version: "0.17.0"
js:
dependency: transitive
description:
name: js
+ sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.6.3"
+ version: "0.6.5"
matcher:
dependency: transitive
description:
name: matcher
+ sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "0.12.13"
+ material_color_utilities:
+ dependency: transitive
+ description:
+ name: material_color_utilities
+ sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.12.10"
+ version: "0.2.0"
meta:
dependency: transitive
description:
name: meta
+ sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.3.0"
+ version: "1.8.0"
path:
dependency: transitive
description:
name: path
+ sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.8.0"
+ version: "1.8.2"
path_provider:
dependency: "direct main"
description:
name: path_provider
+ sha256: "050e8e85e4b7fecdf2bb3682c1c64c4887a183720c802d323de8a5fd76d372dd"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.6.24"
+ version: "2.0.11"
+ path_provider_android:
+ dependency: transitive
+ description:
+ name: path_provider_android
+ sha256: "1dab723dd8feeb80afb39c7be894f09df1457243d930010f6f328fb8c660c5e1"
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "2.0.21"
+ path_provider_ios:
+ dependency: transitive
+ description:
+ name: path_provider_ios
+ sha256: "03d639406f5343478352433f00d3c4394d52dac8df3d847869c5e2333e0bbce8"
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "2.0.11"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
+ sha256: ab0987bf95bc591da42dffb38c77398fc43309f0b9b894dcc5d6f40c4b26c379
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.0.1+2"
+ version: "2.1.7"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
+ sha256: "2a97e7fbb7ae9dcd0dfc1220a78e9ec3e71da691912e617e8715ff2a13086ae8"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.0.4+6"
+ version: "2.0.6"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
+ sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.0.4"
+ version: "2.0.5"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
+ sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.0.4+3"
+ version: "2.1.3"
platform:
dependency: transitive
description:
name: platform
+ sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "2.2.1"
+ version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
+ sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.0.3"
+ version: "2.1.3"
process:
dependency: transitive
description:
name: process
+ sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "3.0.13"
+ version: "4.2.4"
rational:
dependency: transitive
description:
name: rational
+ sha256: "783116b22b98170bfaf6eaac2d8d5e58a308a343ac8be12815444ee73147430a"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.3.8"
+ version: "2.2.0"
shared_preferences:
dependency: transitive
description:
name: shared_preferences
+ sha256: "76917b7d4b9526b2ba416808a7eb9fb2863c1a09cf63ec85f1453da240fa818a"
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "2.0.15"
+ shared_preferences_android:
+ dependency: transitive
+ description:
+ name: shared_preferences_android
+ sha256: "8e251f3c986002b65fed6396bce81f379fb63c27317d49743cf289fd0fd1ab97"
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "2.0.14"
+ shared_preferences_ios:
+ dependency: transitive
+ description:
+ name: shared_preferences_ios
+ sha256: "585a14cefec7da8c9c2fb8cd283a3bb726b4155c0952afe6a0caaa7b2272de34"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.5.12+4"
+ version: "2.1.1"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
+ sha256: "28aefc1261746e7bad3d09799496054beb84e8c4ffcdfed7734e17b4ada459a5"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.0.2+4"
+ version: "2.1.1"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
+ sha256: fbb94bf296576f49be37a1496d5951796211a8db0aa22cc0d68c46440dad808c
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.0.1+11"
+ version: "2.0.4"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
+ sha256: da9431745ede5ece47bc26d5d73a9d3c6936ef6945c101a5aca46f62e52c1cf3
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.0.4"
+ version: "2.1.0"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
+ sha256: a4b5bc37fe1b368bbc81f953197d55e12f49d0296e7e412dfe2d2d77d6929958
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.1.2+7"
+ version: "2.0.4"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
+ sha256: "97f7ab9a7da96d9cf19581f5de520ceb529548498bd6b5e0ccd02d68a0d15eba"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.0.1+3"
+ version: "2.1.1"
sky_engine:
dependency: transitive
description: flutter
@@ -277,62 +344,71 @@ packages:
dependency: transitive
description:
name: source_span
+ sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.8.0"
+ version: "1.9.1"
sp_util:
dependency: transitive
description:
name: sp_util
+ sha256: "9da43dce5de79c17a787d0626bf01538d63090ca32521200d22a232171c495dc"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.0.1"
+ version: "2.0.3"
stack_trace:
dependency: transitive
description:
name: stack_trace
+ sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.10.0"
+ version: "1.11.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
+ sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "2.1.0"
+ version: "2.1.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
+ sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.1.0"
+ version: "1.2.0"
synchronized:
dependency: transitive
description:
name: synchronized
+ sha256: "7b530acd9cb7c71b0019a1e7fa22c4105e675557a4400b6a401c71c5e0ade1ac"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "2.2.0+2"
+ version: "3.0.0+3"
term_glyph:
dependency: transitive
description:
name: term_glyph
+ sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.2.0"
+ version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
+ sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.2.19"
+ version: "0.4.16"
typed_data:
dependency: transitive
description:
name: typed_data
+ sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
@@ -340,30 +416,34 @@ packages:
dependency: transitive
description:
name: uuid
+ sha256: "2469694ad079893e3b434a627970c33f2fa5adc46dfe03c9617546969a9a8afc"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "3.0.2"
+ version: "3.0.6"
vector_math:
dependency: transitive
description:
name: vector_math
+ sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "2.1.0"
+ version: "2.1.4"
win32:
dependency: transitive
description:
name: win32
+ sha256: "8c9f247c668da68597c44a04b60b5fa79f70f3f6a5b6ef28f5a4726f1febef78"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.7.4"
+ version: "3.1.0"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
+ sha256: "11541eedefbcaec9de35aa82650b695297ce668662bbd6e3911a7fabdbde589f"
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.1.0"
+ version: "0.2.0+2"
sdks:
- dart: ">=2.12.0-29.10.beta <3.0.0"
- flutter: ">=1.12.13+hotfix.5"
+ dart: ">=2.18.0 <3.0.0"
+ flutter: ">=3.0.0"
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index 3afbace..5405436 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
- sdk: ">=2.7.0 <3.0.0"
+ sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
@@ -28,8 +28,9 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3
- path_provider: ^1.6.8
- flustars: ^0.3.2
+ path_provider: ^2.0.2
+ flustars: ^2.0.1
+ intl: ^0.17.0
dev_dependencies:
flutter_test:
diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart
index 0dc07e7..659d517 100644
--- a/example/test/widget_test.dart
+++ b/example/test/widget_test.dart
@@ -19,7 +19,7 @@ void main() {
expect(
find.byWidgetPredicate(
(Widget widget) => widget is Text &&
- widget.data.startsWith('Running on:'),
+ (widget.data?.startsWith('Running on:') ?? false) ,
),
findsOneWidget,
);
diff --git a/flutter_plugin_record.iml b/flutter_plugin_record.iml
index c60f6de..8d6d26b 100644
--- a/flutter_plugin_record.iml
+++ b/flutter_plugin_record.iml
@@ -23,5 +23,6 @@
+
\ No newline at end of file
diff --git a/pubspec.lock b/pubspec.lock
deleted file mode 100644
index 1c89f21..0000000
--- a/pubspec.lock
+++ /dev/null
@@ -1,161 +0,0 @@
-# Generated by pub
-# See https://dart.dev/tools/pub/glossary#lockfile
-packages:
- async:
- dependency: transitive
- description:
- name: async
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "2.5.0"
- boolean_selector:
- dependency: transitive
- description:
- name: boolean_selector
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "2.1.0"
- characters:
- dependency: transitive
- description:
- name: characters
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "1.1.0"
- charcode:
- dependency: transitive
- description:
- name: charcode
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "1.2.0"
- clock:
- dependency: transitive
- description:
- name: clock
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "1.1.0"
- collection:
- dependency: transitive
- description:
- name: collection
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "1.15.0"
- crypto:
- dependency: transitive
- description:
- name: crypto
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "3.0.0"
- fake_async:
- dependency: transitive
- description:
- name: fake_async
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "1.2.0"
- flutter:
- dependency: "direct main"
- description: flutter
- source: sdk
- version: "0.0.0"
- flutter_test:
- dependency: "direct dev"
- description: flutter
- source: sdk
- version: "0.0.0"
- matcher:
- dependency: transitive
- description:
- name: matcher
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "0.12.10"
- meta:
- dependency: transitive
- description:
- name: meta
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "1.3.0"
- path:
- dependency: transitive
- description:
- name: path
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "1.8.0"
- sky_engine:
- dependency: transitive
- description: flutter
- source: sdk
- version: "0.0.99"
- source_span:
- dependency: transitive
- description:
- name: source_span
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "1.8.0"
- stack_trace:
- dependency: transitive
- description:
- name: stack_trace
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "1.10.0"
- stream_channel:
- dependency: transitive
- description:
- name: stream_channel
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "2.1.0"
- string_scanner:
- dependency: transitive
- description:
- name: string_scanner
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "1.1.0"
- term_glyph:
- dependency: transitive
- description:
- name: term_glyph
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "1.2.0"
- test_api:
- dependency: transitive
- description:
- name: test_api
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "0.2.19"
- typed_data:
- dependency: transitive
- description:
- name: typed_data
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "1.3.0"
- uuid:
- dependency: "direct main"
- description:
- name: uuid
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "3.0.2"
- vector_math:
- dependency: transitive
- description:
- name: vector_math
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "2.1.0"
-sdks:
- dart: ">=2.12.0-29.10.beta <3.0.0"
- flutter: ">=1.12.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index db4ef10..3b39cba 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -15,7 +15,8 @@ environment:
dependencies:
flutter:
sdk: flutter
- uuid: ^3.0.0
+ uuid: ^3.0.6
+# intl: ^0.17.0
dev_dependencies:
flutter_test:
@@ -80,3 +81,5 @@ flutter:
#
# For details regarding fonts in packages, see
# https://flutter.dev/custom-fonts/#from-packages
+#flutter_intl:
+# enabled: true