0

I am new to Flutter App development and as a learning project, I am working on a notes app. It takes notes from the user and saves it in a database. I have written the home-screen and database helper class in Dart.

Now I want to add a home screen widget to the app. As per my understanding, I think it is not possible to write home screen widgets in a flutter. so I was thinking of adding a java code block to the project for UI and use already written database helper class for storing data. I cannot find any useful references for the same. It is possible to import/use "database helper class that is already written in dart" in Java.

bscharan
  • 137
  • 1
  • 13
  • When your app is running, you can interact between Java and Dart using method channel. Example of calling Dart function from Java: https://stackoverflow.com/questions/50187680/how-to-call-methods-in-dart-portion-of-the-app-from-the-native-platform-using-m – Pavel Aug 27 '20 at 19:10
  • Not sure if it's possible from Android home screen widgets. Related: https://stackoverflow.com/questions/53940400/invoke-flutter-dart-code-from-native-android-home-screen-widget – Pavel Aug 27 '20 at 19:11

0 Answers0