Commit b2d7291578b854f561194139df54f98dc82d16ed

Authored by weixin_45529955
1 parent 7341bd6f

我的页面(语音播报)+home页(语音转文本)

Showing 100 changed files with 2359 additions and 107 deletions

Too many changes to show.

To preserve performance only 100 of 100+ files are displayed.

@@ -40,6 +40,7 @@ import 'package:one_key/utils/dialog_util.dart'; @@ -40,6 +40,7 @@ import 'package:one_key/utils/dialog_util.dart';
40 40
41 import 'package:one_key/route/navigator_util.dart'; 41 import 'package:one_key/route/navigator_util.dart';
42 import 'package:one_key/utils/utils.dart'; 42 import 'package:one_key/utils/utils.dart';
  43 +import 'package:permission_handler/permission_handler.dart';
43 import 'package:provider/provider.dart'; 44 import 'package:provider/provider.dart';
44 import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; 45 import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart';
45 import 'package:flutter_app_badger/flutter_app_badger.dart'; 46 import 'package:flutter_app_badger/flutter_app_badger.dart';
@@ -67,6 +68,9 @@ import '../../provider/table_manage_model.dart'; @@ -67,6 +68,9 @@ import '../../provider/table_manage_model.dart';
67 import '../../utils/event_bus.dart'; 68 import '../../utils/event_bus.dart';
68 import '../../utils/screen_util.dart'; 69 import '../../utils/screen_util.dart';
69 import '../feast/feast_page.dart'; 70 import '../feast/feast_page.dart';
  71 +
  72 +// import 'package:sherpa_onnx/sherpa_onnx.dart';
  73 +import 'package:speech_to_text_wdn_ohos/speech_to_text_wdn_ohos.dart';
70 // import 'package:sipflutterplugin/sipflutterplugin.dart'; 74 // import 'package:sipflutterplugin/sipflutterplugin.dart';
71 75
72 class HomePage extends StatefulWidget { 76 class HomePage extends StatefulWidget {
@@ -273,6 +277,9 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { @@ -273,6 +277,9 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
273 // bus.on('refresh_token', (arg) { 277 // bus.on('refresh_token', (arg) {
274 // initPlatformState(); 278 // initPlatformState();
275 // }); 279 // });
  280 + if (Platform.isOhos) {
  281 + _speechToText();
  282 + }
276 getSellerVersion(); 283 getSellerVersion();
277 284
278 initPlatformState(); 285 initPlatformState();
@@ -374,6 +381,22 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { @@ -374,6 +381,22 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
374 } 381 }
375 } 382 }
376 383
  384 +/**
  385 + * 语音转文本 鸿蒙
  386 + */
  387 + _speechToText() async {
  388 + Utils.getPickPermission(context, () async {
  389 + final _speechToTextWdnOhosPlugin = SpeechToTextWdnOhos();
  390 + String? result =
  391 + await _speechToTextWdnOhosPlugin.init() ?? 'Unknown platform version';
  392 + print(result);
  393 +
  394 + if (Navigator.canPop(context)) {
  395 + Navigator.pop(context);
  396 + }
  397 + }, Permission.microphone);
  398 + }
  399 +
377 _version() { 400 _version() {
378 if (collectStoreProvider!.sellerVersionList.length > 0) { 401 if (collectStoreProvider!.sellerVersionList.length > 0) {
379 //获取到店铺过期时间 402 //获取到店铺过期时间
@@ -43,6 +43,8 @@ import '../../provider/store_base_info_provider.dart'; @@ -43,6 +43,8 @@ import '../../provider/store_base_info_provider.dart';
43 import '../../utils/dialog_util.dart'; 43 import '../../utils/dialog_util.dart';
44 import '../../utils/screen_util.dart'; 44 import '../../utils/screen_util.dart';
45 45
  46 +import 'package:flutter_tts/flutter_tts.dart';
  47 +
46 class MyPage extends StatefulWidget { 48 class MyPage extends StatefulWidget {
47 @override 49 @override
48 State<StatefulWidget> createState() { 50 State<StatefulWidget> createState() {
@@ -66,11 +68,18 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -66,11 +68,18 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
66 late CollectStoreProvider collectStoreProvider; 68 late CollectStoreProvider collectStoreProvider;
67 bool isStoreWine = false; 69 bool isStoreWine = false;
68 70
  71 + FlutterTts tts = FlutterTts();
  72 +
69 @override 73 @override
70 void initState() { 74 void initState() {
71 // TODO: implement initState 75 // TODO: implement initState
72 super.initState(); 76 super.initState();
73 77
  78 + tts.awaitSpeakCompletion(true);
  79 + tts.startHandler = () {
  80 + print('start');
  81 + };
  82 +
74 controller = ScrollController(initialScrollOffset: 0.0); 83 controller = ScrollController(initialScrollOffset: 0.0);
75 WidgetsBinding.instance.addObserver(this); 84 WidgetsBinding.instance.addObserver(this);
76 Utils.changeStatusColor(color: MyColours.color_438E93); 85 Utils.changeStatusColor(color: MyColours.color_438E93);
@@ -365,14 +374,14 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -365,14 +374,14 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
365 //检查版本更新 374 //检查版本更新
366 checkUpdate() async { 375 checkUpdate() async {
367 // if (Platform.isIOS || Platform.isAndroid) { 376 // if (Platform.isIOS || Platform.isAndroid) {
368 - UpdateModelMy updateModel = new UpdateModelMy();  
369 - updateModel.checkUpdate(context, (version) {  
370 - _version = version;  
371 - setState(() {  
372 - newVersion = true;  
373 - });  
374 - // updateModel.showUpdateDialog(context, version);  
375 - }, showToast: false); 377 + UpdateModelMy updateModel = new UpdateModelMy();
  378 + updateModel.checkUpdate(context, (version) {
  379 + _version = version;
  380 + setState(() {
  381 + newVersion = true;
  382 + });
  383 + // updateModel.showUpdateDialog(context, version);
  384 + }, showToast: false);
376 // } else if (Platform.isOhos) { 385 // } else if (Platform.isOhos) {
377 // // newVersion = await Utils.checkUpdateOhos(); 386 // // newVersion = await Utils.checkUpdateOhos();
378 // // setState(() {}); 387 // // setState(() {});
@@ -1327,7 +1336,19 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1327,7 +1336,19 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1327 context, '客户存酒') || 1336 context, '客户存酒') ||
1328 isStoreWine))), 1337 isStoreWine))),
1329 InkWell( 1338 InkWell(
1330 - onTap: () {}, child: _item('', '空空空空')), 1339 + onTap: () async {
  1340 + try {
  1341 +
  1342 + var rss = await tts.speak(
  1343 + '12月30日营业额是30000,总预订数是50桌,同比上涨3%,环比上涨6%。',
  1344 + focus: false);
  1345 + print('rss');
  1346 + } catch (e) {
  1347 + print(e);
  1348 + }
  1349 + },
  1350 + child: _item(
  1351 + Utils.getImgPath('khcj'), '语音播报')),
1331 InkWell( 1352 InkWell(
1332 onTap: () {}, child: _item('', '空空空空')), 1353 onTap: () {}, child: _item('', '空空空空')),
1333 ]) 1354 ])
@@ -1784,7 +1805,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1784,7 +1805,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1784 VEmptyView(48), 1805 VEmptyView(48),
1785 InkWell( 1806 InkWell(
1786 onTap: () async { 1807 onTap: () async {
1787 - if ( Platform.isAndroid) { 1808 + if (Platform.isAndroid) {
1788 UserModel usermodel = 1809 UserModel usermodel =
1789 Provider.of<UserModel>(context, 1810 Provider.of<UserModel>(context,
1790 listen: false); 1811 listen: false);
@@ -1793,14 +1814,14 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1793,14 +1814,14 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1793 return; 1814 return;
1794 } 1815 }
1795 } 1816 }
1796 - if (newVersion) {  
1797 - UpdateModelMy updateModel =  
1798 - new UpdateModelMy();  
1799 - updateModel.showUpdateDialog(  
1800 - context, _version);  
1801 - } else {  
1802 - Utils.showToast("当前已是最新版本");  
1803 - } 1817 + if (newVersion) {
  1818 + UpdateModelMy updateModel =
  1819 + new UpdateModelMy();
  1820 + updateModel.showUpdateDialog(
  1821 + context, _version);
  1822 + } else {
  1823 + Utils.showToast("当前已是最新版本");
  1824 + }
1804 // else if (Platform.isOhos) { 1825 // else if (Platform.isOhos) {
1805 // if (newVersion) { 1826 // if (newVersion) {
1806 // // UpdateModelMy updateModel = 1827 // // UpdateModelMy updateModel =
@@ -37,10 +37,10 @@ packages: @@ -37,10 +37,10 @@ packages:
37 dependency: transitive 37 dependency: transitive
38 description: 38 description:
39 name: collection 39 name: collection
40 - sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf 40 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
41 url: "https://pub.flutter-io.cn" 41 url: "https://pub.flutter-io.cn"
42 source: hosted 42 source: hosted
43 - version: "1.19.0" 43 + version: "1.18.0"
44 fake_async: 44 fake_async:
45 dependency: transitive 45 dependency: transitive
46 description: 46 description:
@@ -71,18 +71,18 @@ packages: @@ -71,18 +71,18 @@ packages:
71 dependency: transitive 71 dependency: transitive
72 description: 72 description:
73 name: leak_tracker 73 name: leak_tracker
74 - sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" 74 + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
75 url: "https://pub.flutter-io.cn" 75 url: "https://pub.flutter-io.cn"
76 source: hosted 76 source: hosted
77 - version: "10.0.7" 77 + version: "10.0.4"
78 leak_tracker_flutter_testing: 78 leak_tracker_flutter_testing:
79 dependency: transitive 79 dependency: transitive
80 description: 80 description:
81 name: leak_tracker_flutter_testing 81 name: leak_tracker_flutter_testing
82 - sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" 82 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
83 url: "https://pub.flutter-io.cn" 83 url: "https://pub.flutter-io.cn"
84 source: hosted 84 source: hosted
85 - version: "3.0.8" 85 + version: "3.0.3"
86 leak_tracker_testing: 86 leak_tracker_testing:
87 dependency: transitive 87 dependency: transitive
88 description: 88 description:
@@ -111,18 +111,18 @@ packages: @@ -111,18 +111,18 @@ packages:
111 dependency: transitive 111 dependency: transitive
112 description: 112 description:
113 name: material_color_utilities 113 name: material_color_utilities
114 - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec 114 + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
115 url: "https://pub.flutter-io.cn" 115 url: "https://pub.flutter-io.cn"
116 source: hosted 116 source: hosted
117 - version: "0.11.1" 117 + version: "0.8.0"
118 meta: 118 meta:
119 dependency: transitive 119 dependency: transitive
120 description: 120 description:
121 name: meta 121 name: meta
122 - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 122 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
123 url: "https://pub.flutter-io.cn" 123 url: "https://pub.flutter-io.cn"
124 source: hosted 124 source: hosted
125 - version: "1.15.0" 125 + version: "1.12.0"
126 path: 126 path:
127 dependency: transitive 127 dependency: transitive
128 description: 128 description:
@@ -143,7 +143,7 @@ packages: @@ -143,7 +143,7 @@ packages:
143 dependency: transitive 143 dependency: transitive
144 description: flutter 144 description: flutter
145 source: sdk 145 source: sdk
146 - version: "0.0.0" 146 + version: "0.0.99"
147 source_span: 147 source_span:
148 dependency: transitive 148 dependency: transitive
149 description: 149 description:
@@ -156,10 +156,10 @@ packages: @@ -156,10 +156,10 @@ packages:
156 dependency: transitive 156 dependency: transitive
157 description: 157 description:
158 name: stack_trace 158 name: stack_trace
159 - sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" 159 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
160 url: "https://pub.flutter-io.cn" 160 url: "https://pub.flutter-io.cn"
161 source: hosted 161 source: hosted
162 - version: "1.12.0" 162 + version: "1.11.1"
163 stream_channel: 163 stream_channel:
164 dependency: transitive 164 dependency: transitive
165 description: 165 description:
@@ -172,10 +172,10 @@ packages: @@ -172,10 +172,10 @@ packages:
172 dependency: transitive 172 dependency: transitive
173 description: 173 description:
174 name: string_scanner 174 name: string_scanner
175 - sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" 175 + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
176 url: "https://pub.flutter-io.cn" 176 url: "https://pub.flutter-io.cn"
177 source: hosted 177 source: hosted
178 - version: "1.3.0" 178 + version: "1.2.0"
179 term_glyph: 179 term_glyph:
180 dependency: transitive 180 dependency: transitive
181 description: 181 description:
@@ -188,10 +188,10 @@ packages: @@ -188,10 +188,10 @@ packages:
188 dependency: transitive 188 dependency: transitive
189 description: 189 description:
190 name: test_api 190 name: test_api
191 - sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" 191 + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
192 url: "https://pub.flutter-io.cn" 192 url: "https://pub.flutter-io.cn"
193 source: hosted 193 source: hosted
194 - version: "0.7.3" 194 + version: "0.7.0"
195 vector_math: 195 vector_math:
196 dependency: transitive 196 dependency: transitive
197 description: 197 description:
@@ -204,10 +204,10 @@ packages: @@ -204,10 +204,10 @@ packages:
204 dependency: transitive 204 dependency: transitive
205 description: 205 description:
206 name: vm_service 206 name: vm_service
207 - sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b 207 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
208 url: "https://pub.flutter-io.cn" 208 url: "https://pub.flutter-io.cn"
209 source: hosted 209 source: hosted
210 - version: "14.3.0" 210 + version: "14.2.1"
211 sdks: 211 sdks:
212 - dart: ">=3.4.0 <4.0.0" 212 + dart: ">=3.3.0 <4.0.0"
213 flutter: ">=3.18.0-18.0.pre.54" 213 flutter: ">=3.18.0-18.0.pre.54"
@@ -37,10 +37,10 @@ packages: @@ -37,10 +37,10 @@ packages:
37 dependency: transitive 37 dependency: transitive
38 description: 38 description:
39 name: collection 39 name: collection
40 - sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf 40 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
41 url: "https://pub.flutter-io.cn" 41 url: "https://pub.flutter-io.cn"
42 source: hosted 42 source: hosted
43 - version: "1.19.0" 43 + version: "1.18.0"
44 fake_async: 44 fake_async:
45 dependency: transitive 45 dependency: transitive
46 description: 46 description:
@@ -79,18 +79,18 @@ packages: @@ -79,18 +79,18 @@ packages:
79 dependency: transitive 79 dependency: transitive
80 description: 80 description:
81 name: leak_tracker 81 name: leak_tracker
82 - sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" 82 + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
83 url: "https://pub.flutter-io.cn" 83 url: "https://pub.flutter-io.cn"
84 source: hosted 84 source: hosted
85 - version: "10.0.7" 85 + version: "10.0.4"
86 leak_tracker_flutter_testing: 86 leak_tracker_flutter_testing:
87 dependency: transitive 87 dependency: transitive
88 description: 88 description:
89 name: leak_tracker_flutter_testing 89 name: leak_tracker_flutter_testing
90 - sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" 90 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
91 url: "https://pub.flutter-io.cn" 91 url: "https://pub.flutter-io.cn"
92 source: hosted 92 source: hosted
93 - version: "3.0.8" 93 + version: "3.0.3"
94 leak_tracker_testing: 94 leak_tracker_testing:
95 dependency: transitive 95 dependency: transitive
96 description: 96 description:
@@ -119,18 +119,18 @@ packages: @@ -119,18 +119,18 @@ packages:
119 dependency: transitive 119 dependency: transitive
120 description: 120 description:
121 name: material_color_utilities 121 name: material_color_utilities
122 - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec 122 + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
123 url: "https://pub.flutter-io.cn" 123 url: "https://pub.flutter-io.cn"
124 source: hosted 124 source: hosted
125 - version: "0.11.1" 125 + version: "0.8.0"
126 meta: 126 meta:
127 dependency: transitive 127 dependency: transitive
128 description: 128 description:
129 name: meta 129 name: meta
130 - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 130 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
131 url: "https://pub.flutter-io.cn" 131 url: "https://pub.flutter-io.cn"
132 source: hosted 132 source: hosted
133 - version: "1.15.0" 133 + version: "1.12.0"
134 path: 134 path:
135 dependency: transitive 135 dependency: transitive
136 description: 136 description:
@@ -143,7 +143,7 @@ packages: @@ -143,7 +143,7 @@ packages:
143 dependency: transitive 143 dependency: transitive
144 description: flutter 144 description: flutter
145 source: sdk 145 source: sdk
146 - version: "0.0.0" 146 + version: "0.0.99"
147 source_span: 147 source_span:
148 dependency: transitive 148 dependency: transitive
149 description: 149 description:
@@ -156,10 +156,10 @@ packages: @@ -156,10 +156,10 @@ packages:
156 dependency: transitive 156 dependency: transitive
157 description: 157 description:
158 name: stack_trace 158 name: stack_trace
159 - sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" 159 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
160 url: "https://pub.flutter-io.cn" 160 url: "https://pub.flutter-io.cn"
161 source: hosted 161 source: hosted
162 - version: "1.12.0" 162 + version: "1.11.1"
163 stream_channel: 163 stream_channel:
164 dependency: transitive 164 dependency: transitive
165 description: 165 description:
@@ -172,10 +172,10 @@ packages: @@ -172,10 +172,10 @@ packages:
172 dependency: transitive 172 dependency: transitive
173 description: 173 description:
174 name: string_scanner 174 name: string_scanner
175 - sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" 175 + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
176 url: "https://pub.flutter-io.cn" 176 url: "https://pub.flutter-io.cn"
177 source: hosted 177 source: hosted
178 - version: "1.3.0" 178 + version: "1.2.0"
179 term_glyph: 179 term_glyph:
180 dependency: transitive 180 dependency: transitive
181 description: 181 description:
@@ -188,10 +188,10 @@ packages: @@ -188,10 +188,10 @@ packages:
188 dependency: transitive 188 dependency: transitive
189 description: 189 description:
190 name: test_api 190 name: test_api
191 - sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" 191 + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
192 url: "https://pub.flutter-io.cn" 192 url: "https://pub.flutter-io.cn"
193 source: hosted 193 source: hosted
194 - version: "0.7.3" 194 + version: "0.7.0"
195 vector_math: 195 vector_math:
196 dependency: transitive 196 dependency: transitive
197 description: 197 description:
@@ -204,10 +204,10 @@ packages: @@ -204,10 +204,10 @@ packages:
204 dependency: transitive 204 dependency: transitive
205 description: 205 description:
206 name: vm_service 206 name: vm_service
207 - sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b 207 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
208 url: "https://pub.flutter-io.cn" 208 url: "https://pub.flutter-io.cn"
209 source: hosted 209 source: hosted
210 - version: "14.3.0" 210 + version: "14.2.1"
211 sdks: 211 sdks:
212 - dart: ">=3.4.0 <4.0.0" 212 + dart: ">=3.3.0 <4.0.0"
213 flutter: ">=3.18.0-18.0.pre.54" 213 flutter: ">=3.18.0-18.0.pre.54"
1 sdk.dir=/Users/wangdongni/Library/Android/sdk 1 sdk.dir=/Users/wangdongni/Library/Android/sdk
2 -flutter.sdk=/Users/wangdongni/fvm/versions/3.27.3  
  2 +flutter.sdk=/Users/wangdongni/fvm/versions/custom_3.27.4-ohos-dev
@@ -37,10 +37,10 @@ packages: @@ -37,10 +37,10 @@ packages:
37 dependency: transitive 37 dependency: transitive
38 description: 38 description:
39 name: collection 39 name: collection
40 - sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf 40 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
41 url: "https://pub.flutter-io.cn" 41 url: "https://pub.flutter-io.cn"
42 source: hosted 42 source: hosted
43 - version: "1.19.0" 43 + version: "1.18.0"
44 cupertino_icons: 44 cupertino_icons:
45 dependency: "direct main" 45 dependency: "direct main"
46 description: 46 description:
@@ -94,18 +94,18 @@ packages: @@ -94,18 +94,18 @@ packages:
94 dependency: transitive 94 dependency: transitive
95 description: 95 description:
96 name: leak_tracker 96 name: leak_tracker
97 - sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" 97 + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
98 url: "https://pub.flutter-io.cn" 98 url: "https://pub.flutter-io.cn"
99 source: hosted 99 source: hosted
100 - version: "10.0.7" 100 + version: "10.0.4"
101 leak_tracker_flutter_testing: 101 leak_tracker_flutter_testing:
102 dependency: transitive 102 dependency: transitive
103 description: 103 description:
104 name: leak_tracker_flutter_testing 104 name: leak_tracker_flutter_testing
105 - sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" 105 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
106 url: "https://pub.flutter-io.cn" 106 url: "https://pub.flutter-io.cn"
107 source: hosted 107 source: hosted
108 - version: "3.0.8" 108 + version: "3.0.3"
109 leak_tracker_testing: 109 leak_tracker_testing:
110 dependency: transitive 110 dependency: transitive
111 description: 111 description:
@@ -142,18 +142,18 @@ packages: @@ -142,18 +142,18 @@ packages:
142 dependency: transitive 142 dependency: transitive
143 description: 143 description:
144 name: material_color_utilities 144 name: material_color_utilities
145 - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec 145 + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
146 url: "https://pub.flutter-io.cn" 146 url: "https://pub.flutter-io.cn"
147 source: hosted 147 source: hosted
148 - version: "0.11.1" 148 + version: "0.8.0"
149 meta: 149 meta:
150 dependency: transitive 150 dependency: transitive
151 description: 151 description:
152 name: meta 152 name: meta
153 - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 153 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
154 url: "https://pub.flutter-io.cn" 154 url: "https://pub.flutter-io.cn"
155 source: hosted 155 source: hosted
156 - version: "1.15.0" 156 + version: "1.12.0"
157 path: 157 path:
158 dependency: transitive 158 dependency: transitive
159 description: 159 description:
@@ -166,7 +166,7 @@ packages: @@ -166,7 +166,7 @@ packages:
166 dependency: transitive 166 dependency: transitive
167 description: flutter 167 description: flutter
168 source: sdk 168 source: sdk
169 - version: "0.0.0" 169 + version: "0.0.99"
170 source_span: 170 source_span:
171 dependency: transitive 171 dependency: transitive
172 description: 172 description:
@@ -179,10 +179,10 @@ packages: @@ -179,10 +179,10 @@ packages:
179 dependency: transitive 179 dependency: transitive
180 description: 180 description:
181 name: stack_trace 181 name: stack_trace
182 - sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" 182 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
183 url: "https://pub.flutter-io.cn" 183 url: "https://pub.flutter-io.cn"
184 source: hosted 184 source: hosted
185 - version: "1.12.0" 185 + version: "1.11.1"
186 stream_channel: 186 stream_channel:
187 dependency: transitive 187 dependency: transitive
188 description: 188 description:
@@ -195,10 +195,10 @@ packages: @@ -195,10 +195,10 @@ packages:
195 dependency: transitive 195 dependency: transitive
196 description: 196 description:
197 name: string_scanner 197 name: string_scanner
198 - sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" 198 + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
199 url: "https://pub.flutter-io.cn" 199 url: "https://pub.flutter-io.cn"
200 source: hosted 200 source: hosted
201 - version: "1.3.0" 201 + version: "1.2.0"
202 term_glyph: 202 term_glyph:
203 dependency: transitive 203 dependency: transitive
204 description: 204 description:
@@ -211,10 +211,10 @@ packages: @@ -211,10 +211,10 @@ packages:
211 dependency: transitive 211 dependency: transitive
212 description: 212 description:
213 name: test_api 213 name: test_api
214 - sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" 214 + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
215 url: "https://pub.flutter-io.cn" 215 url: "https://pub.flutter-io.cn"
216 source: hosted 216 source: hosted
217 - version: "0.7.3" 217 + version: "0.7.0"
218 vector_math: 218 vector_math:
219 dependency: transitive 219 dependency: transitive
220 description: 220 description:
@@ -227,10 +227,10 @@ packages: @@ -227,10 +227,10 @@ packages:
227 dependency: transitive 227 dependency: transitive
228 description: 228 description:
229 name: vm_service 229 name: vm_service
230 - sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b 230 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
231 url: "https://pub.flutter-io.cn" 231 url: "https://pub.flutter-io.cn"
232 source: hosted 232 source: hosted
233 - version: "14.3.0" 233 + version: "14.2.1"
234 sdks: 234 sdks:
235 - dart: ">=3.4.0 <4.0.0" 235 + dart: ">=3.3.0 <4.0.0"
236 flutter: ">=3.18.0-18.0.pre.54" 236 flutter: ">=3.18.0-18.0.pre.54"
@@ -37,10 +37,10 @@ packages: @@ -37,10 +37,10 @@ packages:
37 dependency: transitive 37 dependency: transitive
38 description: 38 description:
39 name: collection 39 name: collection
40 - sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf 40 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
41 url: "https://pub.flutter-io.cn" 41 url: "https://pub.flutter-io.cn"
42 source: hosted 42 source: hosted
43 - version: "1.19.0" 43 + version: "1.18.0"
44 fake_async: 44 fake_async:
45 dependency: transitive 45 dependency: transitive
46 description: 46 description:
@@ -71,18 +71,18 @@ packages: @@ -71,18 +71,18 @@ packages:
71 dependency: transitive 71 dependency: transitive
72 description: 72 description:
73 name: leak_tracker 73 name: leak_tracker
74 - sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" 74 + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
75 url: "https://pub.flutter-io.cn" 75 url: "https://pub.flutter-io.cn"
76 source: hosted 76 source: hosted
77 - version: "10.0.7" 77 + version: "10.0.4"
78 leak_tracker_flutter_testing: 78 leak_tracker_flutter_testing:
79 dependency: transitive 79 dependency: transitive
80 description: 80 description:
81 name: leak_tracker_flutter_testing 81 name: leak_tracker_flutter_testing
82 - sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" 82 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
83 url: "https://pub.flutter-io.cn" 83 url: "https://pub.flutter-io.cn"
84 source: hosted 84 source: hosted
85 - version: "3.0.8" 85 + version: "3.0.3"
86 leak_tracker_testing: 86 leak_tracker_testing:
87 dependency: transitive 87 dependency: transitive
88 description: 88 description:
@@ -119,18 +119,18 @@ packages: @@ -119,18 +119,18 @@ packages:
119 dependency: transitive 119 dependency: transitive
120 description: 120 description:
121 name: material_color_utilities 121 name: material_color_utilities
122 - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec 122 + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
123 url: "https://pub.flutter-io.cn" 123 url: "https://pub.flutter-io.cn"
124 source: hosted 124 source: hosted
125 - version: "0.11.1" 125 + version: "0.8.0"
126 meta: 126 meta:
127 dependency: transitive 127 dependency: transitive
128 description: 128 description:
129 name: meta 129 name: meta
130 - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 130 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
131 url: "https://pub.flutter-io.cn" 131 url: "https://pub.flutter-io.cn"
132 source: hosted 132 source: hosted
133 - version: "1.15.0" 133 + version: "1.12.0"
134 path: 134 path:
135 dependency: transitive 135 dependency: transitive
136 description: 136 description:
@@ -143,7 +143,7 @@ packages: @@ -143,7 +143,7 @@ packages:
143 dependency: transitive 143 dependency: transitive
144 description: flutter 144 description: flutter
145 source: sdk 145 source: sdk
146 - version: "0.0.0" 146 + version: "0.0.99"
147 source_span: 147 source_span:
148 dependency: transitive 148 dependency: transitive
149 description: 149 description:
@@ -156,10 +156,10 @@ packages: @@ -156,10 +156,10 @@ packages:
156 dependency: transitive 156 dependency: transitive
157 description: 157 description:
158 name: stack_trace 158 name: stack_trace
159 - sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" 159 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
160 url: "https://pub.flutter-io.cn" 160 url: "https://pub.flutter-io.cn"
161 source: hosted 161 source: hosted
162 - version: "1.12.0" 162 + version: "1.11.1"
163 stream_channel: 163 stream_channel:
164 dependency: transitive 164 dependency: transitive
165 description: 165 description:
@@ -172,10 +172,10 @@ packages: @@ -172,10 +172,10 @@ packages:
172 dependency: transitive 172 dependency: transitive
173 description: 173 description:
174 name: string_scanner 174 name: string_scanner
175 - sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" 175 + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
176 url: "https://pub.flutter-io.cn" 176 url: "https://pub.flutter-io.cn"
177 source: hosted 177 source: hosted
178 - version: "1.3.0" 178 + version: "1.2.0"
179 term_glyph: 179 term_glyph:
180 dependency: transitive 180 dependency: transitive
181 description: 181 description:
@@ -188,10 +188,10 @@ packages: @@ -188,10 +188,10 @@ packages:
188 dependency: transitive 188 dependency: transitive
189 description: 189 description:
190 name: test_api 190 name: test_api
191 - sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" 191 + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
192 url: "https://pub.flutter-io.cn" 192 url: "https://pub.flutter-io.cn"
193 source: hosted 193 source: hosted
194 - version: "0.7.3" 194 + version: "0.7.0"
195 vector_math: 195 vector_math:
196 dependency: transitive 196 dependency: transitive
197 description: 197 description:
@@ -204,10 +204,10 @@ packages: @@ -204,10 +204,10 @@ packages:
204 dependency: transitive 204 dependency: transitive
205 description: 205 description:
206 name: vm_service 206 name: vm_service
207 - sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b 207 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
208 url: "https://pub.flutter-io.cn" 208 url: "https://pub.flutter-io.cn"
209 source: hosted 209 source: hosted
210 - version: "14.3.0" 210 + version: "14.2.1"
211 sdks: 211 sdks:
212 - dart: ">=3.4.0 <4.0.0" 212 + dart: ">=3.3.0 <4.0.0"
213 flutter: ">=3.18.0-18.0.pre.54" 213 flutter: ">=3.18.0-18.0.pre.54"
  1 +# Miscellaneous
  2 +*.class
  3 +*.log
  4 +*.pyc
  5 +*.swp
  6 +.DS_Store
  7 +.atom/
  8 +.build/
  9 +.buildlog/
  10 +.history
  11 +.svn/
  12 +.swiftpm/
  13 +migrate_working_dir/
  14 +
  15 +# IntelliJ related
  16 +*.iml
  17 +*.ipr
  18 +*.iws
  19 +.idea/
  20 +
  21 +# The .vscode folder contains launch configuration and tasks you configure in
  22 +# VS Code which you may wish to be included in version control, so this line
  23 +# is commented out by default.
  24 +#.vscode/
  25 +
  26 +# Flutter/Dart/Pub related
  27 +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
  28 +/pubspec.lock
  29 +**/doc/api/
  30 +.dart_tool/
  31 +.flutter-plugins
  32 +.flutter-plugins-dependencies
  33 +build/
  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: "2f6880c100de5adf8fb4f2aa8d5c84484ca3d966"
  8 + channel: "[user-branch]"
  9 +
  10 +project_type: plugin
  11 +
  12 +# Tracks metadata for the flutter migrate command
  13 +migration:
  14 + platforms:
  15 + - platform: root
  16 + create_revision: 2f6880c100de5adf8fb4f2aa8d5c84484ca3d966
  17 + base_revision: 2f6880c100de5adf8fb4f2aa8d5c84484ca3d966
  18 + - platform: ohos
  19 + create_revision: 2f6880c100de5adf8fb4f2aa8d5c84484ca3d966
  20 + base_revision: 2f6880c100de5adf8fb4f2aa8d5c84484ca3d966
  21 +
  22 + # User provided section
  23 +
  24 + # List of Local paths (relative to this file) that should be
  25 + # ignored by the migrate tool.
  26 + #
  27 + # Files that are not part of the templates will be ignored by default.
  28 + unmanaged_files:
  29 + - 'lib/main.dart'
  30 + - 'ios/Runner.xcodeproj/project.pbxproj'
  1 +## 0.0.1
  2 +
  3 +* TODO: Describe initial release.
  1 +TODO: Add your license here.
  1 +# flutter_tts_ohos
  2 +
  3 +A new Flutter plugin project.
  4 +
  5 +## Getting Started
  6 +
  7 +This project is a starting point for a Flutter
  8 +[plug-in package](https://flutter.dev/to/develop-plugins),
  9 +a specialized package that includes platform-specific implementation code for
  10 +Android and/or iOS.
  11 +
  12 +For help getting started with Flutter development, view the
  13 +[online documentation](https://docs.flutter.dev), which offers tutorials,
  14 +samples, guidance on mobile development, and a full API reference.
  15 +
  1 +include: package:flutter_lints/flutter.yaml
  2 +
  3 +# Additional information about this file can be found at
  4 +# https://dart.dev/guides/language/analysis-options
  1 +# Miscellaneous
  2 +*.class
  3 +*.log
  4 +*.pyc
  5 +*.swp
  6 +.DS_Store
  7 +.atom/
  8 +.build/
  9 +.buildlog/
  10 +.history
  11 +.svn/
  12 +.swiftpm/
  13 +migrate_working_dir/
  14 +
  15 +# IntelliJ related
  16 +*.iml
  17 +*.ipr
  18 +*.iws
  19 +.idea/
  20 +
  21 +# The .vscode folder contains launch configuration and tasks you configure in
  22 +# VS Code which you may wish to be included in version control, so this line
  23 +# is commented out by default.
  24 +#.vscode/
  25 +
  26 +# Flutter/Dart/Pub related
  27 +**/doc/api/
  28 +**/ios/Flutter/.last_build_id
  29 +.dart_tool/
  30 +.flutter-plugins
  31 +.flutter-plugins-dependencies
  32 +.pub-cache/
  33 +.pub/
  34 +/build/
  35 +
  36 +# Symbolication related
  37 +app.*.symbols
  38 +
  39 +# Obfuscation related
  40 +app.*.map.json
  41 +
  42 +# Android Studio will place build artifacts here
  43 +/android/app/debug
  44 +/android/app/profile
  45 +/android/app/release
  1 +# flutter_tts_ohos_example
  2 +
  3 +Demonstrates how to use the flutter_tts_ohos plugin.
  4 +
  5 +## Getting Started
  6 +
  7 +This project is a starting point for a Flutter application.
  8 +
  9 +A few resources to get you started if this is your first Flutter project:
  10 +
  11 +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
  12 +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
  13 +
  14 +For help getting started with Flutter development, view the
  15 +[online documentation](https://docs.flutter.dev/), which offers tutorials,
  16 +samples, guidance on mobile development, and a full API reference.
  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
  1 +import 'package:flutter/material.dart';
  2 +import 'dart:async';
  3 +
  4 +import 'package:flutter/services.dart';
  5 +import 'package:flutter_tts/flutter_tts.dart';
  6 +
  7 +void main() {
  8 + runApp(const MyApp());
  9 +}
  10 +
  11 +class MyApp extends StatefulWidget {
  12 + const MyApp({super.key});
  13 +
  14 + @override
  15 + State<MyApp> createState() => _MyAppState();
  16 +}
  17 +
  18 +class _MyAppState extends State<MyApp> {
  19 + String _platformVersion = 'Unknown';
  20 +
  21 + FlutterTts tts = FlutterTts();
  22 +
  23 + @override
  24 + void initState() {
  25 + super.initState();
  26 + initPlatformState();
  27 + tts.awaitSpeakCompletion(true);
  28 + tts.startHandler=(){
  29 + print('start');
  30 + };
  31 + }
  32 +
  33 + // Platform messages are asynchronous, so we initialize in an async method.
  34 + Future<void> initPlatformState() async {
  35 + String platformVersion;
  36 + // Platform messages may fail, so we use a try/catch PlatformException.
  37 + // We also handle the message potentially returning null.
  38 + try {
  39 + platformVersion = 'Unknown platform version';
  40 + } on PlatformException {
  41 + platformVersion = 'Failed to get platform version.';
  42 + }
  43 +
  44 + // If the widget was removed from the tree while the asynchronous platform
  45 + // message was in flight, we want to discard the reply rather than calling
  46 + // setState to update our non-existent appearance.
  47 + if (!mounted) return;
  48 +
  49 + setState(() {
  50 + _platformVersion = platformVersion;
  51 + });
  52 + }
  53 +
  54 + @override
  55 + Widget build(BuildContext context) {
  56 + return MaterialApp(
  57 + home: Scaffold(
  58 + appBar: AppBar(
  59 + title: const Text('Plugin example app'),
  60 + ),
  61 + body: Column(
  62 + children: [
  63 + Text('Running on: $_platformVersion\n'),
  64 + ElevatedButton(
  65 + onPressed: () async {
  66 + try {
  67 + var rss= await tts.speak('Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界,Hello World 你好世界');
  68 + print('rss');
  69 + } catch (e) {
  70 + print(e);
  71 + }
  72 + },
  73 + child: Text('Say Hello'),
  74 + )
  75 + ],
  76 + ),
  77 + ),
  78 + );
  79 + }
  80 +}
  1 +/node_modules
  2 +/oh_modules
  3 +/local.properties
  4 +/.idea
  5 +**/build
  6 +/.hvigor
  7 +.cxx
  8 +/.clangd
  9 +/.clang-format
  10 +/.clang-tidy
  11 +**/.test
  12 +**/BuildProfile.ets
  13 +**/oh-package-lock.json5
  14 +/package.json
  15 +/package-lock.json
  16 +
  17 +**/src/main/resources/rawfile/flutter_assets/
  18 +**/libs/**/libapp.so
  19 +**/libs/**/libflutter.so
  20 +**/libs/**/libvmservice_snapshot.so
  1 +{
  2 + "app": {
  3 + "bundleName": "com.chyuning.example",
  4 + "vendor": "example",
  5 + "versionCode": 1000000,
  6 + "versionName": "1.0.0",
  7 + "icon": "$media:app_icon",
  8 + "label": "$string:app_name"
  9 + }
  10 +}
  1 +{
  2 + "string": [
  3 + {
  4 + "name": "app_name",
  5 + "value": "flutter_tts_ohos_example"
  6 + }
  7 + ]
  8 +}
  1 +{
  2 + "app": {
  3 + "signingConfigs": [
  4 + {
  5 + "name": "default",
  6 + "type": "HarmonyOS",
  7 + "material": {
  8 + "storeFile": "D:/证书/chyuning/ohos/store.p12",
  9 + "storePassword": "0000001CED20FB0662DEAF1F73A1ADFB3C08C89C1A83CF81F37394E00CD4F21B1E859654226E950293B1D383",
  10 + "keyAlias": "store",
  11 + "keyPassword": "0000001C563E4F77133B2008F8BAD89361D28CC74BF86EAD0310C64FD3E73B9F2E188AE5D8A28CACDF7CC084",
  12 + "signAlg": "SHA256withECDSA",
  13 + "profile": "D:/证书/chyuning/ohos/com.chyuning.example/exampleDebug.p7b",
  14 + "certpath": "D:/证书/chyuning/ohos/debug.cer"
  15 + }
  16 + }
  17 + ],
  18 + "products": [
  19 + {
  20 + "name": "default",
  21 + "signingConfig": "default",
  22 + "compatibleSdkVersion": "5.0.1(13)",
  23 + "runtimeOS": "HarmonyOS",
  24 + "targetSdkVersion": "5.0.1(13)"
  25 + }
  26 + ],
  27 + "buildModeSet": [
  28 + {
  29 + "name": "debug"
  30 + },
  31 + {
  32 + "name": "profile"
  33 + },
  34 + {
  35 + "name": "release"
  36 + }
  37 + ]
  38 + },
  39 + "modules": [
  40 + {
  41 + "name": "entry",
  42 + "srcPath": "./entry",
  43 + "targets": [
  44 + {
  45 + "name": "default",
  46 + "applyToProducts": [
  47 + "default"
  48 + ]
  49 + }
  50 + ]
  51 + }
  52 + ]
  53 +}
  1 +/node_modules
  2 +/oh_modules
  3 +/.preview
  4 +/build
  5 +/.cxx
  6 +/.test
  7 +GeneratedPluginRegistrant.ets
  1 +
  2 +{
  3 + "apiType": 'stageMode',
  4 + "buildOption": {
  5 + },
  6 + "targets": [
  7 + {
  8 + "name": "default",
  9 + "runtimeOS": "HarmonyOS"
  10 + },
  11 + {
  12 + "name": "ohosTest",
  13 + }
  14 + ]
  15 +}
  1 +
  2 +// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
  3 +import { hapTasks } from '@ohos/hvigor-ohos-plugin';
  4 +export default {
  5 + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
  6 + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */
  7 +}
  1 +
  2 +{
  3 + "name": "entry",
  4 + "version": "1.0.0",
  5 + "description": "Please describe the basic information.",
  6 + "main": "",
  7 + "author": "",
  8 + "license": "",
  9 + "dependencies": {},
  10 +}
  11 +
  1 +
  2 +import { FlutterAbility, FlutterEngine } from '@ohos/flutter_ohos';
  3 +import { GeneratedPluginRegistrant } from '../plugins/GeneratedPluginRegistrant';
  4 +
  5 +export default class EntryAbility extends FlutterAbility {
  6 + configureFlutterEngine(flutterEngine: FlutterEngine) {
  7 + super.configureFlutterEngine(flutterEngine)
  8 + GeneratedPluginRegistrant.registerWith(flutterEngine)
  9 + }
  10 +}
  1 +
  2 +import common from '@ohos.app.ability.common';
  3 +import { FlutterPage } from '@ohos/flutter_ohos'
  4 +
  5 +let storage = LocalStorage.getShared()
  6 +const EVENT_BACK_PRESS = 'EVENT_BACK_PRESS'
  7 +
  8 +@Entry(storage)
  9 +@Component
  10 +struct Index {
  11 + private context = getContext(this) as common.UIAbilityContext
  12 + @LocalStorageLink('viewId') viewId: string = "";
  13 +
  14 + build() {
  15 + Column() {
  16 + FlutterPage({ viewId: this.viewId })
  17 + }
  18 + }
  19 +
  20 + onBackPress(): boolean {
  21 + this.context.eventHub.emit(EVENT_BACK_PRESS)
  22 + return true
  23 + }
  24 +}
  1 +
  2 +{
  3 + "module": {
  4 + "name": "entry",
  5 + "type": "entry",
  6 + "description": "$string:module_desc",
  7 + "mainElement": "EntryAbility",
  8 + "deviceTypes": [
  9 + "phone"
  10 + ],
  11 + "deliveryWithInstall": true,
  12 + "installationFree": false,
  13 + "pages": "$profile:main_pages",
  14 + "abilities": [
  15 + {
  16 + "name": "EntryAbility",
  17 + "srcEntry": "./ets/entryability/EntryAbility.ets",
  18 + "description": "$string:EntryAbility_desc",
  19 + "icon": "$media:icon",
  20 + "label": "$string:EntryAbility_label",
  21 + "startWindowIcon": "$media:icon",
  22 + "startWindowBackground": "$color:start_window_background",
  23 + "exported": true,
  24 + "skills": [
  25 + {
  26 + "entities": [
  27 + "entity.system.home"
  28 + ],
  29 + "actions": [
  30 + "action.system.home"
  31 + ]
  32 + }
  33 + ]
  34 + }
  35 + ],
  36 + "requestPermissions": [
  37 + {"name" : "ohos.permission.INTERNET"},
  38 + ]
  39 + }
  40 +}
  1 +{
  2 + "color": [
  3 + {
  4 + "name": "start_window_background",
  5 + "value": "#FFFFFF"
  6 + }
  7 + ]
  8 +}
  1 +{
  2 + "string": [
  3 + {
  4 + "name": "module_desc",
  5 + "value": "module description"
  6 + },
  7 + {
  8 + "name": "EntryAbility_desc",
  9 + "value": "description"
  10 + },
  11 + {
  12 + "name": "EntryAbility_label",
  13 + "value": "flutter_tts_ohos_example"
  14 + }
  15 + ]
  16 +}
  1 +{
  2 + "string": [
  3 + {
  4 + "name": "module_desc",
  5 + "value": "module description"
  6 + },
  7 + {
  8 + "name": "EntryAbility_desc",
  9 + "value": "description"
  10 + },
  11 + {
  12 + "name": "EntryAbility_label",
  13 + "value": "flutter_tts_ohos_example"
  14 + }
  15 + ]
  16 +}
  1 +{
  2 + "string": [
  3 + {
  4 + "name": "enable_impeller",
  5 + "value": "true"
  6 + }
  7 + ]
  8 +}
  1 +{
  2 + "SWITCH": 1,
  3 + "TRANSLATE": [
  4 + {
  5 + "serial_number": 1,
  6 + "min": 800,
  7 + "max": -1,
  8 + "preferred_fps": 90
  9 + },
  10 + {
  11 + "serial_number": 2,
  12 + "min": 77,
  13 + "max": 800,
  14 + "preferred_fps": 120
  15 + },
  16 + {
  17 + "serial_number": 3,
  18 + "min": 46,
  19 + "max": 77,
  20 + "preferred_fps": 90
  21 + },
  22 + {
  23 + "serial_number": 4,
  24 + "min": 10,
  25 + "max": 46,
  26 + "preferred_fps": 72
  27 + },
  28 + {
  29 + "serial_number": 5,
  30 + "min": 0,
  31 + "max": 10,
  32 + "preferred_fps": 60
  33 + }
  34 + ],
  35 + "SCALE": [],
  36 + "ROTATION": []
  37 +}
  1 +{
  2 + "string": [
  3 + {
  4 + "name": "module_desc",
  5 + "value": "模块描述"
  6 + },
  7 + {
  8 + "name": "EntryAbility_desc",
  9 + "value": "description"
  10 + },
  11 + {
  12 + "name": "EntryAbility_label",
  13 + "value": "flutter_tts_ohos_example"
  14 + }
  15 + ]
  16 +}
  1 +import hilog from '@ohos.hilog';
  2 +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
  3 +
  4 +export default function abilityTest() {
  5 + describe('ActsAbilityTest', function () {
  6 + // Defines a test suite. Two parameters are supported: test suite name and test suite function.
  7 + beforeAll(function () {
  8 + // Presets an action, which is performed only once before all test cases of the test suite start.
  9 + // This API supports only one parameter: preset action function.
  10 + })
  11 + beforeEach(function () {
  12 + // Presets an action, which is performed before each unit test case starts.
  13 + // The number of execution times is the same as the number of test cases defined by **it**.
  14 + // This API supports only one parameter: preset action function.
  15 + })
  16 + afterEach(function () {
  17 + // Presets a clear action, which is performed after each unit test case ends.
  18 + // The number of execution times is the same as the number of test cases defined by **it**.
  19 + // This API supports only one parameter: clear action function.
  20 + })
  21 + afterAll(function () {
  22 + // Presets a clear action, which is performed after all test cases of the test suite end.
  23 + // This API supports only one parameter: clear action function.
  24 + })
  25 + it('assertContain',0, function () {
  26 + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
  27 + hilog.info(0x0000, 'testTag', '%{public}s', 'it begin');
  28 + let a = 'abc'
  29 + let b = 'b'
  30 + // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
  31 + expect(a).assertContain(b)
  32 + expect(a).assertEqual(a)
  33 + })
  34 + })
  35 +}
  1 +import abilityTest from './Ability.test'
  2 +
  3 +export default function testsuite() {
  4 + abilityTest()
  5 +}
  1 +import UIAbility from '@ohos.app.ability.UIAbility';
  2 +import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
  3 +import hilog from '@ohos.hilog';
  4 +import { Hypium } from '@ohos/hypium';
  5 +import testsuite from '../test/List.test';
  6 +import window from '@ohos.window';
  7 +
  8 +export default class TestAbility extends UIAbility {
  9 + onCreate(want, launchParam) {
  10 + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate');
  11 + hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? '');
  12 + hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:'+ JSON.stringify(launchParam) ?? '');
  13 + var abilityDelegator: any
  14 + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
  15 + var abilityDelegatorArguments: any
  16 + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
  17 + hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!');
  18 + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
  19 + }
  20 +
  21 + onDestroy() {
  22 + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy');
  23 + }
  24 +
  25 + onWindowStageCreate(windowStage: window.WindowStage) {
  26 + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate');
  27 + windowStage.loadContent('testability/pages/Index', (err, data) => {
  28 + if (err.code) {
  29 + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
  30 + return;
  31 + }
  32 + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s',
  33 + JSON.stringify(data) ?? '');
  34 + });
  35 + }
  36 +
  37 + onWindowStageDestroy() {
  38 + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy');
  39 + }
  40 +
  41 + onForeground() {
  42 + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground');
  43 + }
  44 +
  45 + onBackground() {
  46 + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground');
  47 + }
  48 +}
  1 +
  2 +
  3 +import hilog from '@ohos.hilog';
  4 +
  5 +@Entry
  6 +@Component
  7 +struct Index {
  8 + aboutToAppear() {
  9 + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear');
  10 + }
  11 + @State message: string = 'Hello World'
  12 + build() {
  13 + Row() {
  14 + Column() {
  15 + Text(this.message)
  16 + .fontSize(50)
  17 + .fontWeight(FontWeight.Bold)
  18 + Button() {
  19 + Text('next page')
  20 + .fontSize(20)
  21 + .fontWeight(FontWeight.Bold)
  22 + }.type(ButtonType.Capsule)
  23 + .margin({
  24 + top: 20
  25 + })
  26 + .backgroundColor('#0D9FFB')
  27 + .width('35%')
  28 + .height('5%')
  29 + .onClick(()=>{
  30 + })
  31 + }
  32 + .width('100%')
  33 + }
  34 + .height('100%')
  35 + }
  36 + }
  1 +
  2 +import hilog from '@ohos.hilog';
  3 +import TestRunner from '@ohos.application.testRunner';
  4 +import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
  5 +
  6 +var abilityDelegator = undefined
  7 +var abilityDelegatorArguments = undefined
  8 +
  9 +async function onAbilityCreateCallback() {
  10 + hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback');
  11 +}
  12 +
  13 +async function addAbilityMonitorCallback(err: any) {
  14 + hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? '');
  15 +}
  16 +
  17 +export default class OpenHarmonyTestRunner implements TestRunner {
  18 + constructor() {
  19 + }
  20 +
  21 + onPrepare() {
  22 + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare ');
  23 + }
  24 +
  25 + async onRun() {
  26 + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run');
  27 + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
  28 + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
  29 + var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility'
  30 + let lMonitor = {
  31 + abilityName: testAbilityName,
  32 + onAbilityCreate: onAbilityCreateCallback,
  33 + };
  34 + abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback)
  35 + var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName
  36 + var debug = abilityDelegatorArguments.parameters['-D']
  37 + if (debug == 'true')
  38 + {
  39 + cmd += ' -D'
  40 + }
  41 + hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd);
  42 + abilityDelegator.executeShellCommand(cmd,
  43 + (err: any, d: any) => {
  44 + hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? '');
  45 + hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? '');
  46 + hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? '');
  47 + })
  48 + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end');
  49 + }
  50 +}
  1 +
  2 +{
  3 + "module": {
  4 + "name": "entry_test",
  5 + "type": "feature",
  6 + "description": "$string:module_test_desc",
  7 + "mainElement": "TestAbility",
  8 + "deviceTypes": [
  9 + "phone"
  10 + ],
  11 + "deliveryWithInstall": true,
  12 + "installationFree": false,
  13 + "pages": "$profile:test_pages",
  14 + "abilities": [
  15 + {
  16 + "name": "TestAbility",
  17 + "srcEntry": "./ets/testability/TestAbility.ets",
  18 + "description": "$string:TestAbility_desc",
  19 + "icon": "$media:icon",
  20 + "label": "$string:TestAbility_label",
  21 + "exported": true,
  22 + "startWindowIcon": "$media:icon",
  23 + "startWindowBackground": "$color:start_window_background",
  24 + "skills": [
  25 + {
  26 + "actions": [
  27 + "action.system.home"
  28 + ],
  29 + "entities": [
  30 + "entity.system.home"
  31 + ]
  32 + }
  33 + ]
  34 + }
  35 + ]
  36 + }
  37 +}
  1 +{
  2 + "color": [
  3 + {
  4 + "name": "start_window_background",
  5 + "value": "#FFFFFF"
  6 + }
  7 + ]
  8 +}
  1 +{
  2 + "string": [
  3 + {
  4 + "name": "module_test_desc",
  5 + "value": "test ability description"
  6 + },
  7 + {
  8 + "name": "TestAbility_desc",
  9 + "value": "the test ability"
  10 + },
  11 + {
  12 + "name": "TestAbility_label",
  13 + "value": "test label"
  14 + }
  15 + ]
  16 +}
  1 +{
  2 + "src": [
  3 + "testability/pages/Index"
  4 + ]
  5 +}
  1 +
  2 +{
  3 + "modelVersion": "5.0.0",
  4 + "dependencies": {
  5 + }
  6 +}
  1 +import path from 'path'
  2 +import { injectNativeModules } from 'flutter-hvigor-plugin';
  3 +
  4 +injectNativeModules(__dirname, path.dirname(__dirname))
  1 +import path from 'path'
  2 +import { appTasks } from '@ohos/hvigor-ohos-plugin';
  3 +import { flutterHvigorPlugin } from 'flutter-hvigor-plugin';
  4 +
  5 +export default {
  6 + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
  7 + plugins:[flutterHvigorPlugin(path.dirname(__dirname))] /* Custom plugin to extend the functionality of Hvigor. */
  8 +}
  1 +{
  2 + "modelVersion": "5.0.0",
  3 + "name": "flutter_tts_ohos_example",
  4 + "version": "1.0.0",
  5 + "description": "Please describe the basic information.",
  6 + "main": "",
  7 + "author": "",
  8 + "license": "",
  9 + "dependencies": {},
  10 + "devDependencies": {
  11 + "@ohos/hypium": "1.0.6"
  12 + }
  13 +}
  1 +# Generated by pub
  2 +# See https://dart.dev/tools/pub/glossary#lockfile
  3 +packages:
  4 + async:
  5 + dependency: transitive
  6 + description:
  7 + name: async
  8 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
  9 + url: "https://pub.flutter-io.cn"
  10 + source: hosted
  11 + version: "2.11.0"
  12 + boolean_selector:
  13 + dependency: transitive
  14 + description:
  15 + name: boolean_selector
  16 + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
  17 + url: "https://pub.flutter-io.cn"
  18 + source: hosted
  19 + version: "2.1.1"
  20 + characters:
  21 + dependency: transitive
  22 + description:
  23 + name: characters
  24 + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
  25 + url: "https://pub.flutter-io.cn"
  26 + source: hosted
  27 + version: "1.3.0"
  28 + clock:
  29 + dependency: transitive
  30 + description:
  31 + name: clock
  32 + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
  33 + url: "https://pub.flutter-io.cn"
  34 + source: hosted
  35 + version: "1.1.1"
  36 + collection:
  37 + dependency: transitive
  38 + description:
  39 + name: collection
  40 + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
  41 + url: "https://pub.flutter-io.cn"
  42 + source: hosted
  43 + version: "1.19.0"
  44 + cupertino_icons:
  45 + dependency: "direct main"
  46 + description:
  47 + name: cupertino_icons
  48 + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
  49 + url: "https://pub.flutter-io.cn"
  50 + source: hosted
  51 + version: "1.0.8"
  52 + fake_async:
  53 + dependency: transitive
  54 + description:
  55 + name: fake_async
  56 + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
  57 + url: "https://pub.flutter-io.cn"
  58 + source: hosted
  59 + version: "1.3.1"
  60 + flutter:
  61 + dependency: "direct main"
  62 + description: flutter
  63 + source: sdk
  64 + version: "0.0.0"
  65 + flutter_lints:
  66 + dependency: "direct dev"
  67 + description:
  68 + name: flutter_lints
  69 + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
  70 + url: "https://pub.flutter-io.cn"
  71 + source: hosted
  72 + version: "5.0.0"
  73 + flutter_test:
  74 + dependency: "direct dev"
  75 + description: flutter
  76 + source: sdk
  77 + version: "0.0.0"
  78 + flutter_tts:
  79 + dependency: "direct main"
  80 + description:
  81 + name: flutter_tts
  82 + sha256: bdf2fc4483e74450dc9fc6fe6a9b6a5663e108d4d0dad3324a22c8e26bf48af4
  83 + url: "https://pub.flutter-io.cn"
  84 + source: hosted
  85 + version: "4.2.3"
  86 + flutter_tts_ohos:
  87 + dependency: "direct main"
  88 + description:
  89 + path: ".."
  90 + relative: true
  91 + source: path
  92 + version: "0.0.1"
  93 + flutter_web_plugins:
  94 + dependency: transitive
  95 + description: flutter
  96 + source: sdk
  97 + version: "0.0.0"
  98 + leak_tracker:
  99 + dependency: transitive
  100 + description:
  101 + name: leak_tracker
  102 + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
  103 + url: "https://pub.flutter-io.cn"
  104 + source: hosted
  105 + version: "10.0.7"
  106 + leak_tracker_flutter_testing:
  107 + dependency: transitive
  108 + description:
  109 + name: leak_tracker_flutter_testing
  110 + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
  111 + url: "https://pub.flutter-io.cn"
  112 + source: hosted
  113 + version: "3.0.8"
  114 + leak_tracker_testing:
  115 + dependency: transitive
  116 + description:
  117 + name: leak_tracker_testing
  118 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
  119 + url: "https://pub.flutter-io.cn"
  120 + source: hosted
  121 + version: "3.0.1"
  122 + lints:
  123 + dependency: transitive
  124 + description:
  125 + name: lints
  126 + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7
  127 + url: "https://pub.flutter-io.cn"
  128 + source: hosted
  129 + version: "5.1.1"
  130 + matcher:
  131 + dependency: transitive
  132 + description:
  133 + name: matcher
  134 + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
  135 + url: "https://pub.flutter-io.cn"
  136 + source: hosted
  137 + version: "0.12.16+1"
  138 + material_color_utilities:
  139 + dependency: transitive
  140 + description:
  141 + name: material_color_utilities
  142 + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
  143 + url: "https://pub.flutter-io.cn"
  144 + source: hosted
  145 + version: "0.11.1"
  146 + meta:
  147 + dependency: transitive
  148 + description:
  149 + name: meta
  150 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
  151 + url: "https://pub.flutter-io.cn"
  152 + source: hosted
  153 + version: "1.15.0"
  154 + path:
  155 + dependency: transitive
  156 + description:
  157 + name: path
  158 + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
  159 + url: "https://pub.flutter-io.cn"
  160 + source: hosted
  161 + version: "1.9.0"
  162 + plugin_platform_interface:
  163 + dependency: transitive
  164 + description:
  165 + name: plugin_platform_interface
  166 + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
  167 + url: "https://pub.flutter-io.cn"
  168 + source: hosted
  169 + version: "2.1.8"
  170 + sky_engine:
  171 + dependency: transitive
  172 + description: flutter
  173 + source: sdk
  174 + version: "0.0.0"
  175 + source_span:
  176 + dependency: transitive
  177 + description:
  178 + name: source_span
  179 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
  180 + url: "https://pub.flutter-io.cn"
  181 + source: hosted
  182 + version: "1.10.0"
  183 + stack_trace:
  184 + dependency: transitive
  185 + description:
  186 + name: stack_trace
  187 + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
  188 + url: "https://pub.flutter-io.cn"
  189 + source: hosted
  190 + version: "1.12.0"
  191 + stream_channel:
  192 + dependency: transitive
  193 + description:
  194 + name: stream_channel
  195 + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
  196 + url: "https://pub.flutter-io.cn"
  197 + source: hosted
  198 + version: "2.1.2"
  199 + string_scanner:
  200 + dependency: transitive
  201 + description:
  202 + name: string_scanner
  203 + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
  204 + url: "https://pub.flutter-io.cn"
  205 + source: hosted
  206 + version: "1.3.0"
  207 + term_glyph:
  208 + dependency: transitive
  209 + description:
  210 + name: term_glyph
  211 + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
  212 + url: "https://pub.flutter-io.cn"
  213 + source: hosted
  214 + version: "1.2.1"
  215 + test_api:
  216 + dependency: transitive
  217 + description:
  218 + name: test_api
  219 + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
  220 + url: "https://pub.flutter-io.cn"
  221 + source: hosted
  222 + version: "0.7.3"
  223 + vector_math:
  224 + dependency: transitive
  225 + description:
  226 + name: vector_math
  227 + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
  228 + url: "https://pub.flutter-io.cn"
  229 + source: hosted
  230 + version: "2.1.4"
  231 + vm_service:
  232 + dependency: transitive
  233 + description:
  234 + name: vm_service
  235 + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
  236 + url: "https://pub.flutter-io.cn"
  237 + source: hosted
  238 + version: "14.3.0"
  239 +sdks:
  240 + dart: ">=3.6.2 <4.0.0"
  241 + flutter: ">=3.18.0-18.0.pre.54"
  1 +name: flutter_tts_ohos_example
  2 +description: "Demonstrates how to use the flutter_tts_ohos plugin."
  3 +# The following line prevents the package from being accidentally published to
  4 +# pub.dev using `flutter pub publish`. This is preferred for private packages.
  5 +publish_to: 'none' # Remove this line if you wish to publish to pub.dev
  6 +
  7 +environment:
  8 + sdk: ^3.6.2
  9 +
  10 +# Dependencies specify other packages that your package needs in order to work.
  11 +# To automatically upgrade your package dependencies to the latest versions
  12 +# consider running `flutter pub upgrade --major-versions`. Alternatively,
  13 +# dependencies can be manually updated by changing the version numbers below to
  14 +# the latest version available on pub.dev. To see which dependencies have newer
  15 +# versions available, run `flutter pub outdated`.
  16 +dependencies:
  17 + flutter:
  18 + sdk: flutter
  19 +
  20 + flutter_tts_ohos:
  21 + # When depending on this package from a real application you should use:
  22 + # flutter_tts_ohos: ^x.y.z
  23 + # See https://dart.dev/tools/pub/dependencies#version-constraints
  24 + # The example app is bundled with the plugin so we use a path dependency on
  25 + # the parent directory to use the current plugin's version.
  26 + path: ../
  27 +
  28 + # The following adds the Cupertino Icons font to your application.
  29 + # Use with the CupertinoIcons class for iOS style icons.
  30 + cupertino_icons: ^1.0.8
  31 + flutter_tts: ^4.2.3
  32 +
  33 +dev_dependencies:
  34 + flutter_test:
  35 + sdk: flutter
  36 +
  37 + # The "flutter_lints" package below contains a set of recommended lints to
  38 + # encourage good coding practices. The lint set provided by the package is
  39 + # activated in the `analysis_options.yaml` file located at the root of your
  40 + # package. See that file for information about deactivating specific lint
  41 + # rules and activating additional ones.
  42 + flutter_lints: ^5.0.0
  43 +
  44 +# For information on the generic Dart part of this file, see the
  45 +# following page: https://dart.dev/tools/pub/pubspec
  46 +
  47 +# The following section is specific to Flutter packages.
  48 +flutter:
  49 +
  50 + # The following line ensures that the Material Icons font is
  51 + # included with your application, so that you can use the icons in
  52 + # the material Icons class.
  53 + uses-material-design: true
  54 +
  55 + # To add assets to your application, add an assets section, like this:
  56 + # assets:
  57 + # - images/a_dot_burr.jpeg
  58 + # - images/a_dot_ham.jpeg
  59 +
  60 + # An image asset can refer to one or more resolution-specific "variants", see
  61 + # https://flutter.dev/to/resolution-aware-images
  62 +
  63 + # For details regarding adding assets from package dependencies, see
  64 + # https://flutter.dev/to/asset-from-package
  65 +
  66 + # To add custom fonts to your application, add a fonts section here,
  67 + # in this "flutter" section. Each entry in this list should have a
  68 + # "family" key with the font family name, and a "fonts" key with a
  69 + # list giving the asset and other descriptors for the font. For
  70 + # example:
  71 + # fonts:
  72 + # - family: Schyler
  73 + # fonts:
  74 + # - asset: fonts/Schyler-Regular.ttf
  75 + # - asset: fonts/Schyler-Italic.ttf
  76 + # style: italic
  77 + # - family: Trajan Pro
  78 + # fonts:
  79 + # - asset: fonts/TrajanPro.ttf
  80 + # - asset: fonts/TrajanPro_Bold.ttf
  81 + # weight: 700
  82 + #
  83 + # For details regarding fonts from package dependencies,
  84 + # see https://flutter.dev/to/font-from-package
  1 +// // This is a basic Flutter widget test.
  2 +// //
  3 +// // To perform an interaction with a widget in your test, use the WidgetTester
  4 +// // utility in the flutter_test package. For example, you can send tap and scroll
  5 +// // gestures. You can also use WidgetTester to find child widgets in the widget
  6 +// // tree, read text, and verify that the values of widget properties are correct.
  7 +
  8 +// import 'package:flutter/material.dart';
  9 +// import 'package:flutter_test/flutter_test.dart';
  10 +
  11 +// import 'package:flutter_tts_ohos_example/main.dart';
  12 +
  13 +// void main() {
  14 +// testWidgets('Verify Platform version', (WidgetTester tester) async {
  15 +// // Build our app and trigger a frame.
  16 +// await tester.pumpWidget(const MyApp());
  17 +
  18 +// // Verify that platform version is retrieved.
  19 +// expect(
  20 +// find.byWidgetPredicate(
  21 +// (Widget widget) => widget is Text &&
  22 +// widget.data!.startsWith('Running on:'),
  23 +// ),
  24 +// findsOneWidget,
  25 +// );
  26 +// });
  27 +// }
  1 +/node_modules
  2 +/oh_modules
  3 +/local.properties
  4 +/.preview
  5 +/.idea
  6 +/build
  7 +/.cxx
  8 +/.test
  9 +/BuildProfile.ets
  10 +/oh-package-lock.json5
  1 +{
  2 + "apiType": "stageMode",
  3 + "buildOption": {
  4 + },
  5 + "targets": [
  6 + {
  7 + "name": "default"
  8 + }
  9 + ]
  10 +}
No preview for this file type
  1 +// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
  2 +import { harTasks } from '@ohos/hvigor-ohos-plugin';
  3 +
  4 +export default {
  5 + system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
  6 + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
  7 +}
  1 +
  2 +
  3 +import FlutterTtsOhosPlugin from './src/main/ets/components/plugin/FlutterTtsOhosPlugin';
  4 +export default FlutterTtsOhosPlugin;
  1 +{
  2 + "name": "flutter_tts_ohos",
  3 + "version": "1.0.0",
  4 + "description": "Please describe the basic information.",
  5 + "main": "index.ets",
  6 + "author": "",
  7 + "license": "Apache-2.0",
  8 + "dependencies": {
  9 + "@ohos/flutter_ohos": "file:har/flutter.har"
  10 + }
  11 +}
  1 +import {
  2 + FlutterPlugin,
  3 + FlutterPluginBinding,
  4 + MethodCall,
  5 + MethodCallHandler,
  6 + MethodChannel,
  7 + MethodResult,
  8 + Log,
  9 +} from '@ohos/flutter_ohos';
  10 +
  11 +import { textToSpeech } from '@kit.CoreSpeechKit';
  12 +import { util } from '@kit.ArkTS';
  13 +import json from '@ohos.util.json';
  14 +
  15 +enum Languages {
  16 + ZH_CN = 'zh-CN',
  17 + EN_US = 'en-US',
  18 +}
  19 +
  20 +const SPOKEN_PREFIX = 'SPL_';
  21 +const SYNTHESIZE_TO_FILE_PREFIX = 'STF_';
  22 +
  23 +const Tag = 'FlutterTtsOhosPlugin';
  24 +
  25 +/** FlutterTtsOhosPlugin **/
  26 +export default class FlutterTtsOhosPlugin implements FlutterPlugin, MethodCallHandler {
  27 + private methodChannel: MethodChannel | null = null;
  28 + private awaitSpeakCompletion: boolean = false;
  29 + private awaitSynthCompletion: boolean = false;
  30 + private language: Languages = Languages.ZH_CN;
  31 + private volume: number = 1.0;
  32 + private pitch: number = 1.0;
  33 + private rate: number = 1.0;
  34 + private tts: textToSpeech.TextToSpeechEngine | null = null;
  35 + private queueMode: 0 | 1 = 0;
  36 + private utterances: Map<string, MethodResult> = new Map();
  37 +
  38 + constructor() {
  39 + }
  40 +
  41 + getUniqueClassName(): string {
  42 + return "FlutterTtsOhosPlugin"
  43 + }
  44 +
  45 + onAttachedToEngine(binding: FlutterPluginBinding): void {
  46 + this.methodChannel = new MethodChannel(binding.getBinaryMessenger(), "flutter_tts");
  47 + this.methodChannel.setMethodCallHandler(this)
  48 + }
  49 +
  50 + onDetachedFromEngine(binding: FlutterPluginBinding): void {
  51 + this.stop();
  52 + this.tts?.shutdown();
  53 + this.tts = null;
  54 + this.methodChannel?.setMethodCallHandler(null);
  55 + this.methodChannel = null;
  56 + }
  57 +
  58 + async onMethodCall(call: MethodCall, result: MethodResult): Promise<void> {
  59 + try {
  60 + switch (call.method) {
  61 + case "speak":
  62 + const speakId = await this.speak(call.args);
  63 + if (this.awaitSpeakCompletion) {
  64 + this.utterances.set(speakId, result);
  65 + } else {
  66 + result.success(1)
  67 + }
  68 + break;
  69 + case "awaitSpeakCompletion":
  70 + this.awaitSpeakCompletion = call.args;
  71 + result.success(1)
  72 + break;
  73 + case "awaitSynthCompletion":
  74 + this.awaitSynthCompletion = call.args;
  75 + result.success(1)
  76 + break;
  77 + case "synthesizeToFile":
  78 + const fileText: string = call.argument("text");
  79 + const synthId = await this.speak(fileText, 0);
  80 + if (this.awaitSynthCompletion) {
  81 + this.utterances.set(synthId, result);
  82 + } else {
  83 + result.success(1)
  84 + }
  85 + break;
  86 + case "stop":
  87 + this.stop();
  88 + result.success(1)
  89 + break;
  90 + case "setLanguage":
  91 + this.language = call.args;
  92 + result.success(1);
  93 + break;
  94 + case "setSpeechRate":
  95 + this.rate = call.args
  96 + result.success(1);
  97 + break;
  98 + case "setVolume":
  99 + this.volume = call.args;
  100 + result.success(1);
  101 + break;
  102 + case "setPitch":
  103 + this.pitch = call.args
  104 + result.success(1);
  105 + break;
  106 + case "getLanguages":
  107 + this.getLanguages(result)
  108 + break;
  109 + case "getSpeechRateValidRange":
  110 + this.getSpeechRateValidRange(result)
  111 + break;
  112 + case "isLanguageAvailable":
  113 + let language1: string = call.argument("language")
  114 + this.isLanguageAvailable(language1, result)
  115 + break;
  116 + case "getVoices":
  117 + this.getVoices(result)
  118 + break;
  119 + case "setVoice":
  120 + const voice: string = call.argument("voice")
  121 + this.setVoice(voice, result)
  122 + break;
  123 + case "clearVoice":
  124 + this.clearVoice(result)
  125 + break;
  126 + case "setSharedInstance":
  127 + result.success(1)
  128 + break;
  129 + default:
  130 + result.notImplemented()
  131 + break;
  132 + }
  133 + } catch (error) {
  134 + result.error('1111', Tag, JSON.stringify(call))
  135 + }
  136 + }
  137 +
  138 + createEngineParams(): textToSpeech.CreateEngineParams {
  139 + return {
  140 + language: this.language,
  141 + online: 1,
  142 + person: 0,
  143 + }
  144 + }
  145 +
  146 + async createEngine(): Promise<textToSpeech.TextToSpeechEngine> {
  147 + const tts: textToSpeech.TextToSpeechEngine = await textToSpeech.createEngine(this.createEngineParams());
  148 + tts.setListener({
  149 + // 开始播报回调
  150 + onStart: (requestId: string, response: textToSpeech.StartResponse) => {
  151 + if (requestId.startsWith(SYNTHESIZE_TO_FILE_PREFIX)) {
  152 + this.methodChannel?.invokeMethod("synth.onStart", true);
  153 + } else {
  154 + this.methodChannel?.invokeMethod("speak.onStart", true)
  155 + }
  156 + },
  157 + // 合成完成及播报完成回调
  158 + onComplete: (requestId: string, response: textToSpeech.CompleteResponse) => {
  159 + if (requestId.startsWith(SYNTHESIZE_TO_FILE_PREFIX)) {
  160 + if (this.awaitSynthCompletion) {
  161 + this.completion(requestId, 1);
  162 + }
  163 + this.methodChannel?.invokeMethod("synth.onComplete", true)
  164 + } else {
  165 + if (this.awaitSpeakCompletion && response.type == 1) {
  166 + this.completion(requestId, 1);
  167 + }
  168 + this.methodChannel?.invokeMethod("speak.onComplete", true)
  169 + }
  170 + },
  171 + // 停止播报回调
  172 + onStop: (requestId: string, response: textToSpeech.StopResponse) => {
  173 + this.methodChannel?.invokeMethod("speak.onCancel", true)
  174 + },
  175 + // 返回音频流
  176 + onData: (requestId: string, audio: ArrayBuffer, response: textToSpeech.SynthesisResponse) => {
  177 +
  178 + },
  179 + // 错误回调
  180 + onError: (requestId: string, errorCode: number, errorMessage: string) => {
  181 + if (requestId.startsWith(SYNTHESIZE_TO_FILE_PREFIX)) {
  182 + if (this.awaitSynthCompletion) {
  183 + this.onError(requestId, errorCode, errorMessage);
  184 + }
  185 + this.methodChannel?.invokeMethod("synth.onError", errorMessage)
  186 + } else {
  187 + if (this.awaitSpeakCompletion) {
  188 + this.onError(requestId, errorCode, errorMessage);
  189 + }
  190 + this.methodChannel?.invokeMethod("speak.onError", errorMessage)
  191 + }
  192 + }
  193 + });
  194 + return tts;
  195 + }
  196 +
  197 + createSpakParams(playType: 0 | 1 = 1): textToSpeech.SpeakParams {
  198 + return {
  199 + requestId: `${playType == 0 ? SYNTHESIZE_TO_FILE_PREFIX : SPOKEN_PREFIX}_${util.generateRandomBinaryUUID()}`,
  200 + extraParams: {
  201 + speed: this.rate,
  202 + pitch: this.pitch,
  203 + volume: this.volume,
  204 + languageContext: this.language,
  205 + playType: playType,
  206 + queueMode: this.queueMode,
  207 + }
  208 + }
  209 + }
  210 +
  211 + completion(id: string, success: number) {
  212 + this.utterances.get(id)?.success(success);
  213 + this.utterances.delete(id);
  214 + }
  215 +
  216 + onError(id: string, errorCode: number, errorMessage: string) {
  217 + this.utterances.get(id)?.error(`${errorCode}`, errorMessage, null);
  218 + this.utterances.delete(id);
  219 + }
  220 +
  221 + async speak(text: string, playType: 0 | 1 = 1): Promise<string> {
  222 + if (this.tts == null) {
  223 + this.tts = await this.createEngine();
  224 + }
  225 + let param = this.createSpakParams(playType)
  226 + this.tts.speak(text, param);
  227 + return param.requestId;
  228 + }
  229 +
  230 +
  231 + async stop() {
  232 + this.tts?.stop();
  233 + }
  234 +
  235 + async setLanguage(language: string, result: MethodResult) {
  236 + // todo
  237 + }
  238 +
  239 + async setRate(rate: number, result: MethodResult) {
  240 + // todo
  241 + }
  242 +
  243 + async setVolume(volume: number, result: MethodResult) {
  244 + // todo
  245 + }
  246 +
  247 + async setPitch(pitch: number, result: MethodResult) {
  248 + // todo
  249 + }
  250 +
  251 + async getLanguages(result: MethodResult) {
  252 +
  253 + }
  254 +
  255 + async getSpeechRateValidRange(result: MethodResult) {
  256 + // todo
  257 + }
  258 +
  259 + async isLanguageAvailable(language: string, result: MethodResult) {
  260 + // todo
  261 + }
  262 +
  263 + async getVoices(result: MethodResult) {
  264 + // todo
  265 + }
  266 +
  267 + async setVoice(voice: string, result: MethodResult) {
  268 + // todo
  269 + }
  270 +
  271 + async clearVoice(result: MethodResult) {
  272 + // todo
  273 + }
  274 +
  275 +}
  1 +{
  2 + "module": {
  3 + "name": "flutter_tts_ohos",
  4 + "type": "har",
  5 + "deviceTypes": [
  6 + "default",
  7 + "tablet"
  8 + ]
  9 + }
  10 +}
  1 +name: flutter_tts_ohos
  2 +description: "A new Flutter plugin project."
  3 +version: 0.0.1
  4 +homepage:
  5 +
  6 +environment:
  7 + sdk: ^3.4.0
  8 + flutter: '>=3.3.0'
  9 +
  10 +dependencies:
  11 + flutter:
  12 + sdk: flutter
  13 + plugin_platform_interface: ^2.0.2
  14 +
  15 +dev_dependencies:
  16 + flutter_test:
  17 + sdk: flutter
  18 + flutter_lints: ^5.0.0
  19 +
  20 +# For information on the generic Dart part of this file, see the
  21 +# following page: https://dart.dev/tools/pub/pubspec
  22 +
  23 +# The following section is specific to Flutter packages.
  24 +flutter:
  25 + # This section identifies this Flutter project as a plugin project.
  26 + # The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.)
  27 + # which should be registered in the plugin registry. This is required for
  28 + # using method channels.
  29 + # The Android 'package' specifies package in which the registered class is.
  30 + # This is required for using method channels on Android.
  31 + # The 'ffiPlugin' specifies that native code should be built and bundled.
  32 + # This is required for using `dart:ffi`.
  33 + # All these are used by the tooling to maintain consistency when
  34 + # adding or updating assets for this project.
  35 + plugin:
  36 + platforms:
  37 + ohos:
  38 + pluginClass: FlutterTtsOhosPlugin
  39 +
  40 + # To add assets to your plugin package, add an assets section, like this:
  41 + # assets:
  42 + # - images/a_dot_burr.jpeg
  43 + # - images/a_dot_ham.jpeg
  44 + #
  45 + # For details regarding assets in packages, see
  46 + # https://flutter.dev/to/asset-from-package
  47 + #
  48 + # An image asset can refer to one or more resolution-specific "variants", see
  49 + # https://flutter.dev/to/resolution-aware-images
  50 +
  51 + # To add custom fonts to your plugin package, add a fonts section here,
  52 + # in this "flutter" section. Each entry in this list should have a
  53 + # "family" key with the font family name, and a "fonts" key with a
  54 + # list giving the asset and other descriptors for the font. For
  55 + # example:
  56 + # fonts:
  57 + # - family: Schyler
  58 + # fonts:
  59 + # - asset: fonts/Schyler-Regular.ttf
  60 + # - asset: fonts/Schyler-Italic.ttf
  61 + # style: italic
  62 + # - family: Trajan Pro
  63 + # fonts:
  64 + # - asset: fonts/TrajanPro.ttf
  65 + # - asset: fonts/TrajanPro_Bold.ttf
  66 + # weight: 700
  67 + #
  68 + # For details regarding fonts in packages, see
  69 + # https://flutter.dev/to/font-from-package
@@ -13,10 +13,10 @@ packages: @@ -13,10 +13,10 @@ packages:
13 dependency: transitive 13 dependency: transitive
14 description: 14 description:
15 name: collection 15 name: collection
16 - sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf 16 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
17 url: "https://pub.flutter-io.cn" 17 url: "https://pub.flutter-io.cn"
18 source: hosted 18 source: hosted
19 - version: "1.19.0" 19 + version: "1.18.0"
20 flutter: 20 flutter:
21 dependency: "direct main" 21 dependency: "direct main"
22 description: flutter 22 description: flutter
@@ -26,23 +26,23 @@ packages: @@ -26,23 +26,23 @@ packages:
26 dependency: transitive 26 dependency: transitive
27 description: 27 description:
28 name: material_color_utilities 28 name: material_color_utilities
29 - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec 29 + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
30 url: "https://pub.flutter-io.cn" 30 url: "https://pub.flutter-io.cn"
31 source: hosted 31 source: hosted
32 - version: "0.11.1" 32 + version: "0.8.0"
33 meta: 33 meta:
34 dependency: transitive 34 dependency: transitive
35 description: 35 description:
36 name: meta 36 name: meta
37 - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 37 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
38 url: "https://pub.flutter-io.cn" 38 url: "https://pub.flutter-io.cn"
39 source: hosted 39 source: hosted
40 - version: "1.15.0" 40 + version: "1.12.0"
41 sky_engine: 41 sky_engine:
42 dependency: transitive 42 dependency: transitive
43 description: flutter 43 description: flutter
44 source: sdk 44 source: sdk
45 - version: "0.0.0" 45 + version: "0.0.99"
46 vector_math: 46 vector_math:
47 dependency: transitive 47 dependency: transitive
48 description: 48 description:
@@ -52,4 +52,4 @@ packages: @@ -52,4 +52,4 @@ packages:
52 source: hosted 52 source: hosted
53 version: "2.1.4" 53 version: "2.1.4"
54 sdks: 54 sdks:
55 - dart: ">=3.4.0 <4.0.0" 55 + dart: ">=3.3.0-0 <4.0.0"
  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 +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
  26 +/pubspec.lock
  27 +**/doc/api/
  28 +.dart_tool/
  29 +build/
  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: "c4a66f77d0e5047ddf5a1bd353fd3ee9cbfeafcd"
  8 + channel: "[user-branch]"
  9 +
  10 +project_type: plugin
  11 +
  12 +# Tracks metadata for the flutter migrate command
  13 +migration:
  14 + platforms:
  15 + - platform: root
  16 + create_revision: c4a66f77d0e5047ddf5a1bd353fd3ee9cbfeafcd
  17 + base_revision: c4a66f77d0e5047ddf5a1bd353fd3ee9cbfeafcd
  18 + - platform: android
  19 + create_revision: c4a66f77d0e5047ddf5a1bd353fd3ee9cbfeafcd
  20 + base_revision: c4a66f77d0e5047ddf5a1bd353fd3ee9cbfeafcd
  21 + - platform: ios
  22 + create_revision: c4a66f77d0e5047ddf5a1bd353fd3ee9cbfeafcd
  23 + base_revision: c4a66f77d0e5047ddf5a1bd353fd3ee9cbfeafcd
  24 + - platform: ohos
  25 + create_revision: c4a66f77d0e5047ddf5a1bd353fd3ee9cbfeafcd
  26 + base_revision: c4a66f77d0e5047ddf5a1bd353fd3ee9cbfeafcd
  27 +
  28 + # User provided section
  29 +
  30 + # List of Local paths (relative to this file) that should be
  31 + # ignored by the migrate tool.
  32 + #
  33 + # Files that are not part of the templates will be ignored by default.
  34 + unmanaged_files:
  35 + - 'lib/main.dart'
  36 + - 'ios/Runner.xcodeproj/project.pbxproj'
  1 +## 0.0.1
  2 +
  3 +* TODO: Describe initial release.
  1 +TODO: Add your license here.
  1 +# speech_to_text_wdn_ohos
  2 +
  3 +A new Flutter plugin project.
  4 +
  5 +## Getting Started
  6 +
  7 +This project is a starting point for a Flutter
  8 +[plug-in package](https://flutter.dev/developing-packages/),
  9 +a specialized package that includes platform-specific implementation code for
  10 +Android and/or iOS.
  11 +
  12 +For help getting started with Flutter development, view the
  13 +[online documentation](https://flutter.dev/docs), which offers tutorials,
  14 +samples, guidance on mobile development, and a full API reference.
  15 +
  1 +include: package:flutter_lints/flutter.yaml
  2 +
  3 +# Additional information about this file can be found at
  4 +# https://dart.dev/guides/language/analysis-options
  1 +*.iml
  2 +.gradle
  3 +/local.properties
  4 +/.idea/workspace.xml
  5 +/.idea/libraries
  6 +.DS_Store
  7 +/build
  8 +/captures
  9 +.cxx
  1 +group = "com.example.speech_to_text_wdn_ohos"
  2 +version = "1.0-SNAPSHOT"
  3 +
  4 +buildscript {
  5 + ext.kotlin_version = "1.7.10"
  6 + repositories {
  7 + google()
  8 + mavenCentral()
  9 + }
  10 +
  11 + dependencies {
  12 + classpath("com.android.tools.build:gradle:7.3.0")
  13 + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
  14 + }
  15 +}
  16 +
  17 +allprojects {
  18 + repositories {
  19 + google()
  20 + mavenCentral()
  21 + }
  22 +}
  23 +
  24 +apply plugin: "com.android.library"
  25 +apply plugin: "kotlin-android"
  26 +
  27 +android {
  28 + if (project.android.hasProperty("namespace")) {
  29 + namespace = "com.example.speech_to_text_wdn_ohos"
  30 + }
  31 +
  32 + compileSdk = 34
  33 +
  34 + compileOptions {
  35 + sourceCompatibility = JavaVersion.VERSION_1_8
  36 + targetCompatibility = JavaVersion.VERSION_1_8
  37 + }
  38 +
  39 + kotlinOptions {
  40 + jvmTarget = "1.8"
  41 + }
  42 +
  43 + sourceSets {
  44 + main.java.srcDirs += "src/main/kotlin"
  45 + test.java.srcDirs += "src/test/kotlin"
  46 + }
  47 +
  48 + defaultConfig {
  49 + minSdk = 21
  50 + }
  51 +
  52 + dependencies {
  53 + testImplementation("org.jetbrains.kotlin:kotlin-test")
  54 + testImplementation("org.mockito:mockito-core:5.0.0")
  55 + }
  56 +
  57 + testOptions {
  58 + unitTests.all {
  59 + useJUnitPlatform()
  60 +
  61 + testLogging {
  62 + events "passed", "skipped", "failed", "standardOut", "standardError"
  63 + outputs.upToDateWhen {false}
  64 + showStandardStreams = true
  65 + }
  66 + }
  67 + }
  68 +}
  1 +rootProject.name = 'speech_to_text_wdn_ohos'
  1 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  2 + package="com.example.speech_to_text_wdn_ohos">
  3 +</manifest>
  1 +package com.example.speech_to_text_wdn_ohos
  2 +
  3 +import androidx.annotation.NonNull
  4 +
  5 +import io.flutter.embedding.engine.plugins.FlutterPlugin
  6 +import io.flutter.plugin.common.MethodCall
  7 +import io.flutter.plugin.common.MethodChannel
  8 +import io.flutter.plugin.common.MethodChannel.MethodCallHandler
  9 +import io.flutter.plugin.common.MethodChannel.Result
  10 +
  11 +/** SpeechToTextWdnOhosPlugin */
  12 +class SpeechToTextWdnOhosPlugin: FlutterPlugin, MethodCallHandler {
  13 + /// The MethodChannel that will the communication between Flutter and native Android
  14 + ///
  15 + /// This local reference serves to register the plugin with the Flutter Engine and unregister it
  16 + /// when the Flutter Engine is detached from the Activity
  17 + private lateinit var channel : MethodChannel
  18 +
  19 + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
  20 + channel = MethodChannel(flutterPluginBinding.binaryMessenger, "speech_to_text_wdn_ohos")
  21 + channel.setMethodCallHandler(this)
  22 + }
  23 +
  24 + override fun onMethodCall(call: MethodCall, result: Result) {
  25 + if (call.method == "getPlatformVersion") {
  26 + result.success("Android ${android.os.Build.VERSION.RELEASE}")
  27 + } else {
  28 + result.notImplemented()
  29 + }
  30 + }
  31 +
  32 + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {
  33 + channel.setMethodCallHandler(null)
  34 + }
  35 +}
  1 +package com.example.speech_to_text_wdn_ohos
  2 +
  3 +import io.flutter.plugin.common.MethodCall
  4 +import io.flutter.plugin.common.MethodChannel
  5 +import kotlin.test.Test
  6 +import org.mockito.Mockito
  7 +
  8 +/*
  9 + * This demonstrates a simple unit test of the Kotlin portion of this plugin's implementation.
  10 + *
  11 + * Once you have built the plugin's example app, you can run these tests from the command
  12 + * line by running `./gradlew testDebugUnitTest` in the `example/android/` directory, or
  13 + * you can run them directly from IDEs that support JUnit such as Android Studio.
  14 + */
  15 +
  16 +internal class SpeechToTextWdnOhosPluginTest {
  17 + @Test
  18 + fun onMethodCall_getPlatformVersion_returnsExpectedValue() {
  19 + val plugin = SpeechToTextWdnOhosPlugin()
  20 +
  21 + val call = MethodCall("getPlatformVersion", null)
  22 + val mockResult: MethodChannel.Result = Mockito.mock(MethodChannel.Result::class.java)
  23 + plugin.onMethodCall(call, mockResult)
  24 +
  25 + Mockito.verify(mockResult).success("Android " + android.os.Build.VERSION.RELEASE)
  26 + }
  27 +}
  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
  1 +# speech_to_text_wdn_ohos_example
  2 +
  3 +Demonstrates how to use the speech_to_text_wdn_ohos plugin.
  4 +
  5 +## Getting Started
  6 +
  7 +This project is a starting point for a Flutter application.
  8 +
  9 +A few resources to get you started if this is your first Flutter project:
  10 +
  11 +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
  12 +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
  13 +
  14 +For help getting started with Flutter development, view the
  15 +[online documentation](https://docs.flutter.dev/), which offers tutorials,
  16 +samples, guidance on mobile development, and a full API reference.
  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
  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
  1 +plugins {
  2 + id "com.android.application"
  3 + id "kotlin-android"
  4 + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
  5 + id "dev.flutter.flutter-gradle-plugin"
  6 +}
  7 +
  8 +def localProperties = new Properties()
  9 +def localPropertiesFile = rootProject.file("local.properties")
  10 +if (localPropertiesFile.exists()) {
  11 + localPropertiesFile.withReader("UTF-8") { reader ->
  12 + localProperties.load(reader)
  13 + }
  14 +}
  15 +
  16 +def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
  17 +if (flutterVersionCode == null) {
  18 + flutterVersionCode = "1"
  19 +}
  20 +
  21 +def flutterVersionName = localProperties.getProperty("flutter.versionName")
  22 +if (flutterVersionName == null) {
  23 + flutterVersionName = "1.0"
  24 +}
  25 +
  26 +android {
  27 + namespace = "com.example.speech_to_text_wdn_ohos_example"
  28 + compileSdk = flutter.compileSdkVersion
  29 + ndkVersion = flutter.ndkVersion
  30 +
  31 + compileOptions {
  32 + sourceCompatibility = JavaVersion.VERSION_1_8
  33 + targetCompatibility = JavaVersion.VERSION_1_8
  34 + }
  35 +
  36 + defaultConfig {
  37 + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  38 + applicationId = "com.example.speech_to_text_wdn_ohos_example"
  39 + // You can update the following values to match your application needs.
  40 + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
  41 + minSdk = flutter.minSdkVersion
  42 + targetSdk = flutter.targetSdkVersion
  43 + versionCode = flutterVersionCode.toInteger()
  44 + versionName = flutterVersionName
  45 + }
  46 +
  47 + buildTypes {
  48 + release {
  49 + // TODO: Add your own signing config for the release build.
  50 + // Signing with the debug keys for now, so `flutter run --release` works.
  51 + signingConfig = signingConfigs.debug
  52 + }
  53 + }
  54 +}
  55 +
  56 +flutter {
  57 + source = "../.."
  58 +}
  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>
  1 +<manifest xmlns:android="http://schemas.android.com/apk/res/android">
  2 + <application
  3 + android:label="speech_to_text_wdn_ohos_example"
  4 + android:name="${applicationName}"
  5 + android:icon="@mipmap/ic_launcher">
  6 + <activity
  7 + android:name=".MainActivity"
  8 + android:exported="true"
  9 + android:launchMode="singleTop"
  10 + android:taskAffinity=""
  11 + android:theme="@style/LaunchTheme"
  12 + android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
  13 + android:hardwareAccelerated="true"
  14 + android:windowSoftInputMode="adjustResize">
  15 + <!-- Specifies an Android theme to apply to this Activity as soon as
  16 + the Android process has started. This theme is visible to the user
  17 + while the Flutter UI initializes. After that, this theme continues
  18 + to determine the Window background behind the Flutter UI. -->
  19 + <meta-data
  20 + android:name="io.flutter.embedding.android.NormalTheme"
  21 + android:resource="@style/NormalTheme"
  22 + />
  23 + <intent-filter>
  24 + <action android:name="android.intent.action.MAIN"/>
  25 + <category android:name="android.intent.category.LAUNCHER"/>
  26 + </intent-filter>
  27 + </activity>
  28 + <!-- Don't delete the meta-data below.
  29 + This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
  30 + <meta-data
  31 + android:name="flutterEmbedding"
  32 + android:value="2" />
  33 + </application>
  34 + <!-- Required to query activities that can process text, see:
  35 + https://developer.android.com/training/package-visibility and
  36 + https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
  37 +
  38 + In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
  39 + <queries>
  40 + <intent>
  41 + <action android:name="android.intent.action.PROCESS_TEXT"/>
  42 + <data android:mimeType="text/plain"/>
  43 + </intent>
  44 + </queries>
  45 +</manifest>
  1 +package com.example.speech_to_text_wdn_ohos_example
  2 +
  3 +import io.flutter.embedding.android.FlutterActivity
  4 +
  5 +class MainActivity: FlutterActivity()
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!-- Modify this file to customize your launch splash screen -->
  3 +<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
  4 + <item android:drawable="?android:colorBackground" />
  5 +
  6 + <!-- You can insert your own image assets here -->
  7 + <!-- <item>
  8 + <bitmap
  9 + android:gravity="center"
  10 + android:src="@mipmap/launch_image" />
  11 + </item> -->
  12 +</layer-list>
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!-- Modify this file to customize your launch splash screen -->
  3 +<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
  4 + <item android:drawable="@android:color/white" />
  5 +
  6 + <!-- You can insert your own image assets here -->
  7 + <!-- <item>
  8 + <bitmap
  9 + android:gravity="center"
  10 + android:src="@mipmap/launch_image" />
  11 + </item> -->
  12 +</layer-list>
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<resources>
  3 + <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
  4 + <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
  5 + <!-- Show a splash screen on the activity. Automatically removed when
  6 + the Flutter engine draws its first frame -->
  7 + <item name="android:windowBackground">@drawable/launch_background</item>
  8 + </style>
  9 + <!-- Theme applied to the Android Window as soon as the process has started.
  10 + This theme determines the color of the Android Window while your
  11 + Flutter UI initializes, as well as behind your Flutter UI while its
  12 + running.
  13 +
  14 + This Theme is only used starting with V2 of Flutter's Android embedding. -->
  15 + <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
  16 + <item name="android:windowBackground">?android:colorBackground</item>
  17 + </style>
  18 +</resources>
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<resources>
  3 + <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
  4 + <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
  5 + <!-- Show a splash screen on the activity. Automatically removed when
  6 + the Flutter engine draws its first frame -->
  7 + <item name="android:windowBackground">@drawable/launch_background</item>
  8 + </style>
  9 + <!-- Theme applied to the Android Window as soon as the process has started.
  10 + This theme determines the color of the Android Window while your
  11 + Flutter UI initializes, as well as behind your Flutter UI while its
  12 + running.
  13 +
  14 + This Theme is only used starting with V2 of Flutter's Android embedding. -->
  15 + <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
  16 + <item name="android:windowBackground">?android:colorBackground</item>
  17 + </style>
  18 +</resources>
  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>
  1 +allprojects {
  2 + repositories {
  3 + google()
  4 + mavenCentral()
  5 + }
  6 +}
  7 +
  8 +rootProject.buildDir = "../build"
  9 +subprojects {
  10 + project.buildDir = "${rootProject.buildDir}/${project.name}"
  11 +}
  12 +subprojects {
  13 + project.evaluationDependsOn(":app")
  14 +}
  15 +
  16 +tasks.register("clean", Delete) {
  17 + delete rootProject.buildDir
  18 +}
  1 +org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
  2 +android.useAndroidX=true
  3 +android.enableJetifier=true
  1 +distributionBase=GRADLE_USER_HOME
  2 +distributionPath=wrapper/dists
  3 +zipStoreBase=GRADLE_USER_HOME
  4 +zipStorePath=wrapper/dists
  5 +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
  1 +pluginManagement {
  2 + def flutterSdkPath = {
  3 + def properties = new Properties()
  4 + file("local.properties").withInputStream { properties.load(it) }
  5 + def flutterSdkPath = properties.getProperty("flutter.sdk")
  6 + assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
  7 + return flutterSdkPath
  8 + }()
  9 +
  10 + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
  11 +
  12 + repositories {
  13 + google()
  14 + mavenCentral()
  15 + gradlePluginPortal()
  16 + }
  17 +}
  18 +
  19 +plugins {
  20 + id "dev.flutter.flutter-plugin-loader" version "1.0.0"
  21 + id "com.android.application" version "7.3.0" apply false
  22 + id "org.jetbrains.kotlin.android" version "1.7.10" apply false
  23 +}
  24 +
  25 +include ":app"
  1 +// This is a basic Flutter integration test.
  2 +//
  3 +// Since integration tests run in a full Flutter application, they can interact
  4 +// with the host side of a plugin implementation, unlike Dart unit tests.
  5 +//
  6 +// For more information about Flutter integration tests, please see
  7 +// https://docs.flutter.dev/cookbook/testing/integration/introduction
  8 +
  9 +
  10 +import 'package:flutter_test/flutter_test.dart';
  11 +import 'package:integration_test/integration_test.dart';
  12 +
  13 +import 'package:speech_to_text_wdn_ohos/speech_to_text_wdn_ohos.dart';
  14 +
  15 +void main() {
  16 + IntegrationTestWidgetsFlutterBinding.ensureInitialized();
  17 +
  18 + testWidgets('getPlatformVersion test', (WidgetTester tester) async {
  19 + final SpeechToTextWdnOhos plugin = SpeechToTextWdnOhos();
  20 + final String? version = await plugin.getPlatformVersion();
  21 + // The version string depends on the host platform running the test, so
  22 + // just assert that some non-empty string is returned.
  23 + expect(version?.isNotEmpty, true);
  24 + });
  25 +}
  1 +**/dgph
  2 +*.mode1v3
  3 +*.mode2v3
  4 +*.moved-aside
  5 +*.pbxuser
  6 +*.perspectivev3
  7 +**/*sync/
  8 +.sconsign.dblite
  9 +.tags*
  10 +**/.vagrant/
  11 +**/DerivedData/
  12 +Icon?
  13 +**/Pods/
  14 +**/.symlinks/
  15 +profile
  16 +xcuserdata
  17 +**/.generated/
  18 +Flutter/App.framework
  19 +Flutter/Flutter.framework
  20 +Flutter/Flutter.podspec
  21 +Flutter/Generated.xcconfig
  22 +Flutter/ephemeral/
  23 +Flutter/app.flx
  24 +Flutter/app.zip
  25 +Flutter/flutter_assets/
  26 +Flutter/flutter_export_environment.sh
  27 +ServiceDefinitions.json
  28 +Runner/GeneratedPluginRegistrant.*
  29 +
  30 +# Exceptions to above rules.
  31 +!default.mode1v3
  32 +!default.mode2v3
  33 +!default.pbxuser
  34 +!default.perspectivev3