From dec2d2d53dba5a096941f68e0a591810b86a5246 Mon Sep 17 00:00:00 2001 From: Aiden <97030039+AidenDexter@users.noreply.github.com> Date: Tue, 20 Feb 2024 19:42:35 +0400 Subject: [PATCH] feat:finish --- .../lib/main_20240220105946.dart | 25 +++ .../lib/main_20240220113222.dart | 25 +++ .../lib/main_20240220113224.dart | 26 +++ .../lib/main_20240220150925.dart | 26 +++ .../lib/main_20240220151303.dart | 26 +++ .../lib/main_20240220151313.dart | 26 +++ .../lib/main_20240220175832.dart | 26 +++ .../lib/main_20240220180137.dart | 27 +++ .../lib/main_20240220180204.dart | 27 +++ .../lib/main_20240220180217.dart | 27 +++ .../lib/main_20240220180226.dart | 26 +++ .../lib/main_20240220180239.dart | 26 +++ .../meme_generator_screen_20240220105946.dart | 61 +++++++ .../meme_generator_screen_20240220112840.dart | 61 +++++++ .../meme_generator_screen_20240220112957.dart | 61 +++++++ .../meme_generator_screen_20240220114048.dart | 66 +++++++ .../meme_generator_screen_20240220114106.dart | 67 +++++++ .../meme_generator_screen_20240220114111.dart | 67 +++++++ .../meme_generator_screen_20240220114136.dart | 67 +++++++ .../meme_generator_screen_20240220114140.dart | 68 +++++++ .../meme_generator_screen_20240220114154.dart | 68 +++++++ .../meme_generator_screen_20240220114155.dart | 68 +++++++ .../meme_generator_screen_20240220114545.dart | 68 +++++++ .../meme_generator_screen_20240220115535.dart | 71 ++++++++ .../meme_generator_screen_20240220115538.dart | 71 ++++++++ .../meme_generator_screen_20240220123604.dart | 119 ++++++++++++ .../meme_generator_screen_20240220124526.dart | 125 +++++++++++++ .../meme_generator_screen_20240220124809.dart | 113 ++++++++++++ .../meme_generator_screen_20240220124812.dart | 114 ++++++++++++ .../meme_generator_screen_20240220125138.dart | 115 ++++++++++++ .../meme_generator_screen_20240220125547.dart | 115 ++++++++++++ .../meme_generator_screen_20240220125557.dart | 115 ++++++++++++ .../meme_generator_screen_20240220125613.dart | 115 ++++++++++++ .../meme_generator_screen_20240220125624.dart | 110 ++++++++++++ .../meme_generator_screen_20240220125634.dart | 106 +++++++++++ .../meme_generator_screen_20240220125643.dart | 106 +++++++++++ .../meme_generator_screen_20240220125920.dart | 106 +++++++++++ .../meme_generator_screen_20240220130027.dart | 106 +++++++++++ .../meme_generator_screen_20240220131233.dart | 106 +++++++++++ .../meme_generator_screen_20240220131240.dart | 106 +++++++++++ .../meme_generator_screen_20240220131249.dart | 106 +++++++++++ .../meme_generator_screen_20240220131448.dart | 107 +++++++++++ .../meme_generator_screen_20240220131503.dart | 105 +++++++++++ .../meme_generator_screen_20240220132143.dart | 105 +++++++++++ .../meme_generator_screen_20240220132224.dart | 106 +++++++++++ .../meme_generator_screen_20240220132354.dart | 107 +++++++++++ .../meme_generator_screen_20240220132453.dart | 106 +++++++++++ .../meme_generator_screen_20240220132826.dart | 107 +++++++++++ .../meme_generator_screen_20240220133014.dart | 107 +++++++++++ .../meme_generator_screen_20240220133047.dart | 108 +++++++++++ .../meme_generator_screen_20240220133105.dart | 111 ++++++++++++ .../meme_generator_screen_20240220133239.dart | 111 ++++++++++++ .../meme_generator_screen_20240220133243.dart | 110 ++++++++++++ .../meme_generator_screen_20240220133303.dart | 111 ++++++++++++ .../meme_generator_screen_20240220133308.dart | 111 ++++++++++++ .../meme_generator_screen_20240220133437.dart | 110 ++++++++++++ .../meme_generator_screen_20240220133444.dart | 110 ++++++++++++ .../meme_generator_screen_20240220133601.dart | 108 +++++++++++ .../meme_generator_screen_20240220134028.dart | 133 ++++++++++++++ .../meme_generator_screen_20240220134119.dart | 115 ++++++++++++ .../meme_generator_screen_20240220134248.dart | 108 +++++++++++ .../meme_generator_screen_20240220134250.dart | 108 +++++++++++ .../meme_generator_screen_20240220134444.dart | 107 +++++++++++ .../meme_generator_screen_20240220134642.dart | 109 +++++++++++ .../meme_generator_screen_20240220134723.dart | 107 +++++++++++ .../meme_generator_screen_20240220134841.dart | 107 +++++++++++ .../meme_generator_screen_20240220134909.dart | 104 +++++++++++ .../meme_generator_screen_20240220134958.dart | 107 +++++++++++ .../meme_generator_screen_20240220135920.dart | 111 ++++++++++++ .../meme_generator_screen_20240220135952.dart | 111 ++++++++++++ .../meme_generator_screen_20240220140007.dart | 111 ++++++++++++ .../meme_generator_screen_20240220140019.dart | 111 ++++++++++++ .../meme_generator_screen_20240220140047.dart | 108 +++++++++++ .../meme_generator_screen_20240220140101.dart | 108 +++++++++++ .../meme_generator_screen_20240220140107.dart | 108 +++++++++++ .../meme_generator_screen_20240220140110.dart | 108 +++++++++++ .../meme_generator_screen_20240220140122.dart | 108 +++++++++++ .../meme_generator_screen_20240220140132.dart | 108 +++++++++++ .../meme_generator_screen_20240220140151.dart | 108 +++++++++++ .../meme_generator_screen_20240220140204.dart | 108 +++++++++++ .../meme_generator_screen_20240220140210.dart | 108 +++++++++++ .../meme_generator_screen_20240220140318.dart | 109 +++++++++++ .../meme_generator_screen_20240220140423.dart | 116 ++++++++++++ .../meme_generator_screen_20240220140507.dart | 110 ++++++++++++ .../meme_generator_screen_20240220140544.dart | 114 ++++++++++++ .../meme_generator_screen_20240220140632.dart | 115 ++++++++++++ .../meme_generator_screen_20240220141557.dart | 115 ++++++++++++ .../meme_generator_screen_20240220142541.dart | 113 ++++++++++++ .../meme_generator_screen_20240220142549.dart | 111 ++++++++++++ .../meme_generator_screen_20240220143525.dart | 113 ++++++++++++ .../meme_generator_screen_20240220143648.dart | 118 ++++++++++++ .../meme_generator_screen_20240220143754.dart | 120 +++++++++++++ .../meme_generator_screen_20240220144034.dart | 121 +++++++++++++ .../meme_generator_screen_20240220144231.dart | 121 +++++++++++++ .../meme_generator_screen_20240220144254.dart | 121 +++++++++++++ .../meme_generator_screen_20240220144257.dart | 121 +++++++++++++ .../meme_generator_screen_20240220144422.dart | 121 +++++++++++++ .../meme_generator_screen_20240220144434.dart | 121 +++++++++++++ .../meme_generator_screen_20240220144438.dart | 121 +++++++++++++ .../meme_generator_screen_20240220144809.dart | 121 +++++++++++++ .../meme_generator_screen_20240220144907.dart | 122 +++++++++++++ .../meme_generator_screen_20240220145047.dart | 121 +++++++++++++ .../meme_generator_screen_20240220145157.dart | 121 +++++++++++++ .../meme_generator_screen_20240220150849.dart | 121 +++++++++++++ .../meme_generator_screen_20240220151043.dart | 121 +++++++++++++ .../meme_generator_screen_20240220151533.dart | 124 +++++++++++++ .../meme_generator_screen_20240220151608.dart | 124 +++++++++++++ .../meme_generator_screen_20240220151949.dart | 151 ++++++++++++++++ .../meme_generator_screen_20240220152043.dart | 150 ++++++++++++++++ .../meme_generator_screen_20240220152134.dart | 150 ++++++++++++++++ .../meme_generator_screen_20240220152215.dart | 155 ++++++++++++++++ .../meme_generator_screen_20240220152311.dart | 162 +++++++++++++++++ .../meme_generator_screen_20240220152528.dart | 157 ++++++++++++++++ .../meme_generator_screen_20240220152640.dart | 157 ++++++++++++++++ .../meme_generator_screen_20240220152646.dart | 157 ++++++++++++++++ .../meme_generator_screen_20240220153057.dart | 158 ++++++++++++++++ .../meme_generator_screen_20240220154602.dart | 155 ++++++++++++++++ .../meme_generator_screen_20240220154724.dart | 160 +++++++++++++++++ .../meme_generator_screen_20240220154745.dart | 159 ++++++++++++++++ .../meme_generator_screen_20240220155218.dart | 156 ++++++++++++++++ .../meme_generator_screen_20240220155704.dart | 156 ++++++++++++++++ .../meme_generator_screen_20240220155735.dart | 156 ++++++++++++++++ .../meme_generator_screen_20240220155742.dart | 156 ++++++++++++++++ .../meme_generator_screen_20240220155748.dart | 156 ++++++++++++++++ .../meme_generator_screen_20240220155844.dart | 159 ++++++++++++++++ .../meme_generator_screen_20240220155853.dart | 159 ++++++++++++++++ .../meme_generator_screen_20240220155910.dart | 159 ++++++++++++++++ .../meme_generator_screen_20240220164909.dart | 157 ++++++++++++++++ .../meme_generator_screen_20240220165033.dart | 157 ++++++++++++++++ .../meme_generator_screen_20240220165040.dart | 159 ++++++++++++++++ .../meme_generator_screen_20240220165049.dart | 159 ++++++++++++++++ .../meme_generator_screen_20240220165052.dart | 159 ++++++++++++++++ .../meme_generator_screen_20240220165117.dart | 163 +++++++++++++++++ .../meme_generator_screen_20240220165122.dart | 163 +++++++++++++++++ .../meme_generator_screen_20240220165128.dart | 163 +++++++++++++++++ .../meme_generator_screen_20240220165142.dart | 165 +++++++++++++++++ .../meme_generator_screen_20240220165802.dart | 165 +++++++++++++++++ .../meme_generator_screen_20240220165934.dart | 165 +++++++++++++++++ .../meme_generator_screen_20240220165937.dart | 166 +++++++++++++++++ .../meme_generator_screen_20240220165943.dart | 166 +++++++++++++++++ .../meme_generator_screen_20240220165947.dart | 166 +++++++++++++++++ .../meme_generator_screen_20240220170626.dart | 166 +++++++++++++++++ .../meme_generator_screen_20240220174821.dart | 166 +++++++++++++++++ .../meme_generator_screen_20240220180455.dart | 167 +++++++++++++++++ .../meme_generator_screen_20240220180708.dart | 168 +++++++++++++++++ .../meme_generator_screen_20240220181135.dart | 168 +++++++++++++++++ .../meme_generator_screen_20240220181319.dart | 167 +++++++++++++++++ .../meme_generator_screen_20240220181403.dart | 167 +++++++++++++++++ .../meme_generator_screen_20240220181444.dart | 167 +++++++++++++++++ .../meme_generator_screen_20240220181452.dart | 167 +++++++++++++++++ .../meme_generator_screen_20240220182217.dart | 167 +++++++++++++++++ .../meme_generator_screen_20240220182645.dart | 166 +++++++++++++++++ .../meme_generator_screen_20240220182703.dart | 166 +++++++++++++++++ .../meme_generator_screen_20240220182705.dart | 170 ++++++++++++++++++ .../meme_generator_screen_20240220183811.dart | 161 +++++++++++++++++ .../meme_generator_screen_20240220183816.dart | 158 ++++++++++++++++ .../meme_generator_screen_20240220183832.dart | 152 ++++++++++++++++ .../meme_generator_screen_20240220184732.dart | 163 +++++++++++++++++ .../meme_generator_screen_20240220184942.dart | 161 +++++++++++++++++ .../meme_generator_screen_20240220185108.dart | 162 +++++++++++++++++ .../meme_generator_screen_20240220185146.dart | 162 +++++++++++++++++ .../meme_generator_screen_20240220192511.dart | 158 ++++++++++++++++ .../meme_generator_screen_20240220192520.dart | 162 +++++++++++++++++ .../meme_generator_screen_20240220192626.dart | 157 ++++++++++++++++ .../meme_generator_screen_20240220192628.dart | 157 ++++++++++++++++ .../meme_generator_screen_20240220192706.dart | 153 ++++++++++++++++ .../meme_generator_screen_20240220192800.dart | 153 ++++++++++++++++ .../widgets/button_widget_20240220114353.dart | 0 .../widgets/button_widget_20240220114543.dart | 10 ++ .../widgets/button_widget_20240220114750.dart | 52 ++++++ .../widgets/button_widget_20240220114804.dart | 52 ++++++ .../widgets/button_widget_20240220114809.dart | 52 ++++++ .../widgets/button_widget_20240220120254.dart | 53 ++++++ .../widgets/button_widget_20240220121253.dart | 53 ++++++ .../mem_text_dialog_20240220141852.dart | 0 .../mem_text_dialog_20240220142246.dart | 12 ++ .../mem_text_dialog_20240220142254.dart | 12 ++ .../mem_text_dialog_20240220143042.dart | 39 ++++ .../mem_text_dialog_20240220143126.dart | 32 ++++ .../mem_text_dialog_20240220143134.dart | 32 ++++ .../mem_text_dialog_20240220143234.dart | 32 ++++ .../mem_text_dialog_20240220143324.dart | 36 ++++ .../mem_text_dialog_20240220143335.dart | 40 +++++ .../mem_text_dialog_20240220143337.dart | 40 +++++ .../mem_text_dialog_20240220143340.dart | 40 +++++ .../mem_text_dialog_20240220143348.dart | 40 +++++ .../mem_text_dialog_20240220144058.dart | 40 +++++ .../mem_text_dialog_20240220150957.dart | 39 ++++ .../mem_text_dialog_20240220151005.dart | 39 ++++ .../mem_text_dialog_20240220151011.dart | 39 ++++ .../mem_text_dialog_20240220151034.dart | 39 ++++ .../mem_text_dialog_20240220151232.dart | 41 +++++ .../mem_text_dialog_20240220151608.dart | 47 +++++ .../mem_text_dialog_20240220152050.dart | 47 +++++ .../mem_text_dialog_20240220193214.dart | 1 + .../widgets/navbar_widget_20240220114937.dart | 0 .../widgets/navbar_widget_20240220115029.dart | 11 ++ .../widgets/navbar_widget_20240220115141.dart | 12 ++ .../widgets/navbar_widget_20240220115323.dart | 12 ++ .../widgets/navbar_widget_20240220115345.dart | 15 ++ .../widgets/navbar_widget_20240220115416.dart | 15 ++ .../widgets/navbar_widget_20240220115502.dart | 15 ++ .../widgets/navbar_widget_20240220115506.dart | 15 ++ .../widgets/navbar_widget_20240220115518.dart | 15 ++ .../widgets/navbar_widget_20240220115939.dart | 15 ++ .../widgets/navbar_widget_20240220120457.dart | 20 +++ .../widgets/navbar_widget_20240220120500.dart | 18 ++ .../widgets/navbar_widget_20240220120520.dart | 20 +++ .../widgets/navbar_widget_20240220120530.dart | 20 +++ .../widgets/navbar_widget_20240220120641.dart | 36 ++++ .../widgets/navbar_widget_20240220120802.dart | 37 ++++ .../widgets/navbar_widget_20240220120922.dart | 12 ++ .../widgets/navbar_widget_20240220121238.dart | 40 +++++ .../widgets/navbar_widget_20240220121354.dart | 38 ++++ .../widgets/navbar_widget_20240220121407.dart | 39 ++++ .../widgets/navbar_widget_20240220121428.dart | 42 +++++ .../widgets/navbar_widget_20240220121505.dart | 34 ++++ .../widgets/navbar_widget_20240220121626.dart | 39 ++++ .../widgets/navbar_widget_20240220121637.dart | 39 ++++ .../widgets/navbar_widget_20240220121716.dart | 39 ++++ .../widgets/navbar_widget_20240220121805.dart | 43 +++++ .../widgets/navbar_widget_20240220121827.dart | 44 +++++ .../widgets/navbar_widget_20240220121854.dart | 44 +++++ .../widgets/navbar_widget_20240220121903.dart | 44 +++++ .../widgets/navbar_widget_20240220122715.dart | 45 +++++ .../widgets/navbar_widget_20240220122730.dart | 45 +++++ .../widgets/navbar_widget_20240220125646.dart | 2 + .../pubspec_20240220105946.yaml | 24 +++ .../pubspec_20240220132020.yaml | 27 +++ .../pubspec_20240220132041.yaml | 27 +++ .../pubspec_20240220132104.yaml | 27 +++ .../pubspec_20240220132207.yaml | 24 +++ meme_generator/.fvm/flutter_sdk | 1 - meme_generator/.fvm/fvm_config.json | 3 +- meme_generator/.fvm/release | 1 + meme_generator/.fvm/version | 1 + meme_generator/.fvmrc | 3 + meme_generator/.vscode/settings.json | 3 + meme_generator/lib/main.dart | 3 +- .../lib/screen/meme_generator_screen.dart | 124 +++++++++++-- meme_generator/pubspec.yaml | 2 +- 241 files changed, 22102 insertions(+), 21 deletions(-) create mode 100644 .history/meme_generator/lib/main_20240220105946.dart create mode 100644 .history/meme_generator/lib/main_20240220113222.dart create mode 100644 .history/meme_generator/lib/main_20240220113224.dart create mode 100644 .history/meme_generator/lib/main_20240220150925.dart create mode 100644 .history/meme_generator/lib/main_20240220151303.dart create mode 100644 .history/meme_generator/lib/main_20240220151313.dart create mode 100644 .history/meme_generator/lib/main_20240220175832.dart create mode 100644 .history/meme_generator/lib/main_20240220180137.dart create mode 100644 .history/meme_generator/lib/main_20240220180204.dart create mode 100644 .history/meme_generator/lib/main_20240220180217.dart create mode 100644 .history/meme_generator/lib/main_20240220180226.dart create mode 100644 .history/meme_generator/lib/main_20240220180239.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220105946.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220112840.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220112957.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220114048.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220114106.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220114111.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220114136.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220114140.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220114154.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220114155.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220114545.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220115535.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220115538.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220123604.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220124526.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220124809.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220124812.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220125138.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220125547.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220125557.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220125613.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220125624.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220125634.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220125643.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220125920.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220130027.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220131233.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220131240.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220131249.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220131448.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220131503.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220132143.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220132224.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220132354.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220132453.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220132826.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220133014.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220133047.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220133105.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220133239.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220133243.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220133303.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220133308.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220133437.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220133444.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220133601.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220134028.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220134119.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220134248.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220134250.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220134444.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220134642.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220134723.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220134841.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220134909.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220134958.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220135920.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220135952.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140007.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140019.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140047.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140101.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140107.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140110.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140122.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140132.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140151.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140204.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140210.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140318.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140423.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140507.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140544.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220140632.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220141557.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220142541.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220142549.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220143525.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220143648.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220143754.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220144034.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220144231.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220144254.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220144257.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220144422.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220144434.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220144438.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220144809.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220144907.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220145047.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220145157.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220150849.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220151043.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220151533.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220151608.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220151949.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220152043.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220152134.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220152215.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220152311.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220152528.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220152640.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220152646.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220153057.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220154602.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220154724.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220154745.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220155218.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220155704.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220155735.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220155742.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220155748.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220155844.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220155853.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220155910.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220164909.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220165033.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220165040.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220165049.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220165052.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220165117.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220165122.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220165128.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220165142.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220165802.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220165934.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220165937.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220165943.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220165947.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220170626.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220174821.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220180455.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220180708.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220181135.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220181319.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220181403.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220181444.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220181452.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220182217.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220182645.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220182703.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220182705.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220183811.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220183816.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220183832.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220184732.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220184942.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220185108.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220185146.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220192511.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220192520.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220192626.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220192628.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220192706.dart create mode 100644 .history/meme_generator/lib/screen/meme_generator_screen_20240220192800.dart create mode 100644 .history/meme_generator/lib/widgets/button_widget_20240220114353.dart create mode 100644 .history/meme_generator/lib/widgets/button_widget_20240220114543.dart create mode 100644 .history/meme_generator/lib/widgets/button_widget_20240220114750.dart create mode 100644 .history/meme_generator/lib/widgets/button_widget_20240220114804.dart create mode 100644 .history/meme_generator/lib/widgets/button_widget_20240220114809.dart create mode 100644 .history/meme_generator/lib/widgets/button_widget_20240220120254.dart create mode 100644 .history/meme_generator/lib/widgets/button_widget_20240220121253.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220141852.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220142246.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220142254.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143042.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143126.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143134.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143234.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143324.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143335.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143337.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143340.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143348.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220144058.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220150957.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151005.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151011.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151034.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151232.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151608.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220152050.dart create mode 100644 .history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220193214.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220114937.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220115029.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220115141.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220115323.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220115345.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220115416.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220115502.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220115506.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220115518.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220115939.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220120457.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220120500.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220120520.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220120530.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220120641.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220120802.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220120922.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220121238.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220121354.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220121407.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220121428.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220121505.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220121626.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220121637.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220121716.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220121805.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220121827.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220121854.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220121903.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220122715.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220122730.dart create mode 100644 .history/meme_generator/lib/widgets/navbar_widget_20240220125646.dart create mode 100644 .history/meme_generator/pubspec_20240220105946.yaml create mode 100644 .history/meme_generator/pubspec_20240220132020.yaml create mode 100644 .history/meme_generator/pubspec_20240220132041.yaml create mode 100644 .history/meme_generator/pubspec_20240220132104.yaml create mode 100644 .history/meme_generator/pubspec_20240220132207.yaml delete mode 120000 meme_generator/.fvm/flutter_sdk create mode 100644 meme_generator/.fvm/release create mode 100644 meme_generator/.fvm/version create mode 100644 meme_generator/.fvmrc create mode 100644 meme_generator/.vscode/settings.json diff --git a/.history/meme_generator/lib/main_20240220105946.dart b/.history/meme_generator/lib/main_20240220105946.dart new file mode 100644 index 0000000..0790258 --- /dev/null +++ b/.history/meme_generator/lib/main_20240220105946.dart @@ -0,0 +1,25 @@ +import 'package:flutter/material.dart'; +import 'package:meme_generator/screen/meme_generator_screen.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(const MyApp()); +} + +/// App,s main widget. +class MyApp extends StatelessWidget { + /// Constructor for [MyApp]. + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + home: const MemeGeneratorScreen(), + ); + } +} diff --git a/.history/meme_generator/lib/main_20240220113222.dart b/.history/meme_generator/lib/main_20240220113222.dart new file mode 100644 index 0000000..b38e721 --- /dev/null +++ b/.history/meme_generator/lib/main_20240220113222.dart @@ -0,0 +1,25 @@ +import 'package:flutter/material.dart'; +import 'package:meme_generator/screen/meme_generator_screen.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(const MyApp()); +} + +/// App,s main widget. +class MyApp extends StatelessWidget { + /// Constructor for [MyApp]. + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp(debugShowCheckedModeBanner: false, + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + home: const MemeGeneratorScreen(), + ); + } +} diff --git a/.history/meme_generator/lib/main_20240220113224.dart b/.history/meme_generator/lib/main_20240220113224.dart new file mode 100644 index 0000000..203d93e --- /dev/null +++ b/.history/meme_generator/lib/main_20240220113224.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; +import 'package:meme_generator/screen/meme_generator_screen.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(const MyApp()); +} + +/// App,s main widget. +class MyApp extends StatelessWidget { + /// Constructor for [MyApp]. + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + home: const MemeGeneratorScreen(), + ); + } +} diff --git a/.history/meme_generator/lib/main_20240220150925.dart b/.history/meme_generator/lib/main_20240220150925.dart new file mode 100644 index 0000000..ecf7a69 --- /dev/null +++ b/.history/meme_generator/lib/main_20240220150925.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; +import 'package:meme_generator/screen/meme_generator_screen.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(const MyApp()); +} + +/// App,s main widget. +class MyApp extends StatelessWidget { + /// Constructor for [MyApp]. + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.brown), + useMaterial3: true, + ), + home: const MemeGeneratorScreen(), + ); + } +} diff --git a/.history/meme_generator/lib/main_20240220151303.dart b/.history/meme_generator/lib/main_20240220151303.dart new file mode 100644 index 0000000..b40c948 --- /dev/null +++ b/.history/meme_generator/lib/main_20240220151303.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; +import 'package:meme_generator/screen/meme_generator_screen.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(const MyApp()); +} + +/// App,s main widget. +class MyApp extends StatelessWidget { + /// Constructor for [MyApp]. + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(), + useMaterial3: true, + ), + home: const MemeGeneratorScreen(), + ); + } +} diff --git a/.history/meme_generator/lib/main_20240220151313.dart b/.history/meme_generator/lib/main_20240220151313.dart new file mode 100644 index 0000000..203d93e --- /dev/null +++ b/.history/meme_generator/lib/main_20240220151313.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; +import 'package:meme_generator/screen/meme_generator_screen.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(const MyApp()); +} + +/// App,s main widget. +class MyApp extends StatelessWidget { + /// Constructor for [MyApp]. + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + home: const MemeGeneratorScreen(), + ); + } +} diff --git a/.history/meme_generator/lib/main_20240220175832.dart b/.history/meme_generator/lib/main_20240220175832.dart new file mode 100644 index 0000000..003ecef --- /dev/null +++ b/.history/meme_generator/lib/main_20240220175832.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; +import 'package:meme_generator/screen/meme_generator_screen.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(const MyApp()); +} + +/// App,s main widget. +class MyApp extends StatelessWidget { + /// Constructor for [MyApp]. + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.black), + useMaterial3: true, + ), + home: const MemeGeneratorScreen(), + ); + } +} diff --git a/.history/meme_generator/lib/main_20240220180137.dart b/.history/meme_generator/lib/main_20240220180137.dart new file mode 100644 index 0000000..59ada30 --- /dev/null +++ b/.history/meme_generator/lib/main_20240220180137.dart @@ -0,0 +1,27 @@ +import 'package:flutter/material.dart'; +import 'package:meme_generator/screen/meme_generator_screen.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(const MyApp()); +} + +/// App,s main widget. +class MyApp extends StatelessWidget { + /// Constructor for [MyApp]. + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + theme: ThemeData( + brightness: Brightness.dark, + colorScheme: ColorScheme.fromSeed(seedColor: Colors.black), + useMaterial3: true, + ), + home: const MemeGeneratorScreen(), + ); + } +} diff --git a/.history/meme_generator/lib/main_20240220180204.dart b/.history/meme_generator/lib/main_20240220180204.dart new file mode 100644 index 0000000..0d6388e --- /dev/null +++ b/.history/meme_generator/lib/main_20240220180204.dart @@ -0,0 +1,27 @@ +import 'package:flutter/material.dart'; +import 'package:meme_generator/screen/meme_generator_screen.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(const MyApp()); +} + +/// App,s main widget. +class MyApp extends StatelessWidget { + /// Constructor for [MyApp]. + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + theme: ThemeData( + brightness: Brightness.dark, + colorScheme: ColorScheme.fromSeed(seedColor: Colors.white), + useMaterial3: true, + ), + home: const MemeGeneratorScreen(), + ); + } +} diff --git a/.history/meme_generator/lib/main_20240220180217.dart b/.history/meme_generator/lib/main_20240220180217.dart new file mode 100644 index 0000000..59ada30 --- /dev/null +++ b/.history/meme_generator/lib/main_20240220180217.dart @@ -0,0 +1,27 @@ +import 'package:flutter/material.dart'; +import 'package:meme_generator/screen/meme_generator_screen.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(const MyApp()); +} + +/// App,s main widget. +class MyApp extends StatelessWidget { + /// Constructor for [MyApp]. + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + theme: ThemeData( + brightness: Brightness.dark, + colorScheme: ColorScheme.fromSeed(seedColor: Colors.black), + useMaterial3: true, + ), + home: const MemeGeneratorScreen(), + ); + } +} diff --git a/.history/meme_generator/lib/main_20240220180226.dart b/.history/meme_generator/lib/main_20240220180226.dart new file mode 100644 index 0000000..003ecef --- /dev/null +++ b/.history/meme_generator/lib/main_20240220180226.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; +import 'package:meme_generator/screen/meme_generator_screen.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(const MyApp()); +} + +/// App,s main widget. +class MyApp extends StatelessWidget { + /// Constructor for [MyApp]. + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.black), + useMaterial3: true, + ), + home: const MemeGeneratorScreen(), + ); + } +} diff --git a/.history/meme_generator/lib/main_20240220180239.dart b/.history/meme_generator/lib/main_20240220180239.dart new file mode 100644 index 0000000..f13be5f --- /dev/null +++ b/.history/meme_generator/lib/main_20240220180239.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; +import 'package:meme_generator/screen/meme_generator_screen.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(const MyApp()); +} + +/// App,s main widget. +class MyApp extends StatelessWidget { + /// Constructor for [MyApp]. + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.black, brightness: Brightness.dark), + useMaterial3: true, + ), + home: const MemeGeneratorScreen(), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220105946.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220105946.dart new file mode 100644 index 0000000..07f535c --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220105946.dart @@ -0,0 +1,61 @@ +import 'package:flutter/material.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220112840.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220112840.dart new file mode 100644 index 0000000..8179b3c --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220112840.dart @@ -0,0 +1,61 @@ +import 'package:flutter/material.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + backgroundColor: const Color.fromARGB(255, 180, 165, 165), + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220112957.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220112957.dart new file mode 100644 index 0000000..07f535c --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220112957.dart @@ -0,0 +1,61 @@ +import 'package:flutter/material.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220114048.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114048.dart new file mode 100644 index 0000000..7003b5c --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114048.dart @@ -0,0 +1,66 @@ +import 'package:flutter/material.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + appBar: AppBar( + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220114106.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114106.dart new file mode 100644 index 0000000..4a1d86b --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114106.dart @@ -0,0 +1,67 @@ +import 'package:flutter/material.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + appBar: AppBar(title:Text( + 'Здесь мог бы быть ваш мем', + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220114111.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114111.dart new file mode 100644 index 0000000..a751133 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114111.dart @@ -0,0 +1,67 @@ +import 'package:flutter/material.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + appBar: AppBar( + title: Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220114136.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114136.dart new file mode 100644 index 0000000..ca366ef --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114136.dart @@ -0,0 +1,67 @@ +import 'package:flutter/material.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + appBar: AppBar( + title: Text('Здесь мог бы быть ваш мем'), extendBodyBehindAppBar: true, + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220114140.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114140.dart new file mode 100644 index 0000000..6ae3240 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114140.dart @@ -0,0 +1,68 @@ +import 'package:flutter/material.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + extendBodyBehindAppBar: true, + appBar: AppBar( + title: Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220114154.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114154.dart new file mode 100644 index 0000000..5f69b0b --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114154.dart @@ -0,0 +1,68 @@ +import 'package:flutter/material.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + extendBodyBehindAppBar: f, + appBar: AppBar( + title: Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220114155.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114155.dart new file mode 100644 index 0000000..b671977 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114155.dart @@ -0,0 +1,68 @@ +import 'package:flutter/material.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + extendBodyBehindAppBar: false, + appBar: AppBar( + title: Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220114545.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114545.dart new file mode 100644 index 0000000..059100b --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220114545.dart @@ -0,0 +1,68 @@ +import 'package:flutter/material.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220115535.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220115535.dart new file mode 100644 index 0000000..0029e2f --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220115535.dart @@ -0,0 +1,71 @@ +import 'package:flutter/material.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: NavBarWidget(), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220115538.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220115538.dart new file mode 100644 index 0000000..aec3c2c --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220115538.dart @@ -0,0 +1,71 @@ +import 'package:flutter/material.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const NavBarWidget(), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220123604.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220123604.dart new file mode 100644 index 0000000..82bb4dd --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220123604.dart @@ -0,0 +1,119 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const NavBarWidget(), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + _paste() { + final value = Clipboard.getData('text/plain'); + } + + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220124526.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220124526.dart new file mode 100644 index 0000000..e44f194 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220124526.dart @@ -0,0 +1,125 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatelessWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const NavBarWidget(), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? ''; + }); + } + } + + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220124809.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220124809.dart new file mode 100644 index 0000000..cf722a4 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220124809.dart @@ -0,0 +1,113 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? ''; + }); + } + } + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + );, + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + '$controller', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + \ No newline at end of file diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220124812.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220124812.dart new file mode 100644 index 0000000..ad33c41 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220124812.dart @@ -0,0 +1,114 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + '$controller', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220125138.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125138.dart new file mode 100644 index 0000000..a53c4e5 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125138.dart @@ -0,0 +1,115 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + '$controller', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220125547.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125547.dart new file mode 100644 index 0000000..389dab1 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125547.dart @@ -0,0 +1,115 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + '${runtimeType.text}', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220125557.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125557.dart new file mode 100644 index 0000000..da7f202 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125557.dart @@ -0,0 +1,115 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220125613.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125613.dart new file mode 100644 index 0000000..3bddd81 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125613.dart @@ -0,0 +1,115 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }) + } + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220125624.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125624.dart new file mode 100644 index 0000000..a4a8ec1 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125624.dart @@ -0,0 +1,110 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + void buttonPressed() { + + } + } + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220125634.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125634.dart new file mode 100644 index 0000000..bae3f1b --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125634.dart @@ -0,0 +1,106 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + // onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220125643.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125643.dart new file mode 100644 index 0000000..dc3c75d --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125643.dart @@ -0,0 +1,106 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220125920.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125920.dart new file mode 100644 index 0000000..2261122 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220125920.dart @@ -0,0 +1,106 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + 'http://${controller.text}', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220130027.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220130027.dart new file mode 100644 index 0000000..dc3c75d --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220130027.dart @@ -0,0 +1,106 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220131233.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220131233.dart new file mode 100644 index 0000000..50245a3 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220131233.dart @@ -0,0 +1,106 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + Text( + controller.text, + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220131240.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220131240.dart new file mode 100644 index 0000000..ceee7dd --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220131240.dart @@ -0,0 +1,106 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + Text( + controller.text, + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 12, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220131249.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220131249.dart new file mode 100644 index 0000000..dc3c75d --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220131249.dart @@ -0,0 +1,106 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220131448.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220131448.dart new file mode 100644 index 0000000..3866276 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220131448.dart @@ -0,0 +1,107 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData( + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220131503.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220131503.dart new file mode 100644 index 0000000..1d0cb24 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220131503.dart @@ -0,0 +1,105 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220132143.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220132143.dart new file mode 100644 index 0000000..8098d5f --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220132143.dart @@ -0,0 +1,105 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? Image.asset('assets/rhino'); + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220132224.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220132224.dart new file mode 100644 index 0000000..ddc3aa4 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220132224.dart @@ -0,0 +1,106 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220132354.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220132354.dart new file mode 100644 index 0000000..9c0a3c4 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220132354.dart @@ -0,0 +1,107 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg', + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220132453.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220132453.dart new file mode 100644 index 0000000..ddc3aa4 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220132453.dart @@ -0,0 +1,106 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220132826.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220132826.dart new file mode 100644 index 0000000..974a525 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220132826.dart @@ -0,0 +1,107 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + style: ButtonStyle(label: ''), + onPressed: _paste, + child: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220133014.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133014.dart new file mode 100644 index 0000000..9e9162c --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133014.dart @@ -0,0 +1,107 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton.(label:'Add_photo by link', + style: ButtonStyle( ), + onPressed: _paste, + icon: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220133047.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133047.dart new file mode 100644 index 0000000..8d38011 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133047.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton.icon( + label: const Text('Add_photo by link'), + style: ButtonStyle(), + onPressed: _paste, + icon: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220133105.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133105.dart new file mode 100644 index 0000000..284c9b2 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133105.dart @@ -0,0 +1,111 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton.icon( + label: const Text( + 'Add_photo by link', + style: TextStyle(color: Colors.white), + ), + style: ButtonStyle(), + onPressed: _paste, + icon: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220133239.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133239.dart new file mode 100644 index 0000000..ab69f6a --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133239.dart @@ -0,0 +1,111 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton.icon( + label: const Text( + 'Add_photo by link', + style: TextStyle(color: Colors.white), + ), + style: const ButtonStyle(), + onPressed: _paste, + icon: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220133243.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133243.dart new file mode 100644 index 0000000..d5cf064 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133243.dart @@ -0,0 +1,110 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton.icon( + label: const Text( + 'Add_photo by link', + style: TextStyle(color: Colors.white), + ), + onPressed: _paste, + icon: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220133303.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133303.dart new file mode 100644 index 0000000..bb53fad --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133303.dart @@ -0,0 +1,111 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton.icon( + label: const Text( + 'Add_photo by link', + style: TextStyle(color: Colors.white), + ), + style: const ButtonStyle(backgroundColor: Colors.black), + onPressed: _paste, + icon: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220133308.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133308.dart new file mode 100644 index 0000000..72aabee --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133308.dart @@ -0,0 +1,111 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton.icon( + label: const Text( + 'Add_photo by link', + style: TextStyle(color: Colors.white), + ), + style: ButtonStyle(backgroundColor: Colors.black), + onPressed: _paste, + icon: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220133437.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133437.dart new file mode 100644 index 0000000..3ec17f5 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133437.dart @@ -0,0 +1,110 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton.icon( + label: Text( + 'Add_photo by link', + style: TextStyle(color: Colors.white), + ), + onPressed: _paste, + icon: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220133444.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133444.dart new file mode 100644 index 0000000..c366ed0 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133444.dart @@ -0,0 +1,110 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + bool isButtonPressed = false; + + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton.icon( + label: Text( + 'Add_photo by link', + style: TextStyle(color: Colors.black), + ), + onPressed: _paste, + icon: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220133601.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133601.dart new file mode 100644 index 0000000..2d2e0a0 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220133601.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _paste() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton.icon( + label: Text( + 'Add_photo by link', + style: TextStyle(color: Colors.black), + ), + onPressed: _paste, + icon: const Icon(Icons.add_a_photo_sharp), + ), + // ElevatedButton( + // // onPressed: buttonPressed, + // child: const Icon(Icons.text_fields), + // ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220134028.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134028.dart new file mode 100644 index 0000000..33b0216 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134028.dart @@ -0,0 +1,133 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton.icon( + label: Text( + 'Add_photo by link', + style: TextStyle(color: Colors.black), + ), + onPressed: _pastePhotoFromInternet, + icon: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: showAlertDialog(BuildContext context) { + + // set up the button + Widget okButton = TextButton( + child: Text("OK"), + onPressed: () { }, + ); + + // set up the AlertDialog + AlertDialog alert = AlertDialog( + title: Text("My title"), + content: Text("This is my message."), + actions: [ + okButton, + ], + ); + + // show the dialog + showDialog( + context: context, + builder: (BuildContext context) { + return alert; + }, + ); +}, + child: const Icon(Icons.text_fields), + ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220134119.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134119.dart new file mode 100644 index 0000000..f2d54e1 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134119.dart @@ -0,0 +1,115 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton.icon( + label: Text( + 'Add_photo by link', + style: TextStyle(color: Colors.black), + ), + onPressed: _pastePhotoFromInternet, + icon: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: showAlertDialog(BuildContext context) { + + // set up the button + Widget okButton = TextButton( + child: Text("OK"), + onPressed: () { }, + )}, + child: const Icon(Icons.text_fields), + ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220134248.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134248.dart new file mode 100644 index 0000000..4d86da3 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134248.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton.icon( + label: Text( + 'Add_photo by link', + style: TextStyle(color: Colors.black), + ), + onPressed: _pastePhotoFromInternet, + icon: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: AlertDialog(), + child: const Icon(Icons.text_fields), + ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: const Color.fromARGB(0, 212, 192, 192), + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220134250.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134250.dart new file mode 100644 index 0000000..4d86da3 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134250.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton.icon( + label: Text( + 'Add_photo by link', + style: TextStyle(color: Colors.black), + ), + onPressed: _pastePhotoFromInternet, + icon: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: AlertDialog(), + child: const Icon(Icons.text_fields), + ) + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: const Color.fromARGB(0, 212, 192, 192), + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220134444.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134444.dart new file mode 100644 index 0000000..bad5650 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134444.dart @@ -0,0 +1,107 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: GestureDetector( + onTap: _pastePhotoFromInternet, + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220134642.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134642.dart new file mode 100644 index 0000000..72a86f0 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134642.dart @@ -0,0 +1,109 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: child: Gest( +( + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220134723.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134723.dart new file mode 100644 index 0000000..63db881 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134723.dart @@ -0,0 +1,107 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: GestureDetector( + onTap: _pastePhotoFromInternet, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220134841.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134841.dart new file mode 100644 index 0000000..25b2c32 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134841.dart @@ -0,0 +1,107 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: GestureDetector( + onDoubleTap: _pastePhotoFromInternet, + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220134909.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134909.dart new file mode 100644 index 0000000..c634d15 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134909.dart @@ -0,0 +1,104 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220134958.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134958.dart new file mode 100644 index 0000000..0de08ab --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220134958.dart @@ -0,0 +1,107 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + const Text( + 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220135920.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220135920.dart new file mode 100644 index 0000000..2b83a59 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220135920.dart @@ -0,0 +1,111 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + decoration: InputDecoration(border: InputBorder.none, hintText: 'Здесь мог бы быть ваш мем'), + // 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220135952.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220135952.dart new file mode 100644 index 0000000..ae82a56 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220135952.dart @@ -0,0 +1,111 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + decoration: InputDecoration(border: InputBorder.none, hintText: 'Здесь мог бы быть ваш мем',hintStyle: TextStyle(color: Colors.white), + // 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140007.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140007.dart new file mode 100644 index 0000000..d4ad1c2 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140007.dart @@ -0,0 +1,111 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + decoration: InputDecoration(border: InputBorder.none, hintText: 'Здесь мог бы быть ваш мем',hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact',), + // 'Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + + fontSize: 40, + color: Colors.white, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140019.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140019.dart new file mode 100644 index 0000000..277580e --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140019.dart @@ -0,0 +1,111 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + decoration: InputDecoration(border: InputBorder.none, hintText: 'Здесь мог бы быть ваш мем',hintStyle: TextStyle(textAlign: TextAlign.center,color: Colors.white, fontFamily: 'Impact',), + // 'Здесь мог бы быть ваш мем', + + style: TextStyle( + + fontSize: 40, + color: Colors.white, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140047.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140047.dart new file mode 100644 index 0000000..797645c --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140047.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь мог бы быть ваш мем', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact'), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140101.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140101.dart new file mode 100644 index 0000000..c8173de --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140101.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь мог бы быть ваш мем', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact'fontWeight: 40), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140107.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140107.dart new file mode 100644 index 0000000..cf42441 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140107.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь мог бы быть ваш мем', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact'fontSize: 40), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140110.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140110.dart new file mode 100644 index 0000000..0ec0f57 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140110.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь мог бы быть ваш мем', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 40), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140122.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140122.dart new file mode 100644 index 0000000..abbdd6f --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140122.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь мог бы быть ваш мем', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 30), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140132.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140132.dart new file mode 100644 index 0000000..7572cd2 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140132.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь мог бы быть ваш мем', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 20), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140151.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140151.dart new file mode 100644 index 0000000..90c12a5 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140151.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь мог бы быть ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 20), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140204.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140204.dart new file mode 100644 index 0000000..1751d77 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140204.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 20), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140210.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140210.dart new file mode 100644 index 0000000..b62b10e --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140210.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140318.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140318.dart new file mode 100644 index 0000000..6a6e791 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140318.dart @@ -0,0 +1,109 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + textAlign: TextAlign.center, + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140423.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140423.dart new file mode 100644 index 0000000..26d3c1d --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140423.dart @@ -0,0 +1,116 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + textAlign: TextAlign.center, + + style: TextStyle( + fontFamily: 'Impact', + fontSize: 40, + color: Colors.white, + ), + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140507.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140507.dart new file mode 100644 index 0000000..0d1aac0 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140507.dart @@ -0,0 +1,110 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + textAlign: TextAlign.center, + style: TextStyle(color: Colors.white), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140544.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140544.dart new file mode 100644 index 0000000..7bf45a0 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140544.dart @@ -0,0 +1,114 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220140632.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140632.dart new file mode 100644 index 0000000..780c6c9 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220140632.dart @@ -0,0 +1,115 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220141557.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220141557.dart new file mode 100644 index 0000000..780c6c9 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220141557.dart @@ -0,0 +1,115 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220142541.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220142541.dart new file mode 100644 index 0000000..8a82551 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220142541.dart @@ -0,0 +1,113 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const Text('Здесь будет ваш комментарий',textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: , + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220142549.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220142549.dart new file mode 100644 index 0000000..64b7afc --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220142549.dart @@ -0,0 +1,111 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220143525.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220143525.dart new file mode 100644 index 0000000..ab6d5d3 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220143525.dart @@ -0,0 +1,113 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _show \ No newline at end of file diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220143648.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220143648.dart new file mode 100644 index 0000000..a2dcb20 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220143648.dart @@ -0,0 +1,118 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {}, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(BuildContext context){ + showDialog(context: context, builder: (BuilderContext context) { + return MemTextDialog(); + })) +} \ No newline at end of file diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220143754.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220143754.dart new file mode 100644 index 0000000..93bb327 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220143754.dart @@ -0,0 +1,120 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () {_showMemTextDialog()}, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) { + return MemTextDialog(); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220144034.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144034.dart new file mode 100644 index 0000000..16b8afa --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144034.dart @@ -0,0 +1,121 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) { + return MemTextDialog(); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220144231.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144231.dart new file mode 100644 index 0000000..f5e3494 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144231.dart @@ -0,0 +1,121 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(context); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) { + return MemTextDialog(); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220144254.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144254.dart new file mode 100644 index 0000000..ea3aa3e --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144254.dart @@ -0,0 +1,121 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(BuildContext context); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) { + return MemTextDialog(); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220144257.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144257.dart new file mode 100644 index 0000000..f5e3494 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144257.dart @@ -0,0 +1,121 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(context); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) { + return MemTextDialog(); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220144422.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144422.dart new file mode 100644 index 0000000..ea3aa3e --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144422.dart @@ -0,0 +1,121 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(BuildContext context); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) { + return MemTextDialog(); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220144434.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144434.dart new file mode 100644 index 0000000..f5e3494 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144434.dart @@ -0,0 +1,121 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(context); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) { + return MemTextDialog(); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220144438.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144438.dart new file mode 100644 index 0000000..b036ca1 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144438.dart @@ -0,0 +1,121 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(context); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(context) { + showDialog( + context: context, + builder: (BuildContext context) { + return MemTextDialog(); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220144809.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144809.dart new file mode 100644 index 0000000..00d276d --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144809.dart @@ -0,0 +1,121 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.asset( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(context); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(context) { + showDialog( + context: context, + builder: (BuildContext context) { + return MemTextDialog(); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220144907.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144907.dart new file mode 100644 index 0000000..2b2c550 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220144907.dart @@ -0,0 +1,122 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: + Image.asset(controller.text, fit: BoxFit.cover,))).toList(), + + + + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(context); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(context) { + showDialog( + context: context, + builder: (BuildContext context) { + return MemTextDialog(); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220145047.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220145047.dart new file mode 100644 index 0000000..9376880 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220145047.dart @@ -0,0 +1,121 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData(''); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(context); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(context) { + showDialog( + context: context, + builder: (BuildContext context) { + return MemTextDialog(); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220145157.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220145157.dart new file mode 100644 index 0000000..b036ca1 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220145157.dart @@ -0,0 +1,121 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController controller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + controller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + controller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(context); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(context) { + showDialog( + context: context, + builder: (BuildContext context) { + return MemTextDialog(); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220150849.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220150849.dart new file mode 100644 index 0000000..9396402 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220150849.dart @@ -0,0 +1,121 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController imageUrlCcontroller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlCcontroller.text = value.text ?? + 's2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlCcontroller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(context); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(context) { + showDialog( + context: context, + builder: (BuildContext context) { + return MemTextDialog(); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220151043.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220151043.dart new file mode 100644 index 0000000..aa112ea --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220151043.dart @@ -0,0 +1,121 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController imageUrlCcontroller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlCcontroller.text = value.text ?? + 's2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlCcontroller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(context); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(context) { + showDialog( + context: context, + builder: (BuildContext context) { + return const MemTextDialog(); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220151533.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220151533.dart new file mode 100644 index 0000000..84f6adf --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220151533.dart @@ -0,0 +1,124 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final memTextController = TextEditingController(); + final imageUrlCcontroller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlCcontroller.text = value.text ?? + 's2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlCcontroller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(context); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(context) { + showDialog( + context: context, + builder: (BuildContext context) { + return MemTextDialog( + memTextController: memTextController, + ); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220151608.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220151608.dart new file mode 100644 index 0000000..deac315 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220151608.dart @@ -0,0 +1,124 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController imageUrlCcontroller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlCcontroller.text = value.text ?? + 's2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlCcontroller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(context); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(context) { + showDialog( + context: context, + builder: (BuildContext context) { + final TextEditingController memTextController = TextEditingController(); + return MemTextDialog( + memTextController: memTextController, + ); + }); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220151949.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220151949.dart new file mode 100644 index 0000000..213a831 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220151949.dart @@ -0,0 +1,151 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController imageUrlCcontroller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlCcontroller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlCcontroller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + _showMemTextDialog(context,); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +void _showMemTextDialog(context) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Добавить")) + ], + ); + },); +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220152043.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220152043.dart new file mode 100644 index 0000000..98ae1af --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220152043.dart @@ -0,0 +1,150 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + final TextEditingController textEditingController = TextEditingController(); + final TextEditingController imageUrlCcontroller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlCcontroller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlCcontroller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Добавить")) + ], + ); + }, + ); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220152134.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220152134.dart new file mode 100644 index 0000000..2d20b2f --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220152134.dart @@ -0,0 +1,150 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late final TextEditingController textEditingController = TextEditingController(); + late final TextEditingController imageUrlCcontroller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlCcontroller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlCcontroller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Добавить")) + ], + ); + }, + ); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220152215.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220152215.dart new file mode 100644 index 0000000..f3f0dbd --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220152215.dart @@ -0,0 +1,155 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late final TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + } + + late final TextEditingController imageUrlCcontroller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlCcontroller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlCcontroller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Добавить")) + ], + ); + }, + ); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220152311.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220152311.dart new file mode 100644 index 0000000..fe5a272 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220152311.dart @@ -0,0 +1,162 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlCcontroller = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlCcontroller.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlCcontroller.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Добавить")) + ], + ); + }, + ); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220152528.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220152528.dart new file mode 100644 index 0000000..eefbe5a --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220152528.dart @@ -0,0 +1,157 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: const Text( + 'Здесь будет ваш комментарий', textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220152640.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220152640.dart new file mode 100644 index 0000000..42787ba --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220152640.dart @@ -0,0 +1,157 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220152646.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220152646.dart new file mode 100644 index 0000000..3705717 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220152646.dart @@ -0,0 +1,157 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220153057.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220153057.dart new file mode 100644 index 0000000..68d80dd --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220153057.dart @@ -0,0 +1,158 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220154602.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220154602.dart new file mode 100644 index 0000000..4554438 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220154602.dart @@ -0,0 +1,155 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? + 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network(imageUrlController.text + headers: {}, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Добавьте комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220154724.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220154724.dart new file mode 100644 index 0000000..ec9853b --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220154724.dart @@ -0,0 +1,160 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? + // 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg' + ; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: + Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220154745.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220154745.dart new file mode 100644 index 0000000..bd14ece --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220154745.dart @@ -0,0 +1,159 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../widgets/dialog/mem_text_dialog.dart'; +import '../widgets/navbar_widget.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? '' + // 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg' + ; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220155218.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155218.dart new file mode 100644 index 0000000..93c18a9 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155218.dart @@ -0,0 +1,156 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? '' + // 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg' + ; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220155704.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155704.dart new file mode 100644 index 0000000..93c18a9 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155704.dart @@ -0,0 +1,156 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? '' + // 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg' + ; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('Здесь мог бы быть ваш мем'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220155735.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155735.dart new file mode 100644 index 0000000..0047ce2 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155735.dart @@ -0,0 +1,156 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? '' + // 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg' + ; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('surf-flutter-study-jam-5'), + backgroundColor: Colors.transparent, + elevation: 0, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220155742.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155742.dart new file mode 100644 index 0000000..5efb083 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155742.dart @@ -0,0 +1,156 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? '' + // 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg' + ; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('surf-flutter-study-jam-5'), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220155748.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155748.dart new file mode 100644 index 0000000..f6c37fb --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155748.dart @@ -0,0 +1,156 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? '' + // 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg' + ; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text('surf-flutter-study-jam-5'), + + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220155844.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155844.dart new file mode 100644 index 0000000..5965601 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155844.dart @@ -0,0 +1,159 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? '' + // 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg' + ; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStile(color: Colors.white), + ), + + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220155853.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155853.dart new file mode 100644 index 0000000..110f752 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155853.dart @@ -0,0 +1,159 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? '' + // 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg' + ; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220155910.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155910.dart new file mode 100644 index 0000000..fd003e0 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220155910.dart @@ -0,0 +1,159 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? '' + // 'https://s2.best-wallpaper.net/wallpaper/2560x1600/2104/Rhino-head-horn-eye-black-background_2560x1600.jpg' + ; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220164909.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220164909.dart new file mode 100644 index 0000000..25439d8 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220164909.dart @@ -0,0 +1,157 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220165033.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165033.dart new file mode 100644 index 0000000..a202583 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165033.dart @@ -0,0 +1,157 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: textEditingController.text!=''? Text(' 'Здесь мог бы быть ваш мем','):Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220165040.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165040.dart new file mode 100644 index 0000000..d76277a --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165040.dart @@ -0,0 +1,159 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: textEditingController.text != '' + ? Text(' Здесь мог бы быть ваш мем') + : Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220165049.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165049.dart new file mode 100644 index 0000000..76a5cc3 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165049.dart @@ -0,0 +1,159 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? Text(' Здесь мог бы быть ваш мем') + : Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220165052.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165052.dart new file mode 100644 index 0000000..bf5ede3 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165052.dart @@ -0,0 +1,159 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем') + : Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220165117.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165117.dart new file mode 100644 index 0000000..33aaab0 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165117.dart @@ -0,0 +1,163 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем',textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), : Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220165122.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165122.dart new file mode 100644 index 0000000..a8586d6 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165122.dart @@ -0,0 +1,163 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем',textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ) : Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220165128.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165128.dart new file mode 100644 index 0000000..c613971 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165128.dart @@ -0,0 +1,163 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем',textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ) : Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220165142.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165142.dart new file mode 100644 index 0000000..9defea2 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165142.dart @@ -0,0 +1,165 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + late final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220165802.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165802.dart new file mode 100644 index 0000000..b33ec05 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165802.dart @@ -0,0 +1,165 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220165934.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165934.dart new file mode 100644 index 0000000..b33ec05 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165934.dart @@ -0,0 +1,165 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить")), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220165937.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165937.dart new file mode 100644 index 0000000..ab5b414 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165937.dart @@ -0,0 +1,166 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220165943.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165943.dart new file mode 100644 index 0000000..ab5b414 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165943.dart @@ -0,0 +1,166 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + // 'Здесь мог бы быть ваш мем', + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220165947.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165947.dart new file mode 100644 index 0000000..d794050 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220165947.dart @@ -0,0 +1,166 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + void _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220170626.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220170626.dart new file mode 100644 index 0000000..c8d5bfc --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220170626.dart @@ -0,0 +1,166 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220174821.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220174821.dart new file mode 100644 index 0000000..c8d5bfc --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220174821.dart @@ -0,0 +1,166 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220180455.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220180455.dart new file mode 100644 index 0000000..da4c5d2 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220180455.dart @@ -0,0 +1,167 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = value.text ?? ''; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + appBar: AppBar( + title: const Text( + 'surf-flutter-study-jam-5', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.transparent, + elevation: 1, + // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220180708.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220180708.dart new file mode 100644 index 0000000..b2c8100 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220180708.dart @@ -0,0 +1,168 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final value = await Clipboard.getData('text/plain'); + if (value != null) { + setState(() { + imageUrlController.text = + value.text ?? 'https://cdn2.iconfinder.com/data/icons/picol-vector/32/image_add-1024.png'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + // appBar: AppBar( + // title: const Text( + // 'surf-flutter-study-jam-5', + // style: TextStyle(color: Colors.white), + // ), + // backgroundColor: Colors.transparent, + // elevation: 1, + // // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + // ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220181135.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220181135.dart new file mode 100644 index 0000000..8a88d98 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220181135.dart @@ -0,0 +1,168 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final value = await Clipboard.getData(Clipboard.kTextPlain); + if (value != null) { + setState(() { + imageUrlController.text = + value.text ?? 'https://cdn2.iconfinder.com/data/icons/picol-vector/32/image_add-1024.png'; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + // appBar: AppBar( + // title: const Text( + // 'surf-flutter-study-jam-5', + // style: TextStyle(color: Colors.white), + // ), + // backgroundColor: Colors.transparent, + // elevation: 1, + // // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + // ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220181319.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220181319.dart new file mode 100644 index 0000000..bac2b58 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220181319.dart @@ -0,0 +1,167 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + // appBar: AppBar( + // title: const Text( + // 'surf-flutter-study-jam-5', + // style: TextStyle(color: Colors.white), + // ), + // backgroundColor: Colors.transparent, + // elevation: 1, + // // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + // ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220181403.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220181403.dart new file mode 100644 index 0000000..85e3bf6 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220181403.dart @@ -0,0 +1,167 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + // appBar: AppBar( + // title: const Text( + // 'surf-flutter-study-jam-5', + // style: TextStyle(color: Colors.white), + // ), + // backgroundColor: Colors.transparent, + // elevation: 1, + // // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + // ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220181444.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220181444.dart new file mode 100644 index 0000000..85e3bf6 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220181444.dart @@ -0,0 +1,167 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + // appBar: AppBar( + // title: const Text( + // 'surf-flutter-study-jam-5', + // style: TextStyle(color: Colors.white), + // ), + // backgroundColor: Colors.transparent, + // elevation: 1, + // // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + // ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220181452.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220181452.dart new file mode 100644 index 0000000..cf19282 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220181452.dart @@ -0,0 +1,167 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + // appBar: AppBar( + // title: const Text( + // 'surf-flutter-study-jam-5', + // style: TextStyle(color: Colors.white), + // ), + // backgroundColor: Colors.transparent, + // elevation: 1, + // // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + // ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Здесь мог бы быть ваш мем', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220182217.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220182217.dart new file mode 100644 index 0000000..d538bde --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220182217.dart @@ -0,0 +1,167 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + // appBar: AppBar( + // title: const Text( + // 'surf-flutter-study-jam-5', + // style: TextStyle(color: Colors.white), + // ), + // backgroundColor: Colors.transparent, + // elevation: 1, + // // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + // ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...Еее', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220182645.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220182645.dart new file mode 100644 index 0000000..c84c7d9 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220182645.dart @@ -0,0 +1,166 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + // appBar: AppBar( + // title: const Text( + // 'surf-flutter-study-jam-5', + // style: TextStyle(color: Colors.white), + // ), + // backgroundColor: Colors.transparent, + // elevation: 1, + // // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + // ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220182703.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220182703.dart new file mode 100644 index 0000000..6388a0a --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220182703.dart @@ -0,0 +1,166 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + // appBar: AppBar( + // title: const Text( + // 'surf-flutter-study-jam-5', + // style: TextStyle(color: Colors.white), + // ), + // backgroundColor: Colors.transparent, + // elevation: 1, + // // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + // ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16б), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220182705.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220182705.dart new file mode 100644 index 0000000..ecb43c4 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220182705.dart @@ -0,0 +1,170 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + // ElevatedButton.icon( + // label: Text( + // 'Add_photo by link', + // style: TextStyle(color: Colors.black), + // ), + // onPressed: _pastePhotoFromInternet, + // icon: const Icon(Icons.add_a_photo_sharp), + // ), + ], + ), + ), + extendBodyBehindAppBar: false, + // appBar: AppBar( + // title: const Text( + // 'surf-flutter-study-jam-5', + // style: TextStyle(color: Colors.white), + // ), + // backgroundColor: Colors.transparent, + // elevation: 1, + // // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + // ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220183811.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220183811.dart new file mode 100644 index 0000000..7f373e9 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220183811.dart @@ -0,0 +1,161 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [], + ), + ), + extendBodyBehindAppBar: false, + // appBar: AppBar( + // title: const Text( + // 'surf-flutter-study-jam-5', + // style: TextStyle(color: Colors.white), + // ), + // backgroundColor: Colors.transparent, + // elevation: 1, + // // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + // ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220183816.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220183816.dart new file mode 100644 index 0000000..24af39c --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220183816.dart @@ -0,0 +1,158 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: + ), + ), + extendBodyBehindAppBar: false, + // appBar: AppBar( + // title: const Text( + // 'surf-flutter-study-jam-5', + // style: TextStyle(color: Colors.white), + // ), + // backgroundColor: Colors.transparent, + // elevation: 1, + // // systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light), + // ), + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220183832.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220183832.dart new file mode 100644 index 0000000..62f17e4 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220183832.dart @@ -0,0 +1,152 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [], + ), + ), + extendBodyBehindAppBar: false, + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220184732.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220184732.dart new file mode 100644 index 0000000..05f14c0 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220184732.dart @@ -0,0 +1,163 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [], + ), + ), + extendBodyBehindAppBar: false, + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: + _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: FutureBuilder( + future: imageUrlController., + builder: (context, snapshot) { + if (snapshot.hasData) { + return Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ); + } else { + return const CircularProgressIndicator(); + } + }, + ), + + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220184942.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220184942.dart new file mode 100644 index 0000000..aa32e10 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220184942.dart @@ -0,0 +1,161 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [], + ), + ), + extendBodyBehindAppBar: false, + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: FutureBuilder( + future: _pastePhotoFromInternet(), + builder: (context, snapshot) { + if (snapshot.hasData) { + return Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ); + } else { + return const CircularProgressIndicator(); + } + }, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220185108.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220185108.dart new file mode 100644 index 0000000..7a9fb64 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220185108.dart @@ -0,0 +1,162 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + return imageUrlController.text; + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [], + ), + ), + extendBodyBehindAppBar: false, + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: FutureBuilder( + future: _pastePhotoFromInternet(), + builder: (context, snapshot) { + if (snapshot.hasData) { + return Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ); + } else { + return const CircularProgressIndicator(); + } + }, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220185146.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220185146.dart new file mode 100644 index 0000000..5d30b05 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220185146.dart @@ -0,0 +1,162 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + return imageUrlController.text; + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [], + ), + ), + extendBodyBehindAppBar: false, + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: FutureBuilder( + future: _pastePhotoFromInternet(), + builder: (context, snapshot) { + if (snapshot.hasData) { + return Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ); + } else { + return const CircularProgressIndicator(); + } + }, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Добавить текст', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220192511.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220192511.dart new file mode 100644 index 0000000..4818474 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220192511.dart @@ -0,0 +1,158 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + return imageUrlController.text; + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: + ), + extendBodyBehindAppBar: false, + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: FutureBuilder( + future: _pastePhotoFromInternet(), + builder: (context, snapshot) { + if (snapshot.hasData) { + return Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ); + } else { + return const CircularProgressIndicator(); + } + }, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Добавить текст', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220192520.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220192520.dart new file mode 100644 index 0000000..5d30b05 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220192520.dart @@ -0,0 +1,162 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + return imageUrlController.text; + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [], + ), + ), + extendBodyBehindAppBar: false, + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: FutureBuilder( + future: _pastePhotoFromInternet(), + builder: (context, snapshot) { + if (snapshot.hasData) { + return Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ); + } else { + return const CircularProgressIndicator(); + } + }, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Добавить текст', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220192626.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220192626.dart new file mode 100644 index 0000000..cdec7e2 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220192626.dart @@ -0,0 +1,157 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + return imageUrlController.text; + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [], + ), + ), + extendBodyBehindAppBar: false, + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: + Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ) + + + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Добавить текст', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220192628.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220192628.dart new file mode 100644 index 0000000..cdec7e2 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220192628.dart @@ -0,0 +1,157 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + return imageUrlController.text; + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [], + ), + ), + extendBodyBehindAppBar: false, + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: + Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ) + + + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Добавить текст', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220192706.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220192706.dart new file mode 100644 index 0000000..bdee849 --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220192706.dart @@ -0,0 +1,153 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + return imageUrlController.text; + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [], + ), + ), + extendBodyBehindAppBar: false, + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Добавить текст', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text(' Оставь свой след в истории...', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/screen/meme_generator_screen_20240220192800.dart b/.history/meme_generator/lib/screen/meme_generator_screen_20240220192800.dart new file mode 100644 index 0000000..a49cf5d --- /dev/null +++ b/.history/meme_generator/lib/screen/meme_generator_screen_20240220192800.dart @@ -0,0 +1,153 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class MemeGeneratorScreen extends StatefulWidget { + const MemeGeneratorScreen({Key? key}) : super(key: key); + + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + return imageUrlController.text; + } + + @override + Widget build(BuildContext context) { + final decoration = BoxDecoration( + border: Border.all( + color: Colors.white, + width: 2, + ), + ); + return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [], + ), + ), + extendBodyBehindAppBar: false, + backgroundColor: Colors.black, + body: Center( + child: ColoredBox( + color: Colors.black, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 50, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: double.infinity, + height: 200, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Добавить текст', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text('Добавить текст', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/button_widget_20240220114353.dart b/.history/meme_generator/lib/widgets/button_widget_20240220114353.dart new file mode 100644 index 0000000..e69de29 diff --git a/.history/meme_generator/lib/widgets/button_widget_20240220114543.dart b/.history/meme_generator/lib/widgets/button_widget_20240220114543.dart new file mode 100644 index 0000000..854f314 --- /dev/null +++ b/.history/meme_generator/lib/widgets/button_widget_20240220114543.dart @@ -0,0 +1,10 @@ +import 'package:flutter/material.dart'; + +class ButtonWidget extends StatelessWidget { + const ButtonWidget({super.key}); + + @override + Widget build(BuildContext context) { + return Container(); + } +} diff --git a/.history/meme_generator/lib/widgets/button_widget_20240220114750.dart b/.history/meme_generator/lib/widgets/button_widget_20240220114750.dart new file mode 100644 index 0000000..08ee18d --- /dev/null +++ b/.history/meme_generator/lib/widgets/button_widget_20240220114750.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; + +class ButtonWidget extends StatelessWidget { + final Function()? onTap; + final bool isButtonPressed; + const ButtonWidget({super.key, this.onTap, required this.isButtonPressed}); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey[300], + body: Center( + child: GestureDetector( + onTap: onTap, + child: AnimatedContainer( + height: 160, + width: 160, + decoration: BoxDecoration( + border: Border.all(color: isButtonPressed ? Colors.grey.shade200 : Colors.grey.shade300), + color: Colors.grey[300], + borderRadius: BorderRadius.circular(12), + boxShadow: isButtonPressed + ? [ + //no shadows if button is pressed + ] + : [ + BoxShadow( + color: Colors.grey.shade500, + blurRadius: 15, + offset: const Offset(6, 6), + spreadRadius: 1, + ), + const BoxShadow( + color: Colors.white, + blurRadius: 15, + offset: Offset(-6, -6), + spreadRadius: 1, + ), + ], + ), + duration: const Duration(milliseconds: 500), + child: Icon( + Icons.favorite, + size: 60, + color: isButtonPressed ? Colors.red[200] : Colors.red[400], + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/button_widget_20240220114804.dart b/.history/meme_generator/lib/widgets/button_widget_20240220114804.dart new file mode 100644 index 0000000..cb8e3e1 --- /dev/null +++ b/.history/meme_generator/lib/widgets/button_widget_20240220114804.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; + +class ButtonWidget extends StatelessWidget { + final Function()? onTap; + final bool isButtonPressed; + const ButtonWidget({super.key, this.onTap, required this.isButtonPressed}); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey[300], + body: Center( + child: GestureDetector( + onTap: onTap, + child: AnimatedContainer( + height: 30, + width: 30, + decoration: BoxDecoration( + border: Border.all(color: isButtonPressed ? Colors.grey.shade200 : Colors.grey.shade300), + color: Colors.grey[300], + borderRadius: BorderRadius.circular(12), + boxShadow: isButtonPressed + ? [ + //no shadows if button is pressed + ] + : [ + BoxShadow( + color: Colors.grey.shade500, + blurRadius: 15, + offset: const Offset(6, 6), + spreadRadius: 1, + ), + const BoxShadow( + color: Colors.white, + blurRadius: 15, + offset: Offset(-6, -6), + spreadRadius: 1, + ), + ], + ), + duration: const Duration(milliseconds: 500), + child: Icon( + Icons.favorite, + size: 60, + color: isButtonPressed ? Colors.red[200] : Colors.red[400], + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/button_widget_20240220114809.dart b/.history/meme_generator/lib/widgets/button_widget_20240220114809.dart new file mode 100644 index 0000000..cb8e3e1 --- /dev/null +++ b/.history/meme_generator/lib/widgets/button_widget_20240220114809.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; + +class ButtonWidget extends StatelessWidget { + final Function()? onTap; + final bool isButtonPressed; + const ButtonWidget({super.key, this.onTap, required this.isButtonPressed}); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey[300], + body: Center( + child: GestureDetector( + onTap: onTap, + child: AnimatedContainer( + height: 30, + width: 30, + decoration: BoxDecoration( + border: Border.all(color: isButtonPressed ? Colors.grey.shade200 : Colors.grey.shade300), + color: Colors.grey[300], + borderRadius: BorderRadius.circular(12), + boxShadow: isButtonPressed + ? [ + //no shadows if button is pressed + ] + : [ + BoxShadow( + color: Colors.grey.shade500, + blurRadius: 15, + offset: const Offset(6, 6), + spreadRadius: 1, + ), + const BoxShadow( + color: Colors.white, + blurRadius: 15, + offset: Offset(-6, -6), + spreadRadius: 1, + ), + ], + ), + duration: const Duration(milliseconds: 500), + child: Icon( + Icons.favorite, + size: 60, + color: isButtonPressed ? Colors.red[200] : Colors.red[400], + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/button_widget_20240220120254.dart b/.history/meme_generator/lib/widgets/button_widget_20240220120254.dart new file mode 100644 index 0000000..4c9a527 --- /dev/null +++ b/.history/meme_generator/lib/widgets/button_widget_20240220120254.dart @@ -0,0 +1,53 @@ +import 'package:flutter/material.dart'; + +class ButtonWidget extends StatelessWidget { + final IconData icon; + final Function()? onTap; + final bool isButtonPressed; + const ButtonWidget({super.key, this.onTap, required this.isButtonPressed, required this.icon}); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey[300], + body: Center( + child: GestureDetector( + onTap: onTap, + child: AnimatedContainer( + height: 30, + width: 30, + decoration: BoxDecoration( + border: Border.all(color: isButtonPressed ? Colors.grey.shade200 : Colors.grey.shade300), + color: Colors.grey[300], + borderRadius: BorderRadius.circular(12), + boxShadow: isButtonPressed + ? [ + //no shadows if button is pressed + ] + : [ + BoxShadow( + color: Colors.grey.shade500, + blurRadius: 15, + offset: const Offset(6, 6), + spreadRadius: 1, + ), + const BoxShadow( + color: Colors.white, + blurRadius: 15, + offset: Offset(-6, -6), + spreadRadius: 1, + ), + ], + ), + duration: const Duration(milliseconds: 500), + child: Icon( + icon, + size: 60, + color: isButtonPressed ? Colors.red[200] : Colors.red[400], + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/button_widget_20240220121253.dart b/.history/meme_generator/lib/widgets/button_widget_20240220121253.dart new file mode 100644 index 0000000..9827b4d --- /dev/null +++ b/.history/meme_generator/lib/widgets/button_widget_20240220121253.dart @@ -0,0 +1,53 @@ +import 'package:flutter/material.dart'; + +class ButtonWidget extends StatelessWidget { + final IconData icon; + final Function()? onTap; + final bool isButtonPressed; + const ButtonWidget({super.key, this.onTap, required this.isButtonPressed, required this.icon}); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey[300], + body: Center( + child: GestureDetector( + onTap: onTap, + child: AnimatedContainer( + height: 30, + width: 30, + decoration: BoxDecoration( + border: Border.all(color: isButtonPressed ? Colors.grey.shade200 : Colors.grey.shade300), + color: Colors.grey[300], + borderRadius: BorderRadius.circular(12), + boxShadow: isButtonPressed + ? [ + //no shadows if button is pressed + ] + : [ + BoxShadow( + color: Colors.grey.shade500, + blurRadius: 15, + offset: const Offset(6, 6), + spreadRadius: 1, + ), + const BoxShadow( + color: Colors.white, + blurRadius: 15, + offset: Offset(-6, -6), + spreadRadius: 1, + ), + ], + ), + duration: const Duration(milliseconds: 500), + child: Icon( + icon, + size: 30, + color: isButtonPressed ? Colors.red[200] : Colors.red[400], + ), + ), + ), + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220141852.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220141852.dart new file mode 100644 index 0000000..e69de29 diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220142246.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220142246.dart new file mode 100644 index 0000000..ee2fb12 --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220142246.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220142254.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220142254.dart new file mode 100644 index 0000000..ee2fb12 --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220142254.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143042.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143042.dart new file mode 100644 index 0000000..30e9fdc --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143042.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog(shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: + TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black,fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton(onPressed: (){ + }, child: Text("Back")), + ElevatedButton(onPressed: (){ + }, child: Text("Next")), + ], + content: Text("Saved successfully"), +) + + + + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143126.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143126.dart new file mode 100644 index 0000000..7085ca6 --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143126.dart @@ -0,0 +1,32 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton(onPressed: () {}, child: Text("Отмена")), + ElevatedButton(onPressed: () {}, child: Text("Добавить")), + ], + content: Text("Saved successfully"), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143134.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143134.dart new file mode 100644 index 0000000..c9f8671 --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143134.dart @@ -0,0 +1,32 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton(onPressed: () {}, child: Text("Отмена")), + ElevatedButton(onPressed: () {}, child: Text("Добавить")), + ], + content: Text("Saved successfully"), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143234.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143234.dart new file mode 100644 index 0000000..695d235 --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143234.dart @@ -0,0 +1,32 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton(onPressed: () {}, child: Text("Отмена")), + ElevatedButton(onPressed: () {}, child: Text("Добавить")), + ], + content: const Text("Saved successfully"), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143324.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143324.dart new file mode 100644 index 0000000..3c4672c --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143324.dart @@ -0,0 +1,36 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + } + child: Text("Отмена")), + ElevatedButton(onPressed: () {}, child: Text("Добавить")), + ], + content: const Text("Saved successfully"), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143335.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143335.dart new file mode 100644 index 0000000..d1ebbda --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143335.dart @@ -0,0 +1,40 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: Text("Добавить")), + ], + content: const Text("Saved successfully"), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143337.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143337.dart new file mode 100644 index 0000000..5f2f3d0 --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143337.dart @@ -0,0 +1,40 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: Text("Добавить")) + ], + content: const Text("Saved successfully"), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143340.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143340.dart new file mode 100644 index 0000000..5f2f3d0 --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143340.dart @@ -0,0 +1,40 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: Text("Добавить")) + ], + content: const Text("Saved successfully"), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143348.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143348.dart new file mode 100644 index 0000000..b6e271c --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220143348.dart @@ -0,0 +1,40 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Добавить")) + ], + content: const Text("Saved successfully"), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220144058.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220144058.dart new file mode 100644 index 0000000..b6e271c --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220144058.dart @@ -0,0 +1,40 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Добавить")) + ], + content: const Text("Saved successfully"), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220150957.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220150957.dart new file mode 100644 index 0000000..63ee683 --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220150957.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Добавить")) + ], + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151005.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151005.dart new file mode 100644 index 0000000..6021d24 --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151005.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Color.fromARGB(255, 0, 0, 0), fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Добавить")) + ], + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151011.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151011.dart new file mode 100644 index 0000000..63ee683 --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151011.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Добавить")) + ], + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151034.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151034.dart new file mode 100644 index 0000000..63ee683 --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151034.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + const MemTextDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: const TextField( + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Добавить")) + ], + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151232.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151232.dart new file mode 100644 index 0000000..ec8532e --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151232.dart @@ -0,0 +1,41 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatelessWidget { + TextEditingController memTextController; + MemTextDialog({super.key, required memTextController}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: memTextController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Добавить")) + ], + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151608.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151608.dart new file mode 100644 index 0000000..8df7902 --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220151608.dart @@ -0,0 +1,47 @@ +import 'package:flutter/material.dart'; + +class MemTextDialog extends StatefulWidget { + MemTextDialog({super.key, required memTextController}); + + @override + State createState() => _MemTextDialogState(); +} + +class _MemTextDialogState extends State { + late final TextEditingController memTextController; + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + title: TextField( + controller: memTextController, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', + hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), + // 'Здесь мог бы быть ваш мем', + ), + ), + titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Отмена")), + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text("Добавить")) + ], + ); + } +} diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220152050.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220152050.dart new file mode 100644 index 0000000..06012f7 --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220152050.dart @@ -0,0 +1,47 @@ +// import 'package:flutter/material.dart'; + +// class MemTextDialog extends StatefulWidget { +// MemTextDialog({super.key, required memTextController}); + +// @override +// State createState() => _MemTextDialogState(); +// } + +// class _MemTextDialogState extends State { +// late final TextEditingController memTextController; + +// @override +// Widget build(BuildContext context) { +// return AlertDialog( +// shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), +// title: TextField( +// controller: memTextController, +// keyboardType: TextInputType.multiline, +// textAlign: TextAlign.center, +// style: const TextStyle( +// color: Colors.white, +// fontFamily: 'Impact', +// ), +// decoration: const InputDecoration( +// border: InputBorder.none, hintText: 'Здесь будет ваш комментарий', +// hintStyle: TextStyle(color: Colors.white, fontFamily: 'Impact', fontSize: 16), +// // 'Здесь мог бы быть ваш мем', +// ), +// ), +// titleTextStyle: const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), +// actionsOverflowButtonSpacing: 20, +// actions: [ +// ElevatedButton( +// onPressed: () { +// Navigator.pop(context); +// }, +// child: const Text("Отмена")), +// ElevatedButton( +// onPressed: () { +// Navigator.pop(context); +// }, +// child: const Text("Добавить")) +// ], +// ); +// } +// } diff --git a/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220193214.dart b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220193214.dart new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.history/meme_generator/lib/widgets/dialog/mem_text_dialog_20240220193214.dart @@ -0,0 +1 @@ + diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220114937.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220114937.dart new file mode 100644 index 0000000..e69de29 diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220115029.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220115029.dart new file mode 100644 index 0000000..76fd78f --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220115029.dart @@ -0,0 +1,11 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatelessWidget { + + const NavBarWidget({super.key, }); + + @override + Widget build(BuildContext context) { + return NavBarWidget() + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220115141.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220115141.dart new file mode 100644 index 0000000..7aab15e --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220115141.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatelessWidget { + const NavBarWidget({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return NavigationBar(destinations: []); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220115323.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220115323.dart new file mode 100644 index 0000000..e93ed42 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220115323.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatelessWidget { + const NavBarWidget({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return NavigationBar(destinations: [NavigationDestination(icon: Icon(Icons.add_a_photo_rounded), label: label)]); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220115345.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220115345.dart new file mode 100644 index 0000000..b47c054 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220115345.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatelessWidget { + const NavBarWidget({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return NavigationBar(destinations: [ + NavigationDestination(icon: Icon(Icons.add_a_photo_rounded), label: 'Add photo'), + NavigationDestination(icon: Icon(Icons.add_a_photo_rounded), label: 'Add photo') + ]); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220115416.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220115416.dart new file mode 100644 index 0000000..d39689f --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220115416.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatelessWidget { + const NavBarWidget({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return NavigationBar(destinations: [ + NavigationDestination(icon: Icon(Icons.add_a_photo_rounded), label: 'Add photo'), + NavigationDestination(icon: Icon(Icons.text), label: 'Add photo') + ]); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220115502.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220115502.dart new file mode 100644 index 0000000..5d1b067 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220115502.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatelessWidget { + const NavBarWidget({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return NavigationBar(destinations: [ + NavigationDestination(icon: Icon(Icons.add_a_photo_rounded), label: 'Add photo'), + NavigationDestination(icon: Icon(Icons.text_fields_outlined), label: 'Add photo') + ]); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220115506.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220115506.dart new file mode 100644 index 0000000..6fc3cf3 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220115506.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatelessWidget { + const NavBarWidget({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return NavigationBar(destinations: [ + NavigationDestination(icon: Icon(Icons.add_a_photo_rounded), label: 'Add photo'), + NavigationDestination(icon: Icon(Icons.text_fields_outlined), label: 'Add text') + ]); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220115518.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220115518.dart new file mode 100644 index 0000000..7b51eb7 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220115518.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatelessWidget { + const NavBarWidget({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return NavigationBar(destinations: const [ + NavigationDestination(icon: Icon(Icons.add_a_photo_rounded), label: 'Add photo'), + NavigationDestination(icon: Icon(Icons.text_fields_outlined), label: 'Add text') + ]); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220115939.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220115939.dart new file mode 100644 index 0000000..a51e347 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220115939.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatelessWidget { + const NavBarWidget({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return NavigationBar(selectedIndex: -1, destinations: const [ + NavigationDestination(icon: Icon(Icons.add_a_photo_rounded), label: 'Add photo'), + NavigationDestination(icon: Icon(Icons.text_fields_outlined), label: 'Add text') + ]); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220120457.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220120457.dart new file mode 100644 index 0000000..94934ad --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220120457.dart @@ -0,0 +1,20 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatelessWidget { + const NavBarWidget({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return NavigationBar(destinations: const [ + ButtonWidget( + isButtonPressed: null, + icon: Icon( + Icons.add_a_photo_rounded, + ), + ), + NavigationDestination(icon: Icon(Icons.text_fields_outlined), label: 'Add text') + ]); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220120500.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220120500.dart new file mode 100644 index 0000000..c566422 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220120500.dart @@ -0,0 +1,18 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatelessWidget { + const NavBarWidget({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return NavigationBar(destinations: const [ + ButtonWidget( + isButtonPressed: null, + icon: Icon(Icons.add_a_photo_rounded), + ), + NavigationDestination(icon: Icon(Icons.text_fields_outlined), label: 'Add text') + ]); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220120520.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220120520.dart new file mode 100644 index 0000000..a691624 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220120520.dart @@ -0,0 +1,20 @@ +import 'package:flutter/material.dart'; + +import 'button_widget.dart'; + +class NavBarWidget extends StatelessWidget { + const NavBarWidget({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return NavigationBar(destinations: const [ + ButtonWidget( + isButtonPressed: () {}, + icon: Icon(Icons.add_a_photo_rounded), + ), + NavigationDestination(icon: Icon(Icons.text_fields_outlined), label: 'Add text') + ]); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220120530.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220120530.dart new file mode 100644 index 0000000..f54452f --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220120530.dart @@ -0,0 +1,20 @@ +import 'package:flutter/material.dart'; + +import 'button_widget.dart'; + +class NavBarWidget extends StatelessWidget { + const NavBarWidget({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return NavigationBar(destinations: const [ + ButtonWidget( + isButtonPressed: () {}, + icon: Icons.add_a_photo_rounded, + ), + NavigationDestination(icon: Icon(Icons.text_fields_outlined), label: 'Add text') + ]); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220120641.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220120641.dart new file mode 100644 index 0000000..168058d --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220120641.dart @@ -0,0 +1,36 @@ +import 'package:flutter/material.dart'; + +import 'button_widget.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return NavigationBar(destinations: const [ + ButtonWidget( + isButtonPressed: () {}, + icon: Icons.add_a_photo_rounded, + ), + NavigationDestination(icon: Icon(Icons.text_fields_outlined), label: 'Add text') + ]); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220120802.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220120802.dart new file mode 100644 index 0000000..c83094e --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220120802.dart @@ -0,0 +1,37 @@ +import 'package:flutter/material.dart'; + +import 'button_widget.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return NavigationBar(destinations: [ + ButtonWidget( + onTap: buttonPressed, + isButtonPressed: isButtonPressed, + icon: Icons.add_a_photo_rounded, + ), + NavigationDestination(icon: Icon(Icons.text_fields_outlined), label: 'Add text') + ]); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220120922.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220120922.dart new file mode 100644 index 0000000..fb0cc76 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220120922.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatelessWidget { + const NavBarWidget({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return NavBarWidget(); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220121238.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220121238.dart new file mode 100644 index 0000000..426cbc9 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220121238.dart @@ -0,0 +1,40 @@ +import 'package:flutter/material.dart'; + +import 'button_widget.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return Container( + child: Row( + children: [ + ButtonWidget( + onTap: buttonPressed, + isButtonPressed: isButtonPressed, + icon: Icons.add_a_photo, + ) + ], + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220121354.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220121354.dart new file mode 100644 index 0000000..042875f --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220121354.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; + +import 'button_widget.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return Row( + children: [ + ButtonWidget( + onTap: buttonPressed, + isButtonPressed: isButtonPressed, + icon: Icons.add_a_photo, + ) + ], + ); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220121407.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220121407.dart new file mode 100644 index 0000000..fd06c90 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220121407.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; + +import 'button_widget.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return Row( + mainAxisSize: MainAxisSize.min, + children: [ + ButtonWidget( + onTap: buttonPressed, + isButtonPressed: isButtonPressed, + icon: Icons.add_a_photo, + ) + ], + ); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220121428.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220121428.dart new file mode 100644 index 0000000..e121e3d --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220121428.dart @@ -0,0 +1,42 @@ +import 'package:flutter/material.dart'; + +import 'button_widget.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + ButtonWidget( + onTap: buttonPressed, + isButtonPressed: isButtonPressed, + icon: Icons.add_a_photo, + ) + ], + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220121505.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220121505.dart new file mode 100644 index 0000000..a0965e8 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220121505.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [], + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220121626.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220121626.dart new file mode 100644 index 0000000..e1c1d29 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220121626.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: buttonPressed, + child: null, + ) + ], + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220121637.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220121637.dart new file mode 100644 index 0000000..b41daf3 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220121637.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: buttonPressed, + child: Icon(Icons.abc_outlined), + ) + ], + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220121716.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220121716.dart new file mode 100644 index 0000000..e35330e --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220121716.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.add_a_photo_sharp), + ) + ], + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220121805.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220121805.dart new file mode 100644 index 0000000..6276d0c --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220121805.dart @@ -0,0 +1,43 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220121827.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220121827.dart new file mode 100644 index 0000000..09aee20 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220121827.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220121854.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220121854.dart new file mode 100644 index 0000000..7031671 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220121854.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220121903.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220121903.dart new file mode 100644 index 0000000..7031671 --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220121903.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220122715.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220122715.dart new file mode 100644 index 0000000..7ff4f1c --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220122715.dart @@ -0,0 +1,45 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + _paste(){}; + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220122730.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220122730.dart new file mode 100644 index 0000000..55d1e9c --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220122730.dart @@ -0,0 +1,45 @@ +import 'package:flutter/material.dart'; + +class NavBarWidget extends StatefulWidget { + const NavBarWidget({ + super.key, + }); + + @override + State createState() => _NavBarWidgetState(); +} + +class _NavBarWidgetState extends State { + + bool isButtonPressed = false; + void buttonPressed() { + setState(() { + if (isButtonPressed == false) { + isButtonPressed = true; + } else if (isButtonPressed == true) { + isButtonPressed = false; + } + }); + } +_paste(){}; + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [ + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.add_a_photo_sharp), + ), + ElevatedButton( + onPressed: buttonPressed, + child: const Icon(Icons.text_fields), + ) + ], + ), + ); + } +} diff --git a/.history/meme_generator/lib/widgets/navbar_widget_20240220125646.dart b/.history/meme_generator/lib/widgets/navbar_widget_20240220125646.dart new file mode 100644 index 0000000..34d403d --- /dev/null +++ b/.history/meme_generator/lib/widgets/navbar_widget_20240220125646.dart @@ -0,0 +1,2 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; diff --git a/.history/meme_generator/pubspec_20240220105946.yaml b/.history/meme_generator/pubspec_20240220105946.yaml new file mode 100644 index 0000000..2a0faa7 --- /dev/null +++ b/.history/meme_generator/pubspec_20240220105946.yaml @@ -0,0 +1,24 @@ +name: meme_generator +description: A new Flutter project. + +publish_to: 'none' + +version: 1.0.0+1 + +environment: + sdk: 3.2.3 # Dart SDK version + flutter: 3.16.3 # Flutter SDK version + +dependencies: + flutter: + sdk: flutter + + cupertino_icons: ^1.0.2 + +dev_dependencies: + flutter_test: + sdk: flutter + + flutter_lints: ^2.0.1 +flutter: + uses-material-design: true \ No newline at end of file diff --git a/.history/meme_generator/pubspec_20240220132020.yaml b/.history/meme_generator/pubspec_20240220132020.yaml new file mode 100644 index 0000000..4bbcc07 --- /dev/null +++ b/.history/meme_generator/pubspec_20240220132020.yaml @@ -0,0 +1,27 @@ +name: meme_generator +description: A new Flutter project. + +publish_to: 'none' + +version: 1.0.0+1 + +environment: + sdk: 3.2.3 # Dart SDK version + flutter: 3.16.3 # Flutter SDK version + +dependencies: + flutter: + sdk: flutter + + cupertino_icons: ^1.0.2 + +dev_dependencies: + flutter_test: + sdk: flutter + + flutter_lints: ^2.0.1 +flutter: + uses-material-design: true + + assets: + - assets/ diff --git a/.history/meme_generator/pubspec_20240220132041.yaml b/.history/meme_generator/pubspec_20240220132041.yaml new file mode 100644 index 0000000..4bbcc07 --- /dev/null +++ b/.history/meme_generator/pubspec_20240220132041.yaml @@ -0,0 +1,27 @@ +name: meme_generator +description: A new Flutter project. + +publish_to: 'none' + +version: 1.0.0+1 + +environment: + sdk: 3.2.3 # Dart SDK version + flutter: 3.16.3 # Flutter SDK version + +dependencies: + flutter: + sdk: flutter + + cupertino_icons: ^1.0.2 + +dev_dependencies: + flutter_test: + sdk: flutter + + flutter_lints: ^2.0.1 +flutter: + uses-material-design: true + + assets: + - assets/ diff --git a/.history/meme_generator/pubspec_20240220132104.yaml b/.history/meme_generator/pubspec_20240220132104.yaml new file mode 100644 index 0000000..4bbcc07 --- /dev/null +++ b/.history/meme_generator/pubspec_20240220132104.yaml @@ -0,0 +1,27 @@ +name: meme_generator +description: A new Flutter project. + +publish_to: 'none' + +version: 1.0.0+1 + +environment: + sdk: 3.2.3 # Dart SDK version + flutter: 3.16.3 # Flutter SDK version + +dependencies: + flutter: + sdk: flutter + + cupertino_icons: ^1.0.2 + +dev_dependencies: + flutter_test: + sdk: flutter + + flutter_lints: ^2.0.1 +flutter: + uses-material-design: true + + assets: + - assets/ diff --git a/.history/meme_generator/pubspec_20240220132207.yaml b/.history/meme_generator/pubspec_20240220132207.yaml new file mode 100644 index 0000000..2393663 --- /dev/null +++ b/.history/meme_generator/pubspec_20240220132207.yaml @@ -0,0 +1,24 @@ +name: meme_generator +description: A new Flutter project. + +publish_to: 'none' + +version: 1.0.0+1 + +environment: + sdk: 3.2.3 # Dart SDK version + flutter: 3.16.3 # Flutter SDK version + +dependencies: + flutter: + sdk: flutter + + cupertino_icons: ^1.0.2 + +dev_dependencies: + flutter_test: + sdk: flutter + + flutter_lints: ^2.0.1 +flutter: + uses-material-design: true diff --git a/meme_generator/.fvm/flutter_sdk b/meme_generator/.fvm/flutter_sdk deleted file mode 120000 index 97c21de..0000000 --- a/meme_generator/.fvm/flutter_sdk +++ /dev/null @@ -1 +0,0 @@ -/Users/parshonok/fvm/versions/3.16.3 \ No newline at end of file diff --git a/meme_generator/.fvm/fvm_config.json b/meme_generator/.fvm/fvm_config.json index e333fa9..5aa8949 100644 --- a/meme_generator/.fvm/fvm_config.json +++ b/meme_generator/.fvm/fvm_config.json @@ -1,4 +1,3 @@ { - "flutterSdkVersion": "3.16.3", - "flavors": {} + "flutterSdkVersion": "3.16.3" } \ No newline at end of file diff --git a/meme_generator/.fvm/release b/meme_generator/.fvm/release new file mode 100644 index 0000000..bc3bd8b --- /dev/null +++ b/meme_generator/.fvm/release @@ -0,0 +1 @@ +3.16.3 \ No newline at end of file diff --git a/meme_generator/.fvm/version b/meme_generator/.fvm/version new file mode 100644 index 0000000..bc3bd8b --- /dev/null +++ b/meme_generator/.fvm/version @@ -0,0 +1 @@ +3.16.3 \ No newline at end of file diff --git a/meme_generator/.fvmrc b/meme_generator/.fvmrc new file mode 100644 index 0000000..4d6812b --- /dev/null +++ b/meme_generator/.fvmrc @@ -0,0 +1,3 @@ +{ + "flutter": "3.16.3" +} \ No newline at end of file diff --git a/meme_generator/.vscode/settings.json b/meme_generator/.vscode/settings.json new file mode 100644 index 0000000..0554702 --- /dev/null +++ b/meme_generator/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dart.flutterSdkPath": ".fvm\\versions\\3.16.3" +} \ No newline at end of file diff --git a/meme_generator/lib/main.dart b/meme_generator/lib/main.dart index 0790258..f13be5f 100644 --- a/meme_generator/lib/main.dart +++ b/meme_generator/lib/main.dart @@ -15,8 +15,9 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( + debugShowCheckedModeBanner: false, theme: ThemeData( - colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + colorScheme: ColorScheme.fromSeed(seedColor: Colors.black, brightness: Brightness.dark), useMaterial3: true, ), home: const MemeGeneratorScreen(), diff --git a/meme_generator/lib/screen/meme_generator_screen.dart b/meme_generator/lib/screen/meme_generator_screen.dart index 07f535c..a49cf5d 100644 --- a/meme_generator/lib/screen/meme_generator_screen.dart +++ b/meme_generator/lib/screen/meme_generator_screen.dart @@ -1,8 +1,38 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; -class MemeGeneratorScreen extends StatelessWidget { +class MemeGeneratorScreen extends StatefulWidget { const MemeGeneratorScreen({Key? key}) : super(key: key); + @override + State createState() => _MemeGeneratorScreenState(); +} + +class _MemeGeneratorScreenState extends State { + late TextEditingController textEditingController = TextEditingController(); + @override + void initState() { + super.initState(); + textEditingController = TextEditingController(); + } + + @override + void dispose() { + textEditingController.dispose; + super.dispose(); + } + + final TextEditingController imageUrlController = TextEditingController(); + Future _pastePhotoFromInternet() async { + final linkPaste = await Clipboard.getData(Clipboard.kTextPlain); + if (linkPaste != null) { + setState(() { + imageUrlController.text = linkPaste.text!; + }); + } + return imageUrlController.text; + } + @override Widget build(BuildContext context) { final decoration = BoxDecoration( @@ -12,6 +42,15 @@ class MemeGeneratorScreen extends StatelessWidget { ), ); return Scaffold( + bottomNavigationBar: const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisSize: MainAxisSize.min, + children: [], + ), + ), + extendBodyBehindAppBar: false, backgroundColor: Colors.black, body: Center( child: ColoredBox( @@ -30,25 +69,78 @@ class MemeGeneratorScreen extends StatelessWidget { SizedBox( width: double.infinity, height: 200, - child: DecoratedBox( - decoration: decoration, - child: Padding( - padding: const EdgeInsets.all(4.0), - child: Image.network( - 'https://i.cbc.ca/1.6713656.1679693029!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/this-is-fine.jpg', - fit: BoxFit.cover, + child: InkWell( + onTap: _pastePhotoFromInternet, + child: DecoratedBox( + decoration: decoration, + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Image.network( + imageUrlController.text, + fit: BoxFit.cover, + ), ), ), ), ), - const Text( - 'Здесь мог бы быть ваш мем', - textAlign: TextAlign.center, - style: TextStyle( - fontFamily: 'Impact', - fontSize: 40, - color: Colors.white, - ), + InkWell( + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: TextField( + controller: textEditingController, + keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.multiline, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + ), + decoration: const InputDecoration( + border: InputBorder.none, + hintText: 'Добавить текст', + hintStyle: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 16, + ), + ), + ), + titleTextStyle: + const TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20), + actionsOverflowButtonSpacing: 20, + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(textEditingController); + setState(() {}); + }, + child: const Text("Подтвердить"), + ), + ], + ); + }, + ); + }, + child: textEditingController.text == '' + ? const Text('Добавить текст', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + )) + : Text( + textEditingController.text, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontFamily: 'Impact', + fontSize: 40, + ), + ), ), ], ), diff --git a/meme_generator/pubspec.yaml b/meme_generator/pubspec.yaml index 2a0faa7..2393663 100644 --- a/meme_generator/pubspec.yaml +++ b/meme_generator/pubspec.yaml @@ -21,4 +21,4 @@ dev_dependencies: flutter_lints: ^2.0.1 flutter: - uses-material-design: true \ No newline at end of file + uses-material-design: true