├── binary └── macos │ ├── realm_version.txt │ └── librealm_dart.dylib ├── ios ├── Runner │ ├── ru.lproj │ │ ├── Main.strings │ │ └── LaunchScreen.strings │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-50x50@1x.png │ │ │ ├── Icon-App-50x50@2x.png │ │ │ ├── Icon-App-57x57@1x.png │ │ │ ├── Icon-App-57x57@2x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-72x72@1x.png │ │ │ ├── Icon-App-72x72@2x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── Runner.entitlements │ ├── AppDelegate.swift │ └── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── RunnerTests │ └── RunnerTests.swift ├── .gitignore └── Podfile ├── linux ├── .gitignore ├── main.cc ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ ├── generated_plugins.cmake │ └── CMakeLists.txt └── my_application.h ├── lib ├── api │ ├── models │ │ ├── models.dart │ │ ├── rhymes.dart │ │ └── rhymes.g.dart │ ├── api.dart │ └── api.g.dart ├── features │ ├── home │ │ ├── home.dart │ │ └── view │ │ │ └── view.dart │ ├── history │ │ ├── history.dart │ │ ├── view │ │ │ ├── view.dart │ │ │ └── history_screen.dart │ │ ├── widgets │ │ │ ├── widgets.dart │ │ │ ├── empty_history_banner.dart │ │ │ └── rhyme_history_card.dart │ │ └── bloc │ │ │ ├── history_rhymes_event.dart │ │ │ ├── history_rhymes_state.dart │ │ │ └── history_rhymes_bloc.dart │ ├── search │ │ ├── search.dart │ │ ├── view │ │ │ └── view.dart │ │ ├── widgets │ │ │ ├── widgets.dart │ │ │ ├── rhymes_list_initial_baner.dart │ │ │ ├── rhymes_history_carousel.dart │ │ │ ├── search_rhymes_bottom_sheet.dart │ │ │ ├── search_button.dart │ │ │ ├── rhyme_history_carousel_card.dart │ │ │ ├── search_text_field.dart │ │ │ └── stressed_char_selector.dart │ │ └── bloc │ │ │ ├── rhymes_list_event.dart │ │ │ ├── rhymes_list_state.dart │ │ │ └── rhymes_list_bloc.dart │ ├── favorites │ │ ├── favorites.dart │ │ ├── view │ │ │ ├── view.dart │ │ │ └── favorites_screen.dart │ │ ├── widgets │ │ │ ├── widgets.dart │ │ │ └── empty_favorites_banner.dart │ │ └── bloc │ │ │ └── bloc │ │ │ ├── favorite_rhymes_event.dart │ │ │ ├── favorite_rhymes_state.dart │ │ │ └── favorite_rhymes_bloc.dart │ └── settings │ │ ├── settings.dart │ │ ├── view │ │ └── view.dart │ │ └── widgets │ │ ├── widgets.dart │ │ ├── settings_toggle_card.dart │ │ ├── settings_action_card.dart │ │ └── support_bottom_sheet.dart ├── repositories │ ├── rhymes │ │ ├── models │ │ │ ├── models.dart │ │ │ └── rhymes.dart │ │ ├── rhymes.dart │ │ ├── rhymes_repository_interface.dart │ │ ├── rhymes_repository.dart │ │ └── mock │ │ │ └── mock_rhymes_repository.dart │ ├── notifications │ │ ├── model │ │ │ ├── model.dart │ │ │ └── notification.dart │ │ ├── notifications.dart │ │ ├── notifications_repository_interface.dart │ │ └── notifications_repository.dart │ ├── favorites │ │ ├── model │ │ │ ├── model.dart │ │ │ ├── favorite_rhymes_table.dart │ │ │ └── favorite_rhyme.dart │ │ ├── favorites.dart │ │ ├── favorites_repository_interface.dart │ │ └── favorites_repository.dart │ ├── history │ │ ├── models │ │ │ ├── models.dart │ │ │ ├── history_rhymes_table.dart │ │ │ └── history_rhyme.dart │ │ ├── history.dart │ │ ├── history_repository_interface.dart │ │ └── history_repository.dart │ └── settings │ │ ├── settings.dart │ │ ├── settings_repository_interface.dart │ │ └── settings_repository.dart ├── utils │ ├── extensions │ │ ├── extensions.dart │ │ └── collection.dart │ ├── formatters │ │ ├── formatters.dart │ │ └── string_formatter.dart │ ├── advertising │ │ ├── advertising.dart │ │ └── advertising_service.dart │ ├── analytics │ │ ├── analytics.dart │ │ ├── events │ │ │ ├── history_events.dart │ │ │ ├── ads_events.dart │ │ │ ├── events.dart │ │ │ ├── search_events.dart │ │ │ ├── favorite_events.dart │ │ │ └── settings_events.dart │ │ ├── analytics_service_interface.dart │ │ └── analytics_service.dart │ └── database │ │ └── drift.dart ├── ui │ ├── ui.dart │ ├── widgets │ │ ├── platform │ │ │ ├── platform.dart │ │ │ ├── platform_progress_indicator.dart │ │ │ └── platform_navigation_bar.dart │ │ ├── widgets.dart │ │ ├── base_bottom_sheet.dart │ │ ├── base_container.dart │ │ ├── text_banner.dart │ │ ├── rhyme_list_card.dart │ │ └── confirmation_dialog.dart │ └── theme │ │ └── theme.dart ├── app │ ├── app.dart │ ├── app_config.dart │ ├── rhymer_app.dart │ ├── repository_container.dart │ └── app_initializer.dart ├── bloc │ └── theme │ │ ├── theme_state.dart │ │ └── theme_cubit.dart ├── router │ ├── router.dart │ └── router.gr.dart └── main.dart ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── manifest.json └── index.html ├── assets └── logo │ └── logo.png ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── launcher_icon.png │ │ │ │ │ ├── launcher_icon_background.png │ │ │ │ │ ├── launcher_icon_foreground.png │ │ │ │ │ └── launcher_icon_monochrome.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── launcher_icon.png │ │ │ │ │ ├── launcher_icon_background.png │ │ │ │ │ ├── launcher_icon_foreground.png │ │ │ │ │ └── launcher_icon_monochrome.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── launcher_icon.png │ │ │ │ │ ├── launcher_icon_background.png │ │ │ │ │ ├── launcher_icon_foreground.png │ │ │ │ │ └── launcher_icon_monochrome.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── launcher_icon.png │ │ │ │ │ ├── launcher_icon_background.png │ │ │ │ │ ├── launcher_icon_foreground.png │ │ │ │ │ └── launcher_icon_monochrome.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── launcher_icon.png │ │ │ │ │ ├── launcher_icon_background.png │ │ │ │ │ ├── launcher_icon_foreground.png │ │ │ │ │ └── launcher_icon_monochrome.png │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ └── launcher_icon.xml │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── frezycode │ │ │ │ │ └── rhymer │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── macos ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ ├── app_icon_64.png │ │ │ ├── app_icon_1024.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── DebugProfile.entitlements │ ├── MainFlutterWindow.swift │ └── Info.plist ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── RunnerTests │ └── RunnerTests.swift └── Podfile ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ ├── main.cpp │ ├── CMakeLists.txt │ ├── utils.cpp │ ├── flutter_window.cpp │ ├── Runner.rc │ └── win32_window.h ├── .gitignore └── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ └── generated_plugin_registrant.cc ├── .vscode └── settings.json ├── devtools_options.yaml ├── README.md ├── Makefile ├── .gitignore ├── analysis_options.yaml ├── .metadata └── pubspec.yaml /binary/macos/realm_version.txt: -------------------------------------------------------------------------------- 1 | 1.5.0 -------------------------------------------------------------------------------- /ios/Runner/ru.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /ios/Runner/ru.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/api/models/models.dart: -------------------------------------------------------------------------------- 1 | export 'rhymes.dart'; 2 | -------------------------------------------------------------------------------- /lib/features/home/home.dart: -------------------------------------------------------------------------------- 1 | export 'view/view.dart'; 2 | -------------------------------------------------------------------------------- /lib/features/history/history.dart: -------------------------------------------------------------------------------- 1 | export 'view/view.dart'; 2 | -------------------------------------------------------------------------------- /lib/features/home/view/view.dart: -------------------------------------------------------------------------------- 1 | export 'home_screen.dart'; 2 | -------------------------------------------------------------------------------- /lib/features/search/search.dart: -------------------------------------------------------------------------------- 1 | export 'view/view.dart'; 2 | -------------------------------------------------------------------------------- /lib/features/favorites/favorites.dart: -------------------------------------------------------------------------------- 1 | export 'view/view.dart'; 2 | -------------------------------------------------------------------------------- /lib/features/search/view/view.dart: -------------------------------------------------------------------------------- 1 | export 'search_screen.dart'; 2 | -------------------------------------------------------------------------------- /lib/features/settings/settings.dart: -------------------------------------------------------------------------------- 1 | export 'view/view.dart'; 2 | -------------------------------------------------------------------------------- /lib/repositories/rhymes/models/models.dart: -------------------------------------------------------------------------------- 1 | export 'rhymes.dart'; 2 | -------------------------------------------------------------------------------- /lib/utils/extensions/extensions.dart: -------------------------------------------------------------------------------- 1 | export 'collection.dart'; 2 | -------------------------------------------------------------------------------- /lib/features/favorites/view/view.dart: -------------------------------------------------------------------------------- 1 | export 'favorites_screen.dart'; 2 | -------------------------------------------------------------------------------- /lib/features/history/view/view.dart: -------------------------------------------------------------------------------- 1 | export 'history_screen.dart'; 2 | -------------------------------------------------------------------------------- /lib/features/settings/view/view.dart: -------------------------------------------------------------------------------- 1 | export 'settings_screen.dart'; 2 | -------------------------------------------------------------------------------- /lib/utils/formatters/formatters.dart: -------------------------------------------------------------------------------- 1 | export 'string_formatter.dart'; 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/utils/advertising/advertising.dart: -------------------------------------------------------------------------------- 1 | export 'advertising_service.dart'; 2 | -------------------------------------------------------------------------------- /lib/repositories/notifications/model/model.dart: -------------------------------------------------------------------------------- 1 | export 'notification.dart'; 2 | -------------------------------------------------------------------------------- /lib/ui/ui.dart: -------------------------------------------------------------------------------- 1 | export 'theme/theme.dart'; 2 | export 'widgets/widgets.dart'; 3 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/web/favicon.png -------------------------------------------------------------------------------- /lib/features/favorites/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'empty_favorites_banner.dart'; 2 | -------------------------------------------------------------------------------- /assets/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/assets/logo/logo.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /binary/macos/librealm_dart.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/binary/macos/librealm_dart.dylib -------------------------------------------------------------------------------- /lib/app/app.dart: -------------------------------------------------------------------------------- 1 | export 'app_config.dart'; 2 | export 'app_initializer.dart'; 3 | export 'rhymer_app.dart'; 4 | -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /lib/repositories/favorites/model/model.dart: -------------------------------------------------------------------------------- 1 | export 'favorite_rhyme.dart'; 2 | export 'favorite_rhymes_table.dart'; 3 | -------------------------------------------------------------------------------- /lib/repositories/history/models/models.dart: -------------------------------------------------------------------------------- 1 | export 'history_rhyme.dart'; 2 | export 'history_rhymes_table.dart'; 3 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /lib/features/history/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'empty_history_banner.dart'; 2 | export 'rhyme_history_card.dart'; 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /lib/repositories/settings/settings.dart: -------------------------------------------------------------------------------- 1 | export 'settings_repository.dart'; 2 | export 'settings_repository_interface.dart'; 3 | -------------------------------------------------------------------------------- /lib/ui/widgets/platform/platform.dart: -------------------------------------------------------------------------------- 1 | export 'platform_navigation_bar.dart'; 2 | export 'platform_progress_indicator.dart'; 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /lib/repositories/rhymes/models/rhymes.dart: -------------------------------------------------------------------------------- 1 | class Rhymes { 2 | const Rhymes({required this.rhymes}); 3 | 4 | final List rhymes; 5 | } 6 | -------------------------------------------------------------------------------- /lib/repositories/rhymes/rhymes.dart: -------------------------------------------------------------------------------- 1 | export 'models/models.dart'; 2 | export 'rhymes_repository.dart'; 3 | export 'rhymes_repository_interface.dart'; 4 | -------------------------------------------------------------------------------- /lib/utils/analytics/analytics.dart: -------------------------------------------------------------------------------- 1 | export 'analytics_service.dart'; 2 | export 'analytics_service_interface.dart'; 3 | export 'events/events.dart'; 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-hdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-mdpi/launcher_icon.png -------------------------------------------------------------------------------- /lib/repositories/history/history.dart: -------------------------------------------------------------------------------- 1 | export 'history_repository.dart'; 2 | export 'history_repository_interface.dart'; 3 | export 'models/models.dart'; 4 | -------------------------------------------------------------------------------- /lib/utils/analytics/events/history_events.dart: -------------------------------------------------------------------------------- 1 | class HistoryEvents { 2 | const HistoryEvents(); 3 | 4 | final tapRhyme = 'history_tap_rhyme'; 5 | } 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /lib/features/settings/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'settings_action_card.dart'; 2 | export 'settings_toggle_card.dart'; 3 | export 'support_bottom_sheet.dart'; 4 | -------------------------------------------------------------------------------- /lib/repositories/favorites/favorites.dart: -------------------------------------------------------------------------------- 1 | export 'favorites_repository.dart'; 2 | export 'favorites_repository_interface.dart'; 3 | export 'model/model.dart'; 4 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /lib/repositories/notifications/notifications.dart: -------------------------------------------------------------------------------- 1 | export 'model/model.dart'; 2 | export 'notifications_repository.dart'; 3 | export 'notifications_repository_interface.dart'; 4 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/launcher_icon_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-hdpi/launcher_icon_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/launcher_icon_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-hdpi/launcher_icon_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/launcher_icon_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-hdpi/launcher_icon_monochrome.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/launcher_icon_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-mdpi/launcher_icon_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/launcher_icon_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-mdpi/launcher_icon_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/launcher_icon_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-mdpi/launcher_icon_monochrome.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/launcher_icon_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-xhdpi/launcher_icon_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/launcher_icon_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-xhdpi/launcher_icon_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/launcher_icon_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-xhdpi/launcher_icon_monochrome.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/launcher_icon_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-xxhdpi/launcher_icon_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/launcher_icon_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-xxhdpi/launcher_icon_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/launcher_icon_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-xxhdpi/launcher_icon_monochrome.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/launcher_icon_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/launcher_icon_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/launcher_icon_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon_monochrome.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Frezyx/rhymer/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /lib/utils/analytics/events/ads_events.dart: -------------------------------------------------------------------------------- 1 | class AdsEvents { 2 | const AdsEvents(); 3 | 4 | final clickAdsBanner1 = 'ads_click_banner_1'; 5 | final loadAdsBanner1 = 'ads_load_banner_1'; 6 | } 7 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeActionsOnSave": { 3 | "source.fixAll": "explicit", 4 | "source.organizeImports": "explicit" 5 | }, 6 | "editor.formatOnSave": true, 7 | } -------------------------------------------------------------------------------- /lib/repositories/settings/settings_repository_interface.dart: -------------------------------------------------------------------------------- 1 | abstract interface class SettingsRepositoryI { 2 | bool isDarkThemeSelected(); 3 | Future setDarkThemeSelected(bool selected); 4 | } 5 | -------------------------------------------------------------------------------- /lib/utils/analytics/events/events.dart: -------------------------------------------------------------------------------- 1 | export 'ads_events.dart'; 2 | export 'favorite_events.dart'; 3 | export 'history_events.dart'; 4 | export 'search_events.dart'; 5 | export 'settings_events.dart'; 6 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/frezycode/rhymer/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.frezycode.rhymer 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /devtools_options.yaml: -------------------------------------------------------------------------------- 1 | description: This file stores settings for Dart & Flutter DevTools. 2 | documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states 3 | extensions: 4 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /lib/repositories/rhymes/rhymes_repository_interface.dart: -------------------------------------------------------------------------------- 1 | import 'package:rhymer/api/models/models.dart'; 2 | 3 | abstract interface class RhymesRepositoryI { 4 | Future fetchRhymesList(String rhyme); 5 | } 6 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/ui/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'base_bottom_sheet.dart'; 2 | export 'base_container.dart'; 3 | export 'confirmation_dialog.dart'; 4 | export 'platform/platform.dart'; 5 | export 'rhyme_list_card.dart'; 6 | export 'text_banner.dart'; 7 | -------------------------------------------------------------------------------- /lib/repositories/notifications/model/notification.dart: -------------------------------------------------------------------------------- 1 | class Notification { 2 | const Notification({ 3 | required this.title, 4 | required this.message, 5 | }); 6 | 7 | final String title; 8 | final String message; 9 | } 10 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /lib/utils/extensions/collection.dart: -------------------------------------------------------------------------------- 1 | extension FirstWhereOrNullExtension on Iterable { 2 | E? firstWhereOrNull(bool Function(E) test) { 3 | for (E element in this) { 4 | if (test(element)) return element; 5 | } 6 | return null; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @main 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/utils/analytics/analytics_service_interface.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | abstract interface class AnalyticsI { 4 | RouteObserver> get observer; 5 | 6 | void log(String name); 7 | void logScreenView(String screenName); 8 | } 9 | -------------------------------------------------------------------------------- /lib/utils/analytics/events/search_events.dart: -------------------------------------------------------------------------------- 1 | class SearchEvents { 2 | const SearchEvents(); 3 | 4 | final completeEditing = 'search_edititng_complete'; 5 | final rhyme = 'search_rhyme'; 6 | final clearTap = 'search_clear_tap'; 7 | final copyRhyme = 'search_copy_rhyme'; 8 | } 9 | -------------------------------------------------------------------------------- /ios/Runner/Runner.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/repositories/history/history_repository_interface.dart: -------------------------------------------------------------------------------- 1 | import 'package:rhymer/repositories/history/models/models.dart'; 2 | 3 | abstract interface class HistoryRepositoryI { 4 | Future> getRhymesList(); 5 | Future createRhyme(CreateHistoryRhyme rhyme); 6 | Future clear(); 7 | } 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/features/search/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'rhyme_history_carousel_card.dart'; 2 | export 'rhymes_history_carousel.dart'; 3 | export 'rhymes_list_initial_baner.dart'; 4 | export 'search_button.dart'; 5 | export 'search_rhymes_bottom_sheet.dart'; 6 | export 'search_text_field.dart'; 7 | export 'stressed_char_selector.dart'; 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/bloc/theme/theme_state.dart: -------------------------------------------------------------------------------- 1 | part of 'theme_cubit.dart'; 2 | 3 | class ThemeState extends Equatable { 4 | const ThemeState(this.brightness); 5 | 6 | final Brightness brightness; 7 | 8 | bool get isDark => brightness == Brightness.dark; 9 | 10 | @override 11 | List get props => [brightness]; 12 | } 13 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/repositories/history/models/history_rhymes_table.dart: -------------------------------------------------------------------------------- 1 | import 'package:drift/drift.dart'; 2 | 3 | class HistoryRhymeModel extends Table { 4 | IntColumn get id => integer().autoIncrement()(); 5 | TextColumn get queryWord => text()(); 6 | TextColumn get words => text()(); 7 | DateTimeColumn get createdAt => dateTime()(); 8 | } 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /lib/repositories/notifications/notifications_repository_interface.dart: -------------------------------------------------------------------------------- 1 | import 'package:rhymer/repositories/notifications/notifications.dart'; 2 | 3 | abstract interface class NotificationsRepositoryI { 4 | Future init(); 5 | Future getToken(); 6 | Future requestPermisison(); 7 | Future showLocalNotification(Notification notification); 8 | } 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | keystore.properties -------------------------------------------------------------------------------- /macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import FlutterMacOS 2 | import Cocoa 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /lib/features/history/bloc/history_rhymes_event.dart: -------------------------------------------------------------------------------- 1 | part of 'history_rhymes_bloc.dart'; 2 | 3 | sealed class HistoryRhymesEvent extends Equatable { 4 | const HistoryRhymesEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | final class LoadHistoryRhymes extends HistoryRhymesEvent {} 11 | 12 | final class ClearRhymesHistory extends HistoryRhymesEvent {} 13 | -------------------------------------------------------------------------------- /lib/repositories/favorites/model/favorite_rhymes_table.dart: -------------------------------------------------------------------------------- 1 | import 'package:drift/drift.dart'; 2 | 3 | class FavoriteRhymeModel extends Table { 4 | IntColumn get id => integer().autoIncrement()(); 5 | TextColumn get queryWord => text()(); 6 | TextColumn get favoriteWord => text()(); 7 | TextColumn get words => text()(); 8 | DateTimeColumn get createdAt => dateTime()(); 9 | } 10 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/launcher_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /lib/repositories/favorites/favorites_repository_interface.dart: -------------------------------------------------------------------------------- 1 | import 'package:rhymer/repositories/favorites/favorites.dart'; 2 | 3 | abstract interface class FavoritesRepositoryI { 4 | Future> getRhymesList(); 5 | Future createOrDeleteRhyme(CreateFavoriteRhyme rhyme); 6 | Future create(CreateFavoriteRhyme rhyme); 7 | Future delete(int id); 8 | Future clear(); 9 | } 10 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/features/history/widgets/empty_history_banner.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:rhymer/ui/ui.dart'; 3 | 4 | class EmptyHistoryBanner extends StatelessWidget { 5 | const EmptyHistoryBanner({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return TextBanner( 10 | title: 'В списке пусто', 11 | subtitle: 'Тут будет отображаться история поиска', 12 | ); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/utils/formatters/string_formatter.dart: -------------------------------------------------------------------------------- 1 | abstract class StringFormatter { 2 | StringFormatter._(); 3 | 4 | static String camelCaseToKebab(String baseName) { 5 | final beforeCapitalLetter = RegExp(r"(?=[A-Z])"); 6 | final parts = baseName.split(beforeCapitalLetter); 7 | final newPath = parts.length == 1 8 | ? parts.first.toLowerCase() 9 | : parts.map((e) => e.toLowerCase()).join('-'); 10 | return newPath; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/utils/analytics/events/favorite_events.dart: -------------------------------------------------------------------------------- 1 | import 'package:rhymer/utils/analytics/analytics.dart'; 2 | 3 | class FavoriteEvents { 4 | const FavoriteEvents(); 5 | 6 | final copyRhyme = 'favorite_copy_rhyme'; 7 | 8 | final _addToFavorites = 'add_favorite'; 9 | final _removeFromFavorites = 'remove_favorite'; 10 | 11 | void toggleFavorite(bool favorite) { 12 | Analytics.i.log(favorite ? _addToFavorites : _removeFromFavorites); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @main 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/features/search/widgets/rhymes_list_initial_baner.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:rhymer/ui/ui.dart'; 3 | 4 | class RhymesListInitialBanner extends StatelessWidget { 5 | const RhymesListInitialBanner({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return TextBanner( 10 | title: 'Начни искать', 11 | subtitle: 'Введите слово в строку поиска,\nчтобы найти рифмы', 12 | ); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/features/favorites/widgets/empty_favorites_banner.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:rhymer/ui/ui.dart'; 3 | 4 | class EmptyFavoritesBanner extends StatelessWidget { 5 | const EmptyFavoritesBanner({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return TextBanner( 10 | title: 'В списке пусто', 11 | subtitle: 12 | 'Тут будут отображаться рифмы, которые вы\nлайкнули на странице поиска', 13 | ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/api/models/rhymes.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'rhymes.g.dart'; 4 | 5 | @JsonSerializable() 6 | class RhymesDto { 7 | const RhymesDto({ 8 | this.rhymes, 9 | this.stressedChars, 10 | }); 11 | 12 | final List? rhymes; 13 | final List? stressedChars; 14 | 15 | factory RhymesDto.fromJson(Map json) => 16 | _$RhymesDtoFromJson(json); 17 | 18 | Map toJson() => _$RhymesDtoToJson(this); 19 | } 20 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /lib/repositories/rhymes/rhymes_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:rhymer/api/api.dart'; 2 | import 'package:rhymer/api/models/models.dart'; 3 | import 'package:rhymer/repositories/rhymes/rhymes.dart'; 4 | 5 | class RhymesRepository implements RhymesRepositoryI { 6 | RhymesRepository({required this.apiClient}); 7 | 8 | final RhymerApiClient apiClient; 9 | 10 | @override 11 | Future fetchRhymesList(String word) async { 12 | final data = await apiClient.getRhymesList(word); 13 | return data; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/features/favorites/bloc/bloc/favorite_rhymes_event.dart: -------------------------------------------------------------------------------- 1 | part of 'favorite_rhymes_bloc.dart'; 2 | 3 | sealed class FavoriteRhymesEvent extends Equatable { 4 | const FavoriteRhymesEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | final class LoadFavoriteRhymes extends FavoriteRhymesEvent {} 11 | 12 | final class DeleteFavoriteRhyme extends FavoriteRhymesEvent { 13 | const DeleteFavoriteRhyme(this.rhyme); 14 | 15 | final FavoriteRhyme rhyme; 16 | 17 | @override 18 | List get props => super.props..add(rhyme); 19 | } 20 | -------------------------------------------------------------------------------- /lib/ui/widgets/platform/platform_progress_indicator.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:rhymer/ui/theme/theme.dart'; 4 | 5 | class PlatformProgressIndicator extends StatelessWidget { 6 | const PlatformProgressIndicator({ 7 | super.key, 8 | }); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | final theme = Theme.of(context); 13 | if (theme.isCupertino) { 14 | return CupertinoActivityIndicator(); 15 | } 16 | return CircularProgressIndicator(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/utils/analytics/events/settings_events.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:rhymer/utils/analytics/analytics_service.dart'; 3 | 4 | class SettingsEvents { 5 | const SettingsEvents(); 6 | 7 | final openSupport = 'open_support'; 8 | final clearHistory = 'clear_history'; 9 | 10 | final _selectLightTheme = 'select_light_theme'; 11 | final _selectDarkTheme = 'select_dark_theme'; 12 | 13 | void selectTheme(Brightness brightness) { 14 | final isDark = brightness == Brightness.dark; 15 | Analytics.i.log(isDark ? _selectDarkTheme : _selectLightTheme); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rhymer 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) 13 | 14 | For help getting started with Flutter development, view the 15 | [online documentation](https://docs.flutter.dev/), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /lib/ui/widgets/base_bottom_sheet.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class BaseBottomSheet extends StatelessWidget { 4 | const BaseBottomSheet({super.key, required this.child}); 5 | 6 | final Widget child; 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | decoration: BoxDecoration( 12 | color: Theme.of(context).canvasColor, 13 | borderRadius: const BorderRadius.vertical( 14 | top: Radius.circular(20), 15 | ), 16 | ), 17 | child: SizedBox( 18 | width: double.infinity, 19 | child: child, 20 | ), 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = rhymer 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.frezycode.rhymer 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.frezycode. All rights reserved. 15 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /lib/repositories/settings/settings_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:rhymer/repositories/settings/settings.dart'; 2 | import 'package:shared_preferences/shared_preferences.dart'; 3 | 4 | class SettingsRepository implements SettingsRepositoryI { 5 | SettingsRepository({ 6 | required this.preferences, 7 | }); 8 | 9 | final SharedPreferences preferences; 10 | 11 | static const _isDarkThemeSelectedKey = 'dark_theme_selected'; 12 | 13 | @override 14 | bool isDarkThemeSelected() { 15 | final selected = preferences.getBool(_isDarkThemeSelectedKey); 16 | return selected ?? false; 17 | } 18 | 19 | @override 20 | Future setDarkThemeSelected(bool selected) async { 21 | await preferences.setBool(_isDarkThemeSelectedKey, selected); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/repositories/rhymes/mock/mock_rhymes_repository.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:rhymer/api/models/models.dart'; 4 | import 'package:rhymer/repositories/rhymes/rhymes.dart'; 5 | 6 | class MockRhymesRepository implements RhymesRepositoryI { 7 | @override 8 | Future fetchRhymesList(String rhyme) async { 9 | await _mockDelay(); 10 | return RhymesDto( 11 | rhymes: List.generate( 12 | 20, 13 | (index) => 14 | (Random(rhyme.hashCode).nextInt(10000) * (index + 1)).toString(), 15 | ), 16 | ); 17 | } 18 | 19 | Future _mockDelay() async { 20 | await Future.delayed( 21 | Duration( 22 | seconds: (Random().nextInt(2) - Random().nextInt(1)).abs(), 23 | ), 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/api/models/rhymes.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'rhymes.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RhymesDto _$RhymesDtoFromJson(Map json) => RhymesDto( 10 | rhymes: 11 | (json['rhymes'] as List?)?.map((e) => e as String).toList(), 12 | stressedChars: (json['stressedChars'] as List?) 13 | ?.map((e) => e as String) 14 | .toList(), 15 | ); 16 | 17 | Map _$RhymesDtoToJson(RhymesDto instance) => { 18 | 'rhymes': instance.rhymes, 19 | 'stressedChars': instance.stressedChars, 20 | }; 21 | -------------------------------------------------------------------------------- /lib/ui/widgets/base_container.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class BaseConatiner extends StatelessWidget { 4 | const BaseConatiner({ 5 | super.key, 6 | required this.child, 7 | this.width, 8 | this.margin, 9 | this.padding = const EdgeInsets.all(8), 10 | }); 11 | 12 | final double? width; 13 | final EdgeInsets? margin; 14 | final Widget child; 15 | final EdgeInsets padding; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | final theme = Theme.of(context); 20 | return Container( 21 | width: width, 22 | margin: margin, 23 | padding: padding, 24 | decoration: BoxDecoration( 25 | color: theme.cardColor, 26 | borderRadius: BorderRadius.circular(10), 27 | ), 28 | child: child, 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/api/api.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:retrofit/retrofit.dart'; 3 | import 'package:rhymer/api/models/models.dart'; 4 | import 'package:talker/talker.dart'; 5 | import 'package:talker_dio_logger/talker_dio_logger.dart'; 6 | 7 | part 'api.g.dart'; 8 | 9 | @RestApi(baseUrl: '') 10 | abstract class RhymerApiClient { 11 | factory RhymerApiClient(Dio dio, {String baseUrl}) = _RhymerApiClient; 12 | 13 | factory RhymerApiClient.create({String? apiUrl, Talker? talker}) { 14 | final dio = Dio(); 15 | dio.interceptors.addAll([TalkerDioLogger(talker: talker)]); 16 | if (apiUrl != null) { 17 | return RhymerApiClient(dio, baseUrl: apiUrl); 18 | } 19 | return RhymerApiClient(dio); 20 | } 21 | 22 | @GET('/rhymes') 23 | Future getRhymesList(@Query('query') String word); 24 | } 25 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | 12 | void fl_register_plugins(FlPluginRegistry* registry) { 13 | g_autoptr(FlPluginRegistrar) sqlite3_flutter_libs_registrar = 14 | fl_plugin_registry_get_registrar_for_plugin(registry, "Sqlite3FlutterLibsPlugin"); 15 | sqlite3_flutter_libs_plugin_register_with_registrar(sqlite3_flutter_libs_registrar); 16 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 17 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 18 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 19 | } 20 | -------------------------------------------------------------------------------- /lib/features/history/bloc/history_rhymes_state.dart: -------------------------------------------------------------------------------- 1 | part of 'history_rhymes_bloc.dart'; 2 | 3 | sealed class HistoryRhymesState extends Equatable { 4 | const HistoryRhymesState(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | final class HistoryRhymesInitial extends HistoryRhymesState {} 11 | 12 | final class HistoryRhymesLoading extends HistoryRhymesState {} 13 | 14 | final class HistoryRhymesLoaded extends HistoryRhymesState { 15 | const HistoryRhymesLoaded({required this.rhymes}); 16 | 17 | final List rhymes; 18 | 19 | @override 20 | List get props => super.props..add(rhymes); 21 | } 22 | 23 | final class HistoryRhymesFailure extends HistoryRhymesState { 24 | const HistoryRhymesFailure(this.error); 25 | final Object error; 26 | 27 | @override 28 | List get props => super.props..add(error); 29 | } 30 | -------------------------------------------------------------------------------- /lib/features/favorites/bloc/bloc/favorite_rhymes_state.dart: -------------------------------------------------------------------------------- 1 | part of 'favorite_rhymes_bloc.dart'; 2 | 3 | sealed class FavoriteRhymesState extends Equatable { 4 | const FavoriteRhymesState(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | final class FavoriteRhymesInitial extends FavoriteRhymesState {} 11 | 12 | final class FavoriteRhymesLoading extends FavoriteRhymesState {} 13 | 14 | final class FavoriteRhymesLoaded extends FavoriteRhymesState { 15 | const FavoriteRhymesLoaded({required this.rhymes}); 16 | 17 | final List rhymes; 18 | 19 | @override 20 | List get props => super.props..add(rhymes); 21 | } 22 | 23 | final class FavoriteRhymesFailure extends FavoriteRhymesState { 24 | const FavoriteRhymesFailure(this.error); 25 | final Object error; 26 | 27 | @override 28 | List get props => super.props..add(error); 29 | } 30 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '2.0.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | // START: FlutterFire Configuration 11 | classpath 'com.google.gms:google-services:4.3.15' 12 | // END: FlutterFire Configuration 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | } 22 | } 23 | 24 | rootProject.buildDir = '../build' 25 | subprojects { 26 | project.buildDir = "${rootProject.buildDir}/${project.name}" 27 | } 28 | subprojects { 29 | project.evaluationDependsOn(':app') 30 | } 31 | 32 | tasks.register("clean", Delete) { 33 | delete rootProject.buildDir 34 | } 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/app/app_config.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_messaging/firebase_messaging.dart'; 2 | import 'package:flutter_local_notifications/flutter_local_notifications.dart'; 3 | import 'package:rhymer/api/api.dart'; 4 | import 'package:rhymer/utils/database/drift.dart'; 5 | import 'package:shared_preferences/shared_preferences.dart'; 6 | import 'package:talker/talker.dart'; 7 | 8 | class AppConfig { 9 | AppConfig({ 10 | required this.database, 11 | required this.preferences, 12 | required this.localNotificationsPlugin, 13 | required this.firebaseMessaging, 14 | required this.talker, 15 | required this.apiClient, 16 | }); 17 | 18 | final AppDatabase database; 19 | final SharedPreferences preferences; 20 | final FlutterLocalNotificationsPlugin localNotificationsPlugin; 21 | final FirebaseMessaging firebaseMessaging; 22 | final Talker talker; 23 | final RhymerApiClient apiClient; 24 | } 25 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | sqlite3_flutter_libs 7 | url_launcher_linux 8 | ) 9 | 10 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 11 | ) 12 | 13 | set(PLUGIN_BUNDLED_LIBRARIES) 14 | 15 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 16 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 17 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 20 | endforeach(plugin) 21 | 22 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 23 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 25 | endforeach(ffi_plugin) 26 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: gen gen_offline pub_get_all gen_assets fmt bloc build_release run_web 2 | gen: 3 | flutter pub get 4 | flutter pub run build_runner build --delete-conflicting-outputs 5 | 6 | gen_offline: 7 | flutter pub get --offline 8 | flutter pub run build_runner build --delete-conflicting-outputs 9 | 10 | 11 | pub_get_all: 12 | sh utils/pub_get_all.sh 13 | 14 | gen_assets: 15 | flutter pub get 16 | fluttergen -c pubspec.yaml 17 | 18 | fmt: 19 | flutter format . --line-length=100 20 | 21 | bloc: 22 | sh utils/create_bloc.sh 23 | 24 | run_web: 25 | flutter run -d chrome --web-browser-flag "--disable-web-security" 26 | 27 | build_release: 28 | flutter build apk --release --obfuscate --split-debug-info=.obfuscate --no-tree-shake-icons --dart-define=APP_ENV=production 29 | flutter build appbundle --release --obfuscate --split-debug-info=.obfuscate --no-tree-shake-icons --dart-define=APP_ENV=production 30 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | firebase_core 7 | share_plus 8 | sqlite3_flutter_libs 9 | url_launcher_windows 10 | ) 11 | 12 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 13 | ) 14 | 15 | set(PLUGIN_BUNDLED_LIBRARIES) 16 | 17 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 18 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 19 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 21 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 22 | endforeach(plugin) 23 | 24 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 25 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 26 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 27 | endforeach(ffi_plugin) 28 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | void RegisterPlugins(flutter::PluginRegistry* registry) { 15 | FirebaseCorePluginCApiRegisterWithRegistrar( 16 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); 17 | SharePlusWindowsPluginCApiRegisterWithRegistrar( 18 | registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); 19 | Sqlite3FlutterLibsPluginRegisterWithRegistrar( 20 | registry->GetRegistrarForPlugin("Sqlite3FlutterLibsPlugin")); 21 | UrlLauncherWindowsRegisterWithRegistrar( 22 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 23 | } 24 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /lib/ui/widgets/text_banner.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class TextBanner extends StatelessWidget { 4 | const TextBanner({ 5 | super.key, 6 | required this.title, 7 | required this.subtitle, 8 | }); 9 | 10 | final String title; 11 | final String subtitle; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | final theme = Theme.of(context); 16 | return Center( 17 | child: Column( 18 | mainAxisAlignment: MainAxisAlignment.center, 19 | children: [ 20 | Text( 21 | title, 22 | style: theme.textTheme.headlineLarge, 23 | ), 24 | Padding( 25 | padding: const EdgeInsets.symmetric(horizontal: 40), 26 | child: Text( 27 | subtitle, 28 | textAlign: TextAlign.center, 29 | style: theme.textTheme.bodyMedium, 30 | ), 31 | ), 32 | ], 33 | ), 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/utils/database/drift.dart: -------------------------------------------------------------------------------- 1 | import 'package:drift/drift.dart'; 2 | import 'package:drift_flutter/drift_flutter.dart'; 3 | import 'package:rhymer/repositories/favorites/favorites.dart'; 4 | import 'package:rhymer/repositories/history/history.dart'; 5 | 6 | part 'drift.g.dart'; 7 | 8 | @DriftDatabase(tables: [FavoriteRhymeModel, HistoryRhymeModel]) 9 | class AppDatabase extends _$AppDatabase { 10 | // After generating code, this class needs to define a `schemaVersion` getter 11 | // and a constructor telling drift where the database should be stored. 12 | // These are described in the getting started guide: https://drift.simonbinder.eu/getting-started/#open 13 | AppDatabase() : super(_openConnection()); 14 | 15 | @override 16 | int get schemaVersion => 1; 17 | 18 | static QueryExecutor _openConnection() { 19 | // `driftDatabase` from `package:drift_flutter` stores the database in 20 | // `getApplicationDocumentsDirectory()`. 21 | return driftDatabase(name: 'rhymer_general'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | .env 46 | android/app/google-services.json 47 | ios/firebase_app_id_file.json 48 | lib/firebase_options.dart 49 | ios/Runner/GoogleService-Info.plist 50 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rhymer", 3 | "short_name": "rhymer", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /lib/repositories/history/history_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:drift/drift.dart'; 2 | import 'package:rhymer/repositories/history/history.dart'; 3 | import 'package:rhymer/utils/database/drift.dart'; 4 | 5 | class HistoryRepository implements HistoryRepositoryI { 6 | HistoryRepository({ 7 | required this.db, 8 | }); 9 | 10 | final AppDatabase db; 11 | 12 | @override 13 | Future> getRhymesList() async { 14 | final data = await (db.select(db.historyRhymeModel) 15 | ..orderBy([ 16 | (u) => OrderingTerm( 17 | expression: u.createdAt, 18 | mode: OrderingMode.desc, 19 | ) 20 | ])) 21 | .get(); 22 | return data.map((e) => HistoryRhyme.fromTable(e)).toList(); 23 | } 24 | 25 | @override 26 | Future createRhyme(CreateHistoryRhyme rhyme) async { 27 | await db.into(db.historyRhymeModel).insert(rhyme.toCompanion()); 28 | } 29 | 30 | @override 31 | Future clear() async { 32 | await db.delete(db.historyRhymeModel).go(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/features/search/bloc/rhymes_list_event.dart: -------------------------------------------------------------------------------- 1 | part of 'rhymes_list_bloc.dart'; 2 | 3 | sealed class RhymesListEvent extends Equatable { 4 | const RhymesListEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | class SearchRhymes extends RhymesListEvent { 11 | const SearchRhymes({ 12 | required this.query, 13 | this.addToHistory = true, 14 | }); 15 | 16 | final String query; 17 | final bool addToHistory; 18 | 19 | @override 20 | List get props => super.props..addAll([query, addToHistory]); 21 | } 22 | 23 | class ToggleFavoriteRhymes extends RhymesListEvent { 24 | const ToggleFavoriteRhymes({ 25 | required this.favorite, 26 | required this.rhymes, 27 | required this.favoriteWord, 28 | this.completer, 29 | }); 30 | 31 | final FavoriteRhyme? favorite; 32 | final String favoriteWord; 33 | final Rhymes rhymes; 34 | final Completer? completer; 35 | 36 | bool get isFavorite => favorite != null; 37 | 38 | @override 39 | List get props => super.props 40 | ..addAll([ 41 | favorite, 42 | rhymes, 43 | favoriteWord, 44 | completer, 45 | ]); 46 | } 47 | -------------------------------------------------------------------------------- /lib/router/router.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:rhymer/features/favorites/favorites.dart'; 3 | import 'package:rhymer/features/history/history.dart'; 4 | import 'package:rhymer/features/home/home.dart'; 5 | import 'package:rhymer/features/search/search.dart'; 6 | import 'package:rhymer/features/settings/settings.dart'; 7 | 8 | part 'router.gr.dart'; 9 | 10 | @AutoRouterConfig() 11 | class AppRouter extends RootStackRouter { 12 | @override 13 | List get routes => [ 14 | AutoRoute( 15 | page: HomeRoute.page, 16 | path: '/', 17 | children: [ 18 | AutoRoute( 19 | page: SearchRoute.page, 20 | path: 'search', 21 | ), 22 | AutoRoute( 23 | page: FavoritesRoute.page, 24 | path: 'favorites', 25 | ), 26 | AutoRoute( 27 | page: HistoryRoute.page, 28 | path: 'poems', 29 | ), 30 | AutoRoute( 31 | page: SettingsRoute.page, 32 | path: 'settings', 33 | ), 34 | ], 35 | ), 36 | ]; 37 | } 38 | -------------------------------------------------------------------------------- /lib/features/search/widgets/rhymes_history_carousel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:rhymer/features/search/widgets/widgets.dart'; 3 | import 'package:rhymer/repositories/history/history.dart'; 4 | 5 | class RhymesHistoryCarousel extends StatelessWidget { 6 | const RhymesHistoryCarousel({ 7 | super.key, 8 | required this.history, 9 | required this.onItemTap, 10 | }); 11 | 12 | final List history; 13 | final Function(HistoryRhyme rhyme) onItemTap; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return ListView.separated( 18 | padding: const EdgeInsets.only(left: 16), 19 | scrollDirection: Axis.horizontal, 20 | itemCount: history.length, 21 | separatorBuilder: (context, index) => const SizedBox( 22 | width: 8, 23 | ), 24 | itemBuilder: (context, index) { 25 | final rhymes = history[index]; 26 | final query = rhymes.queryWord; 27 | return RhymeHistoryCarouselCard( 28 | word: query, 29 | rhymes: rhymes.words, 30 | onTap: () => onItemTap.call(rhymes), 31 | ); 32 | }, 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /lib/features/search/widgets/search_rhymes_bottom_sheet.dart: -------------------------------------------------------------------------------- 1 | // import 'package:flutter/material.dart'; 2 | // import 'package:rhymer/ui/ui.dart'; 3 | 4 | // class SearchRhymesBottomSheet extends StatelessWidget { 5 | // const SearchRhymesBottomSheet({ 6 | // super.key, 7 | // required this.controller, 8 | // }); 9 | 10 | // final TextEditingController controller; 11 | 12 | // @override 13 | // Widget build(BuildContext context) { 14 | // final theme = Theme.of(context); 15 | // return BaseBottomSheet( 16 | // child: Column( 17 | // children: [ 18 | // const Divider(height: 1), 19 | // Expanded( 20 | // child: ListView.separated( 21 | // itemBuilder: (context, index) => ListTile( 22 | // title: const Text('Слово из автокомплита'), 23 | // onTap: () {}, 24 | // ), 25 | // separatorBuilder: (context, _) => const Divider(height: 1), 26 | // itemCount: 15, 27 | // ), 28 | // ), 29 | // ], 30 | // ), 31 | // ); 32 | // } 33 | 34 | // void _onTapSearch(BuildContext context) { 35 | // Navigator.of(context).pop(controller.text); 36 | // } 37 | // } 38 | -------------------------------------------------------------------------------- /lib/bloc/theme/theme_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'dart:developer'; 2 | 3 | import 'package:equatable/equatable.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_bloc/flutter_bloc.dart'; 6 | import 'package:rhymer/repositories/settings/settings.dart'; 7 | 8 | part 'theme_state.dart'; 9 | 10 | class ThemeCubit extends Cubit { 11 | ThemeCubit({ 12 | required SettingsRepositoryI settingsRepository, 13 | }) : _settingsRepository = settingsRepository, 14 | super(const ThemeState(Brightness.light)) { 15 | _heckSelectedTheme(); 16 | } 17 | 18 | final SettingsRepositoryI _settingsRepository; 19 | 20 | Future setThemeBrightness(Brightness brightness) async { 21 | try { 22 | emit(ThemeState(brightness)); 23 | await _settingsRepository.setDarkThemeSelected( 24 | brightness == Brightness.dark, 25 | ); 26 | } catch (e) { 27 | log(e.toString()); 28 | } 29 | } 30 | 31 | void _heckSelectedTheme() { 32 | try { 33 | final brightness = _settingsRepository.isDarkThemeSelected() 34 | ? Brightness.dark 35 | : Brightness.light; 36 | emit(ThemeState(brightness)); 37 | } catch (e) { 38 | log(e.toString()); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/ui/widgets/platform/platform_navigation_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:rhymer/ui/theme/theme.dart'; 5 | 6 | class PlatformNavigationBar extends StatelessWidget { 7 | const PlatformNavigationBar({ 8 | super.key, 9 | required this.tabsRouter, 10 | required this.onSelect, 11 | required this.items, 12 | }); 13 | 14 | final TabsRouter tabsRouter; 15 | final Function(int index) onSelect; 16 | final List items; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | final theme = Theme.of(context); 21 | final selectedIndex = tabsRouter.activeIndex; 22 | 23 | if (theme.isAndroid) { 24 | return BottomNavigationBar( 25 | items: items, 26 | currentIndex: selectedIndex, 27 | selectedItemColor: theme.primaryColor, 28 | unselectedItemColor: theme.hintColor, 29 | onTap: onSelect, 30 | ); 31 | } 32 | return CupertinoTabBar( 33 | activeColor: theme.primaryColor, 34 | items: items, 35 | currentIndex: selectedIndex, 36 | backgroundColor: theme.cardColor, 37 | onTap: onSelect, 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/features/history/bloc/history_rhymes_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:developer'; 2 | 3 | import 'package:equatable/equatable.dart'; 4 | import 'package:flutter_bloc/flutter_bloc.dart'; 5 | import 'package:rhymer/repositories/history/history.dart'; 6 | 7 | part 'history_rhymes_event.dart'; 8 | part 'history_rhymes_state.dart'; 9 | 10 | class HistoryRhymesBloc extends Bloc { 11 | HistoryRhymesBloc({ 12 | required HistoryRepositoryI historyRepository, 13 | }) : _historyRepository = historyRepository, 14 | super(HistoryRhymesInitial()) { 15 | on(_load); 16 | on(_clear); 17 | } 18 | 19 | final HistoryRepositoryI _historyRepository; 20 | 21 | Future _load( 22 | LoadHistoryRhymes event, 23 | Emitter emit, 24 | ) async { 25 | try { 26 | emit(HistoryRhymesLoading()); 27 | final rhymes = await _historyRepository.getRhymesList(); 28 | emit(HistoryRhymesLoaded(rhymes: rhymes)); 29 | } catch (e) { 30 | emit(HistoryRhymesFailure(e)); 31 | } 32 | } 33 | 34 | Future _clear( 35 | ClearRhymesHistory event, 36 | Emitter emit, 37 | ) async { 38 | try { 39 | await _historyRepository.clear(); 40 | add(LoadHistoryRhymes()); 41 | } catch (e) { 42 | log(e.toString()); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import firebase_analytics 9 | import firebase_core 10 | import firebase_messaging 11 | import flutter_local_notifications 12 | import package_info_plus 13 | import path_provider_foundation 14 | import share_plus 15 | import shared_preferences_foundation 16 | import sqlite3_flutter_libs 17 | 18 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 19 | FLTFirebaseAnalyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAnalyticsPlugin")) 20 | FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) 21 | FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin")) 22 | FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) 23 | FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) 24 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 25 | SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) 26 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 27 | Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: "Sqlite3FlutterLibsPlugin")) 28 | } 29 | -------------------------------------------------------------------------------- /lib/utils/advertising/advertising_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter_dotenv/flutter_dotenv.dart'; 3 | import 'package:rhymer/utils/analytics/analytics.dart'; 4 | import 'package:talker_flutter/talker_flutter.dart'; 5 | import 'package:yandex_mobileads/mobile_ads.dart'; 6 | 7 | class AdvertisingService { 8 | AdvertisingService({ 9 | required this.talker, 10 | required this.brightness, 11 | }); 12 | 13 | final Talker talker; 14 | final Brightness brightness; 15 | 16 | String? get bannerId1 { 17 | final isAndroid = defaultTargetPlatform == TargetPlatform.android; 18 | final bannerId = isAndroid 19 | ? dotenv.env['Y1_BANNER_ANDROID'] 20 | : dotenv.env['Y1_BANNER_IOS']; 21 | return bannerId; 22 | } 23 | 24 | BannerAd createBanner({ 25 | required String adUnitId, 26 | required BannerAdSize size, 27 | }) { 28 | return BannerAd( 29 | adUnitId: adUnitId, 30 | // adUnitId: 'demo-banner-yandex', // or 'demo-banner-yandex' 31 | adSize: size, 32 | onAdLoaded: () => Analytics.i.log(Analytics.ads.loadAdsBanner1), 33 | onAdClicked: () => Analytics.i.log(Analytics.ads.clickAdsBanner1), 34 | onAdFailedToLoad: talker.handle, 35 | ); 36 | } 37 | 38 | AdRequest createAdRequest() => AdRequest( 39 | preferredTheme: 40 | brightness == Brightness.dark ? AdTheme.dark : AdTheme.light, 41 | ); 42 | } 43 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"rhymer", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /lib/features/settings/widgets/settings_toggle_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:rhymer/ui/ui.dart'; 4 | 5 | class SettingsToggleCard extends StatelessWidget { 6 | const SettingsToggleCard({ 7 | super.key, 8 | required this.title, 9 | required this.value, 10 | this.onChanged, 11 | }); 12 | 13 | final String title; 14 | final bool value; 15 | final ValueChanged? onChanged; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | final theme = Theme.of(context); 20 | return Padding( 21 | padding: const EdgeInsets.symmetric(horizontal: 16).copyWith(bottom: 8), 22 | child: BaseConatiner( 23 | padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 12), 24 | width: double.infinity, 25 | child: Row( 26 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 27 | children: [ 28 | Text( 29 | title, 30 | style: theme.textTheme.titleMedium?.copyWith( 31 | fontSize: 18, 32 | ), 33 | ), 34 | if (theme.isAndroid) 35 | Switch( 36 | value: value, 37 | onChanged: onChanged, 38 | ) 39 | else 40 | CupertinoSwitch( 41 | value: value, 42 | onChanged: onChanged, 43 | ) 44 | ], 45 | ), 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /lib/features/search/widgets/search_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SearchButtion extends StatelessWidget { 4 | const SearchButtion({ 5 | super.key, 6 | required this.onTap, 7 | required this.controller, 8 | }); 9 | 10 | final VoidCallback onTap; 11 | final TextEditingController controller; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | final theme = Theme.of(context); 16 | return GestureDetector( 17 | onTap: onTap, 18 | child: Container( 19 | width: double.infinity, 20 | margin: const EdgeInsets.symmetric(horizontal: 16).copyWith(bottom: 8), 21 | padding: const EdgeInsets.all(12), 22 | decoration: BoxDecoration( 23 | color: theme.hintColor.withOpacity(0.1), 24 | borderRadius: BorderRadius.circular(16), 25 | ), 26 | child: Row( 27 | children: [ 28 | const Icon(Icons.search_rounded), 29 | const SizedBox(width: 12), 30 | AnimatedBuilder( 31 | animation: controller, 32 | builder: (context, _) { 33 | return Text( 34 | controller.text.isEmpty ? 'Поиск рифм...' : controller.text, 35 | style: TextStyle( 36 | fontSize: 18, 37 | color: theme.hintColor.withOpacity(0.5), 38 | fontWeight: FontWeight.w500, 39 | ), 40 | ); 41 | }, 42 | ), 43 | ], 44 | ), 45 | ), 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/features/settings/widgets/settings_action_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:rhymer/ui/ui.dart'; 3 | 4 | class SettingsActionCard extends StatelessWidget { 5 | const SettingsActionCard({ 6 | super.key, 7 | required this.title, 8 | this.onTap, 9 | required this.iconData, 10 | this.iconColor, 11 | }); 12 | 13 | final String title; 14 | final VoidCallback? onTap; 15 | final IconData iconData; 16 | final Color? iconColor; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | final theme = Theme.of(context); 21 | return GestureDetector( 22 | onTap: onTap, 23 | child: Padding( 24 | padding: const EdgeInsets.symmetric(horizontal: 16).copyWith(bottom: 8), 25 | child: BaseConatiner( 26 | padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 12), 27 | width: double.infinity, 28 | child: Row( 29 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 30 | children: [ 31 | Text( 32 | title, 33 | style: theme.textTheme.titleMedium?.copyWith( 34 | fontSize: 18, 35 | ), 36 | ), 37 | Padding( 38 | padding: const EdgeInsets.all(4), 39 | child: Icon( 40 | iconData, 41 | color: iconColor ?? theme.hintColor.withOpacity(0.3), 42 | size: 32, 43 | ), 44 | ), 45 | ], 46 | ), 47 | ), 48 | ), 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /lib/ui/theme/theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | const _primaryColor = Color(0xFFF82B10); 5 | 6 | final darkTheme = ThemeData( 7 | useMaterial3: true, 8 | primaryColor: _primaryColor, 9 | textTheme: _textTheme, 10 | scaffoldBackgroundColor: Colors.black, 11 | colorScheme: ColorScheme.fromSeed( 12 | seedColor: _primaryColor, 13 | brightness: Brightness.dark, 14 | ), 15 | ); 16 | 17 | final lightTheme = ThemeData( 18 | useMaterial3: true, 19 | primaryColor: _primaryColor, 20 | textTheme: _textTheme, 21 | scaffoldBackgroundColor: const Color(0xFFEFF1F3), 22 | dividerTheme: DividerThemeData( 23 | color: Colors.grey.withOpacity(0.1), 24 | ), 25 | // snackBarTheme: SnackBarThemeData( 26 | // backgroundColor: _primaryColor, 27 | // ), 28 | colorScheme: ColorScheme.fromSeed( 29 | seedColor: _primaryColor, 30 | brightness: Brightness.light, 31 | surface: Colors.white, 32 | ), 33 | ); 34 | 35 | const _textTheme = TextTheme( 36 | titleMedium: TextStyle( 37 | fontSize: 16, 38 | fontWeight: FontWeight.w600, 39 | ), 40 | headlineLarge: TextStyle( 41 | fontSize: 28, 42 | fontWeight: FontWeight.w600, 43 | ), 44 | ); 45 | 46 | extension ThemePlatformExtension on ThemeData { 47 | bool get isAndroid => defaultTargetPlatform == TargetPlatform.android; 48 | bool get isCupertino => [TargetPlatform.iOS, TargetPlatform.macOS] 49 | .contains(defaultTargetPlatform); 50 | Color get cupertinoAlertColor => const Color(0xFFF82B10); 51 | Color get cupertinoActionColor => const Color(0xFF3478F7); 52 | } 53 | -------------------------------------------------------------------------------- /macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.15' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | target 'RunnerTests' do 35 | inherit! :search_paths 36 | end 37 | end 38 | 39 | post_install do |installer| 40 | installer.pods_project.targets.each do |target| 41 | flutter_additional_macos_build_settings(target) 42 | target.build_configurations.each do |config| 43 | config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.15' 44 | end 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /lib/app/rhymer_app.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:rhymer/app/app.dart'; 4 | import 'package:rhymer/app/repository_container.dart'; 5 | import 'package:rhymer/bloc/theme/theme_cubit.dart'; 6 | import 'package:rhymer/router/router.dart'; 7 | import 'package:rhymer/ui/ui.dart'; 8 | import 'package:rhymer/utils/analytics/analytics.dart'; 9 | import 'package:talker_flutter/talker_flutter.dart'; 10 | 11 | class RhymerApp extends StatefulWidget { 12 | const RhymerApp({ 13 | super.key, 14 | required this.config, 15 | }); 16 | 17 | final AppConfig config; 18 | 19 | @override 20 | State createState() => _RhymerAppState(); 21 | } 22 | 23 | class _RhymerAppState extends State { 24 | final _router = AppRouter(); 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | final repositoryContainer = RepositoryContainer.prod( 29 | config: widget.config, 30 | ); 31 | 32 | return AppInitializer( 33 | config: widget.config, 34 | repositoryContainer: repositoryContainer, 35 | child: BlocBuilder( 36 | builder: (context, state) { 37 | return MaterialApp.router( 38 | title: 'Rhymer', 39 | theme: state.isDark ? darkTheme : lightTheme, 40 | debugShowCheckedModeBanner: false, 41 | routerConfig: _router.config( 42 | navigatorObservers: () => [ 43 | Analytics.i.observer, 44 | TalkerRouteObserver(context.read()), 45 | ], 46 | ), 47 | ); 48 | }, 49 | ), 50 | ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/features/search/widgets/rhyme_history_carousel_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:rhymer/ui/ui.dart'; 3 | 4 | class RhymeHistoryCarouselCard extends StatelessWidget { 5 | const RhymeHistoryCarouselCard({ 6 | super.key, 7 | required this.rhymes, 8 | required this.word, 9 | required this.onTap, 10 | }); 11 | 12 | final String word; 13 | final List rhymes; 14 | final VoidCallback onTap; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | final theme = Theme.of(context); 19 | return GestureDetector( 20 | onTap: onTap, 21 | child: BaseConatiner( 22 | width: 140, 23 | padding: const EdgeInsets.all(8), 24 | child: Column( 25 | mainAxisSize: MainAxisSize.min, 26 | crossAxisAlignment: CrossAxisAlignment.start, 27 | children: [ 28 | Flexible( 29 | child: Text( 30 | word, 31 | overflow: TextOverflow.ellipsis, 32 | style: theme.textTheme.bodyLarge?.copyWith( 33 | fontWeight: FontWeight.w700, 34 | fontSize: 16, 35 | ), 36 | ), 37 | ), 38 | Flexible( 39 | child: Text( 40 | rhymes.take(2).map((e) => e).join(", "), 41 | overflow: TextOverflow.ellipsis, 42 | style: theme.textTheme.bodyMedium?.copyWith( 43 | fontWeight: FontWeight.w500, 44 | fontSize: 13, 45 | color: theme.hintColor.withOpacity(0.6), 46 | ), 47 | ), 48 | ), 49 | ], 50 | ), 51 | ), 52 | ); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /lib/features/history/widgets/rhyme_history_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:rhymer/ui/ui.dart'; 3 | 4 | class RhymeHistoryCard extends StatelessWidget { 5 | const RhymeHistoryCard({ 6 | super.key, 7 | required this.rhymes, 8 | required this.word, 9 | required this.onTap, 10 | }); 11 | 12 | final String word; 13 | final List rhymes; 14 | final VoidCallback onTap; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | final theme = Theme.of(context); 19 | return GestureDetector( 20 | onTap: onTap, 21 | child: BaseConatiner( 22 | width: 200, 23 | padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16), 24 | child: Column( 25 | mainAxisSize: MainAxisSize.min, 26 | crossAxisAlignment: CrossAxisAlignment.start, 27 | children: [ 28 | Flexible( 29 | child: Text( 30 | word, 31 | overflow: TextOverflow.ellipsis, 32 | style: theme.textTheme.bodyLarge?.copyWith( 33 | fontWeight: FontWeight.w700, 34 | fontSize: 18, 35 | ), 36 | ), 37 | ), 38 | Flexible( 39 | child: Text( 40 | maxLines: 2, 41 | rhymes.take(4).map((e) => e).join(", "), 42 | overflow: TextOverflow.ellipsis, 43 | style: theme.textTheme.bodyMedium?.copyWith( 44 | fontWeight: FontWeight.w500, 45 | fontSize: 13, 46 | color: theme.hintColor.withOpacity(0.6), 47 | ), 48 | ), 49 | ), 50 | ], 51 | ), 52 | ), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '13.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! :linkage => :static 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | target 'RunnerTests' do 36 | inherit! :search_paths 37 | end 38 | 39 | # pod 'YandexMobileAdsMediation', '7.1.1' 40 | end 41 | 42 | post_install do |installer| 43 | installer.pods_project.targets.each do |target| 44 | flutter_additional_ios_build_settings(target) 45 | # target.build_configurations.each do |config| 46 | # config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' 47 | # end 48 | end 49 | end -------------------------------------------------------------------------------- /lib/utils/analytics/analytics_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:appmetrica_plugin/appmetrica_plugin.dart'; 2 | import 'package:firebase_analytics/firebase_analytics.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:rhymer/utils/analytics/analytics.dart'; 5 | import 'package:rhymer/utils/formatters/formatters.dart'; 6 | 7 | class Analytics implements AnalyticsI { 8 | Analytics._(); 9 | 10 | static Analytics get i => _analytics; 11 | static final Analytics _analytics = Analytics._(); 12 | 13 | static const favorites = FavoriteEvents(); 14 | static const ads = AdsEvents(); 15 | static const settings = SettingsEvents(); 16 | static const history = HistoryEvents(); 17 | static const search = SearchEvents(); 18 | 19 | final _firebaseAnalytics = FirebaseAnalytics.instance; 20 | 21 | @override 22 | RouteObserver get observer => FirebaseAnalyticsObserver( 23 | analytics: _firebaseAnalytics, 24 | nameExtractor: (settings) { 25 | final baseName = settings.name?.replaceAll('Route', ''); 26 | if (baseName == null) return null; 27 | 28 | final newPath = StringFormatter.camelCaseToKebab(baseName); 29 | return '/$newPath'; 30 | }, 31 | ); 32 | 33 | @override 34 | void log(String name) { 35 | _logAppMetrica(name); 36 | _logFirebase(name); 37 | } 38 | 39 | @override 40 | void logScreenView(String screenName) => 41 | _firebaseAnalytics.logScreenView(screenName: screenName); 42 | 43 | void _logFirebase(String name) { 44 | try { 45 | _firebaseAnalytics.logEvent(name: name); 46 | } catch (_) { 47 | // pass... 48 | } 49 | } 50 | 51 | void _logAppMetrica(String name) { 52 | try { 53 | AppMetrica.reportEvent(name); 54 | } catch (_) { 55 | // pass... 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /lib/features/search/bloc/rhymes_list_state.dart: -------------------------------------------------------------------------------- 1 | part of 'rhymes_list_bloc.dart'; 2 | 3 | sealed class RhymesListState extends Equatable { 4 | const RhymesListState(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | final class RhymesListInitial extends RhymesListState {} 11 | 12 | final class RhymesListLoading extends RhymesListState {} 13 | 14 | final class RhymesListLoaded extends RhymesListState { 15 | const RhymesListLoaded({ 16 | required this.rhymes, 17 | required this.query, 18 | required this.favorites, 19 | }); 20 | 21 | final String query; 22 | final Rhymes rhymes; 23 | final List favorites; 24 | 25 | FavoriteRhyme? favorite(String rhyme) { 26 | return favorites.firstWhereOrNull( 27 | (e) => e.favoriteWord == rhyme && e.queryWord == query, 28 | ); 29 | } 30 | 31 | @override 32 | List get props => super.props..addAll([rhymes, query, favorites]); 33 | 34 | RhymesListLoaded copyWith({ 35 | String? query, 36 | Rhymes? rhymes, 37 | List? favorites, 38 | }) { 39 | return RhymesListLoaded( 40 | query: query ?? this.query, 41 | rhymes: rhymes ?? this.rhymes, 42 | favorites: favorites ?? this.favorites, 43 | ); 44 | } 45 | } 46 | 47 | final class RhymesStressedCharsSelection extends RhymesListState { 48 | const RhymesStressedCharsSelection({ 49 | required this.stressedChars, 50 | required this.query, 51 | }); 52 | 53 | final String query; 54 | final List stressedChars; 55 | 56 | @override 57 | List get props => super.props..addAll([stressedChars, query]); 58 | } 59 | 60 | final class RhymesListFailure extends RhymesListState { 61 | const RhymesListFailure(this.error); 62 | final Object error; 63 | 64 | @override 65 | List get props => super.props..add(error); 66 | } 67 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: "12fccda598477eddd19f93040a1dba24f915b9be" 8 | channel: "stable" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be 17 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be 18 | - platform: android 19 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be 20 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be 21 | - platform: ios 22 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be 23 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be 24 | - platform: linux 25 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be 26 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be 27 | - platform: macos 28 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be 29 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be 30 | - platform: web 31 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be 32 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be 33 | - platform: windows 34 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be 35 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "version": 1, 4 | "author": "xcode" 5 | }, 6 | "images": [ 7 | { 8 | "size": "16x16", 9 | "idiom": "mac", 10 | "filename": "app_icon_16.png", 11 | "scale": "1x" 12 | }, 13 | { 14 | "size": "16x16", 15 | "idiom": "mac", 16 | "filename": "app_icon_32.png", 17 | "scale": "2x" 18 | }, 19 | { 20 | "size": "32x32", 21 | "idiom": "mac", 22 | "filename": "app_icon_32.png", 23 | "scale": "1x" 24 | }, 25 | { 26 | "size": "32x32", 27 | "idiom": "mac", 28 | "filename": "app_icon_64.png", 29 | "scale": "2x" 30 | }, 31 | { 32 | "size": "128x128", 33 | "idiom": "mac", 34 | "filename": "app_icon_128.png", 35 | "scale": "1x" 36 | }, 37 | { 38 | "size": "128x128", 39 | "idiom": "mac", 40 | "filename": "app_icon_256.png", 41 | "scale": "2x" 42 | }, 43 | { 44 | "size": "256x256", 45 | "idiom": "mac", 46 | "filename": "app_icon_256.png", 47 | "scale": "1x" 48 | }, 49 | { 50 | "size": "256x256", 51 | "idiom": "mac", 52 | "filename": "app_icon_512.png", 53 | "scale": "2x" 54 | }, 55 | { 56 | "size": "512x512", 57 | "idiom": "mac", 58 | "filename": "app_icon_512.png", 59 | "scale": "1x" 60 | }, 61 | { 62 | "size": "512x512", 63 | "idiom": "mac", 64 | "filename": "app_icon_1024.png", 65 | "scale": "2x" 66 | } 67 | ] 68 | } -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: rhymer 2 | description: A new Flutter project. 3 | publish_to: 'none' 4 | version: 2.0.1+15 5 | 6 | environment: 7 | sdk: '>=3.0.6 <4.0.0' 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | 13 | # Core 14 | auto_route: ^9.2.2 15 | json_annotation: ^4.9.0 16 | flutter_bloc: ^8.1.6 17 | equatable: ^2.0.5 18 | flutter_dotenv: ^5.1.0 19 | 20 | # Network 21 | dio: ^5.7.0 22 | retrofit: ^4.4.1 23 | 24 | # Firebase 25 | firebase_core: ^3.6.0 26 | firebase_messaging: ^15.1.3 27 | flutter_local_notifications: ^17.2.3 28 | firebase_analytics: ^11.3.3 29 | 30 | # Data stores 31 | drift: ^2.20.3 32 | drift_flutter: ^0.1.0 33 | shared_preferences: ^2.3.2 34 | 35 | # Logging 36 | talker: 4.4.1 37 | talker_flutter: 4.4.1 38 | talker_dio_logger: 4.4.1 39 | talker_bloc_logger: 4.4.1 40 | 41 | # Vendors 42 | yandex_mobileads: ^7.4.0 43 | appmetrica_plugin: ^3.1.0 44 | 45 | # Platform 46 | package_info_plus: ^8.0.3 47 | 48 | dev_dependencies: 49 | flutter_test: 50 | sdk: flutter 51 | build_runner: 52 | auto_route_generator: ^9.0.0 53 | retrofit_generator: '^9.1.2' 54 | json_serializable: ^6.8.0 55 | flutter_lints: ^5.0.0 56 | flutter_launcher_icons: 0.14.1 57 | drift_dev: ^2.20.3 58 | 59 | flutter: 60 | uses-material-design: true 61 | assets: 62 | - .env 63 | # To add assets to your application, add an assets section, like this: 64 | # assets: 65 | # - images/a_dot_burr.jpeg 66 | # - images/a_dot_ham.jpeg 67 | 68 | flutter_launcher_icons: 69 | android: false 70 | ios: true 71 | image_path: "assets/logo/logo.png" 72 | remove_alpha_ios: true 73 | min_sdk_android: 21 74 | web: 75 | generate: true 76 | image_path: "assets/logo/logo.png" 77 | windows: 78 | generate: true 79 | image_path: "assets/logo/logo.png" 80 | macos: 81 | generate: true 82 | image_path: "assets/logo/logo.png" 83 | 84 | -------------------------------------------------------------------------------- /lib/features/favorites/bloc/bloc/favorite_rhymes_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:rhymer/repositories/favorites/favorites.dart'; 4 | import 'package:talker_flutter/talker_flutter.dart'; 5 | 6 | part 'favorite_rhymes_event.dart'; 7 | part 'favorite_rhymes_state.dart'; 8 | 9 | class FavoriteRhymesBloc 10 | extends Bloc { 11 | FavoriteRhymesBloc({ 12 | required FavoritesRepositoryI favoritesRepository, 13 | required Talker talker, 14 | }) : _talker = talker, 15 | _favoritesRepository = favoritesRepository, 16 | super(FavoriteRhymesInitial()) { 17 | on(_load); 18 | on(_toggleFavorite); 19 | } 20 | 21 | final Talker _talker; 22 | final FavoritesRepositoryI _favoritesRepository; 23 | 24 | Future _load( 25 | LoadFavoriteRhymes event, 26 | Emitter emit, 27 | ) async { 28 | try { 29 | emit(FavoriteRhymesLoading()); 30 | final rhymes = await _favoritesRepository.getRhymesList(); 31 | emit(FavoriteRhymesLoaded(rhymes: rhymes)); 32 | } catch (e, st) { 33 | emit(FavoriteRhymesFailure(e)); 34 | _talker.handle(e, st); 35 | } 36 | } 37 | 38 | Future _toggleFavorite( 39 | DeleteFavoriteRhyme event, 40 | Emitter emit, 41 | ) async { 42 | try { 43 | final prevState = state; 44 | if (prevState is! FavoriteRhymesLoaded) { 45 | _talker.warning('Illegal state'); 46 | return; 47 | } 48 | final id = event.rhyme.id; 49 | await _favoritesRepository.delete(id); 50 | final favorites = [...prevState.rhymes]; 51 | favorites.removeWhere((e) => e.id == id); 52 | emit(FavoriteRhymesLoaded(rhymes: favorites)); 53 | } catch (e, st) { 54 | _talker.handle(e, st); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") 37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 38 | 39 | # Run the Flutter tool portions of the build. This must not be removed. 40 | add_dependencies(${BINARY_NAME} flutter_assemble) 41 | -------------------------------------------------------------------------------- /lib/repositories/favorites/favorites_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:drift/drift.dart'; 2 | import 'package:rhymer/repositories/favorites/favorites.dart'; 3 | import 'package:rhymer/utils/database/drift.dart'; 4 | 5 | class FavoritesRepository implements FavoritesRepositoryI { 6 | FavoritesRepository({required this.db}); 7 | 8 | final AppDatabase db; 9 | 10 | @override 11 | Future> getRhymesList() async { 12 | final data = await db.select(db.favoriteRhymeModel).get(); 13 | return data.map((e) => FavoriteRhyme.fromTable(e)).toList(); 14 | } 15 | 16 | @override 17 | Future createOrDeleteRhyme(CreateFavoriteRhyme rhyme) async { 18 | // Проверяем, существует ли запись с такими же queryWord и favoriteWord 19 | final select = db.select(db.favoriteRhymeModel); 20 | final existingRhyme = await (select 21 | ..where((e) => _uniqFavoriteExpr(e, rhyme))) 22 | .getSingleOrNull(); 23 | 24 | if (existingRhyme != null) { 25 | // Если запись существует, удаляем её 26 | final delete = db.delete(db.favoriteRhymeModel); 27 | await (delete..where((e) => e.id.equals(existingRhyme.id))).go(); 28 | return; 29 | } 30 | // Если записи нет, создаём новую 31 | await create(rhyme); 32 | } 33 | 34 | @override 35 | Future create(CreateFavoriteRhyme rhyme) async { 36 | return await db.into(db.favoriteRhymeModel).insert(rhyme.toCompanion()); 37 | } 38 | 39 | @override 40 | Future clear() async { 41 | await db.delete(db.favoriteRhymeModel).go(); 42 | } 43 | 44 | @override 45 | Future delete(int id) async { 46 | final delete = db.delete(db.favoriteRhymeModel); 47 | await (delete..where((e) => e.id.equals(id))).go(); 48 | } 49 | 50 | Expression _uniqFavoriteExpr( 51 | $FavoriteRhymeModelTable e, 52 | CreateFavoriteRhyme rhyme, 53 | ) => 54 | Expression.and( 55 | [ 56 | e.queryWord.equals(rhyme.queryWord), 57 | e.favoriteWord.equals(rhyme.favoriteWord) 58 | ], 59 | ); 60 | } 61 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr) 51 | -1; // remove the trailing null character 52 | int input_length = (int)wcslen(utf16_string); 53 | std::string utf8_string; 54 | if (target_length <= 0 || target_length > utf8_string.max_size()) { 55 | return utf8_string; 56 | } 57 | utf8_string.resize(target_length); 58 | int converted_length = ::WideCharToMultiByte( 59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 60 | input_length, utf8_string.data(), target_length, nullptr, nullptr); 61 | if (converted_length == 0) { 62 | return std::string(); 63 | } 64 | return utf8_string; 65 | } 66 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | rhymer 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 14 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 32 | 35 | 38 | 39 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | return true; 35 | } 36 | 37 | void FlutterWindow::OnDestroy() { 38 | if (flutter_controller_) { 39 | flutter_controller_ = nullptr; 40 | } 41 | 42 | Win32Window::OnDestroy(); 43 | } 44 | 45 | LRESULT 46 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 47 | WPARAM const wparam, 48 | LPARAM const lparam) noexcept { 49 | // Give Flutter, including plugins, an opportunity to handle window messages. 50 | if (flutter_controller_) { 51 | std::optional result = 52 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 53 | lparam); 54 | if (result) { 55 | return *result; 56 | } 57 | } 58 | 59 | switch (message) { 60 | case WM_FONTCHANGE: 61 | flutter_controller_->engine()->ReloadSystemFonts(); 62 | break; 63 | } 64 | 65 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 66 | } 67 | -------------------------------------------------------------------------------- /lib/features/search/widgets/search_text_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SearchTextField extends StatefulWidget { 4 | const SearchTextField({ 5 | super.key, 6 | required this.controller, 7 | this.onSubmitted, 8 | this.onEditingComplete, 9 | this.onClearTap, 10 | }); 11 | 12 | final TextEditingController controller; 13 | final ValueChanged? onSubmitted; 14 | final VoidCallback? onEditingComplete; 15 | final VoidCallback? onClearTap; 16 | 17 | @override 18 | State createState() => _SearchTextFieldState(); 19 | } 20 | 21 | class _SearchTextFieldState extends State { 22 | var _showSuffix = false; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | final theme = Theme.of(context); 27 | return Focus( 28 | onFocusChange: (value) => _onFocusChanged(value), 29 | child: TextField( 30 | controller: widget.controller, 31 | textInputAction: TextInputAction.search, 32 | onSubmitted: widget.onSubmitted, 33 | onEditingComplete: widget.onEditingComplete, 34 | decoration: InputDecoration( 35 | hintText: 'Начни вводить слово...', 36 | hintStyle: TextStyle( 37 | color: theme.hintColor.withOpacity(0.5), 38 | fontWeight: FontWeight.w400, 39 | ), 40 | contentPadding: const EdgeInsets.symmetric( 41 | horizontal: 12, 42 | ), 43 | enabledBorder: const OutlineInputBorder( 44 | borderSide: BorderSide.none, 45 | ), 46 | border: const OutlineInputBorder( 47 | borderSide: BorderSide.none, 48 | ), 49 | suffixIcon: _showSuffix 50 | ? IconButton( 51 | onPressed: _clearText, 52 | icon: Icon(Icons.close, size: 22), 53 | ) 54 | : null, 55 | ), 56 | ), 57 | ); 58 | } 59 | 60 | void _clearText() { 61 | widget.controller.clear(); 62 | widget.onClearTap?.call(); 63 | } 64 | 65 | void _onFocusChanged(bool value) { 66 | if (!value && widget.controller.text.isNotEmpty) { 67 | return; 68 | } 69 | setState(() => _showSuffix = value); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:appmetrica_plugin/appmetrica_plugin.dart'; 2 | import 'package:firebase_core/firebase_core.dart'; 3 | import 'package:firebase_messaging/firebase_messaging.dart'; 4 | import 'package:flutter/foundation.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_bloc/flutter_bloc.dart'; 7 | import 'package:flutter_dotenv/flutter_dotenv.dart'; 8 | import 'package:flutter_local_notifications/flutter_local_notifications.dart'; 9 | import 'package:rhymer/api/api.dart'; 10 | import 'package:rhymer/app/app.dart'; 11 | import 'package:rhymer/firebase_options.dart'; 12 | import 'package:rhymer/utils/database/drift.dart'; 13 | import 'package:shared_preferences/shared_preferences.dart'; 14 | import 'package:talker_bloc_logger/talker_bloc_logger.dart'; 15 | import 'package:talker_flutter/talker_flutter.dart'; 16 | 17 | Future main() async { 18 | WidgetsFlutterBinding.ensureInitialized(); 19 | await dotenv.load(fileName: ".env"); 20 | 21 | final appmetricaKey = dotenv.env["APPMETRICA_KEY"]; 22 | final apiUrl = dotenv.env['API_URL']; 23 | 24 | await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); 25 | 26 | if (appmetricaKey != null) { 27 | await AppMetrica.activate(AppMetricaConfig(appmetricaKey)); 28 | } 29 | 30 | final prefs = await _initPrefs(); 31 | final database = AppDatabase(); 32 | final talker = TalkerFlutter.init( 33 | settings: TalkerSettings( 34 | useConsoleLogs: kDebugMode, 35 | useHistory: kDebugMode, 36 | ), 37 | ); 38 | final apiClient = RhymerApiClient.create(apiUrl: apiUrl, talker: talker); 39 | 40 | Bloc.observer = TalkerBlocObserver( 41 | talker: talker, 42 | settings: TalkerBlocLoggerSettings( 43 | printEventFullData: false, 44 | printStateFullData: false, 45 | ), 46 | ); 47 | 48 | final config = AppConfig( 49 | database: database, 50 | preferences: prefs, 51 | localNotificationsPlugin: FlutterLocalNotificationsPlugin(), 52 | firebaseMessaging: FirebaseMessaging.instance, 53 | talker: talker, 54 | apiClient: apiClient, 55 | ); 56 | 57 | runApp(RhymerApp(config: config)); 58 | } 59 | 60 | Future _initPrefs() async { 61 | final prefs = await SharedPreferences.getInstance(); 62 | return prefs; 63 | } 64 | -------------------------------------------------------------------------------- /lib/app/repository_container.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | import 'package:rhymer/app/app_config.dart'; 3 | import 'package:rhymer/repositories/favorites/favorites.dart'; 4 | import 'package:rhymer/repositories/history/history.dart'; 5 | import 'package:rhymer/repositories/notifications/notifications.dart'; 6 | import 'package:rhymer/repositories/rhymes/mock/mock_rhymes_repository.dart'; 7 | import 'package:rhymer/repositories/rhymes/rhymes.dart'; 8 | import 'package:rhymer/repositories/settings/settings.dart'; 9 | 10 | class RepositoryContainer { 11 | const RepositoryContainer({ 12 | required this.historyRepository, 13 | required this.favoritesRepository, 14 | required this.settingsRepository, 15 | required this.notificationsRepository, 16 | required this.rhymesRepository, 17 | }); 18 | 19 | final HistoryRepositoryI historyRepository; 20 | final FavoritesRepositoryI favoritesRepository; 21 | final SettingsRepositoryI settingsRepository; 22 | final NotificationsRepositoryI notificationsRepository; 23 | final RhymesRepositoryI rhymesRepository; 24 | 25 | factory RepositoryContainer.prod({ 26 | required AppConfig config, 27 | }) => 28 | RepositoryContainer( 29 | historyRepository: HistoryRepository(db: config.database), 30 | favoritesRepository: FavoritesRepository(db: config.database), 31 | settingsRepository: SettingsRepository(preferences: config.preferences), 32 | rhymesRepository: RhymesRepository(apiClient: config.apiClient), 33 | notificationsRepository: NotificationsRepository( 34 | localNotifications: config.localNotificationsPlugin, 35 | firebaseMessaging: config.firebaseMessaging, 36 | ), 37 | ); 38 | 39 | factory RepositoryContainer.dev({ 40 | required AppConfig config, 41 | }) => 42 | RepositoryContainer( 43 | historyRepository: HistoryRepository(db: config.database), 44 | favoritesRepository: FavoritesRepository(db: config.database), 45 | settingsRepository: SettingsRepository(preferences: config.preferences), 46 | rhymesRepository: MockRhymesRepository(), 47 | notificationsRepository: NotificationsRepository( 48 | localNotifications: config.localNotificationsPlugin, 49 | firebaseMessaging: config.firebaseMessaging, 50 | ), 51 | ); 52 | } 53 | -------------------------------------------------------------------------------- /lib/repositories/history/models/history_rhyme.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:drift/drift.dart'; 4 | import 'package:equatable/equatable.dart'; 5 | import 'package:rhymer/utils/database/drift.dart'; 6 | 7 | class HistoryRhyme extends Equatable { 8 | const HistoryRhyme({ 9 | required this.id, 10 | required this.queryWord, 11 | required this.words, 12 | required this.createdAt, 13 | }); 14 | 15 | final int id; 16 | final String queryWord; 17 | final List words; 18 | final DateTime createdAt; 19 | 20 | CreateHistoryRhyme toCreate() => CreateHistoryRhyme( 21 | queryWord: queryWord, 22 | words: words, 23 | createdAt: createdAt, 24 | ); 25 | 26 | factory HistoryRhyme.fromTable(HistoryRhymeModelData data) { 27 | final decoded = List.from(jsonDecode(data.words)); 28 | final words = data.words.isEmpty ? [] : decoded; 29 | return HistoryRhyme( 30 | id: data.id, 31 | queryWord: data.queryWord, 32 | words: words, 33 | createdAt: data.createdAt, 34 | ); 35 | } 36 | 37 | HistoryRhyme copyWith({ 38 | int? id, 39 | String? queryWord, 40 | String? favoriteWord, 41 | List? words, 42 | DateTime? createdAt, 43 | }) { 44 | return HistoryRhyme( 45 | id: id ?? this.id, 46 | queryWord: queryWord ?? this.queryWord, 47 | words: words ?? this.words, 48 | createdAt: createdAt ?? this.createdAt, 49 | ); 50 | } 51 | 52 | @override 53 | List get props => [id, queryWord, words, createdAt]; 54 | } 55 | 56 | class CreateHistoryRhyme extends Equatable { 57 | const CreateHistoryRhyme({ 58 | required this.queryWord, 59 | required this.words, 60 | required this.createdAt, 61 | }); 62 | 63 | final String queryWord; 64 | final List words; 65 | final DateTime createdAt; 66 | 67 | factory CreateHistoryRhyme.create({ 68 | required String queryWord, 69 | required List words, 70 | }) => 71 | CreateHistoryRhyme( 72 | queryWord: queryWord, 73 | words: words, 74 | createdAt: DateTime.now(), 75 | ); 76 | 77 | HistoryRhymeModelCompanion toCompanion() { 78 | return HistoryRhymeModelCompanion( 79 | queryWord: Value(queryWord), 80 | words: Value(jsonEncode(words)), 81 | createdAt: Value(createdAt), 82 | ); 83 | } 84 | 85 | @override 86 | List get props => [queryWord, words, createdAt]; 87 | } 88 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/api/api.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'api.dart'; 4 | 5 | // ************************************************************************** 6 | // RetrofitGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers,unused_element 10 | 11 | class _RhymerApiClient implements RhymerApiClient { 12 | _RhymerApiClient( 13 | this._dio, { 14 | this.baseUrl, 15 | this.errorLogger, 16 | }); 17 | 18 | final Dio _dio; 19 | 20 | String? baseUrl; 21 | 22 | final ParseErrorLogger? errorLogger; 23 | 24 | @override 25 | Future getRhymesList(String word) async { 26 | final _extra = {}; 27 | final queryParameters = {r'query': word}; 28 | final _headers = {}; 29 | const Map? _data = null; 30 | final _options = _setStreamType(Options( 31 | method: 'GET', 32 | headers: _headers, 33 | extra: _extra, 34 | ) 35 | .compose( 36 | _dio.options, 37 | '/rhymes', 38 | queryParameters: queryParameters, 39 | data: _data, 40 | ) 41 | .copyWith( 42 | baseUrl: _combineBaseUrls( 43 | _dio.options.baseUrl, 44 | baseUrl, 45 | ))); 46 | final _result = await _dio.fetch>(_options); 47 | late RhymesDto _value; 48 | try { 49 | _value = RhymesDto.fromJson(_result.data!); 50 | } on Object catch (e, s) { 51 | errorLogger?.logError(e, s, _options); 52 | rethrow; 53 | } 54 | return _value; 55 | } 56 | 57 | RequestOptions _setStreamType(RequestOptions requestOptions) { 58 | if (T != dynamic && 59 | !(requestOptions.responseType == ResponseType.bytes || 60 | requestOptions.responseType == ResponseType.stream)) { 61 | if (T == String) { 62 | requestOptions.responseType = ResponseType.plain; 63 | } else { 64 | requestOptions.responseType = ResponseType.json; 65 | } 66 | } 67 | return requestOptions; 68 | } 69 | 70 | String _combineBaseUrls( 71 | String dioBaseUrl, 72 | String? baseUrl, 73 | ) { 74 | if (baseUrl == null || baseUrl.trim().isEmpty) { 75 | return dioBaseUrl; 76 | } 77 | 78 | final url = Uri.parse(baseUrl); 79 | 80 | if (url.isAbsolute) { 81 | return url.toString(); 82 | } 83 | 84 | return Uri.parse(dioBaseUrl).resolveUri(url).toString(); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /lib/router/router.gr.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | // ************************************************************************** 4 | // AutoRouterGenerator 5 | // ************************************************************************** 6 | 7 | // ignore_for_file: type=lint 8 | // coverage:ignore-file 9 | 10 | part of 'router.dart'; 11 | 12 | /// generated route for 13 | /// [FavoritesScreen] 14 | class FavoritesRoute extends PageRouteInfo { 15 | const FavoritesRoute({List? children}) 16 | : super( 17 | FavoritesRoute.name, 18 | initialChildren: children, 19 | ); 20 | 21 | static const String name = 'FavoritesRoute'; 22 | 23 | static PageInfo page = PageInfo( 24 | name, 25 | builder: (data) { 26 | return const FavoritesScreen(); 27 | }, 28 | ); 29 | } 30 | 31 | /// generated route for 32 | /// [HistoryScreen] 33 | class HistoryRoute extends PageRouteInfo { 34 | const HistoryRoute({List? children}) 35 | : super( 36 | HistoryRoute.name, 37 | initialChildren: children, 38 | ); 39 | 40 | static const String name = 'HistoryRoute'; 41 | 42 | static PageInfo page = PageInfo( 43 | name, 44 | builder: (data) { 45 | return const HistoryScreen(); 46 | }, 47 | ); 48 | } 49 | 50 | /// generated route for 51 | /// [HomeScreen] 52 | class HomeRoute extends PageRouteInfo { 53 | const HomeRoute({List? children}) 54 | : super( 55 | HomeRoute.name, 56 | initialChildren: children, 57 | ); 58 | 59 | static const String name = 'HomeRoute'; 60 | 61 | static PageInfo page = PageInfo( 62 | name, 63 | builder: (data) { 64 | return const HomeScreen(); 65 | }, 66 | ); 67 | } 68 | 69 | /// generated route for 70 | /// [SearchScreen] 71 | class SearchRoute extends PageRouteInfo { 72 | const SearchRoute({List? children}) 73 | : super( 74 | SearchRoute.name, 75 | initialChildren: children, 76 | ); 77 | 78 | static const String name = 'SearchRoute'; 79 | 80 | static PageInfo page = PageInfo( 81 | name, 82 | builder: (data) { 83 | return const SearchScreen(); 84 | }, 85 | ); 86 | } 87 | 88 | /// generated route for 89 | /// [SettingsScreen] 90 | class SettingsRoute extends PageRouteInfo { 91 | const SettingsRoute({List? children}) 92 | : super( 93 | SettingsRoute.name, 94 | initialChildren: children, 95 | ); 96 | 97 | static const String name = 'SettingsRoute'; 98 | 99 | static PageInfo page = PageInfo( 100 | name, 101 | builder: (data) { 102 | return const SettingsScreen(); 103 | }, 104 | ); 105 | } 106 | -------------------------------------------------------------------------------- /lib/repositories/favorites/model/favorite_rhyme.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:drift/drift.dart'; 4 | import 'package:equatable/equatable.dart'; 5 | import 'package:rhymer/utils/database/drift.dart'; 6 | 7 | class FavoriteRhyme extends Equatable { 8 | const FavoriteRhyme({ 9 | required this.id, 10 | required this.queryWord, 11 | required this.favoriteWord, 12 | required this.words, 13 | required this.createdAt, 14 | }); 15 | 16 | final int id; 17 | final String queryWord; 18 | final String favoriteWord; 19 | final List words; 20 | final DateTime createdAt; 21 | 22 | CreateFavoriteRhyme toCreate() => CreateFavoriteRhyme( 23 | queryWord: queryWord, 24 | favoriteWord: favoriteWord, 25 | words: words, 26 | createdAt: createdAt, 27 | ); 28 | 29 | factory FavoriteRhyme.fromTable(FavoriteRhymeModelData data) { 30 | final decoded = List.from(jsonDecode(data.words)); 31 | final words = data.words.isEmpty ? [] : decoded; 32 | return FavoriteRhyme( 33 | id: data.id, 34 | queryWord: data.queryWord, 35 | favoriteWord: data.favoriteWord, 36 | words: words, 37 | createdAt: data.createdAt, 38 | ); 39 | } 40 | 41 | FavoriteRhyme copyWith({ 42 | int? id, 43 | String? queryWord, 44 | String? favoriteWord, 45 | List? words, 46 | DateTime? createdAt, 47 | }) { 48 | return FavoriteRhyme( 49 | id: id ?? this.id, 50 | queryWord: queryWord ?? this.queryWord, 51 | favoriteWord: favoriteWord ?? this.favoriteWord, 52 | words: words ?? this.words, 53 | createdAt: createdAt ?? this.createdAt, 54 | ); 55 | } 56 | 57 | @override 58 | List get props => [id, queryWord, favoriteWord, words, createdAt]; 59 | } 60 | 61 | class CreateFavoriteRhyme extends Equatable { 62 | const CreateFavoriteRhyme({ 63 | required this.queryWord, 64 | required this.favoriteWord, 65 | required this.words, 66 | required this.createdAt, 67 | }); 68 | 69 | final String queryWord; 70 | final String favoriteWord; 71 | final List words; 72 | final DateTime createdAt; 73 | 74 | factory CreateFavoriteRhyme.create({ 75 | required String queryWord, 76 | required String favoriteWord, 77 | required List words, 78 | }) => 79 | CreateFavoriteRhyme( 80 | queryWord: queryWord, 81 | favoriteWord: favoriteWord, 82 | words: words, 83 | createdAt: DateTime.now(), 84 | ); 85 | 86 | FavoriteRhymeModelCompanion toCompanion() { 87 | return FavoriteRhymeModelCompanion( 88 | queryWord: Value(queryWord), 89 | favoriteWord: Value(favoriteWord), 90 | words: Value(jsonEncode(words)), 91 | createdAt: Value(createdAt), 92 | ); 93 | } 94 | 95 | @override 96 | List get props => [queryWord, favoriteWord, words, createdAt]; 97 | } 98 | -------------------------------------------------------------------------------- /lib/repositories/notifications/notifications_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_messaging/firebase_messaging.dart'; 2 | import 'package:flutter_local_notifications/flutter_local_notifications.dart'; 3 | import 'package:rhymer/repositories/notifications/notifications.dart'; 4 | 5 | class NotificationsRepository implements NotificationsRepositoryI { 6 | NotificationsRepository({ 7 | required FlutterLocalNotificationsPlugin localNotifications, 8 | required FirebaseMessaging firebaseMessaging, 9 | }) : _localNotifications = localNotifications, 10 | _firebaseMessaging = firebaseMessaging; 11 | 12 | final FlutterLocalNotificationsPlugin _localNotifications; 13 | final FirebaseMessaging _firebaseMessaging; 14 | 15 | static const _defaultChannel = AndroidNotificationChannel( 16 | 'high_importance_channel', 17 | 'High Importance Notifications', 18 | description: 'This channel is used for important notifications.', 19 | importance: Importance.high, 20 | ); 21 | 22 | @override 23 | Future getToken() => _firebaseMessaging.getToken(); 24 | 25 | @override 26 | Future requestPermisison() async { 27 | final settings = await _firebaseMessaging.requestPermission(); 28 | final isAuthorized = 29 | settings.authorizationStatus == AuthorizationStatus.authorized; 30 | if (isAuthorized) { 31 | await FirebaseMessaging.instance 32 | .setForegroundNotificationPresentationOptions( 33 | alert: true, 34 | badge: true, 35 | sound: true, 36 | ); 37 | } 38 | return isAuthorized; 39 | } 40 | 41 | @override 42 | Future init() async { 43 | final androidPlugin = 44 | _localNotifications.resolvePlatformSpecificImplementation< 45 | AndroidFlutterLocalNotificationsPlugin>(); 46 | if (androidPlugin != null) { 47 | await androidPlugin.createNotificationChannel(_defaultChannel); 48 | } 49 | 50 | FirebaseMessaging.onMessage.listen((RemoteMessage message) { 51 | final notification = message.notification; 52 | final android = message.notification?.android; 53 | 54 | if (notification != null && android != null) { 55 | showLocalNotification( 56 | Notification( 57 | title: notification.title!, 58 | message: notification.body!, 59 | ), 60 | ); 61 | } 62 | }); 63 | } 64 | 65 | @override 66 | Future showLocalNotification(Notification notification) async { 67 | await _localNotifications.show( 68 | notification.hashCode, 69 | notification.title, 70 | notification.message, 71 | NotificationDetails( 72 | android: AndroidNotificationDetails( 73 | _defaultChannel.id, 74 | _defaultChannel.name, 75 | channelDescription: _defaultChannel.description, 76 | icon: 'ic_launcher', 77 | ), 78 | ), 79 | ); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /lib/features/favorites/view/favorites_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:rhymer/features/favorites/bloc/bloc/favorite_rhymes_bloc.dart'; 5 | import 'package:rhymer/features/favorites/widgets/widgets.dart'; 6 | import 'package:rhymer/repositories/favorites/favorites.dart'; 7 | import 'package:rhymer/ui/ui.dart'; 8 | import 'package:rhymer/utils/analytics/analytics.dart'; 9 | 10 | @RoutePage() 11 | class FavoritesScreen extends StatefulWidget { 12 | const FavoritesScreen({super.key}); 13 | 14 | @override 15 | State createState() => _FavoritesScreenState(); 16 | } 17 | 18 | class _FavoritesScreenState extends State { 19 | @override 20 | void initState() { 21 | BlocProvider.of(context).add(LoadFavoriteRhymes()); 22 | super.initState(); 23 | } 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return Scaffold( 28 | body: CustomScrollView( 29 | slivers: [ 30 | const SliverAppBar( 31 | snap: true, 32 | floating: true, 33 | centerTitle: true, 34 | title: Text('Избранное'), 35 | elevation: 0, 36 | surfaceTintColor: Colors.transparent, 37 | ), 38 | const SliverToBoxAdapter(child: SizedBox(height: 16)), 39 | BlocBuilder( 40 | builder: (context, state) { 41 | if (state is FavoriteRhymesLoaded) { 42 | final rhymes = state.rhymes; 43 | if (rhymes.isEmpty) { 44 | return SliverFillRemaining(child: EmptyFavoritesBanner()); 45 | } 46 | return SliverList.builder( 47 | itemCount: rhymes.length, 48 | itemBuilder: (context, index) { 49 | final rhyme = rhymes[index]; 50 | return RhymeListCard( 51 | isFavorite: true, 52 | id: rhyme.id, 53 | rhyme: rhyme.favoriteWord, 54 | sourceWord: rhyme.queryWord, 55 | onLikeTap: () => _toggleFavoriteRhyme(context, rhyme), 56 | onCopied: _onRhymeCopied, 57 | ); 58 | }, 59 | ); 60 | } 61 | return const SliverFillRemaining( 62 | child: PlatformProgressIndicator(), 63 | ); 64 | }, 65 | ), 66 | ], 67 | ), 68 | ); 69 | } 70 | 71 | void _onRhymeCopied() { 72 | Analytics.i.log(Analytics.favorites.copyRhyme); 73 | } 74 | 75 | void _toggleFavoriteRhyme(BuildContext context, FavoriteRhyme rhyme) { 76 | BlocProvider.of(context).add( 77 | DeleteFavoriteRhyme(rhyme), 78 | ); 79 | Analytics.favorites.toggleFavorite(false); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /lib/features/settings/widgets/support_bottom_sheet.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:rhymer/ui/ui.dart'; 4 | 5 | class SupportBottomSheet extends StatelessWidget { 6 | const SupportBottomSheet({super.key}); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | final theme = Theme.of(context); 11 | if (theme.isAndroid) { 12 | return Padding( 13 | padding: const EdgeInsets.all(24).copyWith(top: 12), 14 | child: Column( 15 | mainAxisSize: MainAxisSize.min, 16 | children: [ 17 | Row( 18 | children: [ 19 | const Spacer(), 20 | IconButton( 21 | onPressed: () => _close(context), 22 | icon: Icon( 23 | Icons.close, 24 | color: theme.colorScheme.primary, 25 | ), 26 | ), 27 | ], 28 | ), 29 | const SizedBox(height: 8), 30 | SizedBox( 31 | width: double.infinity, 32 | height: 56, 33 | child: ElevatedButton.icon( 34 | label: const Text('Написать в Telegram'), 35 | icon: const Icon(Icons.telegram), 36 | onPressed: () {}, 37 | style: ElevatedButton.styleFrom( 38 | backgroundColor: theme.colorScheme.primary, 39 | foregroundColor: Colors.white, 40 | ), 41 | ), 42 | ), 43 | const SizedBox(height: 12), 44 | SizedBox( 45 | width: double.infinity, 46 | height: 56, 47 | child: OutlinedButton.icon( 48 | icon: const Icon(Icons.email), 49 | style: OutlinedButton.styleFrom( 50 | foregroundColor: theme.colorScheme.primary, 51 | ), 52 | label: const Text('Отправить Email'), 53 | onPressed: () {}, 54 | ), 55 | ), 56 | ], 57 | ), 58 | ); 59 | } 60 | return CupertinoActionSheet( 61 | title: const Text('Поддержка'), 62 | message: const Text('Ответим вам быстро!'), 63 | actions: [ 64 | CupertinoActionSheetAction( 65 | child: Text( 66 | 'Написать в Telegram', 67 | style: TextStyle( 68 | color: theme.cupertinoActionColor, 69 | ), 70 | ), 71 | onPressed: () { 72 | Navigator.pop(context); 73 | }, 74 | ), 75 | CupertinoActionSheetAction( 76 | child: Text( 77 | 'Отправить Email', 78 | style: TextStyle( 79 | color: theme.cupertinoActionColor, 80 | ), 81 | ), 82 | onPressed: () { 83 | Navigator.pop(context); 84 | }, 85 | ), 86 | ], 87 | ); 88 | } 89 | 90 | void _close(BuildContext context) { 91 | Navigator.of(context).pop(); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /lib/features/search/widgets/stressed_char_selector.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:rhymer/ui/ui.dart'; 3 | 4 | class StressedCharSelector extends StatelessWidget { 5 | const StressedCharSelector({ 6 | super.key, 7 | required this.query, 8 | required this.stressedChars, 9 | required this.onCharSelected, 10 | }); 11 | 12 | final String query; 13 | final List stressedChars; 14 | final Function(String query) onCharSelected; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | final theme = Theme.of(context); 19 | final chars = query.split(''); 20 | return BaseConatiner( 21 | margin: const EdgeInsets.symmetric(vertical: 12, horizontal: 24), 22 | child: Column( 23 | children: [ 24 | Text('Укажите ударную гласную'), 25 | Divider(height: 16), 26 | RichText( 27 | text: TextSpan( 28 | children: chars.asMap().entries.map((e) { 29 | final char = e.value; 30 | final isStressedChar = stressedChars.contains(char); 31 | if (isStressedChar) { 32 | return WidgetSpan( 33 | child: ClipRRect( 34 | borderRadius: BorderRadius.circular(8), 35 | child: InkWell( 36 | onTap: () => _onCharSelected(chars, e.key), 37 | child: Container( 38 | margin: EdgeInsets.symmetric(horizontal: 3), 39 | padding: EdgeInsets.symmetric(horizontal: 4), 40 | decoration: BoxDecoration( 41 | border: Border.all(color: theme.primaryColor), 42 | borderRadius: BorderRadius.circular(8), 43 | ), 44 | child: Text( 45 | char, 46 | style: theme.textTheme.bodyMedium?.copyWith( 47 | color: theme.primaryColor, 48 | fontSize: 32, 49 | fontWeight: FontWeight.w600, 50 | ), 51 | ), 52 | ), 53 | ), 54 | ), 55 | ); 56 | } 57 | return WidgetSpan( 58 | child: Padding( 59 | padding: EdgeInsets.symmetric(horizontal: 1), 60 | child: Text( 61 | char, 62 | style: theme.textTheme.bodyMedium?.copyWith( 63 | fontSize: 32, 64 | ), 65 | ), 66 | ), 67 | ); 68 | }).toList(), 69 | ), 70 | ), 71 | ], 72 | ), 73 | ); 74 | } 75 | 76 | void _onCharSelected(List chars, int index) { 77 | final newQueyChars = [...chars]..insert(index + 1, '*'); 78 | final newQuery = newQueyChars.join(); 79 | onCharSelected(newQuery); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | // START: FlutterFire Configuration 26 | apply plugin: 'com.google.gms.google-services' 27 | // END: FlutterFire Configuration 28 | apply plugin: 'kotlin-android' 29 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 30 | 31 | 32 | def keystoreProperties = new Properties() 33 | def keystorePropertiesFile = rootProject.file('keystore.properties') 34 | if (keystorePropertiesFile.exists()) { 35 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 36 | } 37 | 38 | android { 39 | namespace "com.frezycode.rhymer" 40 | compileSdkVersion flutter.compileSdkVersion 41 | ndkVersion flutter.ndkVersion 42 | 43 | compileOptions { 44 | sourceCompatibility JavaVersion.VERSION_1_8 45 | targetCompatibility JavaVersion.VERSION_1_8 46 | } 47 | 48 | kotlinOptions { 49 | jvmTarget = '1.8' 50 | } 51 | 52 | sourceSets { 53 | main.java.srcDirs += 'src/main/kotlin' 54 | } 55 | 56 | defaultConfig { 57 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 58 | applicationId "com.frezycode.rhymer" 59 | // You can update the following values to match your application needs. 60 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 61 | minSdkVersion flutter.minSdkVersion 62 | targetSdkVersion flutter.targetSdkVersion 63 | versionCode flutterVersionCode.toInteger() 64 | versionName flutterVersionName 65 | } 66 | 67 | signingConfigs { 68 | release { 69 | keyAlias keystoreProperties['keyAlias'] 70 | keyPassword keystoreProperties['keyPassword'] 71 | storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null 72 | storePassword keystoreProperties['storePassword'] 73 | } 74 | } 75 | 76 | buildTypes { 77 | release { 78 | signingConfig signingConfigs.release 79 | } 80 | } 81 | } 82 | 83 | flutter { 84 | source '../..' 85 | } 86 | 87 | dependencies { 88 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 89 | } 90 | -------------------------------------------------------------------------------- /lib/ui/widgets/rhyme_list_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:rhymer/ui/ui.dart'; 4 | 5 | class RhymeListCard extends StatelessWidget { 6 | const RhymeListCard({ 7 | super.key, 8 | required this.rhyme, 9 | required this.onLikeTap, 10 | this.id, 11 | this.isFavorite = false, 12 | this.sourceWord, 13 | this.onCopied, 14 | }); 15 | 16 | final int? id; 17 | final String rhyme; 18 | final String? sourceWord; 19 | final bool isFavorite; 20 | final VoidCallback onLikeTap; 21 | final VoidCallback? onCopied; 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | final theme = Theme.of(context); 26 | return GestureDetector( 27 | onTap: () => _onTap(context), 28 | child: BaseConatiner( 29 | margin: const EdgeInsets.symmetric(horizontal: 16).copyWith(bottom: 10), 30 | padding: EdgeInsets.only(left: 12), 31 | width: double.infinity, 32 | child: Row( 33 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 34 | children: [ 35 | Row( 36 | children: [ 37 | if (sourceWord != null) ...[ 38 | Text( 39 | sourceWord!, 40 | style: theme.textTheme.bodyLarge, 41 | ), 42 | Padding( 43 | padding: const EdgeInsets.symmetric(horizontal: 4), 44 | child: Icon( 45 | Icons.arrow_forward_ios, 46 | size: 18, 47 | color: theme.hintColor.withOpacity(0.4), 48 | ), 49 | ), 50 | ], 51 | SelectableText( 52 | rhyme, 53 | style: theme.textTheme.bodyLarge?.copyWith( 54 | fontWeight: FontWeight.w600, 55 | ), 56 | onTap: () => _onTap(context), 57 | ), 58 | ], 59 | ), 60 | IconButton( 61 | onPressed: onLikeTap, 62 | icon: Icon( 63 | Icons.favorite, 64 | color: isFavorite 65 | ? theme.primaryColor 66 | : theme.hintColor.withOpacity(0.2), 67 | ), 68 | ) 69 | ], 70 | ), 71 | ), 72 | ); 73 | } 74 | 75 | void _onTap(BuildContext context) { 76 | HapticFeedback.lightImpact(); 77 | Clipboard.setData(ClipboardData(text: rhyme)); 78 | final colorScheme = Theme.of(context).colorScheme; 79 | ScaffoldMessenger.of(context).showSnackBar( 80 | SnackBar( 81 | content: Row( 82 | children: [ 83 | Icon(Icons.check, color: colorScheme.onPrimaryFixed), 84 | SizedBox(width: 16), 85 | Text( 86 | 'Рифма скопированана', 87 | style: TextStyle(color: colorScheme.onPrimaryFixed), 88 | ), 89 | ], 90 | ), 91 | backgroundColor: colorScheme.primaryFixed, 92 | ), 93 | ); 94 | onCopied?.call(); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/app/app_initializer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:rhymer/app/app.dart'; 4 | import 'package:rhymer/app/repository_container.dart'; 5 | import 'package:rhymer/bloc/theme/theme_cubit.dart'; 6 | import 'package:rhymer/features/favorites/bloc/bloc/favorite_rhymes_bloc.dart'; 7 | import 'package:rhymer/features/history/bloc/history_rhymes_bloc.dart'; 8 | import 'package:rhymer/features/search/bloc/rhymes_list_bloc.dart'; 9 | import 'package:rhymer/repositories/favorites/favorites.dart'; 10 | import 'package:rhymer/repositories/history/history_repository_interface.dart'; 11 | import 'package:rhymer/repositories/notifications/notifications.dart'; 12 | import 'package:rhymer/repositories/rhymes/rhymes.dart'; 13 | import 'package:rhymer/repositories/settings/settings.dart'; 14 | import 'package:talker_flutter/talker_flutter.dart'; 15 | 16 | class AppInitializer extends StatelessWidget { 17 | const AppInitializer({ 18 | super.key, 19 | required this.child, 20 | required this.config, 21 | required this.repositoryContainer, 22 | }); 23 | 24 | final Widget child; 25 | final AppConfig config; 26 | final RepositoryContainer repositoryContainer; 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return MultiRepositoryProvider( 31 | providers: [ 32 | RepositoryProvider(create: (context) => config.talker), 33 | RepositoryProvider( 34 | create: (context) => repositoryContainer.historyRepository, 35 | ), 36 | RepositoryProvider( 37 | create: (context) => repositoryContainer.favoritesRepository, 38 | ), 39 | RepositoryProvider( 40 | create: (context) => repositoryContainer.settingsRepository, 41 | ), 42 | RepositoryProvider( 43 | create: (context) => repositoryContainer.notificationsRepository, 44 | ), 45 | RepositoryProvider( 46 | create: (context) => repositoryContainer.rhymesRepository, 47 | ), 48 | ], 49 | child: MultiBlocProvider( 50 | providers: [ 51 | BlocProvider( 52 | create: (context) => RhymesListBloc( 53 | rhymesRepository: context.read(), 54 | historyRepository: context.read(), 55 | favoritesRepositoryInterface: 56 | context.read(), 57 | ), 58 | ), 59 | BlocProvider( 60 | create: (context) => HistoryRhymesBloc( 61 | historyRepository: context.read(), 62 | ), 63 | ), 64 | BlocProvider( 65 | create: (context) => FavoriteRhymesBloc( 66 | talker: config.talker, 67 | favoritesRepository: context.read(), 68 | ), 69 | ), 70 | BlocProvider( 71 | create: (context) => ThemeCubit( 72 | settingsRepository: context.read(), 73 | ), 74 | ), 75 | ], 76 | child: child, 77 | ), 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /lib/ui/widgets/confirmation_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:rhymer/ui/ui.dart'; 4 | 5 | class ConfirmationDialog extends StatelessWidget { 6 | const ConfirmationDialog({ 7 | super.key, 8 | required this.description, 9 | required this.title, 10 | required this.onConfirm, 11 | }); 12 | 13 | final String title; 14 | final String description; 15 | final VoidCallback onConfirm; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | final theme = Theme.of(context); 20 | if (theme.isAndroid) { 21 | return AlertDialog( 22 | backgroundColor: theme.cardColor, 23 | surfaceTintColor: theme.cardColor, 24 | content: _DialogContent( 25 | title: title, 26 | description: description, 27 | crossAxisAlignment: CrossAxisAlignment.start, 28 | ), 29 | actions: [ 30 | TextButton( 31 | onPressed: () => _confirm(context), 32 | child: Text( 33 | 'Да', 34 | style: TextStyle(color: theme.hintColor), 35 | ), 36 | ), 37 | TextButton( 38 | onPressed: () => _close(context), 39 | child: const Text('Нет'), 40 | ), 41 | ], 42 | ); 43 | } 44 | return CupertinoAlertDialog( 45 | content: _DialogContent( 46 | title: title, 47 | description: description, 48 | crossAxisAlignment: CrossAxisAlignment.center, 49 | ), 50 | actions: [ 51 | CupertinoDialogAction( 52 | onPressed: () => _confirm(context), 53 | isDestructiveAction: true, 54 | child: Text( 55 | 'Да', 56 | style: TextStyle( 57 | color: theme.cupertinoAlertColor, 58 | ), 59 | ), 60 | ), 61 | CupertinoDialogAction( 62 | onPressed: () => _close(context), 63 | isDefaultAction: true, 64 | child: Text( 65 | 'Нет', 66 | style: TextStyle( 67 | color: theme.cupertinoActionColor, 68 | ), 69 | ), 70 | ), 71 | ], 72 | ); 73 | } 74 | 75 | void _close(BuildContext context) { 76 | Navigator.of(context).pop(); 77 | } 78 | 79 | void _confirm(BuildContext context) { 80 | onConfirm.call(); 81 | Navigator.of(context).pop(); 82 | } 83 | } 84 | 85 | class _DialogContent extends StatelessWidget { 86 | const _DialogContent({ 87 | required this.crossAxisAlignment, 88 | required this.title, 89 | required this.description, 90 | }); 91 | 92 | final String title; 93 | final String description; 94 | 95 | final CrossAxisAlignment crossAxisAlignment; 96 | 97 | @override 98 | Widget build(BuildContext context) { 99 | final theme = Theme.of(context); 100 | return Column( 101 | crossAxisAlignment: crossAxisAlignment, 102 | mainAxisSize: MainAxisSize.min, 103 | children: [ 104 | Text( 105 | title, 106 | style: theme.textTheme.headlineSmall, 107 | ), 108 | Text( 109 | description, 110 | style: theme.textTheme.bodyMedium?.copyWith(fontSize: 16), 111 | ), 112 | ], 113 | ); 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /lib/features/history/view/history_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:rhymer/features/history/bloc/history_rhymes_bloc.dart'; 5 | import 'package:rhymer/features/history/widgets/widgets.dart'; 6 | import 'package:rhymer/features/search/bloc/rhymes_list_bloc.dart'; 7 | import 'package:rhymer/ui/ui.dart'; 8 | import 'package:rhymer/utils/analytics/analytics_service.dart'; 9 | 10 | @RoutePage() 11 | class HistoryScreen extends StatefulWidget { 12 | const HistoryScreen({super.key}); 13 | 14 | @override 15 | State createState() => _HistoryScreenState(); 16 | } 17 | 18 | class _HistoryScreenState extends State { 19 | @override 20 | void initState() { 21 | BlocProvider.of(context).add(LoadHistoryRhymes()); 22 | super.initState(); 23 | } 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return Scaffold( 28 | body: CustomScrollView( 29 | slivers: [ 30 | const SliverAppBar( 31 | snap: true, 32 | floating: true, 33 | centerTitle: true, 34 | title: Text('История'), 35 | elevation: 0, 36 | surfaceTintColor: Colors.transparent, 37 | ), 38 | const SliverToBoxAdapter(child: SizedBox(height: 16)), 39 | BlocBuilder( 40 | builder: (context, state) { 41 | if (state is HistoryRhymesLoaded) { 42 | final rhymes = state.rhymes; 43 | if (rhymes.isEmpty) { 44 | return SliverFillRemaining(child: EmptyHistoryBanner()); 45 | } 46 | return SliverPadding( 47 | padding: const EdgeInsets.symmetric(horizontal: 16), 48 | sliver: SliverGrid( 49 | gridDelegate: 50 | const SliverGridDelegateWithMaxCrossAxisExtent( 51 | maxCrossAxisExtent: 200, 52 | mainAxisSpacing: 10.0, 53 | crossAxisSpacing: 10.0, 54 | childAspectRatio: 2, 55 | ), 56 | delegate: SliverChildBuilderDelegate( 57 | childCount: rhymes.length, 58 | (BuildContext context, int index) { 59 | final rhyme = rhymes[index]; 60 | return RhymeHistoryCard( 61 | word: rhyme.queryWord, 62 | rhymes: rhyme.words, 63 | onTap: () => _openSearchScreen( 64 | context, 65 | rhyme.queryWord, 66 | ), 67 | ); 68 | }, 69 | ), 70 | ), 71 | ); 72 | } 73 | return SliverFillRemaining(child: PlatformProgressIndicator()); 74 | }, 75 | ), 76 | ], 77 | ), 78 | ); 79 | } 80 | 81 | void _openSearchScreen(BuildContext context, String query) { 82 | AutoTabsRouter.of(context).setActiveIndex(0); 83 | context.read().add( 84 | SearchRhymes(query: query, addToHistory: false), 85 | ); 86 | Analytics.i.log(Analytics.history.tapRhyme); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) 64 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0,0 67 | #endif 68 | 69 | #if defined(FLUTTER_VERSION) 70 | #define VERSION_AS_STRING FLUTTER_VERSION 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.frezycode" "\0" 93 | VALUE "FileDescription", "rhymer" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "rhymer" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2023 com.frezycode. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "rhymer.exe" "\0" 98 | VALUE "ProductName", "rhymer" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /lib/features/search/bloc/rhymes_list_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:developer'; 3 | 4 | import 'package:equatable/equatable.dart'; 5 | import 'package:flutter_bloc/flutter_bloc.dart'; 6 | import 'package:rhymer/repositories/favorites/favorites.dart'; 7 | import 'package:rhymer/repositories/history/history.dart'; 8 | import 'package:rhymer/repositories/rhymes/rhymes.dart'; 9 | import 'package:rhymer/utils/analytics/analytics.dart'; 10 | import 'package:rhymer/utils/extensions/extensions.dart'; 11 | 12 | part 'rhymes_list_event.dart'; 13 | part 'rhymes_list_state.dart'; 14 | 15 | class RhymesListBloc extends Bloc { 16 | RhymesListBloc({ 17 | required RhymesRepositoryI rhymesRepository, 18 | required HistoryRepositoryI historyRepository, 19 | required FavoritesRepositoryI favoritesRepositoryInterface, 20 | }) : _historyRepository = historyRepository, 21 | _favoritesRepository = favoritesRepositoryInterface, 22 | _rhymesRepository = rhymesRepository, 23 | super(RhymesListInitial()) { 24 | on(_onSearch); 25 | on(_onToggleFavorite); 26 | } 27 | 28 | final RhymesRepositoryI _rhymesRepository; 29 | final HistoryRepositoryI _historyRepository; 30 | final FavoritesRepositoryI _favoritesRepository; 31 | 32 | Future _onSearch( 33 | SearchRhymes event, 34 | Emitter emit, 35 | ) async { 36 | try { 37 | emit(RhymesListLoading()); 38 | final rhymesDto = await _rhymesRepository.fetchRhymesList(event.query); 39 | final words = rhymesDto.rhymes; 40 | if (words == null || words.isEmpty) { 41 | final stressedChars = rhymesDto.stressedChars; 42 | if (stressedChars != null && stressedChars.isNotEmpty) { 43 | emit( 44 | RhymesStressedCharsSelection( 45 | stressedChars: stressedChars, 46 | query: event.query, 47 | ), 48 | ); 49 | return; 50 | } 51 | return; 52 | } 53 | 54 | final rhymes = Rhymes(rhymes: words); 55 | if (event.addToHistory) { 56 | final createHistoryRhyme = CreateHistoryRhyme.create( 57 | queryWord: event.query, 58 | words: words, 59 | ); 60 | await _historyRepository.createRhyme(createHistoryRhyme); 61 | } 62 | 63 | final favoriteRhymes = await _favoritesRepository.getRhymesList(); 64 | emit( 65 | RhymesListLoaded( 66 | rhymes: rhymes, 67 | query: event.query, 68 | favorites: favoriteRhymes, 69 | ), 70 | ); 71 | } catch (e) { 72 | emit(RhymesListFailure(e)); 73 | log(e.toString()); 74 | } 75 | } 76 | 77 | Future _onToggleFavorite( 78 | ToggleFavoriteRhymes event, 79 | Emitter emit, 80 | ) async { 81 | try { 82 | final prevState = state; 83 | if (prevState is! RhymesListLoaded) { 84 | log('state is not RhymesListLoaded'); 85 | return; 86 | } 87 | final createModel = CreateFavoriteRhyme.create( 88 | queryWord: prevState.query, 89 | favoriteWord: event.favoriteWord, 90 | words: event.rhymes.rhymes, 91 | ); 92 | await _favoritesRepository.createOrDeleteRhyme(createModel); 93 | final favorites = await _favoritesRepository.getRhymesList(); 94 | emit(prevState.copyWith(favorites: favorites)); 95 | } catch (e) { 96 | emit(RhymesListFailure(e)); 97 | } finally { 98 | event.completer?.complete(); 99 | _logToggleFavorite(event); 100 | } 101 | } 102 | 103 | void _logToggleFavorite(ToggleFavoriteRhymes event) { 104 | final isFavorite = event.favorite != null; 105 | Analytics.favorites.toggleFavorite(isFavorite); 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates a win32 window with |title| that is positioned and sized using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size this function will scale the inputted width and height as 35 | // as appropriate for the default monitor. The window is invisible until 36 | // |Show| is called. Returns true if the window was created successfully. 37 | bool Create(const std::wstring& title, const Point& origin, const Size& size); 38 | 39 | // Show the current window. Returns true if the window was successfully shown. 40 | bool Show(); 41 | 42 | // Release OS resources associated with window. 43 | void Destroy(); 44 | 45 | // Inserts |content| into the window tree. 46 | void SetChildContent(HWND content); 47 | 48 | // Returns the backing Window handle to enable clients to set icon and other 49 | // window properties. Returns nullptr if the window has been destroyed. 50 | HWND GetHandle(); 51 | 52 | // If true, closing this window will quit the application. 53 | void SetQuitOnClose(bool quit_on_close); 54 | 55 | // Return a RECT representing the bounds of the current client area. 56 | RECT GetClientArea(); 57 | 58 | protected: 59 | // Processes and route salient window messages for mouse handling, 60 | // size change and DPI. Delegates handling of these to member overloads that 61 | // inheriting classes can handle. 62 | virtual LRESULT MessageHandler(HWND window, 63 | UINT const message, 64 | WPARAM const wparam, 65 | LPARAM const lparam) noexcept; 66 | 67 | // Called when CreateAndShow is called, allowing subclass window-related 68 | // setup. Subclasses should return false if setup fails. 69 | virtual bool OnCreate(); 70 | 71 | // Called when Destroy is called. 72 | virtual void OnDestroy(); 73 | 74 | private: 75 | friend class WindowClassRegistrar; 76 | 77 | // OS callback called by message pump. Handles the WM_NCCREATE message which 78 | // is passed when the non-client area is being created and enables automatic 79 | // non-client DPI scaling so that the non-client area automatically 80 | // responds to changes in DPI. All other messages are handled by 81 | // MessageHandler. 82 | static LRESULT CALLBACK WndProc(HWND const window, 83 | UINT const message, 84 | WPARAM const wparam, 85 | LPARAM const lparam) noexcept; 86 | 87 | // Retrieves a class instance pointer for |window| 88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 89 | 90 | // Update the window frame's theme to match the system theme. 91 | static void UpdateTheme(HWND const window); 92 | 93 | bool quit_on_close_ = false; 94 | 95 | // window handle for top level window. 96 | HWND window_handle_ = nullptr; 97 | 98 | // window handle for hosted content. 99 | HWND child_content_ = nullptr; 100 | }; 101 | 102 | #endif // RUNNER_WIN32_WINDOW_H_ 103 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | --------------------------------------------------------------------------------