-
-
Notifications
You must be signed in to change notification settings - Fork 4
Development
This app was developed using dart, the flutter framework and Tensorflow (lite). Flutter needs to be installed. For this please follow the guide on the official website.
Note: There are some utility scripts that require a python installation.
Now the repository of DaKanji needs to be cloned:
git clone https://github.com/CaptainDario/DaKanji-Application
Then all necessary packages need to be installed:
flutter pub get
Now some additional files are necessary:
- Copy the dictionary files from the release section of DaKanji dictionary
assets/dict
- Copy the kagome binaries from [the release section of kagome dart to
blobs
- Copy the TF Lite binaries from the release section of TFLite binaries to
blobs
Note: the tf lite models are not included in the repo and are not available, all ml features are replaced with mock models.
iOS / Android
For updating the icons the flutter_launcher_icons package was used.
To update all icons, replace media/icon.png
and run:
flutter pub run flutter_launcher_icons:main
Windows
windows/runner/resources/app_icon.ico
png → ico: https://convertico.com/
MacOS
macos/Runner/Assets.xcassets/AppIcon.appiconset
Linux
note: only snap support
uses the default image from the assets
assets/images/dakanji/icon.png
For generating the icon font fluttericon.com is being used.
The configuration file can be found at: assets/icons/svg_to_font/fluttericon.com/config.json
.
Uploading this file to fluttericon.com will show the current icon set.
New Icons can then be added via dropping .svg
-files into the web ui.
After adding new icons, download the new project and replace the old files in assets/icons/svg_to_font/fluttericon.com/
and also replace lib/data/da_kanji_icons_icons.dart
with the newly generated file.
Other applications can link to DaKanji via deep linking.
The base link is defined as dakanji://dakanji
.
A table with all supported deep links can be found here. You can try them out directly in your browser.
When adding a tutorial to NewScreen
do the following
- create new file
lib/data/show_cases/NewScreen.dart
and add a class that extendsTutorial
following the approach of the other tutorials in that folder- Add the tutorial texts to the google sheet like the other tutorials
-
lib/data/tutorials.dart
integrate the new tutorial inTutorials
- Add the tutorial to
lib/domain/user_data/user_data.dart
so that the progress gets tracked- Update the generated code with
flutter pub run build_runner build --delete-conflicting-outputs
- Update the generated code with
- Add to the
NewScreen
widget a variableincludeTutorial
- Add a
postFrameCallback
to the screen to trigger the tutorial
...
@override
void initState() {
super.initState();
// after first frame
WidgetsBinding.instance.addPostFrameCallback((Duration timeStamp) async {
// init tutorial
final OnboardingState? onboarding = Onboarding.of(context);
if (onboarding != null && widget.includeTutorial &&
GetIt.I<UserData>().showTutorialnewScreen) {
onboarding.showWithSteps(
GetIt.I<Tutorials>().newScreenTutorial.indexes![0],
GetIt.I<Tutorials>().newScreenTutorial.indexes!
);
}
});
}
...
- Add
Focus
widgets to all widgets that should be highlighted during the tutorial and set theirfocusNode
to the matching one fromNewScreenTutorial
- Add the new tutorial to
lib/dakanji_app.dart
inonGenerateRoute
(PageRouteBuilder
andswitch(settings.name)
)