├── assets
└── fonts
│ └── IRAN.ttf
├── are-you-stupid-desktop-app.png
├── README.md
├── windows
└── runner
│ └── main.cpp
├── pubspec.yaml
└── lib
└── main.dart
/assets/fonts/IRAN.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sahandmohammadrehzaii/Stupid-button-window-app/HEAD/assets/fonts/IRAN.ttf
--------------------------------------------------------------------------------
/are-you-stupid-desktop-app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sahandmohammadrehzaii/Stupid-button-window-app/HEAD/are-you-stupid-desktop-app.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #
2 |
3 | #
4 |
5 |
6 |
7 | in the name of god
8 |
9 |
10 |
11 | #
12 |
13 |
14 |
15 |
16 | hello people the this project desgined by sahand mohammadrezaii
17 |
18 |
19 |
20 | #
21 |
--------------------------------------------------------------------------------
/windows/runner/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "flutter_window.h"
6 | #include "utils.h"
7 | // HERE
8 | #include
9 | auto bdw = bitsdojo_window_configure(BDW_CUSTOM_FRAME | BDW_HIDE_ON_STARTUP);
10 |
11 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
12 | _In_ wchar_t *command_line, _In_ int show_command) {
13 | // Attach to console when present (e.g., 'flutter run') or create a
14 | // new console when running with a debugger.
15 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
16 | CreateAndAttachConsole();
17 | }
18 |
19 | // Initialize COM, so that it is available for use in the library and/or
20 | // plugins.
21 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
22 |
23 | flutter::DartProject project(L"data");
24 |
25 | std::vector command_line_arguments =
26 | GetCommandLineArguments();
27 |
28 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
29 |
30 | FlutterWindow window(project);
31 | Win32Window::Point origin(10, 10);
32 | Win32Window::Size size(1280, 720);
33 | if (!window.Create(L"stupid_buton", origin, size)) {
34 | return EXIT_FAILURE;
35 | }
36 | window.SetQuitOnClose(true);
37 |
38 | ::MSG msg;
39 | while (::GetMessage(&msg, nullptr, 0, 0)) {
40 | ::TranslateMessage(&msg);
41 | ::DispatchMessage(&msg);
42 | }
43 |
44 | ::CoUninitialize();
45 | return EXIT_SUCCESS;
46 | }
47 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: stupid_button
2 | description: Desktop App - Code by NABEGHEHA.COM
3 | # The following line prevents the package from being accidentally published to
4 | # pub.dev using `flutter pub publish`. This is preferred for private packages.
5 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
6 |
7 | # The following defines the version and build number for your application.
8 | # A version number is three numbers separated by dots, like 1.2.43
9 | # followed by an optional build number separated by a +.
10 | # Both the version and the builder number may be overridden in flutter
11 | # build by specifying --build-name and --build-number, respectively.
12 | # In Android, build-name is used as versionName while build-number used as versionCode.
13 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
14 | # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
15 | # Read more about iOS versioning at
16 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
17 | # In Windows, build-name is used as the major, minor, and patch parts
18 | # of the product and file versions while build-number is used as the build suffix.
19 | version: 1.0.0+1
20 |
21 | environment:
22 | sdk: '>=2.19.2 <3.0.0'
23 |
24 | # Dependencies specify other packages that your package needs in order to work.
25 | # To automatically upgrade your package dependencies to the latest versions
26 | # consider running `flutter pub upgrade --major-versions`. Alternatively,
27 | # dependencies can be manually updated by changing the version numbers below to
28 | # the latest version available on pub.dev. To see which dependencies have newer
29 | # versions available, run `flutter pub outdated`.
30 | dependencies:
31 | flutter:
32 | sdk: flutter
33 |
34 |
35 | # The following adds the Cupertino Icons font to your application.
36 | # Use with the CupertinoIcons class for iOS style icons.
37 | cupertino_icons: ^1.0.2
38 | bitsdojo_window: ^0.1.5
39 |
40 | dev_dependencies:
41 | flutter_test:
42 | sdk: flutter
43 |
44 | # The "flutter_lints" package below contains a set of recommended lints to
45 | # encourage good coding practices. The lint set provided by the package is
46 | # activated in the `analysis_options.yaml` file located at the root of your
47 | # package. See that file for information about deactivating specific lint
48 | # rules and activating additional ones.
49 | flutter_lints: ^2.0.0
50 |
51 | # For information on the generic Dart part of this file, see the
52 | # following page: https://dart.dev/tools/pub/pubspec
53 |
54 | # The following section is specific to Flutter packages.
55 | flutter:
56 |
57 | # The following line ensures that the Material Icons font is
58 | # included with your application, so that you can use the icons in
59 | # the material Icons class.
60 | uses-material-design: true
61 |
62 | # To add assets to your application, add an assets section, like this:
63 | # assets:
64 | # - images/a_dot_burr.jpeg
65 | # - images/a_dot_ham.jpeg
66 |
67 | # An image asset can refer to one or more resolution-specific "variants", see
68 | # https://flutter.dev/assets-and-images/#resolution-aware
69 |
70 | # For details regarding adding assets from package dependencies, see
71 | # https://flutter.dev/assets-and-images/#from-packages
72 |
73 | # To add custom fonts to your application, add a fonts section here,
74 | # in this "flutter" section. Each entry in this list should have a
75 | # "family" key with the font family name, and a "fonts" key with a
76 | # list giving the asset and other descriptors for the font. For
77 | # example:
78 | fonts:
79 | - family: Iran
80 | fonts:
81 | - asset: assets/fonts/IRAN.ttf
82 | #
83 | # For details regarding fonts from package dependencies,
84 | # see https://flutter.dev/custom-fonts/#from-packages
85 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | // NABEGHEHA.COM
2 |
3 | import 'dart:math';
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:bitsdojo_window/bitsdojo_window.dart';
7 |
8 | void main() {
9 | runApp(const MyApp());
10 |
11 | // Add this code below
12 |
13 | doWhenWindowReady(() {
14 | const initialSize = Size(400, 250);
15 | appWindow.minSize = initialSize;
16 | appWindow.size = initialSize;
17 | appWindow.alignment = Alignment.center;
18 | appWindow.title = "NABEGHEHA APP";
19 | appWindow.show();
20 | });
21 | }
22 |
23 | class MyApp extends StatelessWidget {
24 | const MyApp({super.key});
25 |
26 | // This widget is the root of your application.
27 | @override
28 | Widget build(BuildContext context) {
29 | return const MaterialApp(
30 | debugShowCheckedModeBanner: false,
31 | home: HomePage(),
32 | );
33 | }
34 | }
35 |
36 | class HomePage extends StatefulWidget {
37 | const HomePage({super.key});
38 |
39 | @override
40 | State createState() => _HomePageState();
41 | }
42 |
43 | class _HomePageState extends State {
44 | bool isYesClicked = false;
45 | var noButtonRight = 100;
46 | var noButtonBottom = 30;
47 | int maxRight = 150;
48 | int minRight = 10;
49 | int maxBotton = 30;
50 | int minBotton = 5;
51 | final borderColor = const Color(0xFF805306);
52 |
53 | @override
54 | Widget build(BuildContext context) {
55 | return Scaffold(
56 | body: WindowBorder(
57 | color: borderColor,
58 | width: 1,
59 | child: Column(
60 | children: [
61 | WindowTitleBarBox(
62 | child: Row(
63 | children: [
64 | Expanded(
65 | child: MoveWindow(),
66 | ),
67 | const WindowButtons(),
68 | ],
69 | ),
70 | ),
71 | Column(
72 | mainAxisAlignment: MainAxisAlignment.center,
73 | children: [
74 | const SizedBox(height: 50.0),
75 | isYesClicked
76 | ? const Text(
77 | 'مرسی که صادق بودی :)))))',
78 | textDirection: TextDirection.rtl,
79 | style: TextStyle(
80 | fontFamily: 'Iran',
81 | fontWeight: FontWeight.bold,
82 | fontSize: 25.0,
83 | ),
84 | )
85 | : const Text(
86 | 'صادقانه پاسخ بده. آیا تو یک احمقی؟؟',
87 | textDirection: TextDirection.rtl,
88 | style: TextStyle(
89 | fontFamily: 'Iran',
90 | fontWeight: FontWeight.bold,
91 | fontSize: 25.0,
92 | ),
93 | ),
94 | ],
95 | ),
96 | const SizedBox(height: 50.0),
97 | SizedBox(
98 | height: 50,
99 | child: Stack(
100 | // NABEGHEHA.COM
101 | children: [
102 | Positioned(
103 | left: 100,
104 | child: GestureDetector(
105 | onTap: () {
106 | setState(() {
107 | isYesClicked = true;
108 | });
109 | },
110 | child: const Text(
111 | 'بله، من احمقم',
112 | textDirection: TextDirection.rtl,
113 | style: TextStyle(
114 | fontWeight: FontWeight.bold,
115 | fontFamily: 'Iran',
116 | ),
117 | ),
118 | ),
119 | ),
120 | Positioned(
121 | right: noButtonRight.toDouble(),
122 | bottom: noButtonBottom.toDouble(),
123 | child: MouseRegion(
124 | onHover: (event) {
125 | setState(() {
126 | noButtonRight = minRight + Random().nextInt((maxRight + 1) - minRight);
127 | // noButtonBottom = minBotton + Random().nextInt((maxBotton + 1) - minBotton);
128 | });
129 | },
130 | child: const Text(
131 | 'نخیر',
132 | textDirection: TextDirection.rtl,
133 | style: TextStyle(
134 | fontWeight: FontWeight.bold,
135 | fontFamily: 'Iran',
136 | ),
137 | ),
138 | ),
139 | ),
140 | ],
141 | ),
142 | )
143 | ],
144 | ),
145 | ),
146 | );
147 | }
148 | }
149 |
150 | class WindowButtons extends StatelessWidget {
151 | const WindowButtons({super.key});
152 |
153 | @override
154 | Widget build(BuildContext context) {
155 | return Row(
156 | children: [
157 | MinimizeWindowButton(),
158 | MaximizeWindowButton(),
159 | CloseWindowButton(),
160 | ],
161 | );
162 | }
163 | }
164 |
--------------------------------------------------------------------------------