├── .DS_Store
├── .gitignore
├── .idea
├── GHDropMenuDemo_flutter.iml
├── encodings.xml
├── libraries
│ ├── Dart_Packages.xml
│ ├── Dart_SDK.xml
│ └── Flutter_Plugins.xml
├── misc.xml
├── modules.xml
├── vcs.xml
└── workspace.xml
├── LICENSE
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── gh_dropmenudemo
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gh_dropmenudemo_android.iml
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── gh_dropmenudemo.iml
├── images
├── .DS_Store
├── 2.0x
│ ├── bg.png
│ ├── logo.png
│ ├── user.png
│ └── user_bg.jpg
├── 3.0x
│ ├── bg.png
│ ├── logo.png
│ ├── user.png
│ └── user_bg.jpg
├── bg.jpg
├── collect.png
├── customerService.png
├── down.png
├── downSeletecd.png
├── filter.png
├── filterSeletecd.png
├── logo.png
├── price.png
├── serviceIcon.png
├── shop.png
├── shoppingCart.png
├── up.png
├── upSeletecd.png
├── user.png
└── user_bg.jpg
├── ios
├── .DS_Store
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ └── contents.xcworkspacedata
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── .DS_Store
├── GHFilterDemo.dart
├── main.dart
├── model
│ └── GHGoodsModel.dart
├── services
│ ├── .DS_Store
│ ├── ScreenAdaper.dart
│ └── httptool.dart
└── widget
│ ├── GHButton.dart
│ ├── GHCustomAppbar.dart
│ ├── GHDialog.dart
│ ├── GHLoading.dart
│ ├── GHTextWidget.dart
│ └── LoadingWidget.dart
├── pubspec.yaml
└── test
└── widget_test.dart
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/.DS_Store
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://www.dartlang.org/guides/libraries/private-files
2 |
3 | # Files and directories created by pub
4 | .dart_tool/
5 | .packages
6 | build/
7 | # If you're building an application, you may want to check-in your pubspec.lock
8 | pubspec.lock
9 |
10 | 筛选.psd
11 | # Directory created by dartdoc
12 | # If you don't generate documentation locally you can remove this line.
13 | doc/api/
14 |
15 | # Avoid committing generated Javascript files:
16 | *.dart.js
17 | *.info.json # Produced by the --dump-info flag.
18 | *.js # When generated by dart2js. Don't specify *.js if your
19 | # project includes source files written in JavaScript.
20 | *.js_
21 | *.js.deps
22 | *.js.map
23 |
24 | .flutter-plugins
25 | .flutter-plugins-dependencies
--------------------------------------------------------------------------------
/.idea/GHDropMenuDemo_flutter.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/libraries/Dart_Packages.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
--------------------------------------------------------------------------------
/.idea/libraries/Dart_SDK.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/.idea/libraries/Flutter_Plugins.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 | print
317 | ;品牌
318 | httpHeaders
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 | 1592458088157
403 |
404 |
405 | 1592458088157
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 | file://$PROJECT_DIR$/lib/GHFilterDemo.dart
443 | 159
444 |
445 |
446 |
447 | file://$PROJECT_DIR$/lib/GHFilterDemo.dart
448 | 87
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 |
545 |
546 |
547 |
548 |
549 |
550 |
551 |
552 |
553 |
554 |
555 |
556 |
557 |
558 |
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
595 |
596 |
597 |
598 |
599 |
600 |
601 |
602 |
603 |
604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 |
612 |
613 |
614 |
615 |
616 |
617 |
618 |
619 |
620 |
621 |
622 |
623 |
624 |
625 |
626 |
627 |
628 |
629 |
630 |
631 |
632 |
633 |
634 |
635 |
636 |
637 |
638 |
639 |
640 |
641 |
642 |
643 |
644 |
645 |
646 |
647 |
648 |
649 |
650 |
651 |
652 |
653 |
654 |
655 |
656 |
657 |
658 |
659 |
660 |
661 |
662 |
663 |
664 |
665 |
666 |
667 |
668 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
685 |
686 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 |
700 |
701 |
702 |
703 |
704 |
705 |
706 |
707 |
708 |
709 |
710 |
711 |
712 |
713 |
714 |
715 |
716 |
717 |
718 |
719 |
720 |
721 |
722 |
723 |
724 |
725 |
726 |
727 |
728 |
729 |
730 |
731 |
732 |
733 |
734 |
735 |
736 |
737 |
738 |
739 |
740 |
741 |
742 |
743 |
744 |
745 |
746 |
747 |
748 |
749 |
750 |
751 |
752 |
753 |
754 |
755 |
756 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2020, GHome
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | 1. Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | 2. Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | 3. Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # GHDropMenuDemo_flutter
2 |
3 | **Flutter版:sunny::sunny: 仿京东/美团电商筛选菜单 电商筛选菜单 电商通用筛选菜单**
4 |
5 |
6 | **一个仿京东的侧滑筛选菜单,Dart语言编写**
7 |
8 | [想要OC版筛选菜单,点击这里](https://github.com/shabake/GHDropMenuDemo/blob/master/README.md)
9 | ### 环境
10 |
11 | ```
12 | Flutter 1.12.13+hotfix.9 • channel stable •
13 |
14 | Dart 2.7.2
15 |
16 | Xcode 11.5
17 |
18 | Android Studio 3.4.1
19 | ```
20 | 
21 |
22 |
23 | ### 安装方法
24 |
25 | ```
26 | cd ~想要存储的文件路径
27 | git clone https://github.com/shabake/GHDropMenuDemo_flutter.git
28 | ```
29 | 克隆好项目后运行项目,运行`flutter run`会自动下载依赖包
30 |
31 | ```
32 | cd 项目路径
33 | flutter run
34 | ```
35 |
36 | ### 本demo仅做学习交流,不可作为商业用途,最后demo如果对你有帮助,帮忙点一个Star。如有任何问题,欢迎打扰45329453@qq.com
37 | ---
38 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 28
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.example.gh_dropmenudemo"
42 | minSdkVersion 16
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
47 | }
48 |
49 | buildTypes {
50 | release {
51 | // TODO: Add your own signing config for the release build.
52 | // Signing with the debug keys for now, so `flutter run --release` works.
53 | signingConfig signingConfigs.debug
54 | }
55 | }
56 | }
57 |
58 | flutter {
59 | source '../..'
60 | }
61 |
62 | dependencies {
63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64 | testImplementation 'junit:junit:4.12'
65 | androidTestImplementation 'androidx.test:runner:1.1.1'
66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
67 | }
68 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
12 |
19 |
20 |
21 |
22 |
23 |
24 |
26 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/gh_dropmenudemo/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.gh_dropmenudemo
2 |
3 | import androidx.annotation.NonNull;
4 | import io.flutter.embedding.android.FlutterActivity
5 | import io.flutter.embedding.engine.FlutterEngine
6 | import io.flutter.plugins.GeneratedPluginRegistrant
7 |
8 | class MainActivity: FlutterActivity() {
9 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
10 | GeneratedPluginRegistrant.registerWith(flutterEngine);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gh_dropmenudemo_android.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/gh_dropmenudemo.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/images/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/.DS_Store
--------------------------------------------------------------------------------
/images/2.0x/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/2.0x/bg.png
--------------------------------------------------------------------------------
/images/2.0x/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/2.0x/logo.png
--------------------------------------------------------------------------------
/images/2.0x/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/2.0x/user.png
--------------------------------------------------------------------------------
/images/2.0x/user_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/2.0x/user_bg.jpg
--------------------------------------------------------------------------------
/images/3.0x/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/3.0x/bg.png
--------------------------------------------------------------------------------
/images/3.0x/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/3.0x/logo.png
--------------------------------------------------------------------------------
/images/3.0x/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/3.0x/user.png
--------------------------------------------------------------------------------
/images/3.0x/user_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/3.0x/user_bg.jpg
--------------------------------------------------------------------------------
/images/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/bg.jpg
--------------------------------------------------------------------------------
/images/collect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/collect.png
--------------------------------------------------------------------------------
/images/customerService.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/customerService.png
--------------------------------------------------------------------------------
/images/down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/down.png
--------------------------------------------------------------------------------
/images/downSeletecd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/downSeletecd.png
--------------------------------------------------------------------------------
/images/filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/filter.png
--------------------------------------------------------------------------------
/images/filterSeletecd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/filterSeletecd.png
--------------------------------------------------------------------------------
/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/logo.png
--------------------------------------------------------------------------------
/images/price.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/price.png
--------------------------------------------------------------------------------
/images/serviceIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/serviceIcon.png
--------------------------------------------------------------------------------
/images/shop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/shop.png
--------------------------------------------------------------------------------
/images/shoppingCart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/shoppingCart.png
--------------------------------------------------------------------------------
/images/up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/up.png
--------------------------------------------------------------------------------
/images/upSeletecd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/upSeletecd.png
--------------------------------------------------------------------------------
/images/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/user.png
--------------------------------------------------------------------------------
/images/user_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/images/user_bg.jpg
--------------------------------------------------------------------------------
/ios/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/.DS_Store
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
18 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
19 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXCopyFilesBuildPhase section */
23 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
24 | isa = PBXCopyFilesBuildPhase;
25 | buildActionMask = 2147483647;
26 | dstPath = "";
27 | dstSubfolderSpec = 10;
28 | files = (
29 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
30 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
31 | );
32 | name = "Embed Frameworks";
33 | runOnlyForDeploymentPostprocessing = 0;
34 | };
35 | /* End PBXCopyFilesBuildPhase section */
36 |
37 | /* Begin PBXFileReference section */
38 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
39 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
40 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
41 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
42 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
43 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
45 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
46 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
47 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
48 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
49 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
50 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
51 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
52 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
53 | /* End PBXFileReference section */
54 |
55 | /* Begin PBXFrameworksBuildPhase section */
56 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
57 | isa = PBXFrameworksBuildPhase;
58 | buildActionMask = 2147483647;
59 | files = (
60 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
61 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
62 | );
63 | runOnlyForDeploymentPostprocessing = 0;
64 | };
65 | /* End PBXFrameworksBuildPhase section */
66 |
67 | /* Begin PBXGroup section */
68 | 9740EEB11CF90186004384FC /* Flutter */ = {
69 | isa = PBXGroup;
70 | children = (
71 | 3B80C3931E831B6300D905FE /* App.framework */,
72 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
73 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
74 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
75 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
76 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
77 | );
78 | name = Flutter;
79 | sourceTree = "";
80 | };
81 | 97C146E51CF9000F007C117D = {
82 | isa = PBXGroup;
83 | children = (
84 | 9740EEB11CF90186004384FC /* Flutter */,
85 | 97C146F01CF9000F007C117D /* Runner */,
86 | 97C146EF1CF9000F007C117D /* Products */,
87 | );
88 | sourceTree = "";
89 | };
90 | 97C146EF1CF9000F007C117D /* Products */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 97C146EE1CF9000F007C117D /* Runner.app */,
94 | );
95 | name = Products;
96 | sourceTree = "";
97 | };
98 | 97C146F01CF9000F007C117D /* Runner */ = {
99 | isa = PBXGroup;
100 | children = (
101 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
102 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
103 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
104 | 97C147021CF9000F007C117D /* Info.plist */,
105 | 97C146F11CF9000F007C117D /* Supporting Files */,
106 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
107 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
108 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
109 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
110 | );
111 | path = Runner;
112 | sourceTree = "";
113 | };
114 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
115 | isa = PBXGroup;
116 | children = (
117 | );
118 | name = "Supporting Files";
119 | sourceTree = "";
120 | };
121 | /* End PBXGroup section */
122 |
123 | /* Begin PBXNativeTarget section */
124 | 97C146ED1CF9000F007C117D /* Runner */ = {
125 | isa = PBXNativeTarget;
126 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
127 | buildPhases = (
128 | 9740EEB61CF901F6004384FC /* Run Script */,
129 | 97C146EA1CF9000F007C117D /* Sources */,
130 | 97C146EB1CF9000F007C117D /* Frameworks */,
131 | 97C146EC1CF9000F007C117D /* Resources */,
132 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
133 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
134 | );
135 | buildRules = (
136 | );
137 | dependencies = (
138 | );
139 | name = Runner;
140 | productName = Runner;
141 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
142 | productType = "com.apple.product-type.application";
143 | };
144 | /* End PBXNativeTarget section */
145 |
146 | /* Begin PBXProject section */
147 | 97C146E61CF9000F007C117D /* Project object */ = {
148 | isa = PBXProject;
149 | attributes = {
150 | LastUpgradeCheck = 1020;
151 | ORGANIZATIONNAME = "The Chromium Authors";
152 | TargetAttributes = {
153 | 97C146ED1CF9000F007C117D = {
154 | CreatedOnToolsVersion = 7.3.1;
155 | LastSwiftMigration = 1100;
156 | };
157 | };
158 | };
159 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
160 | compatibilityVersion = "Xcode 3.2";
161 | developmentRegion = en;
162 | hasScannedForEncodings = 0;
163 | knownRegions = (
164 | en,
165 | Base,
166 | );
167 | mainGroup = 97C146E51CF9000F007C117D;
168 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
169 | projectDirPath = "";
170 | projectRoot = "";
171 | targets = (
172 | 97C146ED1CF9000F007C117D /* Runner */,
173 | );
174 | };
175 | /* End PBXProject section */
176 |
177 | /* Begin PBXResourcesBuildPhase section */
178 | 97C146EC1CF9000F007C117D /* Resources */ = {
179 | isa = PBXResourcesBuildPhase;
180 | buildActionMask = 2147483647;
181 | files = (
182 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
183 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
184 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
185 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
186 | );
187 | runOnlyForDeploymentPostprocessing = 0;
188 | };
189 | /* End PBXResourcesBuildPhase section */
190 |
191 | /* Begin PBXShellScriptBuildPhase section */
192 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
193 | isa = PBXShellScriptBuildPhase;
194 | buildActionMask = 2147483647;
195 | files = (
196 | );
197 | inputPaths = (
198 | );
199 | name = "Thin Binary";
200 | outputPaths = (
201 | );
202 | runOnlyForDeploymentPostprocessing = 0;
203 | shellPath = /bin/sh;
204 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
205 | };
206 | 9740EEB61CF901F6004384FC /* Run Script */ = {
207 | isa = PBXShellScriptBuildPhase;
208 | buildActionMask = 2147483647;
209 | files = (
210 | );
211 | inputPaths = (
212 | );
213 | name = "Run Script";
214 | outputPaths = (
215 | );
216 | runOnlyForDeploymentPostprocessing = 0;
217 | shellPath = /bin/sh;
218 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
219 | };
220 | /* End PBXShellScriptBuildPhase section */
221 |
222 | /* Begin PBXSourcesBuildPhase section */
223 | 97C146EA1CF9000F007C117D /* Sources */ = {
224 | isa = PBXSourcesBuildPhase;
225 | buildActionMask = 2147483647;
226 | files = (
227 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
228 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | };
232 | /* End PBXSourcesBuildPhase section */
233 |
234 | /* Begin PBXVariantGroup section */
235 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
236 | isa = PBXVariantGroup;
237 | children = (
238 | 97C146FB1CF9000F007C117D /* Base */,
239 | );
240 | name = Main.storyboard;
241 | sourceTree = "";
242 | };
243 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
244 | isa = PBXVariantGroup;
245 | children = (
246 | 97C147001CF9000F007C117D /* Base */,
247 | );
248 | name = LaunchScreen.storyboard;
249 | sourceTree = "";
250 | };
251 | /* End PBXVariantGroup section */
252 |
253 | /* Begin XCBuildConfiguration section */
254 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
255 | isa = XCBuildConfiguration;
256 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
257 | buildSettings = {
258 | ALWAYS_SEARCH_USER_PATHS = NO;
259 | CLANG_ANALYZER_NONNULL = YES;
260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
261 | CLANG_CXX_LIBRARY = "libc++";
262 | CLANG_ENABLE_MODULES = YES;
263 | CLANG_ENABLE_OBJC_ARC = YES;
264 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
265 | CLANG_WARN_BOOL_CONVERSION = YES;
266 | CLANG_WARN_COMMA = YES;
267 | CLANG_WARN_CONSTANT_CONVERSION = YES;
268 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
270 | CLANG_WARN_EMPTY_BODY = YES;
271 | CLANG_WARN_ENUM_CONVERSION = YES;
272 | CLANG_WARN_INFINITE_RECURSION = YES;
273 | CLANG_WARN_INT_CONVERSION = YES;
274 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
275 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
279 | CLANG_WARN_STRICT_PROTOTYPES = YES;
280 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
281 | CLANG_WARN_UNREACHABLE_CODE = YES;
282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
284 | COPY_PHASE_STRIP = NO;
285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
286 | ENABLE_NS_ASSERTIONS = NO;
287 | ENABLE_STRICT_OBJC_MSGSEND = YES;
288 | GCC_C_LANGUAGE_STANDARD = gnu99;
289 | GCC_NO_COMMON_BLOCKS = YES;
290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
292 | GCC_WARN_UNDECLARED_SELECTOR = YES;
293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
294 | GCC_WARN_UNUSED_FUNCTION = YES;
295 | GCC_WARN_UNUSED_VARIABLE = YES;
296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
297 | MTL_ENABLE_DEBUG_INFO = NO;
298 | SDKROOT = iphoneos;
299 | SUPPORTED_PLATFORMS = iphoneos;
300 | TARGETED_DEVICE_FAMILY = "1,2";
301 | VALIDATE_PRODUCT = YES;
302 | };
303 | name = Profile;
304 | };
305 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
306 | isa = XCBuildConfiguration;
307 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
308 | buildSettings = {
309 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
310 | CLANG_ENABLE_MODULES = YES;
311 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
312 | ENABLE_BITCODE = NO;
313 | FRAMEWORK_SEARCH_PATHS = (
314 | "$(inherited)",
315 | "$(PROJECT_DIR)/Flutter",
316 | );
317 | INFOPLIST_FILE = Runner/Info.plist;
318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
319 | LIBRARY_SEARCH_PATHS = (
320 | "$(inherited)",
321 | "$(PROJECT_DIR)/Flutter",
322 | );
323 | PRODUCT_BUNDLE_IDENTIFIER = com.example.ghDropmenudemo;
324 | PRODUCT_NAME = "$(TARGET_NAME)";
325 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
326 | SWIFT_VERSION = 5.0;
327 | VERSIONING_SYSTEM = "apple-generic";
328 | };
329 | name = Profile;
330 | };
331 | 97C147031CF9000F007C117D /* Debug */ = {
332 | isa = XCBuildConfiguration;
333 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
334 | buildSettings = {
335 | ALWAYS_SEARCH_USER_PATHS = NO;
336 | CLANG_ANALYZER_NONNULL = YES;
337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
338 | CLANG_CXX_LIBRARY = "libc++";
339 | CLANG_ENABLE_MODULES = YES;
340 | CLANG_ENABLE_OBJC_ARC = YES;
341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
342 | CLANG_WARN_BOOL_CONVERSION = YES;
343 | CLANG_WARN_COMMA = YES;
344 | CLANG_WARN_CONSTANT_CONVERSION = YES;
345 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
347 | CLANG_WARN_EMPTY_BODY = YES;
348 | CLANG_WARN_ENUM_CONVERSION = YES;
349 | CLANG_WARN_INFINITE_RECURSION = YES;
350 | CLANG_WARN_INT_CONVERSION = YES;
351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
356 | CLANG_WARN_STRICT_PROTOTYPES = YES;
357 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
358 | CLANG_WARN_UNREACHABLE_CODE = YES;
359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
360 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
361 | COPY_PHASE_STRIP = NO;
362 | DEBUG_INFORMATION_FORMAT = dwarf;
363 | ENABLE_STRICT_OBJC_MSGSEND = YES;
364 | ENABLE_TESTABILITY = YES;
365 | GCC_C_LANGUAGE_STANDARD = gnu99;
366 | GCC_DYNAMIC_NO_PIC = NO;
367 | GCC_NO_COMMON_BLOCKS = YES;
368 | GCC_OPTIMIZATION_LEVEL = 0;
369 | GCC_PREPROCESSOR_DEFINITIONS = (
370 | "DEBUG=1",
371 | "$(inherited)",
372 | );
373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
375 | GCC_WARN_UNDECLARED_SELECTOR = YES;
376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
377 | GCC_WARN_UNUSED_FUNCTION = YES;
378 | GCC_WARN_UNUSED_VARIABLE = YES;
379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
380 | MTL_ENABLE_DEBUG_INFO = YES;
381 | ONLY_ACTIVE_ARCH = YES;
382 | SDKROOT = iphoneos;
383 | TARGETED_DEVICE_FAMILY = "1,2";
384 | };
385 | name = Debug;
386 | };
387 | 97C147041CF9000F007C117D /* Release */ = {
388 | isa = XCBuildConfiguration;
389 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
390 | buildSettings = {
391 | ALWAYS_SEARCH_USER_PATHS = NO;
392 | CLANG_ANALYZER_NONNULL = YES;
393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
394 | CLANG_CXX_LIBRARY = "libc++";
395 | CLANG_ENABLE_MODULES = YES;
396 | CLANG_ENABLE_OBJC_ARC = YES;
397 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
398 | CLANG_WARN_BOOL_CONVERSION = YES;
399 | CLANG_WARN_COMMA = YES;
400 | CLANG_WARN_CONSTANT_CONVERSION = YES;
401 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
402 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
403 | CLANG_WARN_EMPTY_BODY = YES;
404 | CLANG_WARN_ENUM_CONVERSION = YES;
405 | CLANG_WARN_INFINITE_RECURSION = YES;
406 | CLANG_WARN_INT_CONVERSION = YES;
407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
408 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
409 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
411 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
412 | CLANG_WARN_STRICT_PROTOTYPES = YES;
413 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
414 | CLANG_WARN_UNREACHABLE_CODE = YES;
415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
416 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
417 | COPY_PHASE_STRIP = NO;
418 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
419 | ENABLE_NS_ASSERTIONS = NO;
420 | ENABLE_STRICT_OBJC_MSGSEND = YES;
421 | GCC_C_LANGUAGE_STANDARD = gnu99;
422 | GCC_NO_COMMON_BLOCKS = YES;
423 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
424 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
425 | GCC_WARN_UNDECLARED_SELECTOR = YES;
426 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
427 | GCC_WARN_UNUSED_FUNCTION = YES;
428 | GCC_WARN_UNUSED_VARIABLE = YES;
429 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
430 | MTL_ENABLE_DEBUG_INFO = NO;
431 | SDKROOT = iphoneos;
432 | SUPPORTED_PLATFORMS = iphoneos;
433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
434 | TARGETED_DEVICE_FAMILY = "1,2";
435 | VALIDATE_PRODUCT = YES;
436 | };
437 | name = Release;
438 | };
439 | 97C147061CF9000F007C117D /* Debug */ = {
440 | isa = XCBuildConfiguration;
441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
442 | buildSettings = {
443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
444 | CLANG_ENABLE_MODULES = YES;
445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
446 | ENABLE_BITCODE = NO;
447 | FRAMEWORK_SEARCH_PATHS = (
448 | "$(inherited)",
449 | "$(PROJECT_DIR)/Flutter",
450 | );
451 | INFOPLIST_FILE = Runner/Info.plist;
452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
453 | LIBRARY_SEARCH_PATHS = (
454 | "$(inherited)",
455 | "$(PROJECT_DIR)/Flutter",
456 | );
457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.ghDropmenudemo;
458 | PRODUCT_NAME = "$(TARGET_NAME)";
459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
461 | SWIFT_VERSION = 5.0;
462 | VERSIONING_SYSTEM = "apple-generic";
463 | };
464 | name = Debug;
465 | };
466 | 97C147071CF9000F007C117D /* Release */ = {
467 | isa = XCBuildConfiguration;
468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
469 | buildSettings = {
470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
471 | CLANG_ENABLE_MODULES = YES;
472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
473 | ENABLE_BITCODE = NO;
474 | FRAMEWORK_SEARCH_PATHS = (
475 | "$(inherited)",
476 | "$(PROJECT_DIR)/Flutter",
477 | );
478 | INFOPLIST_FILE = Runner/Info.plist;
479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
480 | LIBRARY_SEARCH_PATHS = (
481 | "$(inherited)",
482 | "$(PROJECT_DIR)/Flutter",
483 | );
484 | PRODUCT_BUNDLE_IDENTIFIER = com.example.ghDropmenudemo;
485 | PRODUCT_NAME = "$(TARGET_NAME)";
486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
487 | SWIFT_VERSION = 5.0;
488 | VERSIONING_SYSTEM = "apple-generic";
489 | };
490 | name = Release;
491 | };
492 | /* End XCBuildConfiguration section */
493 |
494 | /* Begin XCConfigurationList section */
495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
496 | isa = XCConfigurationList;
497 | buildConfigurations = (
498 | 97C147031CF9000F007C117D /* Debug */,
499 | 97C147041CF9000F007C117D /* Release */,
500 | 249021D3217E4FDB00AE95B9 /* Profile */,
501 | );
502 | defaultConfigurationIsVisible = 0;
503 | defaultConfigurationName = Release;
504 | };
505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
506 | isa = XCConfigurationList;
507 | buildConfigurations = (
508 | 97C147061CF9000F007C117D /* Debug */,
509 | 97C147071CF9000F007C117D /* Release */,
510 | 249021D4217E4FDB00AE95B9 /* Profile */,
511 | );
512 | defaultConfigurationIsVisible = 0;
513 | defaultConfigurationName = Release;
514 | };
515 | /* End XCConfigurationList section */
516 | };
517 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
518 | }
519 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | gh_dropmenudemo
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/lib/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/lib/.DS_Store
--------------------------------------------------------------------------------
/lib/GHFilterDemo.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 | import './services/ScreenAdaper.dart';
4 | import './services/httptool.dart';
5 | import './widget/GHCustomAppbar.dart';
6 | import './model/GHGoodsModel.dart';
7 | import 'package:transparent_image/transparent_image.dart';
8 | import 'package:flutter_easyrefresh/easy_refresh.dart';
9 | import 'dart:convert';
10 | import './widget/GHLoading.dart';
11 | import 'package:flutter_screenutil/flutter_screenutil.dart';
12 |
13 | /// 商品列表
14 | class GHFilterDemo extends StatefulWidget {
15 | Map arguments;
16 |
17 | GHFilterDemo({Key key, this.arguments}) : super(key: key);
18 |
19 | _GHFilterDemoState createState() => _GHFilterDemoState();
20 | }
21 |
22 | class _GHFilterDemoState extends State {
23 | /// 最低价
24 | TextEditingController _minPriceEditingController =
25 | new TextEditingController();
26 |
27 | /// 最高价
28 | TextEditingController _maxPriceEditingController =
29 | new TextEditingController();
30 |
31 | //Scaffold key 用于打开侧滑筛选菜单
32 | final GlobalKey _scaffoldKey = new GlobalKey();
33 |
34 | //用于上拉分页 listview 的控制器
35 | EasyRefreshController _controller = EasyRefreshController();
36 |
37 | /// 分页
38 | int _skip = 0;
39 |
40 | /// 销量最高
41 | String _isSales = "";
42 |
43 | /// 销量最高
44 | String _isPrice = "";
45 |
46 | /// 用户点击价格的次数
47 | int _count = 0;
48 |
49 | /// _flag
50 | bool _flag = true;
51 |
52 | /// 所有的商品数据
53 | List _list = [];
54 |
55 | bool seletect = false;
56 |
57 | /// 构造筛选Map
58 | List _filterList = [
59 | {
60 | "id": "1",
61 | "title": "综合",
62 | "fileds": "all",
63 | "sort": "1",
64 | "seletecd": "1",
65 | },
66 | {
67 | "id": "2",
68 | "title": "销量",
69 | "fileds": 'saleCount',
70 | "sort": "1",
71 | "seletecd": "0"
72 | },
73 | {"id": "3", "title": "价格", "fileds": 'price', "sort": "1", "seletecd": "0"},
74 | {"id": "4", "title": "筛选", "seletecd": "0"}
75 | ];
76 |
77 | /// 构造筛选Map
78 | List _firstList = [
79 | {"id": "1", "title": "京东物流", "type": "1", "seletecd": "0"},
80 | {"id": "2", "title": "货到付款", "type": "2", "seletecd": "0"},
81 | {"id": "3", "title": "仅看有货", "type": "3", "seletecd": "0"},
82 | {"id": "4", "title": "京东国际", "type": "5", "seletecd": "0"}
83 | ];
84 |
85 |
86 | /// 构造筛选Map
87 | List _thirdList = [
88 | {"id": "1", "title": "32G", "type": "6", "seletecd": "0"},
89 | {"id": "2", "title": "64G", "type": "7", "seletecd": "0"},
90 | {"id": "3", "title": "128G", "type": "8", "seletecd": "0"},
91 | {"id": "1", "title": "256", "type": "9", "seletecd": "0"}
92 | ];
93 |
94 | List _seletecdList = [];
95 |
96 | //二级导航选中判断
97 | int _selectHeaderId = 1;
98 |
99 | int _countLength = 10;
100 |
101 | /// 请求数据
102 | void _loadData() async {
103 | if (this._count == 0) {
104 | this._isPrice = "";
105 | } else if (this._count == 1) {
106 | this._isPrice = "price";
107 | } else {
108 | this._isPrice = "-price";
109 | }
110 |
111 | /// 默认最小值
112 | int minPrice = 0;
113 | if (this._minPriceEditingController.text.length > 0) {
114 | minPrice = int.parse(this._minPriceEditingController.text);
115 | }
116 |
117 | /// 默认最大值
118 | int maxPrice = 2147483647;
119 | if (this._maxPriceEditingController.text.length > 0) {
120 | maxPrice = int.parse(this._maxPriceEditingController.text);
121 | }
122 |
123 | var and = "\$and";
124 | var gt = "\$gt";
125 | var lt = "\$lt";
126 | var icn = "\$in";
127 |
128 | Map wherePrice = {
129 | and: [
130 | {
131 | "price": {gt: minPrice}
132 | },
133 | {
134 | "price": {lt: maxPrice}
135 | },
136 | ]
137 | };
138 |
139 | List types = [];
140 |
141 | this._seletecdList.forEach((element) {
142 | if (element["seletecd"] == "1") {
143 | types.add(element["type"]);
144 | }
145 | });
146 |
147 | if (types.length > 0) {
148 | Map whereType = {
149 | "service": {icn: types},
150 | };
151 | wherePrice.addAll(whereType);
152 | }
153 |
154 | var jsonWherePrice = jsonEncode(wherePrice);
155 | var parameterWherePrice = Uri.encodeFull(jsonWherePrice);
156 |
157 | var url = "https://a4cj1hm5.api.lncld.net/1.1/classes/" +
158 | "shopGoodsList?limit=10&&skip=${this._skip}&&order=${this._isSales},${this._isPrice},${"createdAt"}&&where=${parameterWherePrice}";
159 |
160 | print(url);
161 | await HttpRequest.request(url, method: 'GET').then((value) {
162 | List _goods = GHGoodsModel.fromJson(value).results;
163 | List _items = [];
164 | for (var item in _goods) {
165 | _items.add(item);
166 | }
167 |
168 | setState(() {
169 | this._list.addAll(_items);
170 | });
171 |
172 | if (_goods.length == 10) {
173 | this._controller.finishRefresh();
174 | }
175 |
176 | if (_goods.length < 10) {
177 | this._controller.finishLoad(success: true, noMore: true);
178 | }
179 | GHLoading.hideLoading(context);
180 | });
181 | }
182 |
183 | @override
184 | void initState() {
185 | super.initState();
186 | }
187 |
188 | /// 改变筛选菜单状态
189 | _changeFilterStatus(index, seletecd) {
190 | Map map = this._filterList[index];
191 | map["seletecd"] = seletecd;
192 | setState(() {});
193 | }
194 |
195 | /// 重置所有数据
196 | _reastData() {
197 | this._seletecdList.forEach((element) {
198 | setState(() {
199 | element["seletecd"] = "0";
200 | });
201 | });
202 |
203 | this._changeFilterStatus(3, "0");
204 | this._minPriceEditingController.text = "";
205 | this._maxPriceEditingController.text = "";
206 | }
207 |
208 | /// 点击确定
209 | _clickSure() {
210 | if ((this._seletecdList != null && this._seletecdList.length > 0) ||
211 | this._maxPriceEditingController.text.length > 0 ||
212 | this._minPriceEditingController.text.length > 0) {
213 | _changeFilterStatus(3, "1");
214 | }
215 | this._controller.callRefresh();
216 | }
217 |
218 | /// 获取用户选中
219 | _getSeletecdList() {
220 | List seletecdList = [];
221 | this._firstList.forEach((element) {
222 | if (element["seletecd"] == "1") {
223 | seletecdList.add(element);
224 | }
225 | });
226 |
227 | this._thirdList.forEach((element) {
228 | if (element["seletecd"] == "1") {
229 | seletecdList.add(element);
230 | }
231 | });
232 | this._seletecdList = seletecdList;
233 | }
234 |
235 | /// 侧滑每行的标题
236 | Widget _sideSectionTitle(String title, [List list]) {
237 | List array = [];
238 | List test = [];
239 |
240 | if (list != null) {
241 | list.forEach((element) {
242 | if (element["seletecd"] == "1") {
243 | array.add(element["title"]);
244 | test.join(element["title"]);
245 | }
246 | });
247 | }
248 | return Container(
249 | padding: EdgeInsets.fromLTRB(10, 20, 10, 0),
250 | child: Row(
251 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
252 | children: [
253 | Container(
254 | child: Text(
255 | title,
256 | style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
257 | ),
258 | ),
259 | Container(
260 | child: Row(
261 | children: [
262 | Container(
263 | width: 200,
264 | child: Text(
265 | array.length > 0 ? array.toString() : "",
266 | style: TextStyle(color: Colors.red),
267 | textAlign: TextAlign.right,
268 | maxLines: 1,
269 | overflow: TextOverflow.clip,
270 | ),
271 | ),
272 | list != null && list.length > 6
273 | ? Container(
274 | child: InkWell(
275 | onTap: () {
276 | setState(() {
277 | this.seletect = !this.seletect;
278 | });
279 | },
280 | child: this.seletect == true
281 | ? Icon(Icons.arrow_drop_down)
282 | : Icon(Icons.arrow_drop_up),
283 | ),
284 | )
285 | : Text(""),
286 | ],
287 | ),
288 | )
289 | ],
290 | ),
291 | );
292 | }
293 |
294 | /// 侧滑筛选子项
295 | Widget _sideItem(list) {
296 | List actionList = [];
297 |
298 | if (list.length > 6) {
299 | for (var i = 0; i < 6; i++) {
300 | Map map = list[i];
301 | actionList.add(map);
302 | }
303 | }
304 | List temp = [];
305 | if (this.seletect && list.length > 6) {
306 | temp = actionList;
307 | } else {
308 | temp = list;
309 | }
310 | return Container(
311 | padding: EdgeInsets.only(top: 5),
312 | child: Wrap(
313 | spacing: 10,
314 | runSpacing: 5,
315 | children: temp.asMap().keys.map((f) {
316 | Map map = temp[f];
317 | return InkWell(
318 | onTap: () {
319 | setState(() {
320 | String sel = map["seletecd"];
321 | if (sel == "0") {
322 | map["seletecd"] = "1";
323 | } else {
324 | map["seletecd"] = "0";
325 | }
326 | });
327 | _getSeletecdList();
328 | },
329 | child: Container(
330 | decoration: BoxDecoration(
331 | borderRadius: BorderRadius.circular(30),
332 | border: Border.all(
333 | width: 0.5,
334 | color: map["seletecd"] == "0"
335 | ? Colors.transparent
336 | : Colors.red,
337 | )),
338 | alignment: Alignment.center,
339 | height: 36,
340 | width: 103,
341 | child: Chip(
342 | backgroundColor: map["seletecd"] == "0"
343 | ? Color.fromRGBO(240, 240, 240, 1)
344 | : Color.fromRGBO(245, 245, 245, 0.2),
345 | shape: RoundedRectangleBorder(
346 | borderRadius: BorderRadius.circular(30.0),
347 | ),
348 | label: Stack(
349 | alignment: Alignment.center,
350 | children: [
351 | Positioned(
352 | child: Container(
353 | width: double.infinity,
354 | child: Text(
355 | "#####",
356 | style: TextStyle(color: Colors.transparent),
357 | ),
358 | ),
359 | ),
360 | Container(
361 | child: Text(
362 | "${map["title"]}",
363 | style: TextStyle(
364 | fontSize: 12,
365 | color: map["seletecd"] == "1"
366 | ? Colors.red
367 | : Colors.black),
368 | ),
369 | ),
370 | ],
371 | ),
372 | ),
373 | ));
374 | }).toList(),
375 | ),
376 | );
377 | }
378 |
379 | Widget _sideTextItem([textEditingController, String hintText]) {
380 | return Container(
381 | alignment: Alignment.center,
382 | height: 30,
383 | width: 125,
384 | decoration: BoxDecoration(
385 | color: Color.fromRGBO(240, 240, 240, 1),
386 | borderRadius: BorderRadius.circular(40),
387 | ),
388 | child: TextField(
389 | controller: textEditingController,
390 | textAlign: TextAlign.center,
391 | style: TextStyle(fontSize: 12),
392 | decoration: InputDecoration(
393 | contentPadding: EdgeInsets.only(left: 0, top: 0),
394 | counterText: '',
395 | hintText: hintText,
396 | hintStyle: TextStyle(
397 | color: Colors.black38,
398 | ),
399 | border: OutlineInputBorder(
400 | borderSide: BorderSide.none,
401 | borderRadius: BorderRadius.circular(10),
402 | )),
403 | ),
404 | );
405 | }
406 |
407 | /// 侧滑价格
408 | Widget _sidePriceItem() {
409 | return Container(
410 | padding: EdgeInsets.fromLTRB(10, 10, 10, 0),
411 | child: Row(
412 | crossAxisAlignment: CrossAxisAlignment.center,
413 | mainAxisAlignment: MainAxisAlignment.start,
414 | children: [
415 | _sideTextItem(this._minPriceEditingController, "最低价"),
416 | SizedBox(
417 | width: 10,
418 | ),
419 | Container(
420 | height: 1,
421 | width: 10,
422 | color: Colors.black,
423 | ),
424 | SizedBox(
425 | width: 10,
426 | ),
427 | _sideTextItem(this._maxPriceEditingController, "最高价"),
428 | ],
429 | ),
430 | );
431 | }
432 |
433 | /// 侧滑筛选
434 | Widget _sideFilter() {
435 | return Container(
436 | child: Stack(
437 | children: [
438 | Positioned(
439 | bottom: 34,
440 | height: ScreenAdaper.height(80),
441 | child: Container(
442 | decoration: BoxDecoration(
443 | border: Border(
444 | top: BorderSide(
445 | width: 1,
446 | color: Colors.black12,
447 | ))),
448 | child: Row(
449 | crossAxisAlignment: CrossAxisAlignment.center,
450 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
451 | children: [
452 | GestureDetector(
453 | onTap: () {
454 | _reastData();
455 | },
456 | child: Container(
457 | color: Colors.white,
458 | alignment: Alignment.center,
459 | width: 175,
460 | child: Text(
461 | "重置",
462 | style: TextStyle(
463 | fontSize: 18,
464 | ),
465 | )),
466 | ),
467 | GestureDetector(
468 | onTap: () {
469 | this._clickSure();
470 | Navigator.pop(context);
471 | },
472 | child: Container(
473 | width: 175,
474 | color: Colors.red,
475 | alignment: Alignment.center,
476 | child: Text(
477 | "确定",
478 | style: TextStyle(fontSize: 18, color: Colors.white),
479 | ),
480 | ))
481 | ],
482 | ),
483 | ),
484 | ),
485 | Container(
486 | height: ScreenAdaper.getScreenHeight() - ScreenAdaper.height(80) - 30,
487 | child: ListView(
488 | children: [
489 | Container(
490 | child: Column(
491 | children: [
492 | _sideSectionTitle("服务/折扣", this._firstList),
493 | _sideItem(this._firstList),
494 | ],
495 | )),
496 | Container(
497 | child: Column(
498 | crossAxisAlignment: CrossAxisAlignment.start,
499 | children: [
500 | _sideSectionTitle("价格区间"),
501 | _sidePriceItem(),
502 | Container(
503 | child: Container(
504 | child: Column(
505 | children: [
506 | _sideSectionTitle("容量", this._thirdList),
507 | _sideItem(this._thirdList),
508 | ],
509 | ),
510 | ),
511 | )
512 | ],
513 | ),
514 | )
515 | ],
516 | ),
517 | )
518 | ],
519 | ));
520 | }
521 |
522 | /// 加载更多
523 | void _getMoreData() {
524 | this._skip += 10;
525 | this._loadData();
526 | }
527 |
528 | /// 下拉刷新
529 | void _getNewData() {
530 | this._skip = 0;
531 | this._list.clear();
532 | this._controller.resetLoadState();
533 | this._loadData();
534 | }
535 |
536 | /// 处理上箭头逻辑
537 | Widget _upArrow() {
538 | if (this._count % 2 == 0) {
539 | return Image.asset(
540 | "images/up.png",
541 | fit: BoxFit.fill,
542 | );
543 | } else {
544 | return Image.asset(
545 | "images/upSeletecd.png",
546 | fit: BoxFit.fill,
547 | );
548 | }
549 | }
550 |
551 | /// 处理下箭头逻辑
552 | Widget _downArrow() {
553 | if (this._count == 2) {
554 | return Image.asset(
555 | "images/downSeletecd.png",
556 | fit: BoxFit.fill,
557 | );
558 | } else {
559 | return Image.asset(
560 | "images/down.png",
561 | fit: BoxFit.fill,
562 | );
563 | }
564 | }
565 |
566 | /// 顶部筛选header
567 | Widget _filterHeader() {
568 | return Positioned(
569 | height: ScreenAdaper.height(80),
570 | width: ScreenAdaper.getScreenWidth(),
571 | top: 0,
572 | child: Container(
573 | decoration: BoxDecoration(
574 | border: Border(
575 | bottom: BorderSide(
576 | width: 1,
577 | color: Colors.black12,
578 | ))),
579 | child: Row(
580 | children: this._filterList.map((value) {
581 | return Expanded(
582 | child: GestureDetector(
583 | behavior: HitTestBehavior.opaque,
584 | onTap: () {
585 | /// 如果是筛选,弹出抽屉
586 | String id = value["id"];
587 | if (id == "4") {
588 | this._scaffoldKey.currentState.openEndDrawer();
589 | }
590 |
591 | if (id == "2") {
592 | /// 点击销量
593 | if (value["seletecd"] == "1") {
594 | return;
595 | }
596 | setState(() {
597 | this._filterList.map((value) {
598 | if (value["id"] == "1") {
599 | value["seletecd"] = "0";
600 | }
601 | if (value["id"] == "3") {
602 | value["seletecd"] = "0";
603 | }
604 | }).toList();
605 | value["seletecd"] = "1";
606 | });
607 | this._count = 0;
608 | this._isSales = "-sales";
609 | this._controller.callRefresh();
610 | }
611 |
612 | if (id == "1") {
613 | /// 点击综合
614 | this._isSales = "sales";
615 | if (value["seletecd"] == "1") {
616 | return;
617 | }
618 | setState(() {
619 | this._filterList.map((value) {
620 | if (value["id"] == "2") {
621 | value["seletecd"] = "0";
622 | }
623 | if (value["id"] == "3") {
624 | value["seletecd"] = "0";
625 | }
626 | }).toList();
627 | value["seletecd"] = "1";
628 | });
629 | this._count = 0;
630 | this._isSales = "sales";
631 | this._controller.callRefresh();
632 | }
633 |
634 | if (id == "3") {
635 | /// 点击价格
636 | setState(() {
637 | this._count++;
638 | if (this._count == 3 || this._count == 0) {
639 | this._count = 1;
640 | value["seletecd"] = "0";
641 | }
642 | if (this._count % 2 == 0 || this._count % 2 == 1) {
643 | value["seletecd"] = "1";
644 | }
645 |
646 | this._filterList.map((value) {
647 | if (value["id"] == "1") {
648 | value["seletecd"] = "0";
649 | }
650 | if (value["id"] == "2") {
651 | value["seletecd"] = "0";
652 | }
653 | }).toList();
654 | });
655 | this._isSales = "sales";
656 | this._isSales = "";
657 | this._controller.callRefresh();
658 | }
659 | },
660 | child: Stack(
661 | children: [
662 | Container(
663 | height: double.infinity,
664 | width: double.infinity,
665 | child: Row(
666 | crossAxisAlignment: CrossAxisAlignment.center,
667 | mainAxisAlignment: MainAxisAlignment.center,
668 | children: [
669 | Container(
670 | child: Text(
671 | "${value["title"]}",
672 | style: TextStyle(
673 | fontSize: 14,
674 | fontWeight: FontWeight.bold,
675 | color: value["seletecd"] == "1"
676 | ? Colors.red
677 | : Colors.black87,
678 | ),
679 | ),
680 | ),
681 | SizedBox(
682 | width: 5,
683 | ),
684 | value["title"] == "价格"
685 | ? Container(
686 | height: ScreenAdaper.height(60),
687 | child: Column(
688 | mainAxisAlignment:
689 | MainAxisAlignment.center,
690 | children: [
691 | Container(
692 | height: 6,
693 | width: 10,
694 | child: this._upArrow(),
695 | ),
696 | SizedBox(
697 | height: 2,
698 | ),
699 | Container(
700 | height: 6,
701 | width: 10,
702 | child: this._downArrow(),
703 | )
704 | ],
705 | ),
706 | )
707 | : Text(""),
708 | value["title"] == "筛选" ? Container(
709 | height: 16,
710 | width: 20,
711 | child: value["seletecd"] == "0" ? Image.asset("images/filter.png"):Image.asset("images/filterSeletecd.png"),
712 | ):Text(""),
713 | ],
714 | ))
715 | ],
716 | )));
717 | }).toList(),
718 | ),
719 | ),
720 | );
721 | }
722 |
723 | /// 自定义导航条
724 | Widget _customAppbar(context) {
725 | return GHCustomAppbar(
726 | contentHeight: ScreenUtil.bottomBarHeight,
727 | leadingWidget: Container(
728 | padding: EdgeInsets.only(left: 20),
729 | child: InkWell(
730 | onTap: () {
731 | },
732 | child: Icon(
733 | Icons.arrow_back_ios,
734 | color: Colors.black38,
735 | size: 20,
736 | ),
737 | ),
738 | ),
739 | titleWidget: Container(
740 | child: Container(
741 | width: ScreenAdaper.getScreenWidth() - 100,
742 | height: ScreenAdaper.height(50),
743 | decoration: BoxDecoration(
744 | color: Color.fromRGBO(233, 233, 233, 0.8),
745 | borderRadius: BorderRadius.circular(30),
746 | ),
747 | child: Row(
748 | children: [
749 | Container(
750 | padding: EdgeInsets.fromLTRB(5, 5, 0, 5),
751 | alignment: Alignment.center,
752 | child: Icon(
753 | Icons.search,
754 | color: Colors.black12,
755 | ),
756 | ),
757 | Container(
758 | alignment: Alignment.center,
759 | height: ScreenAdaper.height(50),
760 | width: ScreenAdaper.width(240),
761 | child: TextField(
762 | maxLength: 30,
763 | cursorColor: Color.fromRGBO(170, 170, 170, 1),
764 | onChanged: (value) {
765 | },
766 | style: TextStyle(fontSize: 14),
767 | autofocus: false,
768 | decoration: InputDecoration(
769 | contentPadding: EdgeInsets.only(left: 0, top: 0),
770 | counterText: '',
771 | hintText: "请输入要搜索的内容",
772 | hintStyle: TextStyle(
773 | color: Color.fromRGBO(170, 170, 170, 0.1),
774 | ),
775 | border: OutlineInputBorder(
776 | borderSide: BorderSide.none,
777 | borderRadius: BorderRadius.circular(30),
778 | )),
779 | ),
780 | ),
781 | ],
782 | ),
783 | ),
784 | ),
785 | trailingWidget: Container(
786 | alignment: Alignment.center,
787 | width: 40,
788 | child: GestureDetector(
789 | onTap: () {
790 | print("切换布局");
791 | },
792 | child: Icon(Icons.filter_list),
793 | )),
794 | );
795 | }
796 |
797 | /// 侧滑筛选
798 | Widget _endDrawer() {
799 | return Container(
800 | width: 350,
801 | child: Drawer(
802 | child: _sideFilter(),
803 | ));
804 | }
805 |
806 | /// 商品列表Item
807 | Widget _goodsItem(GHGoodsItemModel goodsItemModel) {
808 | return GestureDetector(
809 | behavior: HitTestBehavior.opaque,
810 | onTap: () {
811 |
812 | },
813 | child: Container(
814 | padding: EdgeInsets.all(10),
815 | child: Row(
816 | crossAxisAlignment: CrossAxisAlignment.start,
817 | children: [
818 | Container(
819 | height: 86,
820 | width: 120,
821 | child: new FadeInImage.memoryNetwork(
822 | placeholder: kTransparentImage,
823 | image: goodsItemModel.url,
824 | ),
825 | ),
826 | Expanded(
827 | flex: 1,
828 | child: Container(
829 | padding: EdgeInsets.only(left: 10, right: 10),
830 | height: 80,
831 | alignment: Alignment.centerLeft,
832 | child: Column(
833 | crossAxisAlignment: CrossAxisAlignment.stretch,
834 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
835 | children: [
836 | Container(
837 | child: Column(
838 | crossAxisAlignment: CrossAxisAlignment.start,
839 | children: [
840 | Container(
841 | child: Text(
842 | goodsItemModel.title,
843 | maxLines: 1,
844 | overflow: TextOverflow.ellipsis,
845 | style: TextStyle(
846 | fontSize: 16,
847 | fontWeight: FontWeight.bold,
848 | ),
849 | ),
850 | ),
851 | Container(
852 | child: Text(
853 | goodsItemModel.description,
854 | style: TextStyle(
855 | fontSize: 10, color: Colors.black38),
856 | ),
857 | ),
858 | ],
859 | )),
860 | Container(
861 | child: Column(
862 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
863 | crossAxisAlignment: CrossAxisAlignment.start,
864 | children: [
865 | Container(
866 | child: Row(
867 | children: [
868 | Container(
869 | child: Text(
870 | "¥",
871 | style: TextStyle(
872 | fontSize: 10, color: Colors.red),
873 | ),
874 | ),
875 | Container(
876 | child: Text(
877 | "${goodsItemModel.price}",
878 | style: TextStyle(
879 | fontSize: 14,
880 | color: Colors.red,
881 | fontWeight: FontWeight.bold),
882 | ),
883 | ),
884 | ],
885 | )),
886 | SizedBox(
887 | height: 5,
888 | ),
889 | Container(
890 | child: Row(
891 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
892 | children: [
893 | Container(
894 | child: Row(
895 | children: [
896 | goodsItemModel.isSelf == "1"
897 | ? Container(
898 | alignment: Alignment.center,
899 | height: 16,
900 | width: 30,
901 | decoration: BoxDecoration(
902 | borderRadius:
903 | BorderRadius.circular(5),
904 | color: Colors.red,
905 | ),
906 | child: Text(
907 | "自营",
908 | style: TextStyle(
909 | color: Colors.white,
910 | fontSize: 10,
911 | ),
912 | ))
913 | : SizedBox(
914 | width: 0,
915 | ),
916 | goodsItemModel.isSelf == "1"
917 | ? SizedBox(
918 | width: 5,
919 | )
920 | : SizedBox(
921 | width: 0,
922 | ),
923 | Container(
924 | child: Text(
925 | "${goodsItemModel.evaluate}条评价",
926 | style: TextStyle(
927 | fontSize: 10,
928 | color: Colors.black54)),
929 | ),
930 | ],
931 | ),
932 | ),
933 | Container(
934 | child: Text("月售${goodsItemModel.sales}",
935 | style: TextStyle(
936 | fontSize: 10, color: Colors.black54)),
937 | ),
938 | ],
939 | )),
940 | SizedBox(
941 | height: 5,
942 | ),
943 | Container(
944 | height: 1,
945 | width: double.infinity,
946 | color: Color.fromRGBO(245, 245, 245, 1),
947 | )
948 | ],
949 | ),
950 | ),
951 | ],
952 | ),
953 | ),
954 | ),
955 | ],
956 | ),
957 | ));
958 | }
959 |
960 | /// 商品列表
961 | Widget _goodsList() {
962 | return Container(
963 | margin: EdgeInsets.only(top: ScreenAdaper.height(80)),
964 | child: EasyRefresh.custom(
965 | enableControlFinishRefresh: false,
966 | enableControlFinishLoad: true,
967 | firstRefresh: true,
968 | controller: this._controller,
969 | slivers: [
970 | SliverList(
971 | delegate: SliverChildBuilderDelegate(
972 | (context, index) {
973 | return _goodsItem(this._list[index]);
974 | },
975 | childCount: this._list.length,
976 | ),
977 | ),
978 | ],
979 | onLoad: () async {
980 | GHLoading.showLoading(context);
981 | await Future.delayed(Duration(seconds: 1), () {
982 | this._getMoreData();
983 | });
984 | },
985 | onRefresh: () async {
986 | GHLoading.showLoading(context);
987 | await Future.delayed(Duration(seconds: 1), () {
988 | this._getNewData();
989 | });
990 | },
991 | ));
992 | }
993 |
994 | @override
995 | Widget build(BuildContext context) {
996 | ScreenAdaper.init(context);
997 | return Scaffold(
998 | /// 侧滑筛选
999 | endDrawer: this._endDrawer(),
1000 |
1001 | /// 自定义导航条
1002 | appBar: _customAppbar(context),
1003 | key: this._scaffoldKey,
1004 | body: Stack(
1005 | children: [
1006 | /// 商品列表
1007 | this._goodsList(),
1008 |
1009 | /// 顶部筛选
1010 | this._filterHeader(),
1011 | ],
1012 | ));
1013 | }
1014 | }
1015 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'GHFilterDemo.dart';
3 |
4 | void main() => runApp(MyApp());
5 |
6 |
7 |
8 | class MyApp extends StatelessWidget {
9 | @override
10 | Widget build(BuildContext context) {
11 |
12 | return MaterialApp(
13 | title: 'GHDropMenuDemo',
14 | theme: ThemeData(
15 | primarySwatch: Colors.red,
16 | ),
17 | home: GHFilterDemo(),
18 |
19 | );
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/lib/model/GHGoodsModel.dart:
--------------------------------------------------------------------------------
1 | class GHGoodsModel {
2 | List results;
3 |
4 | GHGoodsModel({this.results});
5 |
6 | GHGoodsModel.fromJson(Map json) {
7 | if (json['results'] != null) {
8 | results = new List();
9 | json['results'].forEach((v) {
10 | results.add(new GHGoodsItemModel.fromJson(v));
11 | });
12 | }
13 | }
14 |
15 | Map toJson() {
16 | final Map data = new Map();
17 | if (this.results != null) {
18 | data['results'] = this.results.map((v) => v.toJson()).toList();
19 | }
20 | return data;
21 | }
22 | }
23 |
24 | class GHGoodsItemModel {
25 | String description;
26 | String updatedAt;
27 | String evaluate;
28 | String objectId;
29 | String createdAt;
30 | String title;
31 | String url;
32 | int price;
33 | int sales;
34 | String isSelf;
35 |
36 | GHGoodsItemModel(
37 | {this.description,
38 | this.updatedAt,
39 | this.evaluate,
40 | this.objectId,
41 | this.createdAt,
42 | this.title,
43 | this.url,
44 | this.sales,
45 | this.isSelf,
46 | this.price});
47 |
48 | GHGoodsItemModel.fromJson(Map json) {
49 | description = json['description'];
50 | updatedAt = json['updatedAt'];
51 | evaluate = json['evaluate'];
52 | objectId = json['objectId'];
53 | createdAt = json['createdAt'];
54 | title = json['title'];
55 | url = json['url'];
56 | sales = json['sales'];
57 | isSelf = json['isSelf'];
58 | price = json['price'];
59 | }
60 |
61 | Map toJson() {
62 | final Map data = new Map();
63 | data['description'] = this.description;
64 | data['updatedAt'] = this.updatedAt;
65 | data['evaluate'] = this.evaluate;
66 | data['objectId'] = this.objectId;
67 | data['createdAt'] = this.createdAt;
68 | data['title'] = this.title;
69 | data['url'] = this.url;
70 | data['sales'] = this.sales;
71 | data['price'] = this.price;
72 | data['isSelf'] = this.isSelf;
73 | return data;
74 | }
75 | }
--------------------------------------------------------------------------------
/lib/services/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shabake/GHDropMenuDemo_flutter/c83e66a3e077b3e030759d7b93c0c593d7ce8d50/lib/services/.DS_Store
--------------------------------------------------------------------------------
/lib/services/ScreenAdaper.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_screenutil/flutter_screenutil.dart';
2 |
3 | class ScreenAdaper {
4 | static init(context) {
5 | ScreenUtil.init(width: 750, height: 1334);
6 | }
7 |
8 | static height(double value) {
9 | return ScreenUtil().setHeight(value);
10 | }
11 |
12 | static width(double value) {
13 | return ScreenUtil().setWidth(value);
14 | }
15 |
16 | static getScreenHeight() {
17 | return ScreenUtil.screenHeight;
18 | }
19 |
20 | static getScreenWidth() {
21 | return ScreenUtil.screenWidth;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/services/httptool.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 |
3 | class HttpRequest {
4 | static final BaseOptions options = BaseOptions(baseUrl: "");
5 |
6 | static final Dio dio = Dio(options);
7 |
8 | static Future request(String url,
9 | {String method, Map params, Interceptor inter}) async {
10 | // 1.请求的单独配置
11 | Options options = Options(method: method);
12 | options.headers = httpHeaders;
13 | // // 2.添加第一个拦截器
14 | // Interceptor dInter =
15 | // InterceptorsWrapper(onRequest: (RequestOptions options) {
16 | // // 1.在进行任何网络请求的时候, 可以添加一个loading显示
17 | //
18 | // // 2.很多页面的访问必须要求携带Token,那么就可以在这里判断是有Token
19 | //
20 | // // 3.对参数进行一些处理,比如序列化处理等
21 | // print("拦截了请求");
22 | // return options;
23 | // }, onResponse: (Response response) {
24 | // print("拦截了响应");
25 | // return response;
26 | // }, onError: (DioError error) {
27 | // print("拦截了错误");
28 | // return error;
29 | // });
30 | //
31 | // List inters = [dInter];
32 | // if (inter != null) {
33 | // inters.add(inter);
34 | // }
35 | //
36 | // dio.interceptors.addAll(inters);
37 | // // 3.发送网络请求
38 | try {
39 | Response response =
40 | await dio.request(url, data: params, options: options);
41 | return response.data;
42 | } on DioError catch (e) {
43 | print(e);
44 | return Future.error(e);
45 | }
46 | }
47 | }
48 |
49 | const httpHeaders = {
50 | 'Content-Type': 'application/json',
51 | 'X-LC-Id': 'a4Cj1Hm5aMrdhob6xGw71B5A-gzGzoHsz',
52 | 'X-LC-Key': 'XQaL1tUQC0DCQxBA9fpoR21C',
53 |
54 | // 'X-LC-Key': 'XQaL1tUQC0DCQxBA9fpoR21C',
55 | };
56 |
--------------------------------------------------------------------------------
/lib/widget/GHButton.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class GHButton extends StatelessWidget {
4 | /// 背景颜色
5 | final Color backGroudColor;
6 |
7 | /// 标题
8 | final String title;
9 |
10 | /// 点击事件
11 | final Object tapAction;
12 |
13 | @override
14 | GHButton(this.title,
15 | {Key key, this.tapAction = null, this.backGroudColor = Colors.red})
16 | : super(key: key);
17 |
18 | Widget build(BuildContext context) {
19 | return Container(
20 | decoration: BoxDecoration(
21 | borderRadius: BorderRadius.circular(8),
22 | color: Colors.red
23 | ),
24 | height: 50,
25 | child: FlatButton(
26 | disabledColor: Colors.black12,
27 | onPressed: this.tapAction,
28 | child: Text(
29 | this.title,
30 | style: TextStyle(color: Colors.white, fontSize: 16),
31 | ),
32 | ),
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/widget/GHCustomAppbar.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | /// 这是一个可以指定SafeArea区域背景色的AppBar
4 | /// PreferredSizeWidget提供指定高度的方法
5 | /// 如果没有约束其高度,则会使用PreferredSizeWidget指定的高度
6 |
7 | class GHCustomAppbar extends StatefulWidget implements PreferredSizeWidget {
8 | final double contentHeight; //从外部指定高度
9 | Color navigationBarBackgroundColor; //设置导航栏背景的颜色
10 | Widget leadingWidget;
11 | Widget trailingWidget;
12 | Widget titleWidget;
13 |
14 | GHCustomAppbar({
15 | @required this.leadingWidget,
16 | this.contentHeight = 44,
17 | this.navigationBarBackgroundColor = Colors.white,
18 | this.titleWidget,
19 | this.trailingWidget,
20 | }) : super();
21 |
22 | @override
23 | State createState() {
24 | return new _GHCustomAppbarState();
25 | }
26 |
27 | @override
28 | Size get preferredSize => new Size.fromHeight(contentHeight);
29 | }
30 |
31 | /// 这里没有直接用SafeArea,而是用Container包装了一层
32 | /// 因为直接用SafeArea,会把顶部的statusBar区域留出空白
33 | /// 外层Container会填充SafeArea,指定外层Container背景色也会覆盖原来SafeArea的颜色
34 | /// var statusheight = MediaQuery.of(context).padding.top; 获取状态栏高度
35 |
36 | class _GHCustomAppbarState extends State {
37 | @override
38 | void initState() {
39 | super.initState();
40 | }
41 | get _drawer =>Drawer(
42 | child: Text('This is Drawer'),
43 | );
44 | @override
45 | Widget build(BuildContext context) {
46 | return Container(
47 | decoration: new BoxDecoration(
48 | boxShadow: [
49 | BoxShadow(
50 | color: Colors.black38,
51 | offset: Offset(0.01, 0.01),
52 | blurRadius: 10.0,
53 | spreadRadius: 0.01),
54 | BoxShadow(
55 | color: Colors.black38,
56 | offset: Offset(
57 | 0.01,
58 | 0.01,
59 | )),
60 | BoxShadow(color: Colors.white)
61 | ],
62 | ),
63 | child: SafeArea(
64 | top: true,
65 | child: Container(
66 | width: double.infinity,
67 | decoration: UnderlineTabIndicator(
68 | borderSide: BorderSide(width: 1.0, color: Color(0xFFeeeeee)),
69 | ),
70 | height: widget.contentHeight,
71 | child: Row(
72 | children: [
73 | Container(
74 | child: Container(
75 | child: widget.leadingWidget,
76 | ),
77 | ),
78 | SizedBox(
79 | width: 5,
80 | ),
81 | Container(
82 | child: widget.titleWidget,
83 | ),
84 | Container(
85 | child: Container(
86 | child: widget.trailingWidget,
87 | ),
88 | ),
89 | ],
90 | )),
91 | ),
92 | );
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/lib/widget/GHDialog.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class BaseDialog extends Dialog {
4 | final Object cancelAction;
5 |
6 | final Object sureAction;
7 |
8 | //子控件
9 | final Widget widget;
10 |
11 | // 高
12 | final double height;
13 |
14 | //宽
15 | final double width;
16 |
17 | BaseDialog(this.widget, this.height, this.width,
18 | {Key key, this.cancelAction, this.sureAction})
19 | : super(key: key);
20 |
21 | @override
22 | Widget build(BuildContext context) {
23 | return new Center(
24 | child: Padding(
25 | padding: const EdgeInsets.all(12.0),
26 | child: new Material(
27 | type: MaterialType.transparency,
28 | child: new Container(
29 | height: this.height,
30 | width: this.width,
31 | decoration: ShapeDecoration(
32 | color: Colors.white,
33 | shape: RoundedRectangleBorder(
34 | borderRadius: BorderRadius.all(
35 | Radius.circular(8.0),
36 | ))),
37 | child: Container(
38 | padding: EdgeInsets.all(20),
39 | child: Column(
40 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
41 | children: [
42 | Container(
43 | child: Text(
44 | "确定退出吗",
45 | style: TextStyle(fontSize: 20),
46 | )),
47 | Row(
48 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
49 | children: [
50 | InkWell(
51 | child: Container(
52 | child: Text(
53 | "取消",
54 | style: TextStyle(fontSize: 18),
55 | ),
56 | ),
57 | onTap: () {
58 | Navigator.of(context).pop(this);
59 | },
60 | ),
61 | InkWell(
62 | child: Container(
63 | child: Text(
64 | "确定",
65 | style:
66 | TextStyle(fontSize: 18, color: Colors.red),
67 | ),
68 | ),
69 | onTap: this.sureAction,
70 | )
71 | ],
72 | )
73 | ],
74 | ),
75 | ))),
76 | ),
77 | );
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/lib/widget/GHLoading.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | typedef OnSuccess = void Function(Object o);
5 | typedef OnError = void Function(Exception e);
6 |
7 | class HttpCallback {
8 | OnSuccess onSuccess;
9 | OnError onError;
10 |
11 | HttpCallback({OnSuccess this.onSuccess, OnError this.onError});
12 | }
13 |
14 | class GHLoading {
15 |
16 | static bool isShow = false;
17 |
18 | static Object dismiss;
19 |
20 | static showLoading(BuildContext context) {
21 | if (!isShow) {
22 | isShow = true;
23 | showGeneralDialog(
24 | context: context,
25 | // barrierColor: Colors.white, // 背景色
26 | barrierLabel: "加载中",
27 | barrierDismissible: false,
28 | // 是否能通过点击空白处关闭
29 | transitionDuration: const Duration(milliseconds: 150),
30 | // 动画时长
31 | pageBuilder: (BuildContext context, Animation animation,
32 | Animation secondaryAnimation) {
33 | return Align(
34 | child: Container(
35 | width: 100,
36 | height: 100,
37 | decoration: BoxDecoration(
38 | color: Colors.black54,
39 | borderRadius: BorderRadius.all(Radius.circular(10)),
40 | ),
41 | child: Theme(
42 | data: ThemeData(
43 | cupertinoOverrideTheme: CupertinoThemeData(
44 | brightness: Brightness.dark,
45 | ),
46 | ),
47 | child: CupertinoActivityIndicator(
48 | radius: 14,
49 | ),
50 | ),
51 | ),
52 | );
53 | }).then((value) {
54 | isShow = false;
55 | });
56 | }
57 | }
58 |
59 | static hideLoading(BuildContext context) {
60 | if (isShow) {
61 | Navigator.of(context).pop();
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/lib/widget/GHTextWidget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | /// 封装TextWidget
4 | class GHTextWidget extends StatelessWidget {
5 | /// 占位文字
6 | final String text;
7 |
8 | /// 点击事件
9 | final Object onChanged;
10 |
11 | /// 字号
12 | final double fontSize;
13 |
14 | /// 是否显示底部线条 默认显示
15 | final bool isShowBottomLine;
16 |
17 | final TextEditingController textEditingController;
18 |
19 | @override
20 | GHTextWidget(this.text,
21 | {Key key,
22 | this.onChanged = null,
23 | this.fontSize = 14,
24 | this.isShowBottomLine = true,
25 | this.textEditingController})
26 | : super(key: key);
27 |
28 | Widget build(BuildContext context) {
29 | return Container(
30 | decoration: BoxDecoration(
31 | border: Border(
32 | bottom: BorderSide(
33 | width: 1,
34 | color:
35 | this.isShowBottomLine == true ? Colors.black12 : Colors.transparent,
36 | ))),
37 | height: 50,
38 | child: TextField(
39 | controller: this.textEditingController,
40 | style: TextStyle(
41 | fontSize: this.fontSize,
42 | ),
43 | onChanged: this.onChanged,
44 | decoration: InputDecoration(
45 | suffixIcon: InkWell(
46 | onTap: () {
47 | WidgetsBinding.instance.addPostFrameCallback(
48 | (_) => this.textEditingController.text = "");
49 | },
50 | child: Icon(
51 | (Icons.clear),
52 | ),
53 | ),
54 | contentPadding: EdgeInsets.only(left: 0, top: 0),
55 | hintText: this.text,
56 | border: OutlineInputBorder(
57 | borderRadius: BorderRadius.circular(30),
58 | borderSide: BorderSide.none),
59 | )),
60 | );
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/lib/widget/LoadingWidget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class LoadingWidget extends StatelessWidget {
4 | const LoadingWidget({Key key}) : super(key: key);
5 |
6 | @override
7 | Widget build(BuildContext context) {
8 | return Center(
9 | child: Padding(
10 | padding: EdgeInsets.all(10.0),
11 | child: Row(
12 | mainAxisAlignment: MainAxisAlignment.center,
13 | crossAxisAlignment: CrossAxisAlignment.center,
14 | children: [
15 | CircularProgressIndicator(
16 | strokeWidth: 1.0,
17 | ),
18 | SizedBox(width: 10),
19 | Text(
20 | '正在加载',
21 | style: TextStyle(fontSize: 14.0),
22 | )
23 | ],
24 | ),
25 | ),
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: gh_dropmenudemo
2 | description: A new Flutter project.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # In Android, build-name is used as versionName while build-number used as versionCode.
10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
12 | # Read more about iOS versioning at
13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14 | version: 1.0.0+1
15 |
16 | environment:
17 | sdk: ">=2.1.0 <3.0.0"
18 |
19 | dependencies:
20 | flutter:
21 | sdk: flutter
22 |
23 | # The following adds the Cupertino Icons font to your application.
24 | # Use with the CupertinoIcons class for iOS style icons.
25 | cupertino_icons: ^0.1.2
26 | flutter_screenutil: ^2.1.0
27 | dio: ^3.0.9
28 | flutter_easyrefresh: ^2.1.1
29 | transparent_image: ^1.0.0
30 |
31 | dev_dependencies:
32 | flutter_test:
33 | sdk: flutter
34 |
35 |
36 | # For information on the generic Dart part of this file, see the
37 | # following page: https://dart.dev/tools/pub/pubspec
38 |
39 | # The following section is specific to Flutter.
40 | flutter:
41 |
42 | # The following line ensures that the Material Icons font is
43 | # included with your application, so that you can use the icons in
44 | # the material Icons class.
45 | uses-material-design: true
46 |
47 | # To add assets to your application, add an assets section, like this:
48 | assets:
49 | - images/user_bg.jpg
50 | - images/2.0x/user_bg.jpg
51 | - images/3.0x/user_bg.jpg
52 | - images/user.png
53 | - images/2.0x/user.png
54 | - images/3.0x/user.png
55 | - images/logo.png
56 | - images/2.0x/logo.png
57 | - images/3.0x/logo.png
58 | - images/bg.jpg
59 | - images/2.0x/bg.png
60 | - images/3.0x/bg.png
61 | - images/up.png
62 | - images/down.png
63 | - images/upSeletecd.png
64 | - images/downSeletecd.png
65 | - images/price.png
66 | - images/collect.png
67 | - images/customerService.png
68 | - images/shop.png
69 | - images/shoppingCart.png
70 | - images/filter.png
71 | - images/filterSeletecd.png
72 | - images/serviceIcon.png
73 |
74 | # An image asset can refer to one or more resolution-specific "variants", see
75 | # https://flutter.dev/assets-and-images/#resolution-aware.
76 |
77 | # For details regarding adding assets from package dependencies, see
78 | # https://flutter.dev/assets-and-images/#from-packages
79 |
80 | # To add custom fonts to your application, add a fonts section here,
81 | # in this "flutter" section. Each entry in this list should have a
82 | # "family" key with the font family name, and a "fonts" key with a
83 | # list giving the asset and other descriptors for the font. For
84 | # example:
85 | # fonts:
86 | # - family: Schyler
87 | # fonts:
88 | # - asset: fonts/Schyler-Regular.ttf
89 | # - asset: fonts/Schyler-Italic.ttf
90 | # style: italic
91 | # - family: Trajan Pro
92 | # fonts:
93 | # - asset: fonts/TrajanPro.ttf
94 | # - asset: fonts/TrajanPro_Bold.ttf
95 | # weight: 700
96 | #
97 | # For details regarding fonts from package dependencies,
98 | # see https://flutter.dev/custom-fonts/#from-packages
99 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:gh_dropmenudemo/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------