Skip to content

Commit

Permalink
chore: (old) error handling changes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkrieger committed Apr 10, 2024
1 parent 255c2c3 commit 58b69f4
Show file tree
Hide file tree
Showing 10 changed files with 203 additions and 147 deletions.
1 change: 1 addition & 0 deletions android/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ GEM
PLATFORMS
universal-darwin-21
universal-darwin-22
universal-darwin-23
x86_64-darwin-19

DEPENDENCIES
Expand Down
6 changes: 3 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ flutter {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
def appcompat_version = "1.4.1"
def appcompat_version = "1.6.1"
implementation "androidx.appcompat:appcompat:$appcompat_version"
api 'net.java.dev.jna:jna:5.10.0@aar'
implementation (group: 'com.alphacephei', name: 'vosk-android', version: '0.3.38') {
api 'net.java.dev.jna:jna:5.13.0@aar'
implementation (group: 'com.alphacephei', name: 'vosk-android', version: '0.3.45') {
exclude group: 'net.java.dev.jna', module: 'jna'
}
}
Expand Down
8 changes: 8 additions & 0 deletions android/fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ Deploy a new beta version to the Google Play
[bundle exec] fastlane android release
```



### android release_submit

```sh
[bundle exec] fastlane android release_submit
```

Deploy a production version to Google Play

----
Expand Down
3 changes: 2 additions & 1 deletion lib/repositories/ios_speech_recognizer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Future<String?> recognizeNoteIOS(String path, String locale) async {
}
} catch (err, tr) {
print(err);
Sentry.captureException(err, stackTrace: tr);
snackbarKey.currentState
?.showSnackBar(const SnackBar(content: Text("Could not get speech")));
return null;
}
}
Expand Down
5 changes: 2 additions & 3 deletions lib/repositories/vosk_speech_recognizer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ Future<String?> voskSpeechRecognize(String path) async {
} catch (err, tr) {
snackbarKey.currentState?.showSnackBar(
SnackBar(content: Text("Could not recognize: ${err.toString()}")));
Sentry.captureException(err, stackTrace: tr);
print(err);
return null;
}
Expand All @@ -84,7 +83,6 @@ Future<String?> voskInitModel(String path) async {
} catch (err, tr) {
snackbarKey.currentState?.showSnackBar(
SnackBar(content: Text("Could not init model: ${err.toString()}")));
Sentry.captureException(err, stackTrace: tr);
return err.toString();
}
}
Expand Down Expand Up @@ -120,7 +118,8 @@ Future<String?> voskDownloadAndInitModel(String url) async {
await sharedPreferences.setString(modelDirKey, modelDir.path);
return null;
} catch (err, tr) {
Sentry.captureException(err, stackTrace: tr);
snackbarKey.currentState?.showSnackBar(
SnackBar(content: Text("Could not init model: ${err.toString()}")));
return err.toString();
}
}
2 changes: 1 addition & 1 deletion lib/views/notes_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class _NotesViewState extends State<_NotesView> {

void showContextMenu() {
Vibrate.feedback(FeedbackType.medium);
final overlay = Overlay.of(context)!.context.findRenderObject();
final overlay = Overlay.of(context).context.findRenderObject();
final relativeSize = RelativeRect.fromSize(
tapXY! & const Size(40, 40), overlay!.semanticBounds.size);
showMenu(context: context, position: relativeSize, items: [
Expand Down
1 change: 0 additions & 1 deletion lib/views/onboarding_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class _OnboardingViewState extends State<OnboardingView> {
dotsDecorator: const DotsDecorator(activeColor: classicPurple),
showDoneButton: true,
showNextButton: true,
isTopSafeArea: true,
next: Text(
"Next",
style: TextStyle(color: Theme.of(context).colorScheme.onSurface),
Expand Down
2 changes: 1 addition & 1 deletion lib/views/outlines_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class _OutlinesViewState extends State<OutlinesView> {
spreadRadius: 10,
color: Color.fromRGBO(156, 104, 241, 0.5))
]),
child: const Icon(Icons.post_add_rounded)),
child: const Icon(Icons.post_add_rounded, color: Colors.white,)),
)
: null,
body: AnimatedCrossFade(
Expand Down
Loading

0 comments on commit 58b69f4

Please sign in to comment.