Showing
53 changed files
with
107 additions
and
1606 deletions
.vscode/launch.json
0 → 100644
| 1 | +{ | ||
| 2 | + // Use IntelliSense to learn about possible attributes. | ||
| 3 | + // Hover to view descriptions of existing attributes. | ||
| 4 | + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
| 5 | + "version": "0.2.0", | ||
| 6 | + "configurations": [ | ||
| 7 | + { | ||
| 8 | + "name": "Flutter", | ||
| 9 | + "type": "dart", | ||
| 10 | + "request": "launch", | ||
| 11 | + "program": "lib/main.dart", | ||
| 12 | + "flutterMode": "profile" | ||
| 13 | + }, | ||
| 14 | + ] | ||
| 15 | +} |
| @@ -59,7 +59,7 @@ EXTERNAL SOURCES: | @@ -59,7 +59,7 @@ EXTERNAL SOURCES: | ||
| 59 | :path: ".symlinks/plugins/webview_flutter_wkwebview/darwin" | 59 | :path: ".symlinks/plugins/webview_flutter_wkwebview/darwin" |
| 60 | 60 | ||
| 61 | SPEC CHECKSUMS: | 61 | SPEC CHECKSUMS: |
| 62 | - Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 | 62 | + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 |
| 63 | fluttertoast: 2c67e14dce98bbdb200df9e1acf610d7a6264ea1 | 63 | fluttertoast: 2c67e14dce98bbdb200df9e1acf610d7a6264ea1 |
| 64 | image_cropper: c4326ea50132b1e1564499e5d32a84f01fb03537 | 64 | image_cropper: c4326ea50132b1e1564499e5d32a84f01fb03537 |
| 65 | image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a | 65 | image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a |
| @@ -62,8 +62,7 @@ import 'app_localizations_zh.dart'; | @@ -62,8 +62,7 @@ import 'app_localizations_zh.dart'; | ||
| 62 | /// be consistent with the languages listed in the AppLocalizations.supportedLocales | 62 | /// be consistent with the languages listed in the AppLocalizations.supportedLocales |
| 63 | /// property. | 63 | /// property. |
| 64 | abstract class AppLocalizations { | 64 | abstract class AppLocalizations { |
| 65 | - AppLocalizations(String locale) | ||
| 66 | - : localeName = intl.Intl.canonicalizedLocale(locale.toString()); | 65 | + AppLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString()); |
| 67 | 66 | ||
| 68 | final String localeName; | 67 | final String localeName; |
| 69 | 68 | ||
| @@ -71,8 +70,7 @@ abstract class AppLocalizations { | @@ -71,8 +70,7 @@ abstract class AppLocalizations { | ||
| 71 | return Localizations.of<AppLocalizations>(context, AppLocalizations); | 70 | return Localizations.of<AppLocalizations>(context, AppLocalizations); |
| 72 | } | 71 | } |
| 73 | 72 | ||
| 74 | - static const LocalizationsDelegate<AppLocalizations> delegate = | ||
| 75 | - _AppLocalizationsDelegate(); | 73 | + static const LocalizationsDelegate<AppLocalizations> delegate = _AppLocalizationsDelegate(); |
| 76 | 74 | ||
| 77 | /// A list of this localizations delegate along with the default localizations | 75 | /// A list of this localizations delegate along with the default localizations |
| 78 | /// delegates. | 76 | /// delegates. |
| @@ -84,8 +82,7 @@ abstract class AppLocalizations { | @@ -84,8 +82,7 @@ abstract class AppLocalizations { | ||
| 84 | /// Additional delegates can be added by appending to this list in | 82 | /// Additional delegates can be added by appending to this list in |
| 85 | /// MaterialApp. This list does not have to be used at all if a custom list | 83 | /// MaterialApp. This list does not have to be used at all if a custom list |
| 86 | /// of delegates is preferred or required. | 84 | /// of delegates is preferred or required. |
| 87 | - static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = | ||
| 88 | - <LocalizationsDelegate<dynamic>>[ | 85 | + static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = <LocalizationsDelegate<dynamic>>[ |
| 89 | delegate, | 86 | delegate, |
| 90 | GlobalMaterialLocalizations.delegate, | 87 | GlobalMaterialLocalizations.delegate, |
| 91 | GlobalCupertinoLocalizations.delegate, | 88 | GlobalCupertinoLocalizations.delegate, |
| @@ -528,8 +525,7 @@ abstract class AppLocalizations { | @@ -528,8 +525,7 @@ abstract class AppLocalizations { | ||
| 528 | /// | 525 | /// |
| 529 | /// In zh, this message translates to: | 526 | /// In zh, this message translates to: |
| 530 | /// **'你们现在可以查看彼此的 HRV、压力与睡眠变化,并在对方疲惫时及时送上关心。'** | 527 | /// **'你们现在可以查看彼此的 HRV、压力与睡眠变化,并在对方疲惫时及时送上关心。'** |
| 531 | - String | ||
| 532 | - get youCanNowViewEachOtherSHrvStressLevelsAndSleepPatternsAndReachOutToCheckInWhenTheOtherPersonSeemsTired; | 528 | + String get youCanNowViewEachOtherSHrvStressLevelsAndSleepPatternsAndReachOutToCheckInWhenTheOtherPersonSeemsTired; |
| 533 | 529 | ||
| 534 | /// No description provided for @bindPartnerTitle. | 530 | /// No description provided for @bindPartnerTitle. |
| 535 | /// | 531 | /// |
| @@ -1450,8 +1446,7 @@ abstract class AppLocalizations { | @@ -1450,8 +1446,7 @@ abstract class AppLocalizations { | ||
| 1450 | String get todayFaqWatchFaceBlackScreenDescription; | 1446 | String get todayFaqWatchFaceBlackScreenDescription; |
| 1451 | } | 1447 | } |
| 1452 | 1448 | ||
| 1453 | -class _AppLocalizationsDelegate | ||
| 1454 | - extends LocalizationsDelegate<AppLocalizations> { | 1449 | +class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> { |
| 1455 | const _AppLocalizationsDelegate(); | 1450 | const _AppLocalizationsDelegate(); |
| 1456 | 1451 | ||
| 1457 | @override | 1452 | @override |
| @@ -1460,25 +1455,25 @@ class _AppLocalizationsDelegate | @@ -1460,25 +1455,25 @@ class _AppLocalizationsDelegate | ||
| 1460 | } | 1455 | } |
| 1461 | 1456 | ||
| 1462 | @override | 1457 | @override |
| 1463 | - bool isSupported(Locale locale) => | ||
| 1464 | - <String>['en', 'zh'].contains(locale.languageCode); | 1458 | + bool isSupported(Locale locale) => <String>['en', 'zh'].contains(locale.languageCode); |
| 1465 | 1459 | ||
| 1466 | @override | 1460 | @override |
| 1467 | bool shouldReload(_AppLocalizationsDelegate old) => false; | 1461 | bool shouldReload(_AppLocalizationsDelegate old) => false; |
| 1468 | } | 1462 | } |
| 1469 | 1463 | ||
| 1470 | AppLocalizations lookupAppLocalizations(Locale locale) { | 1464 | AppLocalizations lookupAppLocalizations(Locale locale) { |
| 1465 | + | ||
| 1466 | + | ||
| 1471 | // Lookup logic when only language code is specified. | 1467 | // Lookup logic when only language code is specified. |
| 1472 | switch (locale.languageCode) { | 1468 | switch (locale.languageCode) { |
| 1473 | - case 'en': | ||
| 1474 | - return AppLocalizationsEn(); | ||
| 1475 | - case 'zh': | ||
| 1476 | - return AppLocalizationsZh(); | 1469 | + case 'en': return AppLocalizationsEn(); |
| 1470 | + case 'zh': return AppLocalizationsZh(); | ||
| 1477 | } | 1471 | } |
| 1478 | 1472 | ||
| 1479 | throw FlutterError( | 1473 | throw FlutterError( |
| 1480 | - 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' | ||
| 1481 | - 'an issue with the localizations generation tool. Please file an issue ' | ||
| 1482 | - 'on GitHub with a reproducible sample app and the gen-l10n configuration ' | ||
| 1483 | - 'that was used.'); | 1474 | + 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' |
| 1475 | + 'an issue with the localizations generation tool. Please file an issue ' | ||
| 1476 | + 'on GitHub with a reproducible sample app and the gen-l10n configuration ' | ||
| 1477 | + 'that was used.' | ||
| 1478 | + ); | ||
| 1484 | } | 1479 | } |
| 1 | -// ignore: unused_import | ||
| 2 | -import 'package:intl/intl.dart' as intl; | ||
| 3 | import 'app_localizations.dart'; | 1 | import 'app_localizations.dart'; |
| 4 | 2 | ||
| 5 | // ignore_for_file: type=lint | 3 | // ignore_for_file: type=lint |
| @@ -69,12 +67,10 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -69,12 +67,10 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 69 | String get settings => 'Settings'; | 67 | String get settings => 'Settings'; |
| 70 | 68 | ||
| 71 | @override | 69 | @override |
| 72 | - String get onboardingIntroTitle => | ||
| 73 | - 'DoubleFeel is a health companion app built for Apple Watch'; | 70 | + String get onboardingIntroTitle => 'DoubleFeel is a health companion app built for Apple Watch'; |
| 74 | 71 | ||
| 75 | @override | 72 | @override |
| 76 | - String get onboardingIntroBody => | ||
| 77 | - 'We hope to help you\n<em>notice changes in your mind and body, and help the people who love you</em> see when you are <em>tired or need support</em>'; | 73 | + String get onboardingIntroBody => 'We hope to help you\n<em>notice changes in your mind and body, and help the people who love you</em> see when you are <em>tired or need support</em>'; |
| 78 | 74 | ||
| 79 | @override | 75 | @override |
| 80 | String get onboardingStateQuestion => 'Which of these often happens to you?'; | 76 | String get onboardingStateQuestion => 'Which of these often happens to you?'; |
| @@ -86,19 +82,16 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -86,19 +82,16 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 86 | String get onboardingStateTired => 'I get tired easily'; | 82 | String get onboardingStateTired => 'I get tired easily'; |
| 87 | 83 | ||
| 88 | @override | 84 | @override |
| 89 | - String get onboardingStatePoorRest => | ||
| 90 | - 'I wake up but still do not feel rested'; | 85 | + String get onboardingStatePoorRest => 'I wake up but still do not feel rested'; |
| 91 | 86 | ||
| 92 | @override | 87 | @override |
| 93 | - String get onboardingStateNeedStimulants => | ||
| 94 | - 'I rely on cigarettes, alcohol, coffee, or other stimulants to stay alert'; | 88 | + String get onboardingStateNeedStimulants => 'I rely on cigarettes, alcohol, coffee, or other stimulants to stay alert'; |
| 95 | 89 | ||
| 96 | @override | 90 | @override |
| 97 | String get onboardingStateNone => 'None of the above'; | 91 | String get onboardingStateNone => 'None of the above'; |
| 98 | 92 | ||
| 99 | @override | 93 | @override |
| 100 | - String get onboardingStressGoalQuestion => | ||
| 101 | - 'What do you want to learn by understanding stress?'; | 94 | + String get onboardingStressGoalQuestion => 'What do you want to learn by understanding stress?'; |
| 102 | 95 | ||
| 103 | @override | 96 | @override |
| 104 | String get onboardingStressGoalSource => 'Understand where stress comes from'; | 97 | String get onboardingStressGoalSource => 'Understand where stress comes from'; |
| @@ -107,8 +100,7 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -107,8 +100,7 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 107 | String get onboardingStressGoalReminder => 'Get reminded when stress appears'; | 100 | String get onboardingStressGoalReminder => 'Get reminded when stress appears'; |
| 108 | 101 | ||
| 109 | @override | 102 | @override |
| 110 | - String get onboardingStressGoalLovedOnes => | ||
| 111 | - 'Let people who care about me know my stress state'; | 103 | + String get onboardingStressGoalLovedOnes => 'Let people who care about me know my stress state'; |
| 112 | 104 | ||
| 113 | @override | 105 | @override |
| 114 | String get onboardingStressGoalRelax => 'Understand stress and feel lighter'; | 106 | String get onboardingStressGoalRelax => 'Understand stress and feel lighter'; |
| @@ -117,8 +109,7 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -117,8 +109,7 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 117 | String get onboardingStressGoalBodyTalk => 'Communicate better with my body'; | 109 | String get onboardingStressGoalBodyTalk => 'Communicate better with my body'; |
| 118 | 110 | ||
| 119 | @override | 111 | @override |
| 120 | - String get onboardingReliefQuestion => | ||
| 121 | - 'Which methods do you think can ease stress?'; | 112 | + String get onboardingReliefQuestion => 'Which methods do you think can ease stress?'; |
| 122 | 113 | ||
| 123 | @override | 114 | @override |
| 124 | String get onboardingReliefSleep => 'Regular sleep'; | 115 | String get onboardingReliefSleep => 'Regular sleep'; |
| @@ -142,8 +133,7 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -142,8 +133,7 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 142 | String get onboardingKeyDataTitle => 'Did you know?'; | 133 | String get onboardingKeyDataTitle => 'Did you know?'; |
| 143 | 134 | ||
| 144 | @override | 135 | @override |
| 145 | - String get onboardingKeyDataSubtitle => | ||
| 146 | - 'Everyone has a magical and important body metric that can help us:'; | 136 | + String get onboardingKeyDataSubtitle => 'Everyone has a magical and important body metric that can help us:'; |
| 147 | 137 | ||
| 148 | @override | 138 | @override |
| 149 | String get onboardingKeyDataStress => 'Monitor stress'; | 139 | String get onboardingKeyDataStress => 'Monitor stress'; |
| @@ -158,8 +148,7 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -158,8 +148,7 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 158 | String get onboardingKeyDataHabits => 'Build healthy habits'; | 148 | String get onboardingKeyDataHabits => 'Build healthy habits'; |
| 159 | 149 | ||
| 160 | @override | 150 | @override |
| 161 | - String get onboardingKeyDataLovedOnes => | ||
| 162 | - 'Help important people care about your state in time'; | 151 | + String get onboardingKeyDataLovedOnes => 'Help important people care about your state in time'; |
| 163 | 152 | ||
| 164 | @override | 153 | @override |
| 165 | String get onboardingTellMeWhatItIs => 'Tell me what it is!'; | 154 | String get onboardingTellMeWhatItIs => 'Tell me what it is!'; |
| @@ -168,19 +157,16 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -168,19 +157,16 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 168 | String get onboardingHrvTitle => 'It is HRV, heart rate variability'; | 157 | String get onboardingHrvTitle => 'It is HRV, heart rate variability'; |
| 169 | 158 | ||
| 170 | @override | 159 | @override |
| 171 | - String get onboardingHrvSubtitle => | ||
| 172 | - 'It helps us measure overall stress and health'; | 160 | + String get onboardingHrvSubtitle => 'It helps us measure overall stress and health'; |
| 173 | 161 | ||
| 174 | @override | 162 | @override |
| 175 | - String get onboardingHrvDescription => | ||
| 176 | - 'Heart rate variability (HRV) is the tiny variation in time between heartbeats. It reflects autonomic nervous system activity and how the body responds to stress.'; | 163 | + String get onboardingHrvDescription => 'Heart rate variability (HRV) is the tiny variation in time between heartbeats. It reflects autonomic nervous system activity and how the body responds to stress.'; |
| 177 | 164 | ||
| 178 | @override | 165 | @override |
| 179 | String get onboardingTellMeMore => 'Tell me more'; | 166 | String get onboardingTellMeMore => 'Tell me more'; |
| 180 | 167 | ||
| 181 | @override | 168 | @override |
| 182 | - String get onboardingResearchTitle => | ||
| 183 | - 'Many studies show that HRV changes are closely related to how our body and mind feel'; | 169 | + String get onboardingResearchTitle => 'Many studies show that HRV changes are closely related to how our body and mind feel'; |
| 184 | 170 | ||
| 185 | @override | 171 | @override |
| 186 | String get onboardingResearchFatigue => 'Physical fatigue'; | 172 | String get onboardingResearchFatigue => 'Physical fatigue'; |
| @@ -198,30 +184,25 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -198,30 +184,25 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 198 | String get onboardingHealthPermissionTitle => 'Allow health data access'; | 184 | String get onboardingHealthPermissionTitle => 'Allow health data access'; |
| 199 | 185 | ||
| 200 | @override | 186 | @override |
| 201 | - String get onboardingHealthPermissionBody => | ||
| 202 | - 'DoubleFeel needs connected wearable health data to send reminders, count stress moments, and provide suggestions.'; | 187 | + String get onboardingHealthPermissionBody => 'DoubleFeel needs connected wearable health data to send reminders, count stress moments, and provide suggestions.'; |
| 203 | 188 | ||
| 204 | @override | 189 | @override |
| 205 | - String get onboardingHealthPermissionPrivacy => | ||
| 206 | - 'Your health data is stored locally. We do not upload any related data.'; | 190 | + String get onboardingHealthPermissionPrivacy => 'Your health data is stored locally. We do not upload any related data.'; |
| 207 | 191 | ||
| 208 | @override | 192 | @override |
| 209 | String get onboardingNotificationTitle => 'Turn on notifications'; | 193 | String get onboardingNotificationTitle => 'Turn on notifications'; |
| 210 | 194 | ||
| 211 | @override | 195 | @override |
| 212 | - String get onboardingNotificationSubtitle => | ||
| 213 | - 'Learn about every body change in time'; | 196 | + String get onboardingNotificationSubtitle => 'Learn about every body change in time'; |
| 214 | 197 | ||
| 215 | @override | 198 | @override |
| 216 | - String get onboardingNotificationBody => | ||
| 217 | - 'After Apple Watch data updates, we can remind you in time and help you act to improve your stress state.'; | 199 | + String get onboardingNotificationBody => 'After Apple Watch data updates, we can remind you in time and help you act to improve your stress state.'; |
| 218 | 200 | ||
| 219 | @override | 201 | @override |
| 220 | String get onboardingMemberTitle => 'Get an annual membership offer'; | 202 | String get onboardingMemberTitle => 'Get an annual membership offer'; |
| 221 | 203 | ||
| 222 | @override | 204 | @override |
| 223 | - String get onboardingMemberBody => | ||
| 224 | - 'Start your pressure alert and health companion journey, so love and care are always present.'; | 205 | + String get onboardingMemberBody => 'Start your pressure alert and health companion journey, so love and care are always present.'; |
| 225 | 206 | ||
| 226 | @override | 207 | @override |
| 227 | String get onboardingMemberOriginalPrice => 'Original ¥72.00/year'; | 208 | String get onboardingMemberOriginalPrice => 'Original ¥72.00/year'; |
| @@ -236,16 +217,13 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -236,16 +217,13 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 236 | String get onboardingMemberAllOptions => 'View all purchase options'; | 217 | String get onboardingMemberAllOptions => 'View all purchase options'; |
| 237 | 218 | ||
| 238 | @override | 219 | @override |
| 239 | - String get healthCompanionIsNowAvailable => | ||
| 240 | - 'Health Companion is now available'; | 220 | + String get healthCompanionIsNowAvailable => 'Health Companion is now available'; |
| 241 | 221 | ||
| 242 | @override | 222 | @override |
| 243 | - String get youCanNowViewEachOtherSHrvStressLevelsAndSleepPatternsAndReachOutToCheckInWhenTheOtherPersonSeemsTired => | ||
| 244 | - 'You can now view each other\'s HRV, stress levels, and sleep patterns, and reach out to check in when the other person seems tired.'; | 223 | + String get youCanNowViewEachOtherSHrvStressLevelsAndSleepPatternsAndReachOutToCheckInWhenTheOtherPersonSeemsTired => 'You can now view each other\'s HRV, stress levels, and sleep patterns, and reach out to check in when the other person seems tired.'; |
| 245 | 224 | ||
| 246 | @override | 225 | @override |
| 247 | - String get bindPartnerTitle => | ||
| 248 | - 'Add a Close Contact\nOne more person to care about your health'; | 226 | + String get bindPartnerTitle => 'Add a Close Contact\nOne more person to care about your health'; |
| 249 | 227 | ||
| 250 | @override | 228 | @override |
| 251 | String get bindPartnerMyId => 'My ID'; | 229 | String get bindPartnerMyId => 'My ID'; |
| @@ -284,8 +262,7 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -284,8 +262,7 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 284 | String get onboardingResearchGoodSleep => 'Good Sleep'; | 262 | String get onboardingResearchGoodSleep => 'Good Sleep'; |
| 285 | 263 | ||
| 286 | @override | 264 | @override |
| 287 | - String get loginSlogan => | ||
| 288 | - 'Start your pressure alert and health companion journey\nso love and care are always present'; | 265 | + String get loginSlogan => 'Start your pressure alert and health companion journey\nso love and care are always present'; |
| 289 | 266 | ||
| 290 | @override | 267 | @override |
| 291 | String get loginWithPhone => 'Sign in with Phone'; | 268 | String get loginWithPhone => 'Sign in with Phone'; |
| @@ -335,15 +312,13 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -335,15 +312,13 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 335 | String get phoneLoginCodeHint => 'Enter verification code'; | 312 | String get phoneLoginCodeHint => 'Enter verification code'; |
| 336 | 313 | ||
| 337 | @override | 314 | @override |
| 338 | - String get phoneLoginAutoRegisterHint => | ||
| 339 | - 'Unregistered numbers will be registered automatically'; | 315 | + String get phoneLoginAutoRegisterHint => 'Unregistered numbers will be registered automatically'; |
| 340 | 316 | ||
| 341 | @override | 317 | @override |
| 342 | String get phoneLoginLoggingIn => 'Signing in...'; | 318 | String get phoneLoginLoggingIn => 'Signing in...'; |
| 343 | 319 | ||
| 344 | @override | 320 | @override |
| 345 | - String get loginAgreeToTermsToast => | ||
| 346 | - 'Please read and agree to the Terms of Service and Privacy Policy first'; | 321 | + String get loginAgreeToTermsToast => 'Please read and agree to the Terms of Service and Privacy Policy first'; |
| 347 | 322 | ||
| 348 | @override | 323 | @override |
| 349 | String get phoneLoginInvalidPhone => 'Invalid phone number'; | 324 | String get phoneLoginInvalidPhone => 'Invalid phone number'; |
| @@ -355,12 +330,10 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -355,12 +330,10 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 355 | String get phoneLoginInvalidCode => 'Invalid verification code'; | 330 | String get phoneLoginInvalidCode => 'Invalid verification code'; |
| 356 | 331 | ||
| 357 | @override | 332 | @override |
| 358 | - String get todayHealthDataAuthTitle => | ||
| 359 | - 'Unable to access heart rate health data'; | 333 | + String get todayHealthDataAuthTitle => 'Unable to access heart rate health data'; |
| 360 | 334 | ||
| 361 | @override | 335 | @override |
| 362 | - String get todayHealthDataAuthDescription => | ||
| 363 | - 'DoubleFeel needs permission to access your health data to provide stress reminders, real-time stress statistics, and health suggestions. Otherwise, some app features may not work properly. Your health data is stored locally only and will not be uploaded to any server.'; | 336 | + String get todayHealthDataAuthDescription => 'DoubleFeel needs permission to access your health data to provide stress reminders, real-time stress statistics, and health suggestions. Otherwise, some app features may not work properly. Your health data is stored locally only and will not be uploaded to any server.'; |
| 364 | 337 | ||
| 365 | @override | 338 | @override |
| 366 | String get todayHealthDataAuthAction => 'Authorize health data access'; | 339 | String get todayHealthDataAuthAction => 'Authorize health data access'; |
| 1 | -// ignore: unused_import | ||
| 2 | -import 'package:intl/intl.dart' as intl; | ||
| 3 | import 'app_localizations.dart'; | 1 | import 'app_localizations.dart'; |
| 4 | 2 | ||
| 5 | // ignore_for_file: type=lint | 3 | // ignore_for_file: type=lint |
| @@ -72,8 +70,7 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -72,8 +70,7 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 72 | String get onboardingIntroTitle => 'DoubleFeel 是专为 Apple Watch 打造的健康陪伴app'; | 70 | String get onboardingIntroTitle => 'DoubleFeel 是专为 Apple Watch 打造的健康陪伴app'; |
| 73 | 71 | ||
| 74 | @override | 72 | @override |
| 75 | - String get onboardingIntroBody => | ||
| 76 | - '我们希望可以帮助你\n<em>关注自己的身心变化,也让爱你的人</em>及时发现你的<em>疲惫与需要</em>'; | 73 | + String get onboardingIntroBody => '我们希望可以帮助你\n<em>关注自己的身心变化,也让爱你的人</em>及时发现你的<em>疲惫与需要</em>'; |
| 77 | 74 | ||
| 78 | @override | 75 | @override |
| 79 | String get onboardingStateQuestion => '请问以下哪些描述,经常发生在你身上?'; | 76 | String get onboardingStateQuestion => '请问以下哪些描述,经常发生在你身上?'; |
| @@ -163,8 +160,7 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -163,8 +160,7 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 163 | String get onboardingHrvSubtitle => '它能帮助我们衡量整体的压力和健康状态'; | 160 | String get onboardingHrvSubtitle => '它能帮助我们衡量整体的压力和健康状态'; |
| 164 | 161 | ||
| 165 | @override | 162 | @override |
| 166 | - String get onboardingHrvDescription => | ||
| 167 | - '心率变异性(HRV, Heart Rate Variability)即心跳之间间隔时间的微小变化,反映了自主神经系统活动和身体对压力的反应能力'; | 163 | + String get onboardingHrvDescription => '心率变异性(HRV, Heart Rate Variability)即心跳之间间隔时间的微小变化,反映了自主神经系统活动和身体对压力的反应能力'; |
| 168 | 164 | ||
| 169 | @override | 165 | @override |
| 170 | String get onboardingTellMeMore => '展开说说'; | 166 | String get onboardingTellMeMore => '展开说说'; |
| @@ -188,12 +184,10 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -188,12 +184,10 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 188 | String get onboardingHealthPermissionTitle => '允许访问健康数据'; | 184 | String get onboardingHealthPermissionTitle => '允许访问健康数据'; |
| 189 | 185 | ||
| 190 | @override | 186 | @override |
| 191 | - String get onboardingHealthPermissionBody => | ||
| 192 | - 'DoubleFeel需要连接健康穿戴设备数据,以提醒、统计压力时刻、提供建议。'; | 187 | + String get onboardingHealthPermissionBody => 'DoubleFeel需要连接健康穿戴设备数据,以提醒、统计压力时刻、提供建议。'; |
| 193 | 188 | ||
| 194 | @override | 189 | @override |
| 195 | - String get onboardingHealthPermissionPrivacy => | ||
| 196 | - '请放心,你的健康数据只会存储在本地,我们不上传任何相关数据。'; | 190 | + String get onboardingHealthPermissionPrivacy => '请放心,你的健康数据只会存储在本地,我们不上传任何相关数据。'; |
| 197 | 191 | ||
| 198 | @override | 192 | @override |
| 199 | String get onboardingNotificationTitle => '开启通知'; | 193 | String get onboardingNotificationTitle => '开启通知'; |
| @@ -202,8 +196,7 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -202,8 +196,7 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 202 | String get onboardingNotificationSubtitle => '及时了解身体每一次异动'; | 196 | String get onboardingNotificationSubtitle => '及时了解身体每一次异动'; |
| 203 | 197 | ||
| 204 | @override | 198 | @override |
| 205 | - String get onboardingNotificationBody => | ||
| 206 | - 'AppleWatch数据更新后会及时提醒你,帮助你及时行动,改善压力状态'; | 199 | + String get onboardingNotificationBody => 'AppleWatch数据更新后会及时提醒你,帮助你及时行动,改善压力状态'; |
| 207 | 200 | ||
| 208 | @override | 201 | @override |
| 209 | String get onboardingMemberTitle => '获得年度会员优惠'; | 202 | String get onboardingMemberTitle => '获得年度会员优惠'; |
| @@ -227,9 +220,7 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -227,9 +220,7 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 227 | String get healthCompanionIsNowAvailable => '健康陪伴已开启'; | 220 | String get healthCompanionIsNowAvailable => '健康陪伴已开启'; |
| 228 | 221 | ||
| 229 | @override | 222 | @override |
| 230 | - String | ||
| 231 | - get youCanNowViewEachOtherSHrvStressLevelsAndSleepPatternsAndReachOutToCheckInWhenTheOtherPersonSeemsTired => | ||
| 232 | - '你们现在可以查看彼此的 HRV、压力与睡眠变化,并在对方疲惫时及时送上关心。'; | 223 | + String get youCanNowViewEachOtherSHrvStressLevelsAndSleepPatternsAndReachOutToCheckInWhenTheOtherPersonSeemsTired => '你们现在可以查看彼此的 HRV、压力与睡眠变化,并在对方疲惫时及时送上关心。'; |
| 233 | 224 | ||
| 234 | @override | 225 | @override |
| 235 | String get bindPartnerTitle => '添加亲密联系人\n多一个人关注你的健康'; | 226 | String get bindPartnerTitle => '添加亲密联系人\n多一个人关注你的健康'; |
| @@ -342,8 +333,7 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -342,8 +333,7 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 342 | String get todayHealthDataAuthTitle => '无法获取心率健康数据'; | 333 | String get todayHealthDataAuthTitle => '无法获取心率健康数据'; |
| 343 | 334 | ||
| 344 | @override | 335 | @override |
| 345 | - String get todayHealthDataAuthDescription => | ||
| 346 | - 'DoubleFeel 需要授权访问你的健康数据,才能提供压力提醒、实时压力统计和健康建议;否则应用功能可能无法正常使用。请放心,你的健康数据仅存储在本地,不会上传到任何服务器。'; | 336 | + String get todayHealthDataAuthDescription => 'DoubleFeel 需要授权访问你的健康数据,才能提供压力提醒、实时压力统计和健康建议;否则应用功能可能无法正常使用。请放心,你的健康数据仅存储在本地,不会上传到任何服务器。'; |
| 347 | 337 | ||
| 348 | @override | 338 | @override |
| 349 | String get todayHealthDataAuthAction => '授权访问健康数据'; | 339 | String get todayHealthDataAuthAction => '授权访问健康数据'; |
| 1 | -[ | ||
| 2 | - { | ||
| 3 | - "analyzerMode":"BEFORE_RELEASE_CHECK_MODE", | ||
| 4 | - "autoCompile":true, | ||
| 5 | - "autoTest":true, | ||
| 6 | - "cardId":200, | ||
| 7 | - "cardName":"自动上架体验规范体检", | ||
| 8 | - "coldStartCount":0, | ||
| 9 | - "default":true, | ||
| 10 | - "projectType":"app", | ||
| 11 | - "replayTask":false, | ||
| 12 | - "replayTime":60, | ||
| 13 | - "ruleCodeList":[ | ||
| 14 | - "0132", | ||
| 15 | - "0133", | ||
| 16 | - "0134", | ||
| 17 | - "0135", | ||
| 18 | - "0601", | ||
| 19 | - "0604", | ||
| 20 | - "0602", | ||
| 21 | - "0502", | ||
| 22 | - "0512", | ||
| 23 | - "0515" | ||
| 24 | - ], | ||
| 25 | - "singleOperateDuration":20, | ||
| 26 | - "testDuration":30 | ||
| 27 | - } | ||
| 28 | -] |
| 1 | -[ | ||
| 2 | - { | ||
| 3 | - "analyzerMode":"BEFORE_RELEASE_CHECK_MODE", | ||
| 4 | - "autoCompile":true, | ||
| 5 | - "autoTest":true, | ||
| 6 | - "cardId":300, | ||
| 7 | - "cardName":"自动上架体验规范体检", | ||
| 8 | - "coldStartCount":0, | ||
| 9 | - "default":true, | ||
| 10 | - "projectType":"service", | ||
| 11 | - "replayTask":false, | ||
| 12 | - "replayTime":60, | ||
| 13 | - "ruleCodeList":[ | ||
| 14 | - "0132", | ||
| 15 | - "0133", | ||
| 16 | - "0134", | ||
| 17 | - "0135", | ||
| 18 | - "0601", | ||
| 19 | - "0604", | ||
| 20 | - "0602", | ||
| 21 | - "0502", | ||
| 22 | - "0512", | ||
| 23 | - "0515" | ||
| 24 | - ], | ||
| 25 | - "singleOperateDuration":20, | ||
| 26 | - "testDuration":30 | ||
| 27 | - } | ||
| 28 | -] |
| 1 | -2026031201 |
ohos-dev/.gitignore
deleted
100644 → 0
| 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 |
ohos-dev/AppScope/app.json5
deleted
100644 → 0
6.63 KB
ohos-dev/build-profile.json5
deleted
100644 → 0
| 1 | -{ | ||
| 2 | - "app": { | ||
| 3 | - "signingConfigs": [ | ||
| 4 | - { | ||
| 5 | - "name": "default", | ||
| 6 | - "type": "HarmonyOS", | ||
| 7 | - "material": { | ||
| 8 | - "certpath": "/Users/changshouda/.ohos/config/default_ohos_vKsCARV5xViLtjn_9PuLQcrOe5rSSbAnDdfHVUvSJBw=.cer", | ||
| 9 | - "keyAlias": "debugKey", | ||
| 10 | - "keyPassword": "0000001B8633917FD6E13B94AB277BE5B9EFD374ABE0BE813C34FD491ADCB0D102C8354C832AFD650EDE57", | ||
| 11 | - "profile": "/Users/changshouda/.ohos/config/default_ohos_vKsCARV5xViLtjn_9PuLQcrOe5rSSbAnDdfHVUvSJBw=.p7b", | ||
| 12 | - "signAlg": "SHA256withECDSA", | ||
| 13 | - "storeFile": "/Users/changshouda/.ohos/config/default_ohos_vKsCARV5xViLtjn_9PuLQcrOe5rSSbAnDdfHVUvSJBw=.p12", | ||
| 14 | - "storePassword": "0000001BB1E97D57837DF0C573416B83B451B9C8E4A48A80E73F66A4BCFEA797C54672EFB1A8D3E06AFAF1" | ||
| 15 | - } | ||
| 16 | - } | ||
| 17 | - ], | ||
| 18 | - "products": [ | ||
| 19 | - { | ||
| 20 | - "name": "default", | ||
| 21 | - "signingConfig": "default", | ||
| 22 | - "targetSdkVersion": "6.0.0(20)", | ||
| 23 | - "compatibleSdkVersion": "6.0.0(20)", | ||
| 24 | - "runtimeOS": "HarmonyOS" | ||
| 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 | -} |
ohos-dev/entry/.gitignore
deleted
100644 → 0
ohos-dev/entry/build-profile.json5
deleted
100644 → 0
ohos-dev/entry/hvigorfile.ts
deleted
100644 → 0
| 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 | -} |
ohos-dev/entry/oh-package.json5
deleted
100644 → 0
| 1 | - | ||
| 2 | -import { FlutterAbility, FlutterEngine } from '@ohos/flutter_ohos'; | ||
| 3 | -import { GeneratedPluginRegistrant } from '../plugins/GeneratedPluginRegistrant'; | ||
| 4 | -import { NativePigeonRegistrar } from '../native/NativePigeonRegistrar'; | ||
| 5 | - | ||
| 6 | -export default class EntryAbility extends FlutterAbility { | ||
| 7 | - configureFlutterEngine(flutterEngine: FlutterEngine) { | ||
| 8 | - super.configureFlutterEngine(flutterEngine) | ||
| 9 | - GeneratedPluginRegistrant.registerWith(flutterEngine) | ||
| 10 | - NativePigeonRegistrar.register(flutterEngine.getDartExecutor()!.getBinaryMessenger()!) | ||
| 11 | - } | ||
| 12 | -} |
| 1 | -import { AlipayHostApi, AliPayResultCode } from '../pigeon/AlipayApi'; | ||
| 2 | - | ||
| 3 | -/** | ||
| 4 | - * Alipay host implementation for HarmonyOS. | ||
| 5 | - * | ||
| 6 | - * Currently a stub – replace with the real Alipay HarmonyOS SDK call | ||
| 7 | - * once the SDK is available. | ||
| 8 | - */ | ||
| 9 | -export class AlipayHostApiImpl extends AlipayHostApi { | ||
| 10 | - launchAliPay(_prepayData: string): AliPayResultCode { | ||
| 11 | - // TODO: call Alipay HarmonyOS SDK | ||
| 12 | - return AliPayResultCode.UNSUPPORTED; | ||
| 13 | - } | ||
| 14 | -} |
| 1 | -import { HealthKitHostApi, HealthUploadResult } from '../pigeon/HealthKitApi'; | ||
| 2 | - | ||
| 3 | -/** | ||
| 4 | - * HealthKit host implementation for HarmonyOS. | ||
| 5 | - * | ||
| 6 | - * Currently a stub – replace with HarmonyOS @kit.HealthKit ArkTS API calls | ||
| 7 | - * once integration is ready. | ||
| 8 | - */ | ||
| 9 | -export class HealthKitHostApiImpl extends HealthKitHostApi { | ||
| 10 | - checkHealthAppAuthorization(): boolean { | ||
| 11 | - // TODO: call HarmonyOS Health Kit authorization check API | ||
| 12 | - return false; | ||
| 13 | - } | ||
| 14 | - | ||
| 15 | - getHealthServerAuthUrl(): string { | ||
| 16 | - // TODO: build OAuth URL for HarmonyOS Health Kit server authorization | ||
| 17 | - return ''; | ||
| 18 | - } | ||
| 19 | - | ||
| 20 | - requestHealthClientAuthorization(): boolean { | ||
| 21 | - // TODO: launch HarmonyOS Health Kit client authorization UI | ||
| 22 | - return false; | ||
| 23 | - } | ||
| 24 | - | ||
| 25 | - cancelHealthAppAuthorization(): boolean { | ||
| 26 | - // TODO: call HarmonyOS Health Kit cancel authorization API | ||
| 27 | - return false; | ||
| 28 | - } | ||
| 29 | - | ||
| 30 | - performHealthUpload(): HealthUploadResult { | ||
| 31 | - // TODO: read health data via HarmonyOS @kit.HealthKit and upload to server | ||
| 32 | - return new HealthUploadResult(false, false, 'Native bridge pending on HarmonyOS'); | ||
| 33 | - } | ||
| 34 | -} |
| 1 | -import { HealthKitHostApi } from '../pigeon/HealthKitApi'; | ||
| 2 | -import { WearEngineHostApi } from '../pigeon/WearEngineApi'; | ||
| 3 | -import { AlipayHostApi } from '../pigeon/AlipayApi'; | ||
| 4 | -import { BinaryMessenger } from '@ohos/flutter_ohos/src/main/ets/plugin/common/BinaryMessenger'; | ||
| 5 | -import { AlipayHostApiImpl } from './AlipayHostApiImpl'; | ||
| 6 | -import { HealthKitHostApiImpl } from './HealthKitHostApiImpl'; | ||
| 7 | -import { WearEngineHostApiImpl } from './WearEngineHostApiImpl'; | ||
| 8 | - | ||
| 9 | -/** Registers all Pigeon host-API implementations with the Flutter binary messenger. */ | ||
| 10 | -export class NativePigeonRegistrar { | ||
| 11 | - static register(binaryMessenger: BinaryMessenger): void { | ||
| 12 | - HealthKitHostApi.setup(binaryMessenger, new HealthKitHostApiImpl()); | ||
| 13 | - WearEngineHostApi.setup(binaryMessenger, new WearEngineHostApiImpl()); | ||
| 14 | - AlipayHostApi.setup(binaryMessenger, new AlipayHostApiImpl()); | ||
| 15 | - } | ||
| 16 | -} |
| 1 | -import { WearEngineHostApi, WearDeviceInfo } from '../pigeon/WearEngineApi'; | ||
| 2 | - | ||
| 3 | -/** | ||
| 4 | - * WearEngine host implementation for HarmonyOS. | ||
| 5 | - * | ||
| 6 | - * Currently a stub – replace with HarmonyOS distributed communication / | ||
| 7 | - * BLE / HiWear ArkTS API calls once integration is ready. | ||
| 8 | - */ | ||
| 9 | -export class WearEngineHostApiImpl extends WearEngineHostApi { | ||
| 10 | - hasAvailableDevices(): boolean { | ||
| 11 | - // TODO: call HarmonyOS device discovery API | ||
| 12 | - return false; | ||
| 13 | - } | ||
| 14 | - | ||
| 15 | - checkConnectedDevice(): WearDeviceInfo { | ||
| 16 | - // TODO: query connected wearable via HarmonyOS distributed bus | ||
| 17 | - return new WearDeviceInfo(); | ||
| 18 | - } | ||
| 19 | - | ||
| 20 | - registerMessageReceiver(): boolean { | ||
| 21 | - // TODO: register P2P message listener on HarmonyOS | ||
| 22 | - return false; | ||
| 23 | - } | ||
| 24 | - | ||
| 25 | - sendTextMessage(_message: string): boolean { | ||
| 26 | - // TODO: send P2P text message to watch via HarmonyOS | ||
| 27 | - return false; | ||
| 28 | - } | ||
| 29 | - | ||
| 30 | - sendWatchSyncPayload(jsonPayload: string): boolean { | ||
| 31 | - return this.sendTextMessage(jsonPayload); | ||
| 32 | - } | ||
| 33 | -} |
| 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 | -* // Copyright 2013 The Flutter Authors. All rights reserved. | ||
| 3 | -*/ | ||
| 4 | -import StandardMessageCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/StandardMessageCodec'; | ||
| 5 | -import BasicMessageChannel, { Reply } from '@ohos/flutter_ohos/src/main/ets/plugin/common/BasicMessageChannel'; | ||
| 6 | -import { BinaryMessenger,TaskQueue } from '@ohos/flutter_ohos/src/main/ets/plugin/common/BinaryMessenger'; | ||
| 7 | -import MessageCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/MessageCodec'; | ||
| 8 | -import { ByteBuffer } from '@ohos/flutter_ohos/src/main/ets/util/ByteBuffer'; | ||
| 9 | - | ||
| 10 | - | ||
| 11 | -/** Error class for passing custom error details to Flutter via a thrown PlatformException. */ | ||
| 12 | -export class FlutterError implements Error { | ||
| 13 | - | ||
| 14 | - /** The error code. */ | ||
| 15 | - public code: string; | ||
| 16 | - | ||
| 17 | - /** The error name. */ | ||
| 18 | - public name: string; | ||
| 19 | - | ||
| 20 | - /** The error message. */ | ||
| 21 | - public message: string; | ||
| 22 | - /** The error stack. */ | ||
| 23 | - public stack?: string; | ||
| 24 | - | ||
| 25 | - constructor(code: string, name: string, message: string, stack?: string) | ||
| 26 | - { | ||
| 27 | - this.code = code; | ||
| 28 | - this.name = name; | ||
| 29 | - this.message = message; | ||
| 30 | - this.stack = stack; | ||
| 31 | - } | ||
| 32 | -} | ||
| 33 | - | ||
| 34 | -function wrapError(error: Error): Array<Object> { | ||
| 35 | - let errorList: Array<Object> = new Array<Object>(3); | ||
| 36 | - if (error instanceof FlutterError) { | ||
| 37 | - let err: FlutterError = error as FlutterError; | ||
| 38 | - errorList[0] = err.code; | ||
| 39 | - errorList[1] = err.name; | ||
| 40 | - errorList[2] = err.message; | ||
| 41 | - } else { | ||
| 42 | - errorList[0] = error.toString(); | ||
| 43 | - errorList[1] = error.name; | ||
| 44 | - errorList[2] = "Cause: " + error.message + ", Stacktrace: " + error.stack; | ||
| 45 | - } | ||
| 46 | - return errorList; | ||
| 47 | -} | ||
| 48 | - | ||
| 49 | -/* | ||
| 50 | -* Alipay payment result codes. | ||
| 51 | -* | ||
| 52 | -* Generated enum from Pigeon that represents data sent in messages. | ||
| 53 | -*/ | ||
| 54 | -export enum AliPayResultCode { | ||
| 55 | - SUCCESS, | ||
| 56 | - CANCEL, | ||
| 57 | - ERROR, | ||
| 58 | - UNSUPPORTED | ||
| 59 | -} | ||
| 60 | - | ||
| 61 | -/* | ||
| 62 | -* Alipay payment result codes. | ||
| 63 | -* | ||
| 64 | -* Generated enum Companion class from Pigeon that represents data sent | ||
| 65 | - in messages.Do not delete otherwise enum type data transfer will be failed | ||
| 66 | -*/ | ||
| 67 | -export class AliPayResultCodeEnum { | ||
| 68 | - index: string|null = null; | ||
| 69 | - constructor(index: string){ | ||
| 70 | - this.index = index; | ||
| 71 | - } | ||
| 72 | -} | ||
| 73 | - | ||
| 74 | -export class PigeonCodec extends StandardMessageCodec { | ||
| 75 | - static readonly INSTANCE: PigeonCodec = new PigeonCodec(); | ||
| 76 | - | ||
| 77 | - getByte(n: number): number { | ||
| 78 | - let byteArray = new Uint8Array(1); | ||
| 79 | - byteArray[0] = n; | ||
| 80 | - return byteArray[0] as number; | ||
| 81 | - } | ||
| 82 | - private constructor() { | ||
| 83 | - super(); | ||
| 84 | - } | ||
| 85 | - | ||
| 86 | - readValueOfType(type: number, buffer: ByteBuffer): ESObject { | ||
| 87 | - switch (type) { | ||
| 88 | - case this.getByte(129): { | ||
| 89 | - let value: Object= super.readValue(buffer); | ||
| 90 | - return value == null ? null : AliPayResultCode[value as number]; | ||
| 91 | - } | ||
| 92 | - default: | ||
| 93 | - return super.readValueOfType(type, buffer); | ||
| 94 | - } | ||
| 95 | - } | ||
| 96 | - | ||
| 97 | - writeValue(stream: ByteBuffer , value: ESObject): ESObject{ | ||
| 98 | - if (value instanceof AliPayResultCodeEnum) { | ||
| 99 | - stream.writeUint8(this.getByte(129)); | ||
| 100 | - this.writeValue(stream, value == null ? null : AliPayResultCode[value.index as string]); | ||
| 101 | - } else { | ||
| 102 | - super.writeValue(stream, value); | ||
| 103 | - } | ||
| 104 | - } | ||
| 105 | -} | ||
| 106 | - | ||
| 107 | -/* Generated abstract class from Pigeon that represents a handler of messages from Flutter.*/ | ||
| 108 | -export abstract class AlipayHostApi { | ||
| 109 | - | ||
| 110 | - abstract launchAliPay(prepayData: string ): AliPayResultCode; | ||
| 111 | - /** The codec used by AlipayHostApi. */ | ||
| 112 | - static getCodec(): MessageCodec<Object>{ | ||
| 113 | - return PigeonCodec.INSTANCE; | ||
| 114 | - } | ||
| 115 | - /*Sets up an instance of `AlipayHostApi` to handle messages through the `binaryMessenger`.*/ | ||
| 116 | - static setup(binaryMessenger: BinaryMessenger, api: AlipayHostApi | null): void { | ||
| 117 | - { | ||
| 118 | - let channel: BasicMessageChannel<Object> = | ||
| 119 | - new BasicMessageChannel( | ||
| 120 | - binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.AlipayHostApi.launchAliPay", AlipayHostApi.getCodec()); | ||
| 121 | - if (api != null) { | ||
| 122 | - channel.setMessageHandler({ | ||
| 123 | - onMessage(message: Object ,reply: Reply<Object> ) { | ||
| 124 | - let args: Array<Object> = message as Array<Object>; | ||
| 125 | - let res: Array<Object> = []; | ||
| 126 | - try { | ||
| 127 | - let output: AliPayResultCodeEnum = new AliPayResultCodeEnum(api!.launchAliPay(args[0] as AliPayResultCode).toString()); | ||
| 128 | - res.push(output); | ||
| 129 | - } | ||
| 130 | - catch (error) { | ||
| 131 | - let wrappedError: Array<Object> = wrapError(error); | ||
| 132 | - res = wrappedError; | ||
| 133 | - } | ||
| 134 | - reply.reply(res); | ||
| 135 | - } }); | ||
| 136 | - } else { | ||
| 137 | - channel.setMessageHandler(null); | ||
| 138 | - } | ||
| 139 | - } | ||
| 140 | - } | ||
| 141 | -} |
| 1 | -/* | ||
| 2 | -* // Copyright 2013 The Flutter Authors. All rights reserved. | ||
| 3 | -*/ | ||
| 4 | -import StandardMessageCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/StandardMessageCodec'; | ||
| 5 | -import BasicMessageChannel, { Reply } from '@ohos/flutter_ohos/src/main/ets/plugin/common/BasicMessageChannel'; | ||
| 6 | -import { BinaryMessenger,TaskQueue } from '@ohos/flutter_ohos/src/main/ets/plugin/common/BinaryMessenger'; | ||
| 7 | -import MessageCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/MessageCodec'; | ||
| 8 | -import { ByteBuffer } from '@ohos/flutter_ohos/src/main/ets/util/ByteBuffer'; | ||
| 9 | - | ||
| 10 | - | ||
| 11 | -/** Error class for passing custom error details to Flutter via a thrown PlatformException. */ | ||
| 12 | -export class FlutterError implements Error { | ||
| 13 | - | ||
| 14 | - /** The error code. */ | ||
| 15 | - public code: string; | ||
| 16 | - | ||
| 17 | - /** The error name. */ | ||
| 18 | - public name: string; | ||
| 19 | - | ||
| 20 | - /** The error message. */ | ||
| 21 | - public message: string; | ||
| 22 | - /** The error stack. */ | ||
| 23 | - public stack?: string; | ||
| 24 | - | ||
| 25 | - constructor(code: string, name: string, message: string, stack?: string) | ||
| 26 | - { | ||
| 27 | - this.code = code; | ||
| 28 | - this.name = name; | ||
| 29 | - this.message = message; | ||
| 30 | - this.stack = stack; | ||
| 31 | - } | ||
| 32 | -} | ||
| 33 | - | ||
| 34 | -function wrapError(error: Error): Array<Object> { | ||
| 35 | - let errorList: Array<Object> = new Array<Object>(3); | ||
| 36 | - if (error instanceof FlutterError) { | ||
| 37 | - let err: FlutterError = error as FlutterError; | ||
| 38 | - errorList[0] = err.code; | ||
| 39 | - errorList[1] = err.name; | ||
| 40 | - errorList[2] = err.message; | ||
| 41 | - } else { | ||
| 42 | - errorList[0] = error.toString(); | ||
| 43 | - errorList[1] = error.name; | ||
| 44 | - errorList[2] = "Cause: " + error.message + ", Stacktrace: " + error.stack; | ||
| 45 | - } | ||
| 46 | - return errorList; | ||
| 47 | -} | ||
| 48 | - | ||
| 49 | -/* Generated class from Pigeon that represents data sent in messages.*/ | ||
| 50 | -export class HealthUploadResult { | ||
| 51 | - private commonUploadSuccess?: boolean; | ||
| 52 | - | ||
| 53 | - public setCommonUploadSuccess(commonUploadSuccess:boolean):void { | ||
| 54 | - this.commonUploadSuccess = commonUploadSuccess; | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - getCommonUploadSuccess(): boolean | undefined{ | ||
| 58 | - return this.commonUploadSuccess; | ||
| 59 | - } | ||
| 60 | - | ||
| 61 | - private sleepUploadSuccess?: boolean; | ||
| 62 | - | ||
| 63 | - public setSleepUploadSuccess(sleepUploadSuccess:boolean):void { | ||
| 64 | - this.sleepUploadSuccess = sleepUploadSuccess; | ||
| 65 | - } | ||
| 66 | - | ||
| 67 | - getSleepUploadSuccess(): boolean | undefined{ | ||
| 68 | - return this.sleepUploadSuccess; | ||
| 69 | - } | ||
| 70 | - | ||
| 71 | - private errorMessage?: string; | ||
| 72 | - | ||
| 73 | - public setErrorMessage(errorMessage:string):void { | ||
| 74 | - this.errorMessage = errorMessage; | ||
| 75 | - } | ||
| 76 | - | ||
| 77 | - getErrorMessage(): string | undefined{ | ||
| 78 | - return this.errorMessage; | ||
| 79 | - } | ||
| 80 | - | ||
| 81 | - constructor(commonUploadSuccess?: boolean, sleepUploadSuccess?: boolean, errorMessage?: string) { | ||
| 82 | - this.commonUploadSuccess = commonUploadSuccess; | ||
| 83 | - this.sleepUploadSuccess = sleepUploadSuccess; | ||
| 84 | - this.errorMessage = errorMessage; | ||
| 85 | - } | ||
| 86 | - | ||
| 87 | - toList(): Object[] { | ||
| 88 | - let arr: Object[] = new Array(); | ||
| 89 | - if(this.commonUploadSuccess !==undefined){ | ||
| 90 | - arr.push(this.commonUploadSuccess); | ||
| 91 | - } | ||
| 92 | - if(this.sleepUploadSuccess !==undefined){ | ||
| 93 | - arr.push(this.sleepUploadSuccess); | ||
| 94 | - } | ||
| 95 | - if(this.errorMessage !==undefined){ | ||
| 96 | - arr.push(this.errorMessage); | ||
| 97 | - } | ||
| 98 | - return arr; | ||
| 99 | - } | ||
| 100 | - | ||
| 101 | - static fromList(arr: Object[]): HealthUploadResult { | ||
| 102 | - let pigeonResult: HealthUploadResult = new HealthUploadResult(); | ||
| 103 | - let commonUploadSuccess: Object = arr[0]; | ||
| 104 | - pigeonResult.setCommonUploadSuccess(commonUploadSuccess as boolean); | ||
| 105 | - let sleepUploadSuccess: Object = arr[1]; | ||
| 106 | - pigeonResult.setSleepUploadSuccess(sleepUploadSuccess as boolean); | ||
| 107 | - let errorMessage: Object = arr[2]; | ||
| 108 | - pigeonResult.setErrorMessage(errorMessage as string); | ||
| 109 | - return pigeonResult; | ||
| 110 | - } | ||
| 111 | -} | ||
| 112 | - | ||
| 113 | -export class PigeonCodec extends StandardMessageCodec { | ||
| 114 | - static readonly INSTANCE: PigeonCodec = new PigeonCodec(); | ||
| 115 | - | ||
| 116 | - getByte(n: number): number { | ||
| 117 | - let byteArray = new Uint8Array(1); | ||
| 118 | - byteArray[0] = n; | ||
| 119 | - return byteArray[0] as number; | ||
| 120 | - } | ||
| 121 | - private constructor() { | ||
| 122 | - super(); | ||
| 123 | - } | ||
| 124 | - | ||
| 125 | - readValueOfType(type: number, buffer: ByteBuffer): ESObject { | ||
| 126 | - switch (type) { | ||
| 127 | - case this.getByte(129): | ||
| 128 | - return HealthUploadResult.fromList(super.readValue(buffer) as Object[]); | ||
| 129 | - default: | ||
| 130 | - return super.readValueOfType(type, buffer); | ||
| 131 | - } | ||
| 132 | - } | ||
| 133 | - | ||
| 134 | - writeValue(stream: ByteBuffer , value: ESObject): ESObject{ | ||
| 135 | - if (value instanceof HealthUploadResult) { | ||
| 136 | - stream.writeUint8(this.getByte(129)); | ||
| 137 | - this.writeValue(stream, (value as HealthUploadResult).toList()); | ||
| 138 | - } else { | ||
| 139 | - super.writeValue(stream, value); | ||
| 140 | - } | ||
| 141 | - } | ||
| 142 | -} | ||
| 143 | - | ||
| 144 | -/* Generated abstract class from Pigeon that represents a handler of messages from Flutter.*/ | ||
| 145 | -export abstract class HealthKitHostApi { | ||
| 146 | - | ||
| 147 | - abstract checkHealthAppAuthorization(): boolean; | ||
| 148 | - | ||
| 149 | - abstract getHealthServerAuthUrl(): string; | ||
| 150 | - /* Opens Huawei Health client authorization UI. Returns whether user granted.*/ | ||
| 151 | - abstract requestHealthClientAuthorization(): boolean; | ||
| 152 | - | ||
| 153 | - abstract cancelHealthAppAuthorization(): boolean; | ||
| 154 | - /* Runs native health read and server upload pipeline.*/ | ||
| 155 | - abstract performHealthUpload(): HealthUploadResult; | ||
| 156 | - /** The codec used by HealthKitHostApi. */ | ||
| 157 | - static getCodec(): MessageCodec<Object>{ | ||
| 158 | - return PigeonCodec.INSTANCE; | ||
| 159 | - } | ||
| 160 | - /*Sets up an instance of `HealthKitHostApi` to handle messages through the `binaryMessenger`.*/ | ||
| 161 | - static setup(binaryMessenger: BinaryMessenger, api: HealthKitHostApi | null): void { | ||
| 162 | - { | ||
| 163 | - let channel: BasicMessageChannel<Object> = | ||
| 164 | - new BasicMessageChannel( | ||
| 165 | - binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.checkHealthAppAuthorization", HealthKitHostApi.getCodec()); | ||
| 166 | - if (api != null) { | ||
| 167 | - channel.setMessageHandler({ | ||
| 168 | - onMessage(message: Object ,reply: Reply<Object> ) { | ||
| 169 | - let res: Array<Object> = []; | ||
| 170 | - try { | ||
| 171 | - let output: boolean = api!.checkHealthAppAuthorization(); | ||
| 172 | - res.push(output); | ||
| 173 | - } | ||
| 174 | - catch (error) { | ||
| 175 | - let wrappedError: Array<Object> = wrapError(error); | ||
| 176 | - res = wrappedError; | ||
| 177 | - } | ||
| 178 | - reply.reply(res); | ||
| 179 | - } }); | ||
| 180 | - } else { | ||
| 181 | - channel.setMessageHandler(null); | ||
| 182 | - } | ||
| 183 | - } | ||
| 184 | - { | ||
| 185 | - let channel: BasicMessageChannel<Object> = | ||
| 186 | - new BasicMessageChannel( | ||
| 187 | - binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.getHealthServerAuthUrl", HealthKitHostApi.getCodec()); | ||
| 188 | - if (api != null) { | ||
| 189 | - channel.setMessageHandler({ | ||
| 190 | - onMessage(message: Object ,reply: Reply<Object> ) { | ||
| 191 | - let res: Array<Object> = []; | ||
| 192 | - try { | ||
| 193 | - let output: string = api!.getHealthServerAuthUrl(); | ||
| 194 | - res.push(output); | ||
| 195 | - } | ||
| 196 | - catch (error) { | ||
| 197 | - let wrappedError: Array<Object> = wrapError(error); | ||
| 198 | - res = wrappedError; | ||
| 199 | - } | ||
| 200 | - reply.reply(res); | ||
| 201 | - } }); | ||
| 202 | - } else { | ||
| 203 | - channel.setMessageHandler(null); | ||
| 204 | - } | ||
| 205 | - } | ||
| 206 | - { | ||
| 207 | - let channel: BasicMessageChannel<Object> = | ||
| 208 | - new BasicMessageChannel( | ||
| 209 | - binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.requestHealthClientAuthorization", HealthKitHostApi.getCodec()); | ||
| 210 | - if (api != null) { | ||
| 211 | - channel.setMessageHandler({ | ||
| 212 | - onMessage(message: Object ,reply: Reply<Object> ) { | ||
| 213 | - let res: Array<Object> = []; | ||
| 214 | - try { | ||
| 215 | - let output: boolean = api!.requestHealthClientAuthorization(); | ||
| 216 | - res.push(output); | ||
| 217 | - } | ||
| 218 | - catch (error) { | ||
| 219 | - let wrappedError: Array<Object> = wrapError(error); | ||
| 220 | - res = wrappedError; | ||
| 221 | - } | ||
| 222 | - reply.reply(res); | ||
| 223 | - } }); | ||
| 224 | - } else { | ||
| 225 | - channel.setMessageHandler(null); | ||
| 226 | - } | ||
| 227 | - } | ||
| 228 | - { | ||
| 229 | - let channel: BasicMessageChannel<Object> = | ||
| 230 | - new BasicMessageChannel( | ||
| 231 | - binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.cancelHealthAppAuthorization", HealthKitHostApi.getCodec()); | ||
| 232 | - if (api != null) { | ||
| 233 | - channel.setMessageHandler({ | ||
| 234 | - onMessage(message: Object ,reply: Reply<Object> ) { | ||
| 235 | - let res: Array<Object> = []; | ||
| 236 | - try { | ||
| 237 | - let output: boolean = api!.cancelHealthAppAuthorization(); | ||
| 238 | - res.push(output); | ||
| 239 | - } | ||
| 240 | - catch (error) { | ||
| 241 | - let wrappedError: Array<Object> = wrapError(error); | ||
| 242 | - res = wrappedError; | ||
| 243 | - } | ||
| 244 | - reply.reply(res); | ||
| 245 | - } }); | ||
| 246 | - } else { | ||
| 247 | - channel.setMessageHandler(null); | ||
| 248 | - } | ||
| 249 | - } | ||
| 250 | - { | ||
| 251 | - let channel: BasicMessageChannel<Object> = | ||
| 252 | - new BasicMessageChannel( | ||
| 253 | - binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.performHealthUpload", HealthKitHostApi.getCodec()); | ||
| 254 | - if (api != null) { | ||
| 255 | - channel.setMessageHandler({ | ||
| 256 | - onMessage(message: Object ,reply: Reply<Object> ) { | ||
| 257 | - let res: Array<Object> = []; | ||
| 258 | - try { | ||
| 259 | - let output: HealthUploadResult = api!.performHealthUpload(); | ||
| 260 | - res.push(output); | ||
| 261 | - } | ||
| 262 | - catch (error) { | ||
| 263 | - let wrappedError: Array<Object> = wrapError(error); | ||
| 264 | - res = wrappedError; | ||
| 265 | - } | ||
| 266 | - reply.reply(res); | ||
| 267 | - } }); | ||
| 268 | - } else { | ||
| 269 | - channel.setMessageHandler(null); | ||
| 270 | - } | ||
| 271 | - } | ||
| 272 | - } | ||
| 273 | -} |
| 1 | -/* | ||
| 2 | -* // Copyright 2013 The Flutter Authors. All rights reserved. | ||
| 3 | -*/ | ||
| 4 | -import StandardMessageCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/StandardMessageCodec'; | ||
| 5 | -import BasicMessageChannel, { Reply } from '@ohos/flutter_ohos/src/main/ets/plugin/common/BasicMessageChannel'; | ||
| 6 | -import { BinaryMessenger,TaskQueue } from '@ohos/flutter_ohos/src/main/ets/plugin/common/BinaryMessenger'; | ||
| 7 | -import MessageCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/MessageCodec'; | ||
| 8 | -import { ByteBuffer } from '@ohos/flutter_ohos/src/main/ets/util/ByteBuffer'; | ||
| 9 | - | ||
| 10 | - | ||
| 11 | -/** Error class for passing custom error details to Flutter via a thrown PlatformException. */ | ||
| 12 | -export class FlutterError implements Error { | ||
| 13 | - | ||
| 14 | - /** The error code. */ | ||
| 15 | - public code: string; | ||
| 16 | - | ||
| 17 | - /** The error name. */ | ||
| 18 | - public name: string; | ||
| 19 | - | ||
| 20 | - /** The error message. */ | ||
| 21 | - public message: string; | ||
| 22 | - /** The error stack. */ | ||
| 23 | - public stack?: string; | ||
| 24 | - | ||
| 25 | - constructor(code: string, name: string, message: string, stack?: string) | ||
| 26 | - { | ||
| 27 | - this.code = code; | ||
| 28 | - this.name = name; | ||
| 29 | - this.message = message; | ||
| 30 | - this.stack = stack; | ||
| 31 | - } | ||
| 32 | -} | ||
| 33 | - | ||
| 34 | -function wrapError(error: Error): Array<Object> { | ||
| 35 | - let errorList: Array<Object> = new Array<Object>(3); | ||
| 36 | - if (error instanceof FlutterError) { | ||
| 37 | - let err: FlutterError = error as FlutterError; | ||
| 38 | - errorList[0] = err.code; | ||
| 39 | - errorList[1] = err.name; | ||
| 40 | - errorList[2] = err.message; | ||
| 41 | - } else { | ||
| 42 | - errorList[0] = error.toString(); | ||
| 43 | - errorList[1] = error.name; | ||
| 44 | - errorList[2] = "Cause: " + error.message + ", Stacktrace: " + error.stack; | ||
| 45 | - } | ||
| 46 | - return errorList; | ||
| 47 | -} | ||
| 48 | - | ||
| 49 | -/* Generated class from Pigeon that represents data sent in messages.*/ | ||
| 50 | -export class WearDeviceInfo { | ||
| 51 | - private deviceId?: string; | ||
| 52 | - | ||
| 53 | - public setDeviceId(deviceId:string):void { | ||
| 54 | - this.deviceId = deviceId; | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - getDeviceId(): string | undefined{ | ||
| 58 | - return this.deviceId; | ||
| 59 | - } | ||
| 60 | - | ||
| 61 | - private deviceName?: string; | ||
| 62 | - | ||
| 63 | - public setDeviceName(deviceName:string):void { | ||
| 64 | - this.deviceName = deviceName; | ||
| 65 | - } | ||
| 66 | - | ||
| 67 | - getDeviceName(): string | undefined{ | ||
| 68 | - return this.deviceName; | ||
| 69 | - } | ||
| 70 | - | ||
| 71 | - private isConnected?: boolean; | ||
| 72 | - | ||
| 73 | - public setIsConnected(isConnected:boolean):void { | ||
| 74 | - this.isConnected = isConnected; | ||
| 75 | - } | ||
| 76 | - | ||
| 77 | - getIsConnected(): boolean | undefined{ | ||
| 78 | - return this.isConnected; | ||
| 79 | - } | ||
| 80 | - | ||
| 81 | - constructor(deviceId?: string, deviceName?: string, isConnected?: boolean) { | ||
| 82 | - this.deviceId = deviceId; | ||
| 83 | - this.deviceName = deviceName; | ||
| 84 | - this.isConnected = isConnected; | ||
| 85 | - } | ||
| 86 | - | ||
| 87 | - toList(): Object[] { | ||
| 88 | - let arr: Object[] = new Array(); | ||
| 89 | - if(this.deviceId !==undefined){ | ||
| 90 | - arr.push(this.deviceId); | ||
| 91 | - } | ||
| 92 | - if(this.deviceName !==undefined){ | ||
| 93 | - arr.push(this.deviceName); | ||
| 94 | - } | ||
| 95 | - if(this.isConnected !==undefined){ | ||
| 96 | - arr.push(this.isConnected); | ||
| 97 | - } | ||
| 98 | - return arr; | ||
| 99 | - } | ||
| 100 | - | ||
| 101 | - static fromList(arr: Object[]): WearDeviceInfo { | ||
| 102 | - let pigeonResult: WearDeviceInfo = new WearDeviceInfo(); | ||
| 103 | - let deviceId: Object = arr[0]; | ||
| 104 | - pigeonResult.setDeviceId(deviceId as string); | ||
| 105 | - let deviceName: Object = arr[1]; | ||
| 106 | - pigeonResult.setDeviceName(deviceName as string); | ||
| 107 | - let isConnected: Object = arr[2]; | ||
| 108 | - pigeonResult.setIsConnected(isConnected as boolean); | ||
| 109 | - return pigeonResult; | ||
| 110 | - } | ||
| 111 | -} | ||
| 112 | - | ||
| 113 | -export class PigeonCodec extends StandardMessageCodec { | ||
| 114 | - static readonly INSTANCE: PigeonCodec = new PigeonCodec(); | ||
| 115 | - | ||
| 116 | - getByte(n: number): number { | ||
| 117 | - let byteArray = new Uint8Array(1); | ||
| 118 | - byteArray[0] = n; | ||
| 119 | - return byteArray[0] as number; | ||
| 120 | - } | ||
| 121 | - private constructor() { | ||
| 122 | - super(); | ||
| 123 | - } | ||
| 124 | - | ||
| 125 | - readValueOfType(type: number, buffer: ByteBuffer): ESObject { | ||
| 126 | - switch (type) { | ||
| 127 | - case this.getByte(129): | ||
| 128 | - return WearDeviceInfo.fromList(super.readValue(buffer) as Object[]); | ||
| 129 | - default: | ||
| 130 | - return super.readValueOfType(type, buffer); | ||
| 131 | - } | ||
| 132 | - } | ||
| 133 | - | ||
| 134 | - writeValue(stream: ByteBuffer , value: ESObject): ESObject{ | ||
| 135 | - if (value instanceof WearDeviceInfo) { | ||
| 136 | - stream.writeUint8(this.getByte(129)); | ||
| 137 | - this.writeValue(stream, (value as WearDeviceInfo).toList()); | ||
| 138 | - } else { | ||
| 139 | - super.writeValue(stream, value); | ||
| 140 | - } | ||
| 141 | - } | ||
| 142 | -} | ||
| 143 | - | ||
| 144 | -/* Generated abstract class from Pigeon that represents a handler of messages from Flutter.*/ | ||
| 145 | -export abstract class WearEngineHostApi { | ||
| 146 | - | ||
| 147 | - abstract hasAvailableDevices(): boolean; | ||
| 148 | - | ||
| 149 | - abstract checkConnectedDevice(): WearDeviceInfo; | ||
| 150 | - | ||
| 151 | - abstract registerMessageReceiver(): boolean; | ||
| 152 | - | ||
| 153 | - abstract sendTextMessage(message: string ): boolean; | ||
| 154 | - | ||
| 155 | - abstract sendWatchSyncPayload(jsonPayload: string ): boolean; | ||
| 156 | - /** The codec used by WearEngineHostApi. */ | ||
| 157 | - static getCodec(): MessageCodec<Object>{ | ||
| 158 | - return PigeonCodec.INSTANCE; | ||
| 159 | - } | ||
| 160 | - /*Sets up an instance of `WearEngineHostApi` to handle messages through the `binaryMessenger`.*/ | ||
| 161 | - static setup(binaryMessenger: BinaryMessenger, api: WearEngineHostApi | null): void { | ||
| 162 | - { | ||
| 163 | - let channel: BasicMessageChannel<Object> = | ||
| 164 | - new BasicMessageChannel( | ||
| 165 | - binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.WearEngineHostApi.hasAvailableDevices", WearEngineHostApi.getCodec()); | ||
| 166 | - if (api != null) { | ||
| 167 | - channel.setMessageHandler({ | ||
| 168 | - onMessage(message: Object ,reply: Reply<Object> ) { | ||
| 169 | - let res: Array<Object> = []; | ||
| 170 | - try { | ||
| 171 | - let output: boolean = api!.hasAvailableDevices(); | ||
| 172 | - res.push(output); | ||
| 173 | - } | ||
| 174 | - catch (error) { | ||
| 175 | - let wrappedError: Array<Object> = wrapError(error); | ||
| 176 | - res = wrappedError; | ||
| 177 | - } | ||
| 178 | - reply.reply(res); | ||
| 179 | - } }); | ||
| 180 | - } else { | ||
| 181 | - channel.setMessageHandler(null); | ||
| 182 | - } | ||
| 183 | - } | ||
| 184 | - { | ||
| 185 | - let channel: BasicMessageChannel<Object> = | ||
| 186 | - new BasicMessageChannel( | ||
| 187 | - binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.WearEngineHostApi.checkConnectedDevice", WearEngineHostApi.getCodec()); | ||
| 188 | - if (api != null) { | ||
| 189 | - channel.setMessageHandler({ | ||
| 190 | - onMessage(message: Object ,reply: Reply<Object> ) { | ||
| 191 | - let res: Array<Object> = []; | ||
| 192 | - try { | ||
| 193 | - let output: WearDeviceInfo = api!.checkConnectedDevice(); | ||
| 194 | - res.push(output); | ||
| 195 | - } | ||
| 196 | - catch (error) { | ||
| 197 | - let wrappedError: Array<Object> = wrapError(error); | ||
| 198 | - res = wrappedError; | ||
| 199 | - } | ||
| 200 | - reply.reply(res); | ||
| 201 | - } }); | ||
| 202 | - } else { | ||
| 203 | - channel.setMessageHandler(null); | ||
| 204 | - } | ||
| 205 | - } | ||
| 206 | - { | ||
| 207 | - let channel: BasicMessageChannel<Object> = | ||
| 208 | - new BasicMessageChannel( | ||
| 209 | - binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.WearEngineHostApi.registerMessageReceiver", WearEngineHostApi.getCodec()); | ||
| 210 | - if (api != null) { | ||
| 211 | - channel.setMessageHandler({ | ||
| 212 | - onMessage(message: Object ,reply: Reply<Object> ) { | ||
| 213 | - let res: Array<Object> = []; | ||
| 214 | - try { | ||
| 215 | - let output: boolean = api!.registerMessageReceiver(); | ||
| 216 | - res.push(output); | ||
| 217 | - } | ||
| 218 | - catch (error) { | ||
| 219 | - let wrappedError: Array<Object> = wrapError(error); | ||
| 220 | - res = wrappedError; | ||
| 221 | - } | ||
| 222 | - reply.reply(res); | ||
| 223 | - } }); | ||
| 224 | - } else { | ||
| 225 | - channel.setMessageHandler(null); | ||
| 226 | - } | ||
| 227 | - } | ||
| 228 | - { | ||
| 229 | - let channel: BasicMessageChannel<Object> = | ||
| 230 | - new BasicMessageChannel( | ||
| 231 | - binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.WearEngineHostApi.sendTextMessage", WearEngineHostApi.getCodec()); | ||
| 232 | - if (api != null) { | ||
| 233 | - channel.setMessageHandler({ | ||
| 234 | - onMessage(message: Object ,reply: Reply<Object> ) { | ||
| 235 | - let args: Array<Object> = message as Array<Object>; | ||
| 236 | - let res: Array<Object> = []; | ||
| 237 | - try { | ||
| 238 | - let output: boolean = api!.sendTextMessage(args[0] as string); | ||
| 239 | - res.push(output); | ||
| 240 | - } | ||
| 241 | - catch (error) { | ||
| 242 | - let wrappedError: Array<Object> = wrapError(error); | ||
| 243 | - res = wrappedError; | ||
| 244 | - } | ||
| 245 | - reply.reply(res); | ||
| 246 | - } }); | ||
| 247 | - } else { | ||
| 248 | - channel.setMessageHandler(null); | ||
| 249 | - } | ||
| 250 | - } | ||
| 251 | - { | ||
| 252 | - let channel: BasicMessageChannel<Object> = | ||
| 253 | - new BasicMessageChannel( | ||
| 254 | - binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.WearEngineHostApi.sendWatchSyncPayload", WearEngineHostApi.getCodec()); | ||
| 255 | - if (api != null) { | ||
| 256 | - channel.setMessageHandler({ | ||
| 257 | - onMessage(message: Object ,reply: Reply<Object> ) { | ||
| 258 | - let args: Array<Object> = message as Array<Object>; | ||
| 259 | - let res: Array<Object> = []; | ||
| 260 | - try { | ||
| 261 | - let output: boolean = api!.sendWatchSyncPayload(args[0] as string); | ||
| 262 | - res.push(output); | ||
| 263 | - } | ||
| 264 | - catch (error) { | ||
| 265 | - let wrappedError: Array<Object> = wrapError(error); | ||
| 266 | - res = wrappedError; | ||
| 267 | - } | ||
| 268 | - reply.reply(res); | ||
| 269 | - } }); | ||
| 270 | - } else { | ||
| 271 | - channel.setMessageHandler(null); | ||
| 272 | - } | ||
| 273 | - } | ||
| 274 | - } | ||
| 275 | -} |
ohos-dev/entry/src/main/module.json5
deleted
100644 → 0
| 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 | -} |
6.63 KB
| 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 | - "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 | -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 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 | -} |
6.63 KB
ohos-dev/hvigor/hvigor-config.json5
deleted
100644 → 0
ohos-dev/hvigorconfig.ts
deleted
100644 → 0
ohos-dev/hvigorfile.ts
deleted
100644 → 0
| 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 | -} |
ohos-dev/oh-package.json5
deleted
100644 → 0
| @@ -133,10 +133,10 @@ packages: | @@ -133,10 +133,10 @@ packages: | ||
| 133 | dependency: transitive | 133 | dependency: transitive |
| 134 | description: | 134 | description: |
| 135 | name: characters | 135 | name: characters |
| 136 | - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 | 136 | + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" |
| 137 | url: "https://pub.dev" | 137 | url: "https://pub.dev" |
| 138 | source: hosted | 138 | source: hosted |
| 139 | - version: "1.4.0" | 139 | + version: "1.3.0" |
| 140 | checked_yaml: | 140 | checked_yaml: |
| 141 | dependency: transitive | 141 | dependency: transitive |
| 142 | description: | 142 | description: |
| @@ -149,10 +149,10 @@ packages: | @@ -149,10 +149,10 @@ packages: | ||
| 149 | dependency: transitive | 149 | dependency: transitive |
| 150 | description: | 150 | description: |
| 151 | name: clock | 151 | name: clock |
| 152 | - sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b | 152 | + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf |
| 153 | url: "https://pub.dev" | 153 | url: "https://pub.dev" |
| 154 | source: hosted | 154 | source: hosted |
| 155 | - version: "1.1.2" | 155 | + version: "1.1.1" |
| 156 | code_builder: | 156 | code_builder: |
| 157 | dependency: transitive | 157 | dependency: transitive |
| 158 | description: | 158 | description: |
| @@ -165,10 +165,10 @@ packages: | @@ -165,10 +165,10 @@ packages: | ||
| 165 | dependency: transitive | 165 | dependency: transitive |
| 166 | description: | 166 | description: |
| 167 | name: collection | 167 | name: collection |
| 168 | - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" | 168 | + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf |
| 169 | url: "https://pub.dev" | 169 | url: "https://pub.dev" |
| 170 | source: hosted | 170 | source: hosted |
| 171 | - version: "1.19.1" | 171 | + version: "1.19.0" |
| 172 | convert: | 172 | convert: |
| 173 | dependency: transitive | 173 | dependency: transitive |
| 174 | description: | 174 | description: |
| @@ -237,10 +237,10 @@ packages: | @@ -237,10 +237,10 @@ packages: | ||
| 237 | dependency: transitive | 237 | dependency: transitive |
| 238 | description: | 238 | description: |
| 239 | name: fake_async | 239 | name: fake_async |
| 240 | - sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" | 240 | + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" |
| 241 | url: "https://pub.dev" | 241 | url: "https://pub.dev" |
| 242 | source: hosted | 242 | source: hosted |
| 243 | - version: "1.3.3" | 243 | + version: "1.3.1" |
| 244 | ffi: | 244 | ffi: |
| 245 | dependency: transitive | 245 | dependency: transitive |
| 246 | description: | 246 | description: |
| @@ -426,7 +426,7 @@ packages: | @@ -426,7 +426,7 @@ packages: | ||
| 426 | dependency: transitive | 426 | dependency: transitive |
| 427 | description: | 427 | description: |
| 428 | path: image_cropper_for_web | 428 | path: image_cropper_for_web |
| 429 | - ref: "65c2c99891882ea59732959a672f3d5993a837bb" | 429 | + ref: "br_v9.1.0_ohos" |
| 430 | resolved-ref: "65c2c99891882ea59732959a672f3d5993a837bb" | 430 | resolved-ref: "65c2c99891882ea59732959a672f3d5993a837bb" |
| 431 | url: "https://gitcode.com/openharmony-sig/fluttertpc_image_cropper.git" | 431 | url: "https://gitcode.com/openharmony-sig/fluttertpc_image_cropper.git" |
| 432 | source: git | 432 | source: git |
| @@ -435,7 +435,7 @@ packages: | @@ -435,7 +435,7 @@ packages: | ||
| 435 | dependency: transitive | 435 | dependency: transitive |
| 436 | description: | 436 | description: |
| 437 | path: image_cropper_platform_interface | 437 | path: image_cropper_platform_interface |
| 438 | - ref: "65c2c99891882ea59732959a672f3d5993a837bb" | 438 | + ref: "br_v9.1.0_ohos" |
| 439 | resolved-ref: "65c2c99891882ea59732959a672f3d5993a837bb" | 439 | resolved-ref: "65c2c99891882ea59732959a672f3d5993a837bb" |
| 440 | url: "https://gitcode.com/openharmony-sig/fluttertpc_image_cropper.git" | 440 | url: "https://gitcode.com/openharmony-sig/fluttertpc_image_cropper.git" |
| 441 | source: git | 441 | source: git |
| @@ -517,10 +517,10 @@ packages: | @@ -517,10 +517,10 @@ packages: | ||
| 517 | dependency: "direct main" | 517 | dependency: "direct main" |
| 518 | description: | 518 | description: |
| 519 | name: intl | 519 | name: intl |
| 520 | - sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" | 520 | + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf |
| 521 | url: "https://pub.dev" | 521 | url: "https://pub.dev" |
| 522 | source: hosted | 522 | source: hosted |
| 523 | - version: "0.20.2" | 523 | + version: "0.19.0" |
| 524 | io: | 524 | io: |
| 525 | dependency: transitive | 525 | dependency: transitive |
| 526 | description: | 526 | description: |
| @@ -549,26 +549,26 @@ packages: | @@ -549,26 +549,26 @@ packages: | ||
| 549 | dependency: transitive | 549 | dependency: transitive |
| 550 | description: | 550 | description: |
| 551 | name: leak_tracker | 551 | name: leak_tracker |
| 552 | - sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" | 552 | + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" |
| 553 | url: "https://pub.dev" | 553 | url: "https://pub.dev" |
| 554 | source: hosted | 554 | source: hosted |
| 555 | - version: "11.0.2" | 555 | + version: "10.0.7" |
| 556 | leak_tracker_flutter_testing: | 556 | leak_tracker_flutter_testing: |
| 557 | dependency: transitive | 557 | dependency: transitive |
| 558 | description: | 558 | description: |
| 559 | name: leak_tracker_flutter_testing | 559 | name: leak_tracker_flutter_testing |
| 560 | - sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" | 560 | + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" |
| 561 | url: "https://pub.dev" | 561 | url: "https://pub.dev" |
| 562 | source: hosted | 562 | source: hosted |
| 563 | - version: "3.0.10" | 563 | + version: "3.0.8" |
| 564 | leak_tracker_testing: | 564 | leak_tracker_testing: |
| 565 | dependency: transitive | 565 | dependency: transitive |
| 566 | description: | 566 | description: |
| 567 | name: leak_tracker_testing | 567 | name: leak_tracker_testing |
| 568 | - sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" | 568 | + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" |
| 569 | url: "https://pub.dev" | 569 | url: "https://pub.dev" |
| 570 | source: hosted | 570 | source: hosted |
| 571 | - version: "3.0.2" | 571 | + version: "3.0.1" |
| 572 | lints: | 572 | lints: |
| 573 | dependency: transitive | 573 | dependency: transitive |
| 574 | description: | 574 | description: |
| @@ -597,10 +597,10 @@ packages: | @@ -597,10 +597,10 @@ packages: | ||
| 597 | dependency: transitive | 597 | dependency: transitive |
| 598 | description: | 598 | description: |
| 599 | name: matcher | 599 | name: matcher |
| 600 | - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 | 600 | + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb |
| 601 | url: "https://pub.dev" | 601 | url: "https://pub.dev" |
| 602 | source: hosted | 602 | source: hosted |
| 603 | - version: "0.12.17" | 603 | + version: "0.12.16+1" |
| 604 | material_color_utilities: | 604 | material_color_utilities: |
| 605 | dependency: transitive | 605 | dependency: transitive |
| 606 | description: | 606 | description: |
| @@ -613,10 +613,10 @@ packages: | @@ -613,10 +613,10 @@ packages: | ||
| 613 | dependency: transitive | 613 | dependency: transitive |
| 614 | description: | 614 | description: |
| 615 | name: meta | 615 | name: meta |
| 616 | - sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" | 616 | + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 |
| 617 | url: "https://pub.dev" | 617 | url: "https://pub.dev" |
| 618 | source: hosted | 618 | source: hosted |
| 619 | - version: "1.17.0" | 619 | + version: "1.15.0" |
| 620 | mime: | 620 | mime: |
| 621 | dependency: transitive | 621 | dependency: transitive |
| 622 | description: | 622 | description: |
| @@ -645,10 +645,10 @@ packages: | @@ -645,10 +645,10 @@ packages: | ||
| 645 | dependency: transitive | 645 | dependency: transitive |
| 646 | description: | 646 | description: |
| 647 | name: path | 647 | name: path |
| 648 | - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" | 648 | + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" |
| 649 | url: "https://pub.dev" | 649 | url: "https://pub.dev" |
| 650 | source: hosted | 650 | source: hosted |
| 651 | - version: "1.9.1" | 651 | + version: "1.9.0" |
| 652 | path_provider: | 652 | path_provider: |
| 653 | dependency: transitive | 653 | dependency: transitive |
| 654 | description: | 654 | description: |
| @@ -966,18 +966,18 @@ packages: | @@ -966,18 +966,18 @@ packages: | ||
| 966 | dependency: transitive | 966 | dependency: transitive |
| 967 | description: | 967 | description: |
| 968 | name: stack_trace | 968 | name: stack_trace |
| 969 | - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" | 969 | + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" |
| 970 | url: "https://pub.dev" | 970 | url: "https://pub.dev" |
| 971 | source: hosted | 971 | source: hosted |
| 972 | - version: "1.12.1" | 972 | + version: "1.12.0" |
| 973 | stream_channel: | 973 | stream_channel: |
| 974 | dependency: transitive | 974 | dependency: transitive |
| 975 | description: | 975 | description: |
| 976 | name: stream_channel | 976 | name: stream_channel |
| 977 | - sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" | 977 | + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 |
| 978 | url: "https://pub.dev" | 978 | url: "https://pub.dev" |
| 979 | source: hosted | 979 | source: hosted |
| 980 | - version: "2.1.4" | 980 | + version: "2.1.2" |
| 981 | stream_transform: | 981 | stream_transform: |
| 982 | dependency: transitive | 982 | dependency: transitive |
| 983 | description: | 983 | description: |
| @@ -1006,10 +1006,10 @@ packages: | @@ -1006,10 +1006,10 @@ packages: | ||
| 1006 | dependency: "direct main" | 1006 | dependency: "direct main" |
| 1007 | description: | 1007 | description: |
| 1008 | name: table_calendar | 1008 | name: table_calendar |
| 1009 | - sha256: "0c0c6219878b363a2d5f40c7afb159d845f253d061dc3c822aa0d5fe0f721982" | 1009 | + sha256: b2896b7c86adf3a4d9c911d860120fe3dbe03c85db43b22fd61f14ee78cdbb63 |
| 1010 | url: "https://pub.dev" | 1010 | url: "https://pub.dev" |
| 1011 | source: hosted | 1011 | source: hosted |
| 1012 | - version: "3.2.0" | 1012 | + version: "3.1.3" |
| 1013 | term_glyph: | 1013 | term_glyph: |
| 1014 | dependency: transitive | 1014 | dependency: transitive |
| 1015 | description: | 1015 | description: |
| @@ -1022,10 +1022,10 @@ packages: | @@ -1022,10 +1022,10 @@ packages: | ||
| 1022 | dependency: transitive | 1022 | dependency: transitive |
| 1023 | description: | 1023 | description: |
| 1024 | name: test_api | 1024 | name: test_api |
| 1025 | - sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 | 1025 | + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" |
| 1026 | url: "https://pub.dev" | 1026 | url: "https://pub.dev" |
| 1027 | source: hosted | 1027 | source: hosted |
| 1028 | - version: "0.7.7" | 1028 | + version: "0.7.3" |
| 1029 | timing: | 1029 | timing: |
| 1030 | dependency: transitive | 1030 | dependency: transitive |
| 1031 | description: | 1031 | description: |
| @@ -1054,10 +1054,10 @@ packages: | @@ -1054,10 +1054,10 @@ packages: | ||
| 1054 | dependency: transitive | 1054 | dependency: transitive |
| 1055 | description: | 1055 | description: |
| 1056 | name: vector_math | 1056 | name: vector_math |
| 1057 | - sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b | 1057 | + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" |
| 1058 | url: "https://pub.dev" | 1058 | url: "https://pub.dev" |
| 1059 | source: hosted | 1059 | source: hosted |
| 1060 | - version: "2.2.0" | 1060 | + version: "2.1.4" |
| 1061 | vm_service: | 1061 | vm_service: |
| 1062 | dependency: transitive | 1062 | dependency: transitive |
| 1063 | description: | 1063 | description: |
| @@ -1111,8 +1111,8 @@ packages: | @@ -1111,8 +1111,8 @@ packages: | ||
| 1111 | dependency: transitive | 1111 | dependency: transitive |
| 1112 | description: | 1112 | description: |
| 1113 | path: "packages/webview_flutter/webview_flutter_android" | 1113 | path: "packages/webview_flutter/webview_flutter_android" |
| 1114 | - ref: de942e79c9057b32ad31106508bd87c0d60aef83 | ||
| 1115 | - resolved-ref: de942e79c9057b32ad31106508bd87c0d60aef83 | 1114 | + ref: "br_webview_flutter-v4.13.0_ohos" |
| 1115 | + resolved-ref: "8d70938aa190eb7d7cd4d66f0d16fddb3c2d03ba" | ||
| 1116 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" | 1116 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" |
| 1117 | source: git | 1117 | source: git |
| 1118 | version: "4.7.0" | 1118 | version: "4.7.0" |
| @@ -1120,8 +1120,8 @@ packages: | @@ -1120,8 +1120,8 @@ packages: | ||
| 1120 | dependency: transitive | 1120 | dependency: transitive |
| 1121 | description: | 1121 | description: |
| 1122 | path: "packages/webview_flutter/webview_flutter_ohos" | 1122 | path: "packages/webview_flutter/webview_flutter_ohos" |
| 1123 | - ref: de942e79c9057b32ad31106508bd87c0d60aef83 | ||
| 1124 | - resolved-ref: de942e79c9057b32ad31106508bd87c0d60aef83 | 1123 | + ref: "br_webview_flutter-v4.13.0_ohos" |
| 1124 | + resolved-ref: "8d70938aa190eb7d7cd4d66f0d16fddb3c2d03ba" | ||
| 1125 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" | 1125 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" |
| 1126 | source: git | 1126 | source: git |
| 1127 | version: "4.7.0" | 1127 | version: "4.7.0" |
| @@ -1129,8 +1129,8 @@ packages: | @@ -1129,8 +1129,8 @@ packages: | ||
| 1129 | dependency: transitive | 1129 | dependency: transitive |
| 1130 | description: | 1130 | description: |
| 1131 | path: "packages/webview_flutter/webview_flutter_platform_interface" | 1131 | path: "packages/webview_flutter/webview_flutter_platform_interface" |
| 1132 | - ref: de942e79c9057b32ad31106508bd87c0d60aef83 | ||
| 1133 | - resolved-ref: de942e79c9057b32ad31106508bd87c0d60aef83 | 1132 | + ref: "br_webview_flutter-v4.13.0_ohos" |
| 1133 | + resolved-ref: "8d70938aa190eb7d7cd4d66f0d16fddb3c2d03ba" | ||
| 1134 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" | 1134 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" |
| 1135 | source: git | 1135 | source: git |
| 1136 | version: "2.13.1" | 1136 | version: "2.13.1" |
| @@ -1138,8 +1138,8 @@ packages: | @@ -1138,8 +1138,8 @@ packages: | ||
| 1138 | dependency: transitive | 1138 | dependency: transitive |
| 1139 | description: | 1139 | description: |
| 1140 | path: "packages/webview_flutter/webview_flutter_wkwebview" | 1140 | path: "packages/webview_flutter/webview_flutter_wkwebview" |
| 1141 | - ref: de942e79c9057b32ad31106508bd87c0d60aef83 | ||
| 1142 | - resolved-ref: de942e79c9057b32ad31106508bd87c0d60aef83 | 1141 | + ref: "br_webview_flutter-v4.13.0_ohos" |
| 1142 | + resolved-ref: "8d70938aa190eb7d7cd4d66f0d16fddb3c2d03ba" | ||
| 1143 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" | 1143 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" |
| 1144 | source: git | 1144 | source: git |
| 1145 | version: "3.22.0" | 1145 | version: "3.22.0" |
| @@ -1160,5 +1160,5 @@ packages: | @@ -1160,5 +1160,5 @@ packages: | ||
| 1160 | source: hosted | 1160 | source: hosted |
| 1161 | version: "3.1.3" | 1161 | version: "3.1.3" |
| 1162 | sdks: | 1162 | sdks: |
| 1163 | - dart: ">=3.8.0-0 <4.0.0" | 1163 | + dart: ">=3.6.2 <4.0.0" |
| 1164 | flutter: ">=3.27.0" | 1164 | flutter: ">=3.27.0" |
| @@ -42,7 +42,7 @@ dependencies: | @@ -42,7 +42,7 @@ dependencies: | ||
| 42 | url: https://gitcode.com/openharmony-sig/flutter_permission_handler.git | 42 | url: https://gitcode.com/openharmony-sig/flutter_permission_handler.git |
| 43 | path: permission_handler_ohos | 43 | path: permission_handler_ohos |
| 44 | ref: br_permission_handler_v11.3.1_ohos | 44 | ref: br_permission_handler_v11.3.1_ohos |
| 45 | - intl: ^0.20.2 | 45 | + intl: ^0.19.0 |
| 46 | flutter_localizations: | 46 | flutter_localizations: |
| 47 | sdk: flutter | 47 | sdk: flutter |
| 48 | table_calendar: ^3.1.3 | 48 | table_calendar: ^3.1.3 |
-
Please register or login to post a comment