├── Dart_Notes ├── algorithm_questions │ ├── list_length.dart │ ├── longest_common_prefix.dart │ ├── merge_two_list.dart │ ├── odd_or_even.dart │ ├── polindrom_number.dart │ ├── remove_duplicates_from_sorted_array.dart │ ├── roman_to_int.dart │ ├── two_sum.dart │ └── valid_parantheses.dart ├── lesson1 │ ├── start.dart │ ├── user_advance.dart │ └── user_basic.dart ├── lesson2 │ ├── conditial.dart │ ├── operators.dart │ └── switch.dart ├── lesson3 │ ├── list.dart │ ├── map.dart │ └── methods.dart ├── lesson4 │ ├── class.dart │ ├── class_extends.dart │ ├── class_implements.dart │ ├── enums.dart │ ├── extension.dart │ └── model │ │ ├── user_model.dart │ │ └── user_model_2.dart ├── lesson5 │ ├── class_advance.dart │ ├── class_singleton.dart │ ├── list_advance.dart │ └── model │ │ └── product_config_model.dart └── lesson6 │ ├── async.dart │ ├── call_back_method.dart │ ├── excepetion.dart │ ├── generic.dart │ ├── polymorphism.dart │ ├── solid.dart │ ├── sync.dart │ └── typedef.dart ├── README.md ├── flutter_notes ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── flutter_notes │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── assets │ ├── book_apple.png │ ├── images │ │ └── ic_book.png │ ├── lottie │ │ └── lottie_theme_change.json │ └── png │ │ ├── ic_book_apple.png │ │ ├── ic_collection.png │ │ └── ic_pc.png ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ ├── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── 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-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ │ └── LaunchImage.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ └── README.md │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h │ └── RunnerTests │ │ └── RunnerTests.swift ├── lib │ ├── core │ │ ├── core_description │ │ └── random_image.dart │ ├── demos │ │ ├── color_demos_view.dart │ │ ├── color_life_cycle_demo.dart │ │ ├── my_collection_demo.dart │ │ ├── note_app_demo.dart │ │ ├── password_text_field_demo.dart │ │ └── stack_demo_view.dart │ ├── level-1 │ │ ├── appbar.dart │ │ ├── button_learn.dart │ │ ├── card.dart │ │ ├── color_learn.dart │ │ ├── column_row_learn.dart │ │ ├── container.dart │ │ ├── custom_widgets.dart │ │ ├── icon_learn.dart │ │ ├── image_enum.dart │ │ ├── image_learn.dart │ │ ├── indicator.dart │ │ ├── life_cycle_example │ │ │ ├── description │ │ │ ├── example_advence.dart │ │ │ └── example_main.dart │ │ ├── list_tile.dart │ │ ├── list_view.dart │ │ ├── list_view_builder.dart │ │ ├── navigation │ │ │ ├── navigation_detail.dart │ │ │ └── navigation_learn.dart │ │ ├── padding.dart │ │ ├── page_view_learn.dart │ │ ├── scaffold_learn.dart │ │ ├── scaffold_life_cycle.dart │ │ ├── sized_box.dart │ │ ├── stack.dart │ │ ├── statefull.dart │ │ ├── statless_learn.dart │ │ ├── text_advence_view.dart │ │ ├── text_basic_view.dart │ │ └── text_field_learn.dart │ ├── level-2 │ │ ├── alert_learn.dart │ │ ├── cache │ │ │ ├── secure_storage │ │ │ │ └── secure_storage_learn.dart │ │ │ └── shared_preferences │ │ │ │ ├── shared_learn.dart │ │ │ │ ├── shared_list_cache.dart │ │ │ │ ├── shared_manager.dart │ │ │ │ ├── shared_not_init.dart │ │ │ │ ├── user_cache │ │ │ │ └── user_cache_manager.dart │ │ │ │ └── user_model.dart │ │ ├── custom_password_field_veiw.dart │ │ ├── model_example │ │ │ ├── immutable_model_example.dart │ │ │ ├── model_learn.dart │ │ │ └── model_learn_view.dart │ │ ├── package │ │ │ └── loading_bar.dart │ │ ├── package_example_view.dart │ │ ├── service │ │ │ ├── comment_model.dart │ │ │ ├── comment_view.dart │ │ │ ├── post_model.dart │ │ │ ├── post_service.dart │ │ │ ├── service_examples_main.dart │ │ │ ├── service_learn_view.dart │ │ │ └── service_post_learn.dart │ │ ├── sheet_learn.dart │ │ ├── sheet_learn │ │ │ ├── sheet_learn_1.dart │ │ │ └── sheet_learn_2.dart │ │ ├── tab_learn.dart │ │ ├── theme │ │ │ └── light_theme.dart │ │ ├── theme_learn_view.dart │ │ └── widget_size_enum_example.dart │ ├── level-3 │ │ ├── callback_learn.dart │ │ ├── feed_view.dart │ │ ├── generic │ │ │ ├── generic_advence.dart │ │ │ └── generic_basic_learn.dart │ │ ├── lottie_animation.dart │ │ ├── navigator │ │ │ ├── navigate_home_detail.dart │ │ │ ├── navigate_home_view.dart │ │ │ └── navigate_profile_view.dart │ │ ├── part │ │ │ ├── part_appbar.dart │ │ │ └── part_of_learn.dart │ │ ├── reqrest_resource │ │ │ ├── model │ │ │ │ ├── resource_model.dart │ │ │ │ └── resource_model.g.dart │ │ │ ├── product │ │ │ │ ├── extension │ │ │ │ │ └── string_extension.dart │ │ │ │ └── loading_statefull.dart │ │ │ ├── service │ │ │ │ ├── project_dio.dart │ │ │ │ └── reqres_service.dart │ │ │ ├── view │ │ │ │ └── reqres_view.dart │ │ │ └── viewModel │ │ │ │ ├── reqres_provider.dart │ │ │ │ └── reqres_view_model.dart │ │ └── tabbar_advence.dart │ ├── main.dart │ └── product │ │ ├── constants │ │ ├── lottie_items.dart │ │ └── project_items.dart │ │ ├── counter_hello_button.dart │ │ ├── global │ │ ├── project_network_manager.dart │ │ ├── resource_context.dart │ │ └── theme_notifier.dart │ │ ├── language │ │ └── language_items.dart │ │ ├── navigator │ │ ├── navigator_custom.dart │ │ └── navigator_routes.dart │ │ ├── product_description │ │ └── widget │ │ ├── button │ │ ├── answer_button.dart │ │ └── loading_button.dart │ │ ├── callback_dropdown.dart │ │ └── card │ │ ├── genreic_user_card.dart │ │ └── high_card.dart ├── linux │ ├── .gitignore │ ├── CMakeLists.txt │ ├── flutter │ │ ├── CMakeLists.txt │ │ ├── generated_plugin_registrant.cc │ │ ├── generated_plugin_registrant.h │ │ └── generated_plugins.cmake │ ├── main.cc │ ├── my_application.cc │ └── my_application.h ├── macos │ ├── .gitignore │ ├── Flutter │ │ ├── Flutter-Debug.xcconfig │ │ ├── Flutter-Release.xcconfig │ │ └── GeneratedPluginRegistrant.swift │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── app_icon_1024.png │ │ │ │ ├── app_icon_128.png │ │ │ │ ├── app_icon_16.png │ │ │ │ ├── app_icon_256.png │ │ │ │ ├── app_icon_32.png │ │ │ │ ├── app_icon_512.png │ │ │ │ └── app_icon_64.png │ │ ├── Base.lproj │ │ │ └── MainMenu.xib │ │ ├── Configs │ │ │ ├── AppInfo.xcconfig │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ └── Warnings.xcconfig │ │ ├── DebugProfile.entitlements │ │ ├── Info.plist │ │ ├── MainFlutterWindow.swift │ │ └── Release.entitlements │ └── RunnerTests │ │ └── RunnerTests.swift ├── pubspec.lock ├── pubspec.yaml ├── test │ ├── list_test.dart │ ├── user_manager_test.dart │ └── widget_test.dart ├── web │ ├── favicon.png │ ├── icons │ │ ├── Icon-192.png │ │ ├── Icon-512.png │ │ ├── Icon-maskable-192.png │ │ └── Icon-maskable-512.png │ ├── index.html │ └── manifest.json └── windows │ ├── .gitignore │ ├── CMakeLists.txt │ ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake │ └── runner │ ├── CMakeLists.txt │ ├── Runner.rc │ ├── flutter_window.cpp │ ├── flutter_window.h │ ├── main.cpp │ ├── resource.h │ ├── resources │ └── app_icon.ico │ ├── runner.exe.manifest │ ├── utils.cpp │ ├── utils.h │ ├── win32_window.cpp │ └── win32_window.h └── ready_custom_widgets ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── ready_custom_widgets │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── 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-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h └── RunnerTests │ └── RunnerTests.swift ├── lib ├── feature │ ├── bottom_nav_bar │ │ └── custom_navbar.dart │ ├── drawer_menu │ │ ├── custom_drawer.dart │ │ └── custom_drawer_menu.dart │ ├── hidden_drawer_menu │ │ ├── hidden_drawer.dart │ │ ├── main_screen.dart │ │ └── settings_screen.dart │ ├── loading_bar │ │ └── custom_loading_bar.dart │ ├── lottie_animations │ │ └── lottie_animations.dart │ ├── register_screen │ │ └── custom_login.dart │ ├── second_bottom_nav_bar │ │ └── custom_bottom_nav_bar.dart │ └── slidable_widget │ │ └── slidable_widget.dart ├── main.dart └── widgets_list.dart ├── linux ├── .gitignore ├── CMakeLists.txt ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── main.cc ├── my_application.cc └── my_application.h ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ └── app_icon_64.png │ ├── Base.lproj │ │ └── MainMenu.xib │ ├── Configs │ │ ├── AppInfo.xcconfig │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── Info.plist │ ├── MainFlutterWindow.swift │ └── Release.entitlements └── RunnerTests │ └── RunnerTests.swift ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── index.html └── manifest.json └── windows ├── .gitignore ├── CMakeLists.txt ├── flutter ├── CMakeLists.txt ├── generated_plugin_registrant.cc ├── generated_plugin_registrant.h └── generated_plugins.cmake └── runner ├── CMakeLists.txt ├── Runner.rc ├── flutter_window.cpp ├── flutter_window.h ├── main.cpp ├── resource.h ├── resources └── app_icon.ico ├── runner.exe.manifest ├── utils.cpp ├── utils.h ├── win32_window.cpp └── win32_window.h /Dart_Notes/algorithm_questions/list_length.dart: -------------------------------------------------------------------------------- 1 | //! Bir listenin uzunlugu kadar donen dongü. 2 | 3 | void main(List args) { 4 | List userList = ['Ali', 'Veli', 'Ahmet', 'Mehmet']; 5 | 6 | for (var item in userList) { 7 | print(item); 8 | //! Burada döngüdeki isimler döner. 9 | } 10 | 11 | for (int i = 0; i < userList.length; i++) { 12 | print(i); 13 | //! Burada döngüdeki elemanların indexleri döner. 14 | } 15 | 16 | //? Bir datadan ya da başka bir yerden veri geldiği zaman kullanabiliriz. 17 | } 18 | -------------------------------------------------------------------------------- /Dart_Notes/algorithm_questions/longest_common_prefix.dart: -------------------------------------------------------------------------------- 1 | /* 2 | SORU: 3 | 4 | Bir metin dizisi arasında en uzun başlangıç kısmını bulmak: 5 | Ortak bir önek yoksa, boş bir dize döndürün "". 6 | 7 | Örnek 1: 8 | Giriş: strs = ["çiçek", "akış", "uçuş"] 9 | Çıktı: "Fl" 10 | Açıklama: Giriş dizeleri arasında ortak başlangıç Fl harfleridir.. 11 | 12 | Örnek 2: 13 | Giriş: strs = ["köpek", "yarış arabası", "araba"] 14 | Çıktı: "" 15 | Açıklama: Giriş dizeleri arasında ortak bir önek yoktur. 16 | */ 17 | 18 | void main() { 19 | // Örnek testler 20 | List example1 = ["flower", "flow", "flight"]; 21 | print(longestCommonPrefix(example1)); // Çıktı: "fl" 22 | 23 | List example2 = ["dog", "racecar", "car"]; 24 | print(longestCommonPrefix(example2)); // Çıktı: "" 25 | } 26 | 27 | String longestCommonPrefix(List strs) { 28 | if (strs.isEmpty) return ""; // Eğer liste boşsa, boş string döndür 29 | 30 | // İlk kelimeyi başlangıç olarak al 31 | String prefix = strs[0]; 32 | 33 | // Diğer kelimelerle karşılaştır 34 | for (int i = 1; i < strs.length; i++) { 35 | // Geçerli kelime `prefix` ile eşleşene kadar kırp 36 | while (!strs[i].startsWith(prefix)) { 37 | prefix = prefix.substring(0, prefix.length - 1); 38 | if (prefix.isEmpty) return ""; // Eğer prefix tamamen boşaldıysa, döndür 39 | } 40 | } 41 | 42 | return prefix; 43 | } 44 | -------------------------------------------------------------------------------- /Dart_Notes/algorithm_questions/odd_or_even.dart: -------------------------------------------------------------------------------- 1 | //! Bu örnekte bir sayının tek mi çift mi olduğunu bulalım: 2 | //* eğer sayi çift ise true, tek ise false yazdıralım. 3 | void main() { 4 | final int sayi1 = 150; //? Sayıyı belirleyelim. (Bu sayı herhangi bir yerden gelen değer olabilir.) 5 | final int sayi2 = 155; //? Sayıyı belirleyelim (Bu sayı herhangi bir yerden gelen değer olabilir.) 6 | 7 | //! Fonksitonu sayı için uygulayarak tek/çift kontrolü yapalım ve sonucu print ile yazdıralım. 8 | print(isOddOrEven(sayi1)); 9 | //! Fonksitonu sayı için uygulayarak tek/çift kontrolü yapalım ve sonucu print ile yazdıralım. 10 | print(isOddOrEven(sayi2)); 11 | } 12 | 13 | //* Tek çift kontrolünü yapan fonksiyon: 14 | //? Fonksiyonu tanımlayalım ve bool değişleninde bir değer döndüreceğini belirtelim (bool = True - False). Parametre olarak bir int değer verelim (int x) 15 | bool isOddOrEven(int x) { 16 | if (x % 2 == 0) { 17 | //? Eğer sayının 2 ile bölümünden kalan 0 ise sayı çifttir. True dönmesini belirleriz. (Örneğin 10/2 kalan = 0) 18 | return true; //* return ile değer döndürürüz. 19 | } else { 20 | //? Eğer sayının 2 ile bölümünden kalan 0 değilse false döndürmeyi belirleriz. 21 | return false; //* return ile değer döndürürüz. 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Dart_Notes/algorithm_questions/polindrom_number.dart: -------------------------------------------------------------------------------- 1 | // Bir sayı al. 2 | // Eğer sayı ile sayının tersten okunuşu aynı ise bu bir polindrom sayıdır. (true) değil ise (false) 3 | 4 | void main() { 5 | int number1 = 121; 6 | int number2 = 10; 7 | 8 | print(Solution().isPalindrome(number1)); 9 | print(Solution().isPalindrome(number2)); 10 | } 11 | 12 | class Solution { 13 | bool isPalindrome(int x) { 14 | if (x < 0) 15 | return false; 16 | else { 17 | //int'i stringe çevir: 18 | String numberString = x.toString(); 19 | //stringi terse çevir 20 | String reverseString = numberString.split('').reversed.join(''); 21 | //string'i tekrar int'e çevir: 22 | int lastInt = int.parse(reverseString); 23 | //kontrol et: 24 | if (x == lastInt) { 25 | return true; 26 | } 27 | return false; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Dart_Notes/algorithm_questions/roman_to_int.dart: -------------------------------------------------------------------------------- 1 | void main() { 2 | print(Solution().romanToInt("III")); // Çıktı: 3 3 | print(Solution().romanToInt("LVIII")); // Çıktı: 58 4 | print(Solution().romanToInt("MCMXCIV")); // Çıktı: 1994 5 | print(Solution().romanToInt('MXIIV')); 6 | } 7 | 8 | class Solution { 9 | int romanToInt(String s) { 10 | // Romen rakamlarını temsil eden bir harita oluşturuyoruz. 11 | final Map romanMap = { 12 | 'I': 1, 13 | 'V': 5, 14 | 'X': 10, 15 | 'L': 50, 16 | 'C': 100, 17 | 'D': 500, 18 | 'M': 1000, 19 | }; 20 | 21 | int result = 0; 22 | 23 | for (int i = 0; i < s.length; i++) { 24 | // Şu anki harfin değerini al 25 | int current = romanMap[s[i]]!; 26 | 27 | // Eğer bu harf kendisinden sonra gelenden küçükse, çıkartma işlemi yap 28 | if (i < s.length - 1 && current < romanMap[s[i + 1]]!) { 29 | result -= current; 30 | } else { 31 | // Aksi halde topla 32 | result += current; 33 | } 34 | } 35 | 36 | return result; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Dart_Notes/lesson1/start.dart: -------------------------------------------------------------------------------- 1 | void main() { 2 | print('Started Dart Notes.'); 3 | 4 | // Veri tiplerimiz vardır örneğin String (Metinsel veri tipi), int (Sayısal veri tipi), double (Ondalıklı sayılar için veri tipi) vb... 5 | // Bu veri tiplerini kullandığımız basit örnekler: 6 | String hello = "Hello 50"; 7 | print(hello); 8 | print(hello); 9 | print(hello); 10 | print(hello); 11 | 12 | // Yukarıdaki tüm metinleri tek bir değişken üzerinden kontrol edilebilir şekilde yazdık. 13 | // Yani hello veri adıyla tutulan değeri değiştirmek, tüm print değerlerini değiştirmek için yeterlidir. 14 | 15 | int money = 1500; 16 | print(money); 17 | print(hello + money.toString()); 18 | // bu kodda bir string ile bir int veri tipi toplanmaya çalışılmış. Fakat Bunlar aynı veri tipinde olmadığı için 19 | // eğer money için .toString() dönüştürücüsü kullanılmaz ise hata alırız. toString, başka bir veri türünü String veri türünde dönüştürmeye yarar. 20 | // Ya da aşağıdak i gibi de yazabiliriz. 21 | } 22 | -------------------------------------------------------------------------------- /Dart_Notes/lesson1/user_advance.dart: -------------------------------------------------------------------------------- 1 | void main() { 2 | //eğer bir degiskenin degerinin degistirlmesini istemiyorsak final ve const kullanabilriz. 3 | final int money = 100; //Bu deger daha sonra degistirilemez. 4 | const int money2 = 100; //Bu deger daha sonra degistirilemez. 5 | 6 | print(money); 7 | print(money2); 8 | 9 | //final ve const arasındaki fark: Final runtime'deki son değeri alır. yani o an gelecek bi değeri verebiliriz. yani proje başlayınca bir değer atanabilir. initilaze değerini alabilir. 10 | // fakat const'da bu işlemi yapamayız, proje başladığı anda aldığı değeri alır. 11 | 12 | //Ornek : 13 | // Bank name = X Bank 14 | // user1 = "musteri1" 15 | // user1 in parasi = 100.00 16 | // Yeni bir musteri gelecek adi musteri2 bankaya yeni gelenden 1. musterinin parasi cikartilarak gösterilecek. 17 | 18 | final String user1 = 19 | 'Musteri 1'; // musterinin adi degistirilmesin diye final yaptık. const da yapabilirzi. 20 | int user1Money = 100; 21 | 22 | String user2 = 'Musteri 2'; 23 | int user2Money = 500; 24 | 25 | print('$user1 : $user1Money'); 26 | print('$user2 : ${user2Money - user1Money}'); 27 | } 28 | -------------------------------------------------------------------------------- /Dart_Notes/lesson1/user_basic.dart: -------------------------------------------------------------------------------- 1 | void main() { 2 | //Örnek : Musterinini adini tut, musterinin parasini ogren, Musteriye merhaba diyip parasinin soyle, Bizim bankaya geldiği için parasina 5 tl ekle: 3 | 4 | String name = 'Selami'; 5 | int money = 15; 6 | print('Merhaba $name mevcut bakiyen: $money'); 7 | int moneyPlus = money + 5; 8 | print( 9 | 'Bizim bankamızı tercih ettiğin için bakiyene 5 tl ekliyoruz. \nGüncel bakiye: $moneyPlus'); 10 | } 11 | -------------------------------------------------------------------------------- /Dart_Notes/lesson2/conditial.dart: -------------------------------------------------------------------------------- 1 | void main() { 2 | // Bazı if else örnekleri: 3 | // Temel olarak if else kontroller için kullanılabilir. 4 | //İçerisinde veriler ile ilgili bir çok şeyi kontrol ederek durumlara göre işlemleri yönetebiliriz. 5 | final int money = 100; 6 | 7 | if (money < 100) { 8 | print('Paran 100 den az.'); 9 | } else if (money == 100) { 10 | print('paran 100\'e eşit'); 11 | } else { 12 | print('paran 100\'den fazla.'); 13 | } 14 | 15 | //Örnek: musteri bankaya gelir, bir sorgu yapar, sorgu sonucu 20 tlsi alinir, eğer müşterinin parası 0 dan küçükse müşteri kovulur. 16 | final int musteriParasi = 15; 17 | 18 | final int sorgusonucu = musteriParasi - 20; 19 | if (sorgusonucu < 0) { 20 | print('Git buradan'); 21 | } else { 22 | print('Paran var, burada kalabilrsin'); 23 | } 24 | 25 | // Ornek, Bazi örnek isimler olsun, isimlerden 4 ve daha fazla harfli olanları ekranda yan yana yazdır: 26 | 27 | final String name1 = 'Ali'; 28 | final String name2 = 'Veli'; 29 | final String name3 = 'Mehmet'; 30 | final String name4 = 'Ahmet'; 31 | final String name5 = 'Ramo'; 32 | final String name6 = 'X'; 33 | 34 | final int controlNumber = 4; 35 | String result = ''; 36 | 37 | if (name1.length >= controlNumber) { 38 | result += name1; 39 | } 40 | if (name2.length >= controlNumber) { 41 | result += name2; 42 | } 43 | if (name3.length >= controlNumber) { 44 | result += name3; 45 | } 46 | if (name4.length >= controlNumber) { 47 | result += name4; 48 | } 49 | if (name5.length >= controlNumber) { 50 | result += name5; 51 | } 52 | if (name6.length >= controlNumber) { 53 | result += name6; 54 | } 55 | 56 | if (result.length == 0) { 57 | print('4 Harften daha fazla harfli bir isim yok'); 58 | } else { 59 | print(result); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Dart_Notes/lesson2/operators.dart: -------------------------------------------------------------------------------- 1 | void main() { 2 | int money = 5; 3 | 4 | money = money + 1; 5 | 6 | money += 1; 7 | money++; 8 | money--; 9 | 10 | String name = "Ozcan"; 11 | String surname = "Bayram"; 12 | 13 | print(name + surname); 14 | 15 | // Bazı operatorler: 16 | 17 | if (name == 'Ozcan') {} 18 | if (name != 'Ozcan') {} 19 | if (name.length > 'Ozcan'.length) {} 20 | if (name.length < 'Ozcan'.length) {} 21 | if (name.length <= 'Ozcan'.length) {} 22 | if (name.length >= 'Ozcan'.length) {} 23 | 24 | const int appleMoney = 20; 25 | const double disccount = 2.5; 26 | 27 | int myMoney = 30; 28 | 29 | myMoney = myMoney - (appleMoney ~/ disccount); 30 | print(myMoney); 31 | 32 | print(myMoney % 2 == 0); 33 | print(myMoney.isOdd); 34 | } 35 | -------------------------------------------------------------------------------- /Dart_Notes/lesson2/switch.dart: -------------------------------------------------------------------------------- 1 | void main() { 2 | //Örnek bir switch case yapısı: 3 | final int degree = 3; 4 | // Eger deger 0 ise çok kotu, 1 ise kotu, 2 ise nahoş, 3 ise ideal, 4 ise iyi, 5 ise cok iyi yazsın: dier durumlarda belirsiz yazsın. 5 | switch (degree) { 6 | case 0: 7 | print('Çok Kötü'); 8 | case 1: 9 | print('Kotu'); 10 | case 2: 11 | print('nahoş'); 12 | case 3: 13 | print('ideal'); 14 | case 4: 15 | print('iyi'); 16 | case 5: 17 | print('çok iyi'); 18 | default: 19 | print('Belirsiz.'); 20 | } 21 | 22 | //Switch ile kontrol edilecek değeri belirleriz, case ile kontrol edilecek ihtimaller için durumlar belirleriz. 23 | // Default ile, caselerin hiçbiri sağlanmazsa ne olması gerektiğini belirleriz. 24 | } 25 | -------------------------------------------------------------------------------- /Dart_Notes/lesson3/map.dart: -------------------------------------------------------------------------------- 1 | void main(List args) { 2 | // Maplar key - Value mantığında çalışır. 3 | Map users = { 4 | 'Mehmet': 20, 5 | 'Ahmet': 32, 6 | 'Serkan': 18, 7 | 'Beyza': 25 8 | }; 9 | 10 | print(users.keys); 11 | print(users.values); 12 | 13 | print('-------------------------'); 14 | 15 | // mapi anahtar değer seklinde gostermek icin: 16 | for (var item in users.keys) { 17 | print('${item} - ${users[item]}'); 18 | } 19 | 20 | print('-------------------------'); 21 | 22 | for (var i = 0; i < users.length; i++) { 23 | print('${users.keys.elementAt(i)} - ${users.values.elementAt(i)}'); 24 | } 25 | 26 | print('--------------'); 27 | 28 | //Örnek: 29 | //Ben bankayim ve musterilerimin birden fazla hesabi olabilir. 30 | //Alinin 3 hesabi var 100,300,200 31 | //Velinin 2 hesabi var 30,50 32 | //Ozcanin 1 hesabi var 30 33 | 34 | //Hesaplari kontrol et, bir hesapta 150 tlden fazla varsa krediniz hazır de. 35 | 36 | Map> bankCustomers = { 37 | 'Ali': [100, 300, 200], 38 | 'Veli': [30, 50], 39 | 'Ozcan': [30] 40 | }; 41 | 42 | for (var items in bankCustomers.keys) { 43 | //bankanin elemanlari 44 | //print('${items} - ${bankCustomers[items]}'); 45 | 46 | for (var money in bankCustomers[items]!) { 47 | //userin elemanlari 48 | 49 | if (money > 150) { 50 | print('kredin hazir'); 51 | //return; //Mesaj sadece 1 kere gönderilir. Direkt programı sonlandırır. 52 | break; //Sadece bu skopu sonladırır. 53 | } 54 | } 55 | } 56 | 57 | print('--------------'); 58 | 59 | //Musterilerin hesaplarındaki toplam parrayı bulalım: 60 | 61 | for (var name in bankCustomers.keys) { 62 | int result = 0; 63 | 64 | for (var money in bankCustomers[name]!) { 65 | result += money; 66 | } 67 | print('$name senin paran --> $result'); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Dart_Notes/lesson3/methods.dart: -------------------------------------------------------------------------------- 1 | void main(List args) { 2 | int user1Money = 0; 3 | 4 | //Kullanıcının parasının olup olmadığını tek tek kontrol etmek yerine controllUserMoney adında bir metot 5 | // yazarak daha az kod ile daha temiz bir şekilde aynı işlemi yapabiliriz. 6 | controllUserMoney(user1Money); 7 | 8 | //musterinin parasini dolara çeviren bir metot yazalim: 9 | int customerMoney = 26000; 10 | int newCustomerMoney = convertToDolar(customerMoney); 11 | print(newCustomerMoney); 12 | 13 | int customer2Money = 36000; 14 | // --> Burada opsionel olarak euro fiyatı belirlenebilir: Eğer belirlenmez ise metottaki default değeri alır. 15 | int newCustomer2Money = convertToEuro(customer2Money); 16 | print(newCustomer2Money); 17 | } 18 | 19 | void controllUserMoney(int money) { 20 | if (money > 0) { 21 | print('Parasi var'); 22 | } else { 23 | print('Parasi yok'); 24 | } 25 | } 26 | 27 | //musterinin parasini dolara çeviren bir metot yazalim: 28 | int convertToDolar(int money) { 29 | return money ~/ 33; 30 | } 31 | 32 | //Asağidaki metot yine euro çevirme işllemini yapar fakat, opsiyonel olarak euro belirlenebilir. 33 | //Eğer belirlenmez ise atanan default değer verilir. 34 | int convertToEuro(int money, {int euro = 34}) { 35 | return money ~/ euro; 36 | } 37 | -------------------------------------------------------------------------------- /Dart_Notes/lesson4/class_implements.dart: -------------------------------------------------------------------------------- 1 | void main(List args) {} 2 | 3 | abstract class IStudent { 4 | final String name; 5 | final int age; 6 | 7 | void SaySomething() { 8 | print(age); 9 | } 10 | 11 | IStudent(this.name, this.age); 12 | } 13 | 14 | class Student implements IStudent { 15 | //* IStudent abstract sınıfını buraya implement etik. 16 | //implement işleminde absstract snıfta olan her şey olmak zorundadır. 17 | //Yani; extend ettiğimiz zaman, sınıf farklı özelliklere sahip olabilir. 18 | //Fakat implement ettiğimiz zaman abstract sınıfın bir kopyası olmalıdır. 19 | //Mesela bu örnekte IStudent sınıfına bir fonksiyon ya da herhangi bir şey eklersek aynısını 20 | //implement ettiğimiz sınıflara da eklememiz gerekecektir. 21 | final String name; 22 | final int age; 23 | 24 | Student(this.name, this.age); 25 | 26 | @override 27 | void SaySomething() { 28 | // TODO: implement SaySomething 29 | //Buradaki SaySomething fonksiyonunu, implement ettiğimiz abstract class'a eklediğimiz fakat buraya eklemediğimiz için hata aldık. 30 | //ctrl+. ya da command + . ile buraya hazır bir şekilde olarak ekleyebiliriz. 31 | //Kısacası, implement ettiğmiz sınıfta bulunan veri, methot, fonksiyon gibi şeyleri implement ettiğimiz sınıflarda da kullanmak zorundayız. 32 | //Zaten kullanmazsak hata ile uyarılacağızdır. 33 | print(name); 34 | } 35 | } 36 | 37 | class Student2 implements IStudent { 38 | final String name; 39 | final int age; 40 | 41 | Student2(this.name, this.age); 42 | 43 | @override 44 | void SaySomething() { 45 | // TODO: implement SaySomething 46 | print('ozcan'); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Dart_Notes/lesson4/enums.dart: -------------------------------------------------------------------------------- 1 | void main(List args) { 2 | final customerMouse = Mouses.Apple; 3 | //Burada baist bir şekilde kullanıcının mouse değerini enum da belirlediğimiz apple olarak ayarladık. 4 | 5 | //Switch-Case kontrollerinde enum bizlere kolaylık sağlar. 6 | // switch(customerMouses) {} yazarak, ardından customerMouses'a ctrl + . ya da command + . ile 7 | //enumun içindeki öğelerin her biri için koşul ekleme işlemini çok daha rahat bir şekilde yapabilirsiniz. 8 | 9 | switch (customerMouse) { 10 | //Aşağıdaki tüm senaryoalrı bize otomotik olarak döndürür. 11 | case Mouses.Apple: //Apple ise ne yapacağını belirleyebilriz. 12 | // TODO: Handle this case. 13 | case Mouses.Logitech: //Logitech ise ne yapacağını belirleyebilriz. 14 | // TODO: Handle this case. 15 | case Mouses.Everest: //Everest ise ne yapacağını belirleyebilriz. 16 | // TODO: Handle this case. 17 | case Mouses.Samsung: //Samsung ise ne yapacağını belirleyebilriz. 18 | // TODO: Handle this case. 19 | } 20 | 21 | //enum içerisindeki bir şeyin isim ve indexini alabiliriz: 22 | // final customerMouse = Mouses.Apple; --> şekilnde tanımladığımız şeyin indexini ve ismini aşağıdaki gibi kolayuca yazdırabilirsiniz: 23 | print(customerMouse.index); 24 | // Kaçıncı indexteki değerin seçildiğini verir --> 0 (Bu enum için) 25 | print(customerMouse.name); 26 | // Seçilen değerin ismini name özelliği ile verir --> Apple (Bu enum için) 27 | } 28 | 29 | enum Mouses { 30 | // Burada enum'u ve içerisindeki elemanları tanımlarız. Dilediğimiz yerde 31 | //Mouses.Apple şeklinde kullanabiliriz. 32 | Apple, 33 | Logitech, 34 | Everest, 35 | Samsung, 36 | } 37 | -------------------------------------------------------------------------------- /Dart_Notes/lesson4/extension.dart: -------------------------------------------------------------------------------- 1 | //extension ile hazır olan sınıflara ya da kendi yazdığımız sınıflara extra özellikler ekleyebiliriz. 2 | //mesela String sınıfı dart tarafından bize hazır olarak verilmiş bir sınıftır ve içerisinde bir çok özellik 3 | //barındırır. Biz String sınıfına başka bir özellik daha eklemek istersek Extension kullanırız. 4 | //Öernek: 5 | //Aşağıdaki mainde bir string için admin olup olmama durumunu kontrol eden özelliği String sınıfına ekleyelim. 6 | 7 | void main(List args) { 8 | final String user = 'admin'; 9 | 10 | //Aşağıda bir strignin admin olup olmadığını kontrol edelim 11 | if (user.isAdmin()) { 12 | print('Admin'); 13 | } else { 14 | print('Admin degil'); 15 | } 16 | } 17 | 18 | extension StringAdminControlExtension on String { 19 | //yukarıdaki satırda, StringAdminControlExtension'a yazılacak olan özelliklerin String sınıfına extend 20 | //edileceğini belirtttik. Ve burada yazacağımız özellikler ve metotlar String sınıfı için de geçerli olacaktır. 21 | //Böylece bir string için admin olup olmama durumunu kontrol edebileceğiz. 22 | 23 | bool isAdmin() { 24 | return this.toLowerCase() == 'admin'.toLowerCase(); 25 | } 26 | 27 | //Bu fonksiyon true-false döner. 28 | //toLoweCase ile metinleri küçük harfe çevirir. 29 | //this ile bu sınıftaki ögeyi belirtir. 30 | //== 'admin' ile, this ile belirtmiş olduğu bu sınıftaki ögeyi, kullanıldığı sınıfta olacak olan ögeye eşitler. 31 | //Yani burada string sınıfından öretilen ögeyi, bizler tarafından verilecek olan ögeye eşitler. 32 | //Bir kontrol sağlar, eğer admin stringine eşit ise true döner ve bu stringin admin kontrolü yapılmış olur. 33 | } 34 | -------------------------------------------------------------------------------- /Dart_Notes/lesson4/model/user_model.dart: -------------------------------------------------------------------------------- 1 | class User { 2 | //Sınfın özellikleri: 3 | //ad olmak zorunda 4 | //para olmak zorunda 5 | //yasini vermeyebilir 6 | //sehrini vermeyebilir 7 | // burada id olsun ve sadece bu sınıftan erişilebilsin. 8 | 9 | late final String name; 10 | //* -> late : bu değer sonradan verilecek anlamına gelir. Consturctor anında değer gelecek. 11 | //* late final olan bir şeyi constructor anında çağırmalıyız. 12 | late int money; 13 | late final int? age; 14 | late final String? city; 15 | //* -> String? ile nullable tanımlarız verinin gelmesi zorunlu olmaz. 16 | //Yukarıdaki özelliklerin, constructorunu oluşturmalıyız. 17 | 18 | //! bir userCode oluşturalım ve bu kullanıcının adı ve şehrinden oluşsun. Eğer yaşı null ise 00 olarak belirlensin. 19 | late final userCode; 20 | 21 | //id: 22 | late final String _id; 23 | 24 | User(String nameC, int money, {required String id, int? age, String? city}) { 25 | //! Bir özellik gelmeyebilirse ve bnunu opsiyonal yapacaksak {} kullanırız. 26 | this.name = nameC; 27 | this.money = money; 28 | this.age = age; 29 | this.city = city; 30 | _id = id; // _id (private) = id (public) 31 | userCode = (city ?? 'ist') + name; 32 | } 33 | 34 | bool isSpecialUser(String id) { 35 | return _id == id; 36 | //Burada eğer _id ile id aynıysa true değilse false dönecek. 37 | } 38 | 39 | // ---***---***---***---***---***--- 40 | 41 | //id nin boş oluğ olmadığını kontrol eden fonksiyon: 42 | // bool isEmptyId() { 43 | // return _id.isEmpty; 44 | // } 45 | 46 | //Bu fonksiyon ile aynı işleve sahip olan daha kısa yazılmış hali: 47 | bool get isEmptyId => _id.isEmpty; 48 | //Burası bir parametre ya da değer almıyor ise get kullanabiliriz. 49 | // get; compitued value anlamında gelir değer çağrıldığında her defasında hesaplanır ve sonucu döndürür. 50 | } 51 | -------------------------------------------------------------------------------- /Dart_Notes/lesson4/model/user_model_2.dart: -------------------------------------------------------------------------------- 1 | class User2 { 2 | final String name; 3 | 4 | int _money; 5 | //money için Encapsulate field: 6 | //değişkeni private çeviriyor 7 | int get money => _money; 8 | //get ile computed value oluşturuyor. ve moneyi dönürüyor. 9 | 10 | set money(int? money) { 11 | //işlemi yapıp money'i set ediyor 12 | //bu işin amacı burada bir kontrol oluşturabilmemizi sağlar. 13 | //örneğin money sıfırdan küçükse set etme işlemini yapabiliriz: 14 | // if (money < 0) { 15 | // return; 16 | // } 17 | 18 | //ya da yukarıdaki gibi null kontrolü de yapabiliriz. 19 | // if (money == null) { 20 | // _money = 0; 21 | // } else { 22 | // _money = money; 23 | // } 24 | 25 | // bu kontrolü tek satır ile daha hızlı da yapabiliriz: 26 | _money = money == null ? 0 : money; 27 | } 28 | 29 | final int? age; 30 | final String? city; 31 | 32 | late final userCode; 33 | 34 | User2(this.name, this._money, this.age, this.city) { 35 | //constructor 36 | userCode = (city ?? 'ist') + name; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Dart_Notes/lesson5/model/product_config_model.dart: -------------------------------------------------------------------------------- 1 | //! Eager Singleton 2 | class ProductConfig { 3 | //* Bu sınıftaki apikeyin singleton olmasını ve başka bir yerde yeni bir ProductConfig sınıfı nesenesi 4 | //* oluşturulmasını istemiyorsak aşağıdaki kullanımı yaparız. Böylece apiKey değiştirilemez. 5 | static final ProductConfig instance = ProductConfig._('apiKeysajhdjkashdk'); 6 | final String apiKey; 7 | 8 | ProductConfig._( 9 | this.apiKey); //! -> Buradaki ._ kullanımı sayesinde bu sınıftan kimse nesne üretemez 10 | //! degistiremez. sadece ProductConfig.instance.apiKey yazanlar apiKey'i görebilir. 11 | } 12 | 13 | //! Lazy singleton. Yukarıdaki eager singleton ile aynı işe yarar. Farklı şudur: 14 | //* Aşağıdaki singleton kullanımında, uygulama başlarken bu verinin değeri olmayacak ve bellekte yer... 15 | //* ...kaplamayacak eğer bu veri kullanılırsa (bu sınıf çağrılırsa) değer alacak ve bellekte yer tutacak. 16 | 17 | class ProductLazySingleton { 18 | static ProductLazySingleton? _instance; 19 | static ProductLazySingleton get instance { 20 | if (_instance == null) _instance = ProductLazySingleton._init(); 21 | return _instance!; 22 | } 23 | 24 | ProductLazySingleton._init(); 25 | } 26 | -------------------------------------------------------------------------------- /Dart_Notes/lesson6/call_back_method.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | void main(List args) { 3 | final user = User(money: 5); 4 | 5 | user.calculateMoney((int result) { 6 | // burada onComplate'in uygulanacağu değer olarak result ismini veriyoruz. 7 | print(result); 8 | return result; 9 | }); 10 | } 11 | 12 | class User { 13 | int money; 14 | User({ 15 | required this.money, 16 | }); 17 | 18 | void calculateMoney(int Function(int data) onComplete) { 19 | // Burada call back yani geriye haber veren metod yazdık. 20 | money += 5; 21 | onComplete(money); // return yterine onComplate ile haber verebiliriz. 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Dart_Notes/lesson6/excepetion.dart: -------------------------------------------------------------------------------- 1 | void main(List args) { 2 | String? userName = 'a'; 3 | 4 | if (userName.length > 2) { 5 | print('2 den büyük'); 6 | } else 7 | throw UserNameException(); // throw ile direkt olarak istenen metodu çalıştırabilriz. 8 | } 9 | 10 | class UserNameException implements Exception { 11 | @override 12 | String toString() { 13 | return 'User name\'i null girmişsin bunu düzelt !'; 14 | } 15 | } 16 | 17 | //! BU yöntemle kendi custom exceptionlarımızı yazarak alabileceğimiz hataları daha iyi çözebiliriz. 18 | -------------------------------------------------------------------------------- /Dart_Notes/lesson6/generic.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | //* generic, türleri belirlerken ya da türlerin tipini öğrenirken yardımcı olur. 3 | //* Mesela trünü belirtmeden kullanırız ve generic ile türünü görürürz. Örneğin: 4 | 5 | void main(List args) { 6 | final user = User(data: 32); 7 | user.data; 8 | 9 | final adminUser = AdminUser(); 10 | adminUser.removeUser(); //* Burada removeUser'i kullanabiliriz. 11 | // -> Burada 32 verince değeri int oldu fakat string ya da herhangi bir değer de verebilirdik 12 | } 13 | 14 | class User { 15 | // burada T tipini vermemiz gerekir 16 | T data; // -> T tipinde data değişkeni 17 | User({ 18 | required this.data, 19 | }); 20 | } 21 | 22 | //! ------- 23 | //! Bir admin sınıfı olsun ve bu sınıfa özel remove özelliği olsun. 24 | //! Daha sonra bu sınıfı extend eden başka bir sınıf oluşturalım. ve bu sınıftan türeyen nesneler de remove 25 | //! özelliğine sahip olsun. 26 | 27 | void renoveUserAll(T data) { 28 | data.removeUser(); 29 | } 30 | 31 | abstract class IAdmin { 32 | void removeUser(); 33 | } 34 | 35 | class AdminUser extends IAdmin { 36 | @override 37 | void removeUser() {} 38 | } 39 | -------------------------------------------------------------------------------- /Dart_Notes/lesson6/polymorphism.dart: -------------------------------------------------------------------------------- 1 | // polymorphism (çok biçimlilik) 2 | // Aynı metotları farklı farklı sınıflarda kullanmak. 3 | 4 | void main(List args) { 5 | IUser user = Turk(); //* turk sınıfı için 6 | user.sayName(); 7 | 8 | user = English(); //* english sınıfı için 9 | user.sayName(); 10 | } 11 | 12 | abstract class IUser { 13 | //! Bu sınıfı diger sınıflarda iplement ederek özelleştirerek kullanalım. 14 | final String name; 15 | 16 | IUser(this.name); 17 | void sayName(); 18 | } 19 | 20 | class Turk implements IUser { //! Ana sınıfı implement ederek özelliklerini override edelim 21 | @override 22 | String get name => 'Ozcan'; 23 | 24 | @override 25 | void sayName() { 26 | print('Hoşgeldiniz'); 27 | } 28 | } 29 | 30 | class English implements IUser { 31 | @override 32 | String get name => 'Micheal'; 33 | 34 | @override 35 | void sayName() { 36 | print('Welcome'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Dart_Notes/lesson6/sync.dart: -------------------------------------------------------------------------------- 1 | // Senkron işlemler 2 | void main(List args) { 3 | Stream bankMoneys = Stream.empty(); 4 | bankMoneys = dataAddBankMoney(15, 3); 5 | bankMoneys.listen( 6 | (event) { 7 | print(event); 8 | }, 9 | ); 10 | 11 | // print( bankMoneys.where((event) => event == 63,).toList()); //* toList burada Future olarak döner 12 | } 13 | 14 | Stream dataAddBankMoney(int retryCount, int money) async* { 15 | int _localRetry = 0; 16 | await Future.delayed(Duration(seconds: 2)); 17 | while (_localRetry < retryCount) { 18 | _localRetry++; 19 | yield 0; 20 | yield money += 5; // Döndürülen yer (yield) 21 | } 22 | } 23 | 24 | /* 25 | yield ve return arasındaki temel fark, fonksiyonun nasıl sonuç döndürdüğüdür. 26 | return: Fonksiyonu anında sonlandırır ve tek bir değer döndürür. Fonksiyon bir kere çalışır ve tüm işi bittiğinde sonucu döner. 27 | yield: Fonksiyonu duraklatır, geçici olarak bir sonuç döndürür, fakat sonlandırmaz. Fonksiyon çalışmaya devam edebilir ve ileride 28 | başka değerler döndürebilir. Bu, generatör fonksiyonlarda kullanılır ve verileri bir akış (stream) halinde parça parça döndürür. 29 | */ 30 | 31 | //* Anlık data akışlarını dinlemek için senkron işlemler yapılabilir. 32 | -------------------------------------------------------------------------------- /Dart_Notes/lesson6/typedef.dart: -------------------------------------------------------------------------------- 1 | //! call_back.dart örneğinin daha kolay ve kullanışlı yazılabilmesi için typedef kullanırız: 2 | 3 | void main(List args) { 4 | final user = User(money: 5); 5 | 6 | user.calculateMoney((int result) { 7 | // burada onComplate'in uygulanacağu değer olarak result ismini veriyoruz. 8 | print(result); 9 | return result; 10 | }); 11 | } 12 | 13 | //! typedef'i burada kullanarak call back metodumuza ekleyelim: 14 | typedef CalculateCallBack = int Function(int data); 15 | 16 | //* daha sonra CalculateCallBack memtodunu call back metodumuzdaki parametre yerine yazmamız yeterlidir. 17 | 18 | class User { 19 | int money; 20 | User({ 21 | required this.money, 22 | }); 23 | 24 | void calculateMoney(CalculateCallBack onComplete) { 25 | // Burada call back yani geriye haber veren metod yazdık. 26 | money += 5; 27 | onComplete(money); // return yterine onComplate ile haber verebiliriz. 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /flutter_notes/.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 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Symbolication related 35 | app.*.symbols 36 | 37 | # Obfuscation related 38 | app.*.map.json 39 | 40 | # Android Studio will place build artifacts here 41 | /android/app/debug 42 | /android/app/profile 43 | /android/app/release 44 | -------------------------------------------------------------------------------- /flutter_notes/.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: "2663184aa79047d0a33a14a3b607954f8fdd8730" 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: 2663184aa79047d0a33a14a3b607954f8fdd8730 17 | base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 18 | - platform: android 19 | create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 20 | base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 21 | - platform: ios 22 | create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 23 | base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 24 | - platform: linux 25 | create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 26 | base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 27 | - platform: macos 28 | create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 29 | base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 30 | - platform: web 31 | create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 32 | base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 33 | - platform: windows 34 | create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 35 | base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 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 | -------------------------------------------------------------------------------- /flutter_notes/README.md: -------------------------------------------------------------------------------- 1 | # flutter_notes 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 | -------------------------------------------------------------------------------- /flutter_notes/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 https://dart.dev/lints. 17 | # 18 | # Instead of disabling a lint rule for the entire project in the 19 | # section below, it can also be suppressed for a single line of code 20 | # or a specific dart file by using the `// ignore: name_of_lint` and 21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 22 | # producing the lint. 23 | rules: 24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 26 | 27 | # Additional information about this file can be found at 28 | # https://dart.dev/guides/language/analysis-options 29 | -------------------------------------------------------------------------------- /flutter_notes/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/to/reference-keystore 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /flutter_notes/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. 5 | id "dev.flutter.flutter-gradle-plugin" 6 | } 7 | 8 | android { 9 | namespace = "com.example.flutter_notes" 10 | compileSdk = flutter.compileSdkVersion 11 | ndkVersion = flutter.ndkVersion 12 | 13 | compileOptions { 14 | sourceCompatibility = JavaVersion.VERSION_1_8 15 | targetCompatibility = JavaVersion.VERSION_1_8 16 | } 17 | 18 | kotlinOptions { 19 | jvmTarget = JavaVersion.VERSION_1_8 20 | } 21 | 22 | defaultConfig { 23 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 24 | applicationId = "com.example.flutter_notes" 25 | // You can update the following values to match your application needs. 26 | // For more information, see: https://flutter.dev/to/review-gradle-config. 27 | minSdk = flutter.minSdkVersion 28 | targetSdk = flutter.targetSdkVersion 29 | versionCode = flutter.versionCode 30 | versionName = flutter.versionName 31 | } 32 | 33 | buildTypes { 34 | release { 35 | // TODO: Add your own signing config for the release build. 36 | // Signing with the debug keys for now, so `flutter run --release` works. 37 | signingConfig = signingConfigs.debug 38 | } 39 | } 40 | } 41 | 42 | flutter { 43 | source = "../.." 44 | } 45 | -------------------------------------------------------------------------------- /flutter_notes/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /flutter_notes/android/app/src/main/kotlin/com/example/flutter_notes/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.flutter_notes 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() 6 | -------------------------------------------------------------------------------- /flutter_notes/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /flutter_notes/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /flutter_notes/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_notes/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_notes/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_notes/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_notes/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_notes/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /flutter_notes/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /flutter_notes/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /flutter_notes/android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = "../build" 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | } 12 | subprojects { 13 | project.evaluationDependsOn(":app") 14 | } 15 | 16 | tasks.register("clean", Delete) { 17 | delete rootProject.buildDir 18 | } 19 | -------------------------------------------------------------------------------- /flutter_notes/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /flutter_notes/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-8.3-all.zip 6 | -------------------------------------------------------------------------------- /flutter_notes/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "8.1.0" apply false 22 | id "org.jetbrains.kotlin.android" version "1.8.22" apply false 23 | } 24 | 25 | include ":app" 26 | -------------------------------------------------------------------------------- /flutter_notes/assets/book_apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/assets/book_apple.png -------------------------------------------------------------------------------- /flutter_notes/assets/images/ic_book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/assets/images/ic_book.png -------------------------------------------------------------------------------- /flutter_notes/assets/png/ic_book_apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/assets/png/ic_book_apple.png -------------------------------------------------------------------------------- /flutter_notes/assets/png/ic_collection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/assets/png/ic_collection.png -------------------------------------------------------------------------------- /flutter_notes/assets/png/ic_pc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/assets/png/ic_pc.png -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /flutter_notes/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /flutter_notes/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /flutter_notes/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_notes/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_notes/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /flutter_notes/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_notes/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 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 | -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /flutter_notes/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. -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Flutter Notes 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_notes 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | CADisableMinimumFrameDurationOnPhone 45 | 46 | UIApplicationSupportsIndirectInputEvents 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /flutter_notes/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/lib/core/core_description: -------------------------------------------------------------------------------- 1 | core içerisinde her yerde kullanılacak kodları yazarız. 2 | mesela bir card tasarlayıp her yerde kullanırız. 3 | her yerde kullanılabilir. Hatta başka projende de ihtiyaca göre kullanabilirsin. -------------------------------------------------------------------------------- /flutter_notes/lib/core/random_image.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class RandomImage extends StatelessWidget { 4 | const RandomImage({super.key, this.height = 100}); 5 | 6 | final imageUrl = 'https://picsum.photos/200/300'; 7 | final double height; 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Image.network( 12 | imageUrl, 13 | height: height, 14 | // width: MediaQuery.of(context).size.width, 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /flutter_notes/lib/demos/color_life_cycle_demo.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_notes/demos/color_demos_view.dart'; 3 | 4 | class ColorLifeCycleView extends StatefulWidget { 5 | const ColorLifeCycleView({super.key}); 6 | 7 | @override 8 | State createState() => _ColorLifeCycleViewState(); 9 | } 10 | 11 | //* Bu sayfada action'da olan clear butonunun sayfaya eklenmiş olan color demos'u default değerine döndürmesini istiyoruz. 12 | 13 | class _ColorLifeCycleViewState extends State { 14 | Color? _backgroundColor; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Scaffold( 19 | appBar: AppBar( 20 | title: const Text('Color LifeCycle'), 21 | actions: [ 22 | IconButton( 23 | onPressed: _changeBackground, icon: const Icon(Icons.clear)) 24 | ], 25 | ), 26 | body: Column( 27 | children: [ 28 | const Spacer(), 29 | Expanded( 30 | child: ColorDemos( 31 | initialColor: _backgroundColor, 32 | //! parametre ile ilk renk değerini atadık. 33 | //! initstate sayfa çizilmeden önce çalışan yaşam döngüsüdür. 34 | )) 35 | ], 36 | ), 37 | ); 38 | } 39 | 40 | void _changeBackground() { 41 | setState(() { 42 | _backgroundColor = Colors.transparent; 43 | }); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /flutter_notes/lib/demos/password_text_field_demo.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class PasswordTextField extends StatefulWidget { 4 | const PasswordTextField({super.key, this.textEditinController}); 5 | 6 | final TextEditingController? textEditinController; 7 | 8 | @override 9 | State createState() => _PasswordTextFieldState(); 10 | } 11 | 12 | class _PasswordTextFieldState extends State { 13 | final String _hintText = 'Password'; 14 | final String _obsourceText = '.'; 15 | bool _isSecure = true; 16 | 17 | void _changeVisibility() { 18 | setState(() { 19 | _isSecure = !_isSecure; 20 | }); 21 | } 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return Padding( 26 | padding: const EdgeInsets.all(32), 27 | child: TextField( 28 | autofillHints: const [AutofillHints.password], 29 | keyboardType: TextInputType.phone, 30 | obscureText: _isSecure, 31 | obscuringCharacter: _obsourceText, 32 | decoration: InputDecoration( 33 | border: const UnderlineInputBorder(), 34 | hintText: _hintText, 35 | suffix: _onVisibilityIcon(), 36 | ), 37 | ), 38 | ); 39 | } 40 | 41 | IconButton _onVisibilityIcon() { 42 | return IconButton( 43 | onPressed: _changeVisibility, 44 | //animasyon kullanarak görünürlüğü değiştirelim 45 | icon: AnimatedCrossFade( 46 | firstChild: const Icon(Icons.visibility_outlined), 47 | secondChild: const Icon(Icons.visibility_off_outlined), 48 | crossFadeState: 49 | _isSecure ? CrossFadeState.showFirst : CrossFadeState.showSecond, 50 | duration: const Duration(seconds: 1), 51 | ), 52 | 53 | // icon: Icon(_isSecure ? Icons.visibility : Icons.visibility_off), 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /flutter_notes/lib/demos/stack_demo_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_notes/core/random_image.dart'; 3 | 4 | class StackDemoView extends StatelessWidget { 5 | const StackDemoView({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | const double cardHeight = 50; 10 | const double width = 150; 11 | 12 | return Scaffold( 13 | appBar: AppBar( 14 | title: const Text('Stack Demo View'), 15 | ), 16 | body: const Column( 17 | children: [ 18 | Expanded( 19 | flex: 4, 20 | child: Stack( 21 | alignment: Alignment.center, 22 | children: [ 23 | Positioned.fill( 24 | bottom: 0, 25 | child: RandomImage(), 26 | ), 27 | Positioned( 28 | height: cardHeight, 29 | width: width, 30 | bottom: cardHeight / 2, 31 | child: Card( 32 | color: Colors.amber, 33 | child: Center( 34 | child: Text( 35 | 'Image Text', 36 | style: TextStyle(color: Colors.black), 37 | )), 38 | ), 39 | ) 40 | ], 41 | ), 42 | ), 43 | Spacer( 44 | flex: 6, 45 | ), 46 | ], 47 | ), 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-1/color_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ColorLearn extends StatelessWidget { 4 | const ColorLearn({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: const Text('Color Learn'), 11 | ), 12 | body: Center( 13 | child: Column( 14 | children: [ 15 | Container( 16 | width: 300, 17 | height: 300, 18 | color: ColorItems().porsche, 19 | ), 20 | Container( 21 | width: 300, 22 | height: 300, 23 | color: Theme.of(context).primaryColor, 24 | ), 25 | ], 26 | ), 27 | ), 28 | ); 29 | } 30 | } 31 | 32 | class ColorItems { 33 | final Color porsche = const Color(0xffEDBF61); 34 | final Color sulu = const Color.fromARGB(255, 66, 247, 0); 35 | } 36 | 37 | //* Bu yontem haricinde tema ile de renk verebiliriz. 38 | //* Ya da temadeki örneğin errorColro rengi gibi istedigimiz rengi degistirebilriz. 39 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-1/icon_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class IconView extends StatelessWidget { 4 | IconView({super.key}); 5 | 6 | //* Aşağıda oluşturduğumuz sınıfı kullanmak için bu sınıftan bir nesne üretelim. 7 | final ProjectIconSizes iconSize = ProjectIconSizes(); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Scaffold( 12 | appBar: AppBar( 13 | title: const Text('Icons'), 14 | ), 15 | body: Center( 16 | child: Column( 17 | children: [ 18 | IconButton( 19 | iconSize: iconSize.iconSmall, 20 | color: Colors.red, 21 | onPressed: () {}, 22 | icon: const Icon(Icons.message_outlined), 23 | ), 24 | IconButton( 25 | iconSize: iconSize.iconMedium, 26 | color: Colors.red, 27 | onPressed: () {}, 28 | icon: const Icon(Icons.message_outlined), 29 | ), 30 | IconButton( 31 | iconSize: iconSize.iconLarge, 32 | color: Colors.red, 33 | onPressed: () {}, 34 | icon: const Icon(Icons.message_outlined), 35 | ), 36 | ], 37 | ), 38 | ), 39 | ); 40 | } 41 | } 42 | 43 | //* Iconların özelliklerini aşağıdaki gibi sınıf olarak belirleyip her yerde daha kolay kullanabilir ve 44 | //* tek yerden kontrol edilebilir yapabilir. Sadece boyut için değil renk gibi bir çok özellik için bu yöntem uygulanabilir. 45 | //* Tabi bazı özelliklier için tema kullanmak daha avantajlıdır. 46 | 47 | class ProjectIconSizes { 48 | final double iconSmall = 20; 49 | final double iconMedium = 40; 50 | final double iconLarge = 60; 51 | } 52 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-1/image_enum.dart: -------------------------------------------------------------------------------- 1 | //! Image widgetini kullanırken en rahat ve kullanışlı şekilde nasıl kullanabileceğimizi inceleyelim. 2 | //! pubspec.yaml sayfasına her resmi tek tek eklemek yerine bu işlem ile kullanabiliriz: 3 | //! pubspec.yaml doyasına assets altına bu satırı eklemeliyiz: - asset/images/ 4 | import 'package:flutter/material.dart'; 5 | 6 | enum ImageEnum { 7 | // buraya görsellerimizin ismini ekleriz 8 | book 9 | } 10 | 11 | //!daha sonra bu enum sınıfının gücünü kullanacağımız bir sınıf oluşturarak bu görsel isimlerini kullanabileceğimiz bir metot yazarız: 12 | 13 | extension ImageEnumExtension on ImageEnum { 14 | String get _toPath => 'assets/images/ic_$name.png'; 15 | 16 | Image get toImage => Image.asset(_toPath); 17 | } 18 | 19 | //! burada enum sınıfına eklenen isimleri kullanabileceğimiz metot yazarak image kullanımını çokdaha verimli hale getirdik. 20 | //? Kullanımı: 21 | //* ImageEnum.book.toImage --> bu şekilde metodu kullanarak sayfalarımıza görsel ekleyebiliriz. 22 | //? book: örnek resim ismi. 23 | //? ImageEnum: resmin isminin yazılı olduğu enım sınıfı. 24 | //? toImage: resmin yaolunun tanımlı olduğu ve bunun bir image olduğunu belirten metot. 25 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-1/indicator.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class IndicatorLearn extends StatelessWidget { 4 | const IndicatorLearn({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | actions: const [ 11 | Padding( 12 | padding: EdgeInsets.all(8.0), 13 | child: _CenterCircularProgress(), 14 | ) 15 | ], 16 | title: const Text('Indicator'), 17 | ), 18 | body: const LinearProgressIndicator( 19 | // backgroundColor: Colors.white, 20 | ), 21 | ); 22 | } 23 | } 24 | 25 | class _CenterCircularProgress extends StatelessWidget { 26 | const _CenterCircularProgress(); 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return const Center( 31 | child: CircularProgressIndicator( 32 | strokeWidth: 10, 33 | // value: 0.2, 34 | backgroundColor: Colors.white, 35 | ), 36 | ); 37 | } 38 | } 39 | 40 | //İnternetten veriler gelirken bekleme anında ekranda görünmesini istediğimiz widget. 41 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-1/life_cycle_example/description: -------------------------------------------------------------------------------- 1 | Bu örnekte example_main.dart sayfasında bir seçenek yönetimi olacak. Kendi içierisinde seçenekleri yönetecek ve initState 2 | kullanılacak. 3 | example_advence.dart sayfasında ise bu example_main.dart sayfasını ekleyerek advence sayfasındaki bir buton ile 4 | example_main.dart sayfasında değişiklik yapabilmek için yaşam döngüsünü kullanacağız. -------------------------------------------------------------------------------- /flutter_notes/lib/level-1/life_cycle_example/example_advence.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_notes/level-1/life_cycle_example/example_main.dart'; 3 | 4 | class ExampleAdvence extends StatefulWidget { 5 | const ExampleAdvence({super.key}); 6 | 7 | @override 8 | State createState() => _ExampleAdvenceState(); 9 | } 10 | 11 | class _ExampleAdvenceState extends State { 12 | String? _mainText; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: AppBar( 18 | title: const Text('Exapmle Advence'), 19 | actions: [ 20 | IconButton(onPressed: _changeMainText, icon: const Icon(Icons.home)) 21 | ], 22 | ), 23 | body: ExampleMain( 24 | initialText: _mainText, 25 | ), 26 | ); 27 | } 28 | 29 | void _changeMainText() { 30 | setState(() { 31 | _mainText = 'Anasayfa (onPressed)'; 32 | }); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-1/list_view_builder.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ListViewBuilderLearn extends StatefulWidget { 4 | const ListViewBuilderLearn({super.key}); 5 | 6 | @override 7 | State createState() => _ListViewBuilderLearnState(); 8 | } 9 | 10 | class _ListViewBuilderLearnState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar( 15 | title: const Text('ListView Builder'), 16 | ), 17 | body: ListView.separated( 18 | //ekranin görüğü kadarını yükler ve gçsterir. 19 | itemBuilder: (context, index) { 20 | return Text('$index'); 21 | }, 22 | separatorBuilder: (BuildContext context, int index) => const Divider( 23 | color: Colors.amber, 24 | ), 25 | itemCount: 50, 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-1/navigation/navigation_detail.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NavigationDetailLearn extends StatefulWidget { 4 | const NavigationDetailLearn({super.key, this.isOk = false}); 5 | 6 | final bool isOk; 7 | 8 | @override 9 | State createState() => _NavigationDetailLearnState(); 10 | } 11 | 12 | class _NavigationDetailLearnState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | appBar: AppBar( 17 | title: const Text('Navigation Detail'), 18 | ), 19 | body: Center( 20 | child: ElevatedButton.icon( 21 | onPressed: () { 22 | Navigator.of(context).pop(!widget.isOk); 23 | //gittiğin sayfaya true değerini döndür. 24 | }, 25 | label: widget.isOk ? const Text('Reddet') : const Text('Onayla'), 26 | icon: widget.isOk ? const Icon(Icons.close) : const Icon(Icons.check), 27 | ), 28 | ), 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-1/sized_box.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SizedBoxView extends StatelessWidget { 4 | const SizedBoxView({super.key}); 5 | 6 | //? Sized boc genellikle belirli bir alanı kaplamak için ayarlanır ve kullanılır. 7 | //? Kendine verilen değer kadar yer kaplar. 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Scaffold( 12 | appBar: AppBar( 13 | toolbarHeight: 80, 14 | title: const Center( 15 | child: Text( 16 | 'SizedBox', 17 | style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600), 18 | ), 19 | ), 20 | ), 21 | body: SingleChildScrollView( 22 | child: Center( 23 | child: Column( 24 | children: [ 25 | SizedBox( 26 | width: 300, 27 | height: 200, 28 | child: Text('Örnek Metin ' * 500), 29 | ), 30 | const SizedBox( 31 | height: 50, 32 | ), 33 | const SizedBox.shrink(), // -> belirli bir boş alan bırakır. 34 | SizedBox.square( 35 | dimension: 50, 36 | child: Text('0' * 50), 37 | ), // -> Kullanmamız için kare bir alan oluşturur. 38 | 39 | //* temel olarak sizedbox bu amaçlar için kullanılır. 40 | ], 41 | ), 42 | ), 43 | ), 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-1/stack.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StackLearn extends StatelessWidget { 4 | const StackLearn({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: const Text('Stack'), 11 | ), 12 | body: Stack( 13 | children: [ 14 | Container( 15 | color: Colors.red, 16 | height: 100, 17 | ), 18 | Padding( 19 | padding: const EdgeInsets.only(top: 32.0), 20 | child: Container( 21 | color: Colors.blue, 22 | height: 100, 23 | ), 24 | ), 25 | Positioned( 26 | //Positioned.fill tüm alanı kaplar. 27 | //posizyon belirleme 28 | width: 25, 29 | height: 100, 30 | bottom: 0, 31 | child: Container( 32 | color: Colors.green, 33 | ), 34 | ), 35 | ], 36 | ), 37 | ); 38 | } 39 | } 40 | 41 | //Widgetların üst üste bindiği yerlerde stack kullanılır. 42 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-1/statless_learn.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | import 'package:flutter/material.dart'; 3 | 4 | class StatlessLearn extends StatelessWidget { 5 | //* extends ile StatlessWidget sınıfının güçlerini kullanabiliriz. 6 | const StatlessLearn({super.key}); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Scaffold( 11 | appBar: AppBar( 12 | title: const Text('StatlessWidget'), 13 | ), 14 | body: Center( 15 | child: Column( 16 | mainAxisAlignment: MainAxisAlignment.center, 17 | children: [ 18 | //* Aşağıda aynı widgetten çok fazla olacak ise, 19 | //* bunu bir statless ya da statefull widget olarak başka bir yerde yazarak her yerden kullanabiliriz. 20 | const TitleTextWidget(textWidgetTitle: 'Statless'), 21 | _emptyBox(), 22 | 23 | const TitleTextWidget(textWidgetTitle: 'Statefull'), 24 | _emptyBox(), 25 | 26 | const TitleTextWidget(textWidgetTitle: 'Dart'), 27 | _emptyBox(), 28 | 29 | const TitleTextWidget(textWidgetTitle: 'Kotlin'), 30 | _emptyBox(), 31 | ], 32 | ), 33 | ), 34 | ); 35 | } 36 | 37 | SizedBox _emptyBox() => const SizedBox( 38 | height: 20); // SizedBox widgetini metot halinde yazabiliriz. 39 | } 40 | 41 | class TitleTextWidget extends StatelessWidget { 42 | final String textWidgetTitle; 43 | 44 | const TitleTextWidget({ 45 | super.key, 46 | required this.textWidgetTitle, 47 | }); 48 | 49 | @override 50 | Widget build(BuildContext context) { 51 | return Text( 52 | textWidgetTitle, 53 | style: Theme.of(context).textTheme.headlineMedium, 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-2/cache/shared_preferences/shared_manager.dart: -------------------------------------------------------------------------------- 1 | // import 'package:flutter_notes/level-2/cache/shared_preferences/shared_not_init.dart'; 2 | // import 'package:shared_preferences/shared_preferences.dart'; 3 | 4 | // enum SharedKeys { counter, users } 5 | 6 | // class SharedManager { 7 | // SharedPreferences? preferences; 8 | 9 | // SharedManager(); 10 | 11 | // Future init() async { 12 | // preferences = await SharedPreferences.getInstance(); 13 | // } 14 | 15 | // void _checkPrefences() { 16 | // if (preferences == null) throw SharedNotInitiazleException(); 17 | // } 18 | 19 | // Future saveString(SharedKeys key, String value) async { 20 | // _checkPrefences(); 21 | // await preferences?.setString(key.name, value); 22 | // } 23 | 24 | // Future saveStringItems(SharedKeys key, List value) async { 25 | // _checkPrefences(); 26 | // await preferences?.setStringList(key.name, value); 27 | // } 28 | 29 | // List? getStrings(SharedKeys key) { 30 | // _checkPrefences(); 31 | // return preferences?.getStringList(key.name); 32 | // } 33 | 34 | // String? getString(SharedKeys key) { 35 | // _checkPrefences(); 36 | // return preferences?.getString(key.name); 37 | // } 38 | 39 | // Future removeItem(SharedKeys key) async { 40 | // _checkPrefences(); 41 | // return (await preferences?.remove(key.name)) ?? false; 42 | // } 43 | // } 44 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-2/cache/shared_preferences/shared_not_init.dart: -------------------------------------------------------------------------------- 1 | 2 | // class SharedNotInitiazleException implements Exception { 3 | // @override 4 | // String toString() { 5 | // return 'Your prefences has not initiazled right now'; 6 | // } 7 | // } 8 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-2/cache/shared_preferences/user_cache/user_cache_manager.dart: -------------------------------------------------------------------------------- 1 | 2 | // import 'dart:convert'; 3 | 4 | // import '../shared_manager.dart'; 5 | 6 | // import '../user_model.dart'; 7 | 8 | // class UserCacheManager { 9 | // final SharedManager sharedManager; 10 | 11 | // UserCacheManager(this.sharedManager); 12 | 13 | // Future saveItems(List items) async { 14 | // // Compute 15 | // final _items = items.map((element) => jsonEncode(element.toJson())).toList(); 16 | // await sharedManager.saveStringItems(SharedKeys.users, _items); 17 | // } 18 | 19 | // List? getItems() { 20 | // // Compute 21 | // final itemsString = sharedManager.getStrings(SharedKeys.users); 22 | // if (itemsString?.isNotEmpty ?? false) { 23 | // return itemsString!.map((element) { 24 | // final json = jsonDecode(element); 25 | // if (json is Map) { 26 | // return User.fromJson(json); 27 | // } 28 | // return User('', '', ''); 29 | // }).toList(); 30 | // } 31 | // return null; 32 | // } 33 | // } 34 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-2/cache/shared_preferences/user_model.dart: -------------------------------------------------------------------------------- 1 | 2 | // class User { 3 | // String? name; 4 | // String? description; 5 | // String? url; 6 | 7 | // User(this.name, this.description, this.url); 8 | 9 | // User.fromJson(Map json) { 10 | // name = json['name']; 11 | // description = json['description']; 12 | // url = json['url']; 13 | // } 14 | 15 | // Map toJson() { 16 | // final Map data = {}; 17 | // data['name'] = name; 18 | // data['description'] = description; 19 | // data['url'] = url; 20 | // return data; 21 | // } 22 | // } 23 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-2/custom_password_field_veiw.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_notes/demos/password_text_field_demo.dart'; 3 | 4 | class CustomPasswordFieldVeiw extends StatefulWidget { 5 | const CustomPasswordFieldVeiw({super.key}); 6 | 7 | @override 8 | State createState() => 9 | _CustomPasswordFieldVeiwState(); 10 | } 11 | 12 | class _CustomPasswordFieldVeiwState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | appBar: AppBar( 17 | title: const Text('Custom Password Field'), 18 | ), 19 | body: const Column( 20 | mainAxisAlignment: MainAxisAlignment.center, 21 | children: [ 22 | PasswordTextField(), 23 | ], 24 | ), 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-2/package/loading_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_spinkit/flutter_spinkit.dart'; 3 | 4 | class LoadingBarSpinkit extends StatelessWidget { 5 | const LoadingBarSpinkit({super.key, this.size}); 6 | 7 | final double? size; 8 | final double _defaultSize = 40; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return SpinKitRotatingCircle( 13 | color: Colors.red, 14 | size: size ?? _defaultSize, 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-2/package_example_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_notes/level-2/package/loading_bar.dart'; 3 | 4 | class PackageExampleView extends StatefulWidget { 5 | const PackageExampleView({super.key}); 6 | 7 | @override 8 | State createState() => _PackageExampleViewState(); 9 | } 10 | 11 | class _PackageExampleViewState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | appBar: AppBar( 16 | title: const Text('Spinkit Package'), 17 | ), 18 | body: const LoadingBarSpinkit(), 19 | floatingActionButton: FloatingActionButton( 20 | onPressed: () {}, 21 | backgroundColor: Theme.of(context).colorScheme.onPrimary, 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-2/service/comment_model.dart: -------------------------------------------------------------------------------- 1 | class CommentModel { 2 | int? postId; 3 | int? id; 4 | String? name; 5 | String? email; 6 | String? body; 7 | 8 | CommentModel({this.postId, this.id, this.name, this.email, this.body}); 9 | 10 | CommentModel.fromJson(Map json) { 11 | postId = json['postId']; 12 | id = json['id']; 13 | name = json['name']; 14 | email = json['email']; 15 | body = json['body']; 16 | } 17 | 18 | Map toJson() { 19 | final Map data = {}; 20 | data['postId'] = postId; 21 | data['id'] = id; 22 | data['name'] = name; 23 | data['email'] = email; 24 | data['body'] = body; 25 | return data; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-2/service/post_model.dart: -------------------------------------------------------------------------------- 1 | class PostModel { 2 | String? title; 3 | String? body; 4 | int? userId; 5 | int? id; 6 | 7 | PostModel({this.title, this.body, this.userId, this.id}); 8 | 9 | PostModel.fromJson(Map json) { 10 | title = json['title']; 11 | body = json['body']; 12 | userId = json['userId']; 13 | id = json['id']; 14 | } 15 | 16 | Map toJson() { 17 | final Map data = {}; 18 | data['title'] = title; 19 | data['body'] = body; 20 | data['userId'] = userId; 21 | data['id'] = id; 22 | return data; 23 | } 24 | } 25 | 26 | //! Bu Model sınıfına extradan kod yazılmaz. Bu sayfanın tek işi servisten data almak ve servise data vermektir. 27 | //! Fonksiyonlar oluşturularak yeni görevler verlebilri. 28 | 29 | //! fromJson -> jsondan data map olarak gelir ve bizim bunu cast etmemiz gerekir. Yani gelen datayı bir modele çevirmemiz gerekir. 30 | 31 | //! toJson -> servise data yollamak için body içeriklerini doldurmak gibi işlemleri burada yaparız. 32 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-2/theme/light_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LightTheme { 4 | ThemeData theme = ThemeData( 5 | scaffoldBackgroundColor: Colors.white.withOpacity(0.9), 6 | appBarTheme: const AppBarTheme( 7 | centerTitle: true, 8 | color: Colors.deepPurpleAccent, 9 | shape: RoundedRectangleBorder( 10 | borderRadius: 11 | BorderRadius.vertical(bottom: Radius.circular(16)))), 12 | floatingActionButtonTheme: const FloatingActionButtonThemeData( 13 | backgroundColor: Colors.blueAccent), 14 | textTheme: ThemeData.light().textTheme.copyWith( 15 | bodyLarge: const TextStyle(fontSize: 30), 16 | bodyMedium: const TextStyle(fontSize: 25), 17 | bodySmall: const TextStyle(fontSize: 20), 18 | ), 19 | colorScheme: const ColorScheme.light( 20 | onPrimary: Colors.white, // gibi proje renk temaları belirlenebilir 21 | primary: Colors.blueAccent, 22 | ), 23 | checkboxTheme: CheckboxThemeData( 24 | fillColor: WidgetStateProperty.all( 25 | Colors.green, 26 | ), 27 | side: const BorderSide(color: Colors.green)), 28 | inputDecorationTheme: const InputDecorationTheme( 29 | border: OutlineInputBorder( 30 | borderSide: BorderSide( 31 | color: Colors.deepPurpleAccent, 32 | ), 33 | borderRadius: BorderRadius.all(Radius.circular(16.0))))); 34 | } 35 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-2/theme_learn_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ThemeLearnView extends StatefulWidget { 4 | const ThemeLearnView({super.key}); 5 | 6 | @override 7 | State createState() => _ThemeLearnViewState(); 8 | } 9 | 10 | class _ThemeLearnViewState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar( 15 | title: const Text('Theme Example'), 16 | ), 17 | body: Column( 18 | children: [ 19 | CheckboxListTile( 20 | title: const Text('Select'), 21 | value: true, 22 | onChanged: (value) {}, 23 | ) 24 | ], 25 | ), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-2/widget_size_enum_example.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class WidgetSizeEnumExample extends StatefulWidget { 4 | const WidgetSizeEnumExample({super.key}); 5 | 6 | @override 7 | State createState() => _WidgetSizeEnumExampleState(); 8 | } 9 | 10 | class _WidgetSizeEnumExampleState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar( 15 | title: const Text('Widget Size Enum Example'), 16 | ), 17 | body: Center( 18 | child: Card( 19 | child: Container( 20 | color: Colors.green, 21 | width: WidgetSizesEnum.largeCardHeight.value(), 22 | height: WidgetSizesEnum.largeCardHeight.value(), 23 | ), 24 | ), 25 | )); 26 | } 27 | } 28 | 29 | //* Projelerde her yerde tek tek boyut vermek yerine bu kullanım örneğinde olduğu gibi daha kullanışlı vbir yöntem ile boyut belirleyebilirsiniz. 30 | enum WidgetSizesEnum { normalCardHeight, largeCardHeight, circleProfileHeight } 31 | 32 | extension WidgetSizesEnumExtension on WidgetSizesEnum { 33 | double value() { 34 | switch (this) { 35 | case WidgetSizesEnum.normalCardHeight: 36 | return 50.0; 37 | case WidgetSizesEnum.circleProfileHeight: 38 | return 25.0; 39 | case WidgetSizesEnum.largeCardHeight: 40 | return 100; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-3/navigator/navigate_home_detail.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NavigateHomeDetailView extends StatefulWidget { 4 | const NavigateHomeDetailView({super.key, this.id}); 5 | 6 | final String? id; 7 | 8 | @override 9 | State createState() => _NavigateHomeDetailViewState(); 10 | } 11 | 12 | class _NavigateHomeDetailViewState extends State { 13 | late String? _id; 14 | 15 | @override 16 | void initState() { 17 | super.initState(); 18 | 19 | _id = widget.id; 20 | 21 | if (_id == null) { 22 | //geldiği sayfadaki belirtilen argument'i almak için: 23 | Future.microtask( 24 | () { 25 | final modelId = ModalRoute.of(context)?.settings.arguments; 26 | setState(() { 27 | _id = modelId is String ? modelId : widget.id; 28 | }); 29 | }, 30 | ); 31 | } 32 | } 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return Scaffold( 37 | appBar: AppBar( 38 | title: Text(_id ?? ''), 39 | ), 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-3/navigator/navigate_home_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_notes/product/navigator/navigator_routes.dart'; 3 | 4 | class NavigateHomeView extends StatefulWidget { 5 | const NavigateHomeView({super.key}); 6 | 7 | @override 8 | State createState() => _NavigateHomeViewState(); 9 | } 10 | 11 | class _NavigateHomeViewState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | appBar: AppBar(title: Text(toString())), 16 | floatingActionButton: FloatingActionButton( 17 | child: const Icon(Icons.home_filled), 18 | onPressed: () { 19 | Navigator.of(context) 20 | .pushNamed(NavigateRoutesEnum.detail.withParaf, arguments: '123'); 21 | }, 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-3/navigator/navigate_profile_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NavigateProfileView extends StatefulWidget { 4 | const NavigateProfileView({super.key}); 5 | 6 | @override 7 | State createState() => _NavigateProfileViewState(); 8 | } 9 | 10 | class _NavigateProfileViewState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar( 15 | title: Text(toString()), 16 | ), 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-3/part/part_appbar.dart: -------------------------------------------------------------------------------- 1 | part of './part_of_learn.dart'; 2 | 3 | // part of yöntemi kullanılırken importlar ana sayfada yapılır. yani bu widgetin kullanılacağı sayfada import edilir. 4 | // part of ile ayrı dosyada tanımlanan bir widgetin özelliklerini bu şekilde kullanabiliriz. 5 | // private bir widget oluşturmak için bu yöntemi kullanabiliriz. 6 | // bu sayede kodumuz daha düzenli ve okunabilir olacaktır. iki dosya arasında bağlantıyı sağlamış oluruz. 7 | 8 | class _PartOfAppBar extends StatelessWidget implements PreferredSizeWidget { 9 | const _PartOfAppBar(); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return AppBar( 14 | title: const Text('Part Of Learn'), 15 | actions: [IconButton(onPressed: () {}, icon: const Icon(Icons.add))], 16 | ); 17 | } 18 | 19 | @override 20 | Size get preferredSize => const Size.fromHeight(kToolbarHeight); 21 | } 22 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-3/part/part_of_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | part './part_appbar.dart'; 3 | 4 | // part of ile ayrı dosyada tanımlanan bir widgetin özelliklerini bu şekilde kullanabiliriz. 5 | // private bir widget oluşturmak için bu yöntemi kullanabiliriz. 6 | // bu sayede kodumuz daha düzenli ve okunabilir olacaktır. iki dosya arasında bağlantıyı sağlamış oluruz. 7 | 8 | class PartOfLearn extends StatefulWidget { 9 | const PartOfLearn({super.key}); 10 | 11 | @override 12 | State createState() => _PartOfLearnState(); 13 | } 14 | 15 | class _PartOfLearnState extends State { 16 | @override 17 | Widget build(BuildContext context) { 18 | return const Scaffold( 19 | appBar: _PartOfAppBar(), 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-3/reqrest_resource/product/extension/string_extension.dart: -------------------------------------------------------------------------------- 1 | extension ColorStringExtension on String? { 2 | // servisten gelen renk kodunu burada kullanılabilir hale getirelim. 3 | int get colorValue { 4 | var newColor = this?.replaceFirst('#', '0xff') ?? ''; 5 | return int.parse(newColor); 6 | } 7 | } 8 | 9 | 10 | // Bu sayfada ne yaptık: 11 | // 1- ColorStringExtension adında bir extension oluşturduk ve bu extension içinde String türünde bir değişken oluşturduk. 12 | // 2- Bu değişkenin içinde colorValue adında bir get metodu oluşturduk ve bu metotun dönüş tipini int olarak belirledik. 13 | // 3- Bu metotun içinde this değişkenini kontrol ettik ve eğer this değişkeni null değilse replaceFirst metotunu çağırdık ve bu metotun içinde '#' karakterini '0xff' karakteri ile değiştirdik. 14 | // 4- Bu işlemi yaptıktan sonra int.parse metotunu kullanarak bu değişkeni int türüne çevirdik. 15 | // 5- Bu sayede ColorStringExtension extension sınıfı içindeki işlemleri gerçekleştirmiş olduk. 16 | // 6- Bu extension sınıfını kullanarak servisten gelen renk kodunu kullanılabilir hale getirdik. 17 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-3/reqrest_resource/product/loading_statefull.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | abstract class Loadingstatefull extends State { 4 | bool isLoading = false; 5 | 6 | void changeLoading() { 7 | setState(() { 8 | isLoading = !isLoading; 9 | }); 10 | } 11 | } 12 | 13 | //Bu sayfada neler yaptık: 14 | //1- Loadingstatefull adında bir sınıf oluşturduk ve bu sınıf StatefulWidget sınıfından türedi. 15 | //2- Bu sınıfın içinde bir isLoading adında bir değişken oluşturduk ve bu değişkenin başlangıç değerini false olarak atadık. 16 | //3- changeLoading adında bir metot oluşturduk ve bu metot içinde setState metotunu çağırdık. 17 | //4- setState metodu içinde isLoading değişkenini ! işareti ile tersine çevirdik. 18 | //5- Bu sayede Loadingstatefull sınıfı içindeki işlemleri gerçekleştirmiş olduk. 19 | -------------------------------------------------------------------------------- /flutter_notes/lib/level-3/reqrest_resource/service/project_dio.dart: -------------------------------------------------------------------------------- 1 | //baseUrl i burada bir class içinde tutalım 2 | 3 | import 'package:dio/dio.dart'; 4 | 5 | mixin ProjectDioMixin { 6 | final service = Dio(BaseOptions(baseUrl: 'https://reqres.in/api')); 7 | } 8 | 9 | //Bu sayfada neler yaptık: 10 | //1- ProjectDioMixin adında bir mixin oluşturduk ve bu mixin içinde service adında bir değişken oluşturduk. 11 | //2- service değişkenine Dio sınıfından bir nesne oluşturduk ve bu nesnenin BaseOptions sınıfından bir nesne oluşturduk ve bu nesnenin baseUrl özelliğine 'https://reqres.in/api' değerini atadık. 12 | //3- Bu sayede ProjectDioMixin mixin sınıfı içindeki işlemleri gerçekleştirmiş olduk. 13 | // bunu nerede kullanabiliriz? 14 | // reqres_service.dart dosyasında kullanabiliriz. -------------------------------------------------------------------------------- /flutter_notes/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_notes/level-3/lottie_animation.dart'; 3 | import 'package:flutter_notes/product/constants/project_items.dart'; 4 | import 'package:flutter_notes/product/global/resource_context.dart'; 5 | import 'package:flutter_notes/product/global/theme_notifier.dart'; 6 | import 'package:flutter_notes/product/navigator/navigator_custom.dart'; 7 | import 'package:flutter_notes/product/navigator/navigator_routes.dart'; 8 | import 'package:provider/provider.dart'; 9 | 10 | void main() { 11 | runApp(MultiProvider( 12 | // provideri bu şekilde kullanıyoruz. 13 | providers: [ 14 | Provider(create: (_) => ResourceContext()), 15 | ChangeNotifierProvider( 16 | create: (context) => ThemeNotifier()) 17 | ], 18 | builder: (context, child) { 19 | return const MyApp(); 20 | }, 21 | )); 22 | } 23 | 24 | class MyApp extends StatelessWidget with NavigatorCustom { 25 | const MyApp({super.key}); 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return MaterialApp( 30 | title: ProjectItems.projectName, 31 | debugShowCheckedModeBanner: false, 32 | theme: context.watch().currentTheme, 33 | // provider ile tema değişikliği yapılıyor. 34 | 35 | routes: NavigatorRoutes().items, 36 | 37 | //tanımlanmayan bir route verilirse: 38 | onUnknownRoute: (settings) { 39 | if (settings.name == "/home") { 40 | return MaterialPageRoute( 41 | builder: (context) { 42 | return const LottieLearn(); 43 | }, 44 | ); 45 | } 46 | return null; 47 | }, 48 | 49 | onGenerateRoute: onGenerateRoute, 50 | //home: const LottieLearn(), // route kullanırken home kullanılmaz. 51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /flutter_notes/lib/product/constants/lottie_items.dart: -------------------------------------------------------------------------------- 1 | enum LottieItems { themeChange } 2 | 3 | extension LottieItemsExtension on LottieItems { 4 | String _path() { 5 | switch (this) { 6 | case LottieItems.themeChange: 7 | return 'lottie_theme_change'; 8 | } 9 | } 10 | 11 | String get lottiePath => 'assets/lottie/${_path()}.json'; 12 | } 13 | -------------------------------------------------------------------------------- /flutter_notes/lib/product/constants/project_items.dart: -------------------------------------------------------------------------------- 1 | class ProjectItems { 2 | static const String projectName = 'Flutter Dart Helper'; 3 | ProjectItems._(); // Bu sınıfın örneklenmesini engeller. 4 | // Yani bu sınıftan yeni bir instance üretilmesini engelleriz ve sadece bu sınıftakileri kullanabiliriz 5 | } 6 | -------------------------------------------------------------------------------- /flutter_notes/lib/product/counter_hello_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_notes/product/language/language_items.dart'; 3 | 4 | class CounterHelloButton extends StatefulWidget { 5 | const CounterHelloButton({super.key}); 6 | 7 | @override 8 | State createState() => _CounterHelloButtonState(); 9 | } 10 | 11 | class _CounterHelloButtonState extends State { 12 | int _helloCounter = 0; 13 | 14 | final String _welcomeText = LanguageItems.welcomeTitle; 15 | //Bu title stringleri toplamış olduğumuz sınıftan gelir. projenin stringleri bir yerde toplanmalıdır. 16 | 17 | void _updateHelloCounter() { 18 | setState(() { 19 | ++_helloCounter; 20 | }); 21 | } 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return Padding( 26 | padding: const EdgeInsets.all(8.0), 27 | child: ElevatedButton( 28 | style: const ButtonStyle( 29 | shape: WidgetStatePropertyAll(RoundedRectangleBorder()), 30 | padding: WidgetStatePropertyAll( 31 | EdgeInsets.symmetric(horizontal: 16, vertical: 8)), 32 | backgroundColor: WidgetStatePropertyAll(Colors.blue)), 33 | onPressed: _updateHelloCounter, 34 | child: Text( 35 | '$_welcomeText $_helloCounter', 36 | style: Theme.of(context).textTheme.headlineLarge, 37 | ), 38 | ), 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /flutter_notes/lib/product/global/project_network_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | 3 | //* Bu kodlar reqres_view_model.dart sayfasında kullanılmıştır. 4 | 5 | class ProjectNetworkManager { 6 | ProjectNetworkManager._() { 7 | // NetworkManager._() ile NetworkManager sınıfının private bir constructor olduğunu belirttik. 8 | _dio = Dio(BaseOptions(baseUrl: 'pub.dev')); 9 | } 10 | late final _dio; 11 | 12 | static final ProjectNetworkManager instance = ProjectNetworkManager._(); 13 | // Singleton pattern kullanarak NetworkManager sınıfından sadece bir tane instance oluşturulmasını sağladık. 14 | 15 | Dio get service => _dio; 16 | // Dio instance'ını döndürür. Dio get dio => _dio; ile _dio'yu döndürdük. Bu sayede başka sayfalardan servis ile _dio'ya erişim sağlayabiliriz. 17 | 18 | // daha sonradan _dio ya başka özellikler vermek istersek aşağıdaki gibi yapabiliriz: 19 | void addBaseHederToToken(String token) { 20 | _dio.options = _dio.options.copyWith(headers: {"Authorization": token}); 21 | //Bu metot ile: Dio instance'ına header ekleyebiliriz. 22 | //eğer kullanıcı login olduysa ve token aldıysa bu token'ı header'a ekleyebiliriz. Ve bunu backende göndeririz. 23 | } 24 | } 25 | 26 | class DurationManager { 27 | DurationManager._(); // dışarıdan instance almaya kapattık. 28 | // Bu senaryoda bir data gelmeyebilir ama gelirse de singelton olarak gelmesini ve projede sadece bir tane olmasını istiyoruz. 29 | static DurationManager? _manager; 30 | static DurationManager get manager { 31 | if (_manager != null) return _manager!; 32 | _manager = DurationManager._(); 33 | return _manager!; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /flutter_notes/lib/product/global/resource_context.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_notes/level-3/reqrest_resource/model/resource_model.dart'; 2 | 3 | class ResourceContext { 4 | ResourceModel? model; 5 | 6 | void saveModel(ResourceModel? model) { 7 | this.model = model; 8 | } 9 | 10 | void clear() { 11 | model = null; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /flutter_notes/lib/product/global/theme_notifier.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_notes/level-2/theme/light_theme.dart'; 3 | 4 | class ThemeNotifier extends ChangeNotifier { 5 | bool isLightTheme = false; 6 | 7 | void changeTheme() { 8 | isLightTheme = !isLightTheme; 9 | notifyListeners(); 10 | } 11 | 12 | ThemeData get currentTheme => 13 | !isLightTheme ? LightTheme().theme : ThemeData.dark(); 14 | // düzeltme: isLightTheme ? ThemeData.light() : ThemeData.dark(); 15 | } 16 | -------------------------------------------------------------------------------- /flutter_notes/lib/product/language/language_items.dart: -------------------------------------------------------------------------------- 1 | class LanguageItems { 2 | static const welcomeTitle = 'Merhaba'; 3 | } 4 | -------------------------------------------------------------------------------- /flutter_notes/lib/product/navigator/navigator_custom.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_notes/level-3/lottie_animation.dart'; 3 | import 'package:flutter_notes/level-3/navigator/navigate_home_detail.dart'; 4 | 5 | // route ayarlarını mainde yapmak yerine burada yapabiliriz. 6 | 7 | // bu sayfadaki mıxin sınıfının main de kullanımı: 8 | // mixin sınıfıa with ile eklendikten sonra : onGenerateRoute: onGenerateRoute, 9 | 10 | mixin NavigatorCustom on Widget { 11 | Route? onGenerateRoute(RouteSettings routeSettings) { 12 | if (routeSettings.name == "/") { 13 | return _navigateToNotmal(const LottieLearn()); 14 | } else if (routeSettings.name == "/homeDetails") { 15 | final id = routeSettings.arguments; 16 | return _navigateToNotmal(NavigateHomeDetailView( 17 | id: id is String ? id : null, 18 | )); 19 | } 20 | 21 | return null; 22 | } 23 | 24 | Route? _navigateToNotmal(Widget child) { 25 | return MaterialPageRoute( 26 | builder: (context) { 27 | return const LottieLearn(); 28 | }, 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /flutter_notes/lib/product/navigator/navigator_routes.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_notes/level-3/lottie_animation.dart'; 2 | import 'package:flutter_notes/level-3/navigator/navigate_home_detail.dart'; 3 | import 'package:flutter_notes/level-3/navigator/navigate_home_view.dart'; 4 | 5 | class NavigatorRoutes { 6 | static const _paraf = "/"; 7 | final items = { 8 | _paraf : (context) => const LottieLearn(), 9 | NavigateRoutesEnum.home.withParaf: (context) => const NavigateHomeView(), 10 | NavigateRoutesEnum.detail.withParaf: (context) => 11 | const NavigateHomeDetailView() 12 | }; 13 | } 14 | 15 | enum NavigateRoutesEnum { 16 | init, 17 | home, 18 | detail, 19 | } 20 | 21 | extension NavigateRouteExtension on NavigateRoutesEnum { 22 | String get withParaf => "/$name"; 23 | } 24 | -------------------------------------------------------------------------------- /flutter_notes/lib/product/product_description: -------------------------------------------------------------------------------- 1 | core'da olduğu gibi her yere kullanamazsın. 2 | bu projeye özgüdür. 3 | mesela bir model sınıfı gibi. -------------------------------------------------------------------------------- /flutter_notes/lib/product/widget/button/answer_button.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class AnswerButton extends StatefulWidget { 5 | const AnswerButton({super.key, this.onNumber}); 6 | final bool Function(int number)? onNumber; 7 | 8 | @override 9 | State createState() => _AnswerButtonState(); 10 | } 11 | 12 | class _AnswerButtonState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | //random bir sayı dön 16 | //sayiyi kontrol et ve cevcaba göre ekranı güncelle 17 | //cevap doğru ise yeşil, yanlış ise kırmızı renk olsun 18 | Color? bgColor; 19 | return ElevatedButton( 20 | style: ElevatedButton.styleFrom(backgroundColor: bgColor), 21 | onPressed: () { 22 | final result = Random().nextInt(10); 23 | final response = widget.onNumber?.call(result) ?? false; 24 | if (response) { 25 | setState(() { 26 | bgColor = response ? Colors.green : Colors.red; 27 | }); 28 | } 29 | }, 30 | child: const Text('Answer Button'), 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /flutter_notes/lib/product/widget/button/loading_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LoadingButton extends StatefulWidget { 4 | const LoadingButton( 5 | {super.key, required this.title, required this.onPressed}); 6 | 7 | final String title; 8 | // final VoidCallback onPressed; 9 | final Future Function() onPressed; 10 | 11 | @override 12 | State createState() => _LoadingButtonState(); 13 | } 14 | 15 | class _LoadingButtonState extends State { 16 | bool _isLoading = false; 17 | void _changeLoading() { 18 | setState(() { 19 | _isLoading = !_isLoading; 20 | }); 21 | } 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return ElevatedButton( 26 | child: Center( 27 | child: 28 | _isLoading ? const CircularProgressIndicator() : Text(widget.title), 29 | ), 30 | onPressed: () async { 31 | if (_isLoading) return; 32 | _changeLoading(); 33 | await widget.onPressed(); 34 | _changeLoading(); 35 | }, 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /flutter_notes/lib/product/widget/callback_dropdown.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_notes/level-3/callback_learn.dart'; 3 | 4 | class CallbackDropdown extends StatefulWidget { 5 | const CallbackDropdown({super.key, required this.onUserSelected}); 6 | 7 | final void Function(CallBackUser user) 8 | onUserSelected; // burada fonksiyonu parametre olarak alıyoruz. 9 | // amacı seçilen user'ı dışarıya göndermek. bir nevi callback fonksiyonu. 10 | // bu sayede seçilen user'ı dışarıya gönderebiliriz. 11 | 12 | @override 13 | State createState() => _CallbackDropdownState(); 14 | } 15 | 16 | class _CallbackDropdownState extends State { 17 | CallBackUser? _user; 18 | 19 | void updateUser(CallBackUser? user) { 20 | setState(() { 21 | _user = user; 22 | }); 23 | if (user != null) { 24 | widget.onUserSelected(user); 25 | } 26 | } 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return DropdownButton( 31 | value: _user, 32 | items: CallBackUser.dummyUsers().map( 33 | (e) { 34 | return DropdownMenuItem( 35 | value: e, 36 | child: 37 | Text(e.name, style: Theme.of(context).textTheme.headlineMedium), 38 | ); 39 | }, 40 | ).toList(), 41 | onChanged: updateUser, 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /flutter_notes/lib/product/widget/card/genreic_user_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_notes/level-3/generic/generic_advence.dart'; 3 | 4 | class GenericUserCard extends StatelessWidget { 5 | const GenericUserCard({super.key, required this.model}); 6 | final GenericUser model; 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Text(model.name); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /flutter_notes/lib/product/widget/card/high_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class HighCard extends StatelessWidget { 4 | const HighCard({super.key, required this.items}); 5 | 6 | final List items; 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | child: Text( 12 | items.join(' '), 13 | style: Theme.of(context).textTheme.headlineMedium, 14 | ), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /flutter_notes/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /flutter_notes/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 | 10 | void fl_register_plugins(FlPluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /flutter_notes/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /flutter_notes/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /flutter_notes/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | 9 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 10 | } 11 | -------------------------------------------------------------------------------- /flutter_notes/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_notes/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /flutter_notes/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /flutter_notes/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 = flutter_notes 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterNotes 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /flutter_notes/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /flutter_notes/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_notes/macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 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 | -------------------------------------------------------------------------------- /flutter_notes/test/user_manager_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_notes/level-3/generic/generic_advence.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | void main() { 5 | setUp(() {}); 6 | test('User calculate ', () { 7 | final users = [ 8 | const GenericUser('ozcan', '13', 1), 9 | const GenericUser('can', '15', 2), 10 | ]; 11 | final userManagement = 12 | UserManagement(const AdminUser('vadmin', '1', 15, 1)); 13 | final result = userManagement.calculateMoney(users); 14 | 15 | // ignore: unused_local_variable 16 | final response = userManagement.showNames(users); 17 | 18 | expect(result, 55); 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /flutter_notes/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_notes/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /flutter_notes/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/web/favicon.png -------------------------------------------------------------------------------- /flutter_notes/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/web/icons/Icon-192.png -------------------------------------------------------------------------------- /flutter_notes/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/web/icons/Icon-512.png -------------------------------------------------------------------------------- /flutter_notes/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /flutter_notes/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /flutter_notes/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | flutter_notes 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /flutter_notes/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flutter_notes", 3 | "short_name": "flutter_notes", 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 | } 36 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/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 | 10 | void RegisterPlugins(flutter::PluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/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"flutter_notes", 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 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /flutter_notes/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/flutter_notes/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /flutter_notes/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /flutter_notes/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/.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 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Symbolication related 35 | app.*.symbols 36 | 37 | # Obfuscation related 38 | app.*.map.json 39 | 40 | # Android Studio will place build artifacts here 41 | /android/app/debug 42 | /android/app/profile 43 | /android/app/release 44 | -------------------------------------------------------------------------------- /ready_custom_widgets/.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: "5874a72aa4c779a02553007c47dacbefba2374dc" 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: 5874a72aa4c779a02553007c47dacbefba2374dc 17 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 18 | - platform: android 19 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 20 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 21 | - platform: ios 22 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 23 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 24 | - platform: linux 25 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 26 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 27 | - platform: macos 28 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 29 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 30 | - platform: web 31 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 32 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 33 | - platform: windows 34 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 35 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 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 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 https://dart.dev/lints. 17 | # 18 | # Instead of disabling a lint rule for the entire project in the 19 | # section below, it can also be suppressed for a single line of code 20 | # or a specific dart file by using the `// ignore: name_of_lint` and 21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 22 | # producing the lint. 23 | rules: 24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 26 | 27 | # Additional information about this file can be found at 28 | # https://dart.dev/guides/language/analysis-options 29 | -------------------------------------------------------------------------------- /ready_custom_widgets/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/to/reference-keystore 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /ready_custom_widgets/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. 5 | id "dev.flutter.flutter-gradle-plugin" 6 | } 7 | 8 | android { 9 | namespace = "com.example.ready_custom_widgets" 10 | compileSdk = flutter.compileSdkVersion 11 | ndkVersion = flutter.ndkVersion 12 | 13 | compileOptions { 14 | sourceCompatibility = JavaVersion.VERSION_1_8 15 | targetCompatibility = JavaVersion.VERSION_1_8 16 | } 17 | 18 | kotlinOptions { 19 | jvmTarget = JavaVersion.VERSION_1_8 20 | } 21 | 22 | defaultConfig { 23 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 24 | applicationId = "com.example.ready_custom_widgets" 25 | // You can update the following values to match your application needs. 26 | // For more information, see: https://flutter.dev/to/review-gradle-config. 27 | minSdk = flutter.minSdkVersion 28 | targetSdk = flutter.targetSdkVersion 29 | versionCode = flutter.versionCode 30 | versionName = flutter.versionName 31 | } 32 | 33 | buildTypes { 34 | release { 35 | // TODO: Add your own signing config for the release build. 36 | // Signing with the debug keys for now, so `flutter run --release` works. 37 | signingConfig = signingConfigs.debug 38 | } 39 | } 40 | } 41 | 42 | flutter { 43 | source = "../.." 44 | } 45 | -------------------------------------------------------------------------------- /ready_custom_widgets/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ready_custom_widgets/android/app/src/main/kotlin/com/example/ready_custom_widgets/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.ready_custom_widgets 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() 6 | -------------------------------------------------------------------------------- /ready_custom_widgets/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ready_custom_widgets/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ready_custom_widgets/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ready_custom_widgets/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ready_custom_widgets/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ready_custom_widgets/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ready_custom_widgets/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ready_custom_widgets/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /ready_custom_widgets/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /ready_custom_widgets/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ready_custom_widgets/android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = "../build" 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | } 12 | subprojects { 13 | project.evaluationDependsOn(":app") 14 | } 15 | 16 | tasks.register("clean", Delete) { 17 | delete rootProject.buildDir 18 | } 19 | -------------------------------------------------------------------------------- /ready_custom_widgets/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /ready_custom_widgets/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.6.3-all.zip 6 | -------------------------------------------------------------------------------- /ready_custom_widgets/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "7.3.0" apply false 22 | id "org.jetbrains.kotlin.android" version "1.7.10" apply false 23 | } 24 | 25 | include ":app" 26 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 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 | -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ready_custom_widgets/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. -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Ready Custom Widgets 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ready_custom_widgets 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | CADisableMinimumFrameDurationOnPhone 45 | 46 | UIApplicationSupportsIndirectInputEvents 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /ready_custom_widgets/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/lib/feature/drawer_menu/custom_drawer_menu.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'custom_drawer.dart'; // Import your CustomDrawer 3 | 4 | class DrawerMenuScreen extends StatefulWidget { 5 | const DrawerMenuScreen({super.key}); 6 | 7 | @override 8 | State createState() => _DrawerMenuScreenState(); 9 | } 10 | 11 | class _DrawerMenuScreenState extends State { 12 | // Global key to access ScaffoldState 13 | final GlobalKey _scaffoldKey = GlobalKey(); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | key: _scaffoldKey, // Assign the key to Scaffold 19 | appBar: AppBar( 20 | title: const Text('Custom Drawer Menu'), 21 | backgroundColor: Colors.amber, 22 | actions: [ 23 | Builder( 24 | // Wrap IconButton with Builder 25 | builder: (context) { 26 | return IconButton( 27 | icon: const Icon(Icons.menu), // Icon for opening drawer 28 | onPressed: () { 29 | Scaffold.of(context) 30 | .openEndDrawer(); // Correct context provided by Builder 31 | }, 32 | ); 33 | }, 34 | ), 35 | ], 36 | ), 37 | endDrawer: const CustomDrawer(), // Add your CustomDrawer here 38 | body: const Center( 39 | child: Text('Ana sayfa içerikleriniz burada.'), 40 | ), 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /ready_custom_widgets/lib/feature/hidden_drawer_menu/main_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class HomePage extends StatefulWidget { 4 | const HomePage({super.key}); 5 | 6 | @override 7 | State createState() => _HomePageState(); 8 | } 9 | 10 | class _HomePageState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return const Scaffold( 14 | backgroundColor: Colors.deepOrangeAccent, 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ready_custom_widgets/lib/feature/hidden_drawer_menu/settings_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SettingsPage extends StatefulWidget { 4 | const SettingsPage({super.key}); 5 | 6 | @override 7 | State createState() => _SettingsPageState(); 8 | } 9 | 10 | class _SettingsPageState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return const Scaffold( 14 | backgroundColor: Colors.deepOrangeAccent, 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ready_custom_widgets/lib/feature/lottie_animations/lottie_animations.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:lottie/lottie.dart'; 3 | 4 | class LottieAnimationView extends StatefulWidget { 5 | const LottieAnimationView({super.key}); 6 | 7 | @override 8 | State createState() => _LottieAnimationViewState(); 9 | } 10 | 11 | class _LottieAnimationViewState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | appBar: AppBar( 16 | title: const Center(child: Text('Lottie Animation')), 17 | ), 18 | body: Center( 19 | child: LottieBuilder.network( 20 | 'https://lottie.host/69369150-d7e2-4eb4-9a3b-72b2f388f822/4E3YpZI1zX.json')), 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ready_custom_widgets/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:ready_custom_widgets/widgets_list.dart'; 4 | 5 | void main() { 6 | runApp(const MyApp()); 7 | 8 | //? Status bar rengini dark yapmak için: 9 | SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark); 10 | SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark.copyWith( 11 | statusBarColor: Colors.transparent, 12 | )); 13 | } 14 | 15 | class MyApp extends StatelessWidget { 16 | const MyApp({super.key}); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return MaterialApp( 21 | title: 'Flutter Demo', 22 | debugShowCheckedModeBanner: false, 23 | theme: ThemeData(primarySwatch: Colors.deepOrange), 24 | home: const WidgetsList(), 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ready_custom_widgets/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | 10 | void fl_register_plugins(FlPluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | 9 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 10 | } 11 | -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /ready_custom_widgets/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 = ready_custom_widgets 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.readyCustomWidgets 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ready_custom_widgets/macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 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 | -------------------------------------------------------------------------------- /ready_custom_widgets/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: ready_custom_widgets 2 | description: "A new Flutter project." 3 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 4 | 5 | version: 1.0.0+1 6 | 7 | environment: 8 | sdk: ^3.5.1 9 | 10 | dependencies: 11 | flutter: 12 | sdk: flutter 13 | 14 | cupertino_icons: ^1.0.8 15 | flutter_spinkit: ^5.2.1 16 | google_nav_bar: ^5.0.6 17 | hidden_drawer_menu: ^3.0.1 18 | flutter_slidable: ^3.1.1 19 | lottie: ^3.1.2 20 | 21 | dev_dependencies: 22 | flutter_test: 23 | sdk: flutter 24 | 25 | flutter_lints: ^4.0.0 26 | 27 | flutter: 28 | uses-material-design: true 29 | -------------------------------------------------------------------------------- /ready_custom_widgets/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:ready_custom_widgets/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /ready_custom_widgets/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/web/favicon.png -------------------------------------------------------------------------------- /ready_custom_widgets/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/web/icons/Icon-192.png -------------------------------------------------------------------------------- /ready_custom_widgets/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/web/icons/Icon-512.png -------------------------------------------------------------------------------- /ready_custom_widgets/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /ready_custom_widgets/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /ready_custom_widgets/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | ready_custom_widgets 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /ready_custom_widgets/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ready_custom_widgets", 3 | "short_name": "ready_custom_widgets", 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 | } 36 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | 10 | void RegisterPlugins(flutter::PluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/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"ready_custom_widgets", 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 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | -------------------------------------------------------------------------------- /ready_custom_widgets/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ozcanbayram/Flutter-Dart-Helper/3a001aec567545b5a4bb71a6e4a758c83be18ac4/ready_custom_widgets/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /ready_custom_widgets/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ready_custom_widgets/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 | --------------------------------------------------------------------------------