├── .gitignore
├── .idea
├── codeStyles
│ └── Project.xml
├── libraries
│ ├── Dart_SDK.xml
│ └── Flutter_Plugins.xml
├── misc.xml
├── modules.xml
├── vcs.xml
└── workspace.xml
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── example
├── .gitignore
├── .metadata
├── README.md
├── android
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── smartapeth
│ │ │ │ └── example
│ │ │ │ └── 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
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── ios
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── flutter_export_environment.sh
│ ├── 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
│ ├── main.dart
│ └── second_page.dart
└── pubspec.yaml
├── fancy_bottom_navigation.iml
├── fancy_gif.gif
├── fancy_theming.png
├── lib
├── fancy_bottom_navigation.dart
├── internal
│ └── tab_item.dart
└── paint
│ ├── half_clipper.dart
│ └── half_painter.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── fancy_widget_tests.dart
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 | ios/.generated/
9 | ios/Flutter/Generated.xcconfig
10 | ios/Runner/GeneratedPluginRegistrant.*
11 |
12 |
13 | # Created by https://www.gitignore.io/api/java,xcode,swift,kotlin,flutter,intellij,objective-c,androidstudio,visualstudiocode
14 | # Edit at https://www.gitignore.io/?templates=java,xcode,swift,kotlin,flutter,intellij,objective-c,androidstudio,visualstudiocode
15 |
16 | ### AndroidStudio ###
17 | # Covers files to be ignored for android development using Android Studio.
18 |
19 | # Built application files
20 | *.apk
21 | *.ap_
22 |
23 | # Files for the ART/Dalvik VM
24 | *.dex
25 |
26 | # Java class files
27 | *.class
28 |
29 | # Generated files
30 | bin/
31 | gen/
32 | out/
33 |
34 | # Gradle files
35 | .gradle
36 | .gradle/
37 | build/
38 |
39 | # Signing files
40 | .signing/
41 |
42 | # Local configuration file (sdk path, etc)
43 | local.properties
44 |
45 | # Proguard folder generated by Eclipse
46 | proguard/
47 |
48 | # Log Files
49 | *.log
50 |
51 | # Android Studio
52 | /*/build/
53 | /*/local.properties
54 | /*/out
55 | /*/*/build
56 | /*/*/production
57 | captures/
58 | .navigation/
59 | *.ipr
60 | *~
61 | *.swp
62 |
63 | # Android Patch
64 | gen-external-apklibs
65 |
66 | # External native build folder generated in Android Studio 2.2 and later
67 | .externalNativeBuild
68 |
69 | # NDK
70 | obj/
71 |
72 | # IntelliJ IDEA
73 | *.iml
74 | *.iws
75 | /out/
76 |
77 | # User-specific configurations
78 | .idea/caches/
79 | .idea/libraries/
80 | .idea/shelf/
81 | .idea/workspace.xml
82 | .idea/tasks.xml
83 | .idea/.name
84 | .idea/compiler.xml
85 | .idea/copyright/profiles_settings.xml
86 | .idea/encodings.xml
87 | .idea/misc.xml
88 | .idea/modules.xml
89 | .idea/scopes/scope_settings.xml
90 | .idea/dictionaries
91 | .idea/vcs.xml
92 | .idea/jsLibraryMappings.xml
93 | .idea/datasources.xml
94 | .idea/dataSources.ids
95 | .idea/sqlDataSources.xml
96 | .idea/dynamic.xml
97 | .idea/uiDesigner.xml
98 | .idea/assetWizardSettings.xml
99 |
100 | # OS-specific files
101 | .DS_Store
102 | .DS_Store?
103 | ._*
104 | .Spotlight-V100
105 | .Trashes
106 | ehthumbs.db
107 | Thumbs.db
108 |
109 | # Legacy Eclipse project files
110 | .classpath
111 | .project
112 | .cproject
113 | .settings/
114 |
115 | # Mobile Tools for Java (J2ME)
116 | .mtj.tmp/
117 |
118 | # Package Files #
119 | *.war
120 | *.ear
121 |
122 | # virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
123 | hs_err_pid*
124 |
125 | ## Plugin-specific files:
126 |
127 | # mpeltonen/sbt-idea plugin
128 | .idea_modules/
129 |
130 | # JIRA plugin
131 | atlassian-ide-plugin.xml
132 |
133 | # Mongo Explorer plugin
134 | .idea/mongoSettings.xml
135 |
136 | # Crashlytics plugin (for Android Studio and IntelliJ)
137 | com_crashlytics_export_strings.xml
138 | crashlytics.properties
139 | crashlytics-build.properties
140 | fabric.properties
141 |
142 | ### AndroidStudio Patch ###
143 |
144 | !/gradle/wrapper/gradle-wrapper.jar
145 |
146 | ### Flutter ###
147 | .flutter-plugins
148 |
149 | ### Intellij ###
150 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
151 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
152 |
153 | # User-specific stuff
154 | .idea/**/workspace.xml
155 | .idea/**/tasks.xml
156 | .idea/**/usage.statistics.xml
157 | .idea/**/dictionaries
158 | .idea/**/shelf
159 |
160 | # Generated files
161 | .idea/**/contentModel.xml
162 |
163 | # Sensitive or high-churn files
164 | .idea/**/dataSources/
165 | .idea/**/dataSources.ids
166 | .idea/**/dataSources.local.xml
167 | .idea/**/sqlDataSources.xml
168 | .idea/**/dynamic.xml
169 | .idea/**/uiDesigner.xml
170 | .idea/**/dbnavigator.xml
171 |
172 | # Gradle
173 | .idea/**/gradle.xml
174 | .idea/**/libraries
175 |
176 | # Gradle and Maven with auto-import
177 | # When using Gradle or Maven with auto-import, you should exclude module files,
178 | # since they will be recreated, and may cause churn. Uncomment if using
179 | # auto-import.
180 | # .idea/modules.xml
181 | # .idea/*.iml
182 | # .idea/modules
183 |
184 | # CMake
185 | cmake-build-*/
186 |
187 | # Mongo Explorer plugin
188 | .idea/**/mongoSettings.xml
189 |
190 | # File-based project format
191 |
192 | # IntelliJ
193 |
194 | # mpeltonen/sbt-idea plugin
195 |
196 | # JIRA plugin
197 |
198 | # Cursive Clojure plugin
199 | .idea/replstate.xml
200 |
201 | # Crashlytics plugin (for Android Studio and IntelliJ)
202 |
203 | # Editor-based Rest Client
204 | .idea/httpRequests
205 |
206 | # Android studio 3.1+ serialized cache file
207 | .idea/caches/build_file_checksums.ser
208 |
209 | ### Intellij Patch ###
210 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
211 |
212 | # *.iml
213 | # modules.xml
214 | # .idea/misc.xml
215 | # *.ipr
216 |
217 | # Sonarlint plugin
218 | .idea/sonarlint
219 |
220 | ### Java ###
221 | # Compiled class file
222 |
223 | # Log file
224 |
225 | # BlueJ files
226 | *.ctxt
227 |
228 | # Mobile Tools for Java (J2ME)
229 |
230 | # Package Files #
231 | *.jar
232 | *.nar
233 | *.zip
234 | *.tar.gz
235 | *.rar
236 |
237 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
238 |
239 | ### Kotlin ###
240 | # Compiled class file
241 |
242 | # Log file
243 |
244 | # BlueJ files
245 |
246 | # Mobile Tools for Java (J2ME)
247 |
248 | # Package Files #
249 |
250 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
251 |
252 | ### Objective-C ###
253 | # Xcode
254 | #
255 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
256 |
257 | ## Build generated
258 | DerivedData/
259 |
260 | ## Various settings
261 | *.pbxuser
262 | !default.pbxuser
263 | *.mode1v3
264 | !default.mode1v3
265 | *.mode2v3
266 | !default.mode2v3
267 | *.perspectivev3
268 | !default.perspectivev3
269 | xcuserdata/
270 |
271 | ## Other
272 | *.moved-aside
273 | *.xccheckout
274 | *.xcscmblueprint
275 |
276 | ## Obj-C/Swift specific
277 | *.hmap
278 | *.ipa
279 | *.dSYM.zip
280 | *.dSYM
281 |
282 | # CocoaPods
283 | #
284 | # We recommend against adding the Pods directory to your .gitignore. However
285 | # you should judge for yourself, the pros and cons are mentioned at:
286 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
287 | #
288 | # Pods/
289 | #
290 | # Add this line if you want to avoid checking in source code from the Xcode workspace
291 | # *.xcworkspace
292 |
293 | # Carthage
294 | #
295 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
296 | # Carthage/Checkouts
297 |
298 | Carthage/Build
299 |
300 | # fastlane
301 | #
302 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
303 | # screenshots whenever they are needed.
304 | # For more information about the recommended setup visit:
305 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
306 |
307 | fastlane/report.xml
308 | fastlane/Preview.html
309 | fastlane/screenshots/**/*.png
310 | fastlane/test_output
311 |
312 | # Code Injection
313 | #
314 | # After new code Injection tools there's a generated folder /iOSInjectionProject
315 | # https://github.com/johnno1962/injectionforxcode
316 |
317 | iOSInjectionProject/
318 |
319 | ### Objective-C Patch ###
320 |
321 | ### Swift ###
322 | # Xcode
323 | #
324 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
325 |
326 | ## Build generated
327 |
328 | ## Various settings
329 |
330 | ## Other
331 |
332 | ## Obj-C/Swift specific
333 |
334 | ## Playgrounds
335 | timeline.xctimeline
336 | playground.xcworkspace
337 |
338 | # Swift Package Manager
339 | #
340 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
341 | # Packages/
342 | # Package.pins
343 | # Package.resolved
344 | .build/
345 |
346 | # CocoaPods
347 | #
348 | # We recommend against adding the Pods directory to your .gitignore. However
349 | # you should judge for yourself, the pros and cons are mentioned at:
350 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
351 | #
352 | # Pods/
353 | #
354 | # Add this line if you want to avoid checking in source code from the Xcode workspace
355 | # *.xcworkspace
356 |
357 | # Carthage
358 | #
359 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
360 | # Carthage/Checkouts
361 |
362 |
363 | # fastlane
364 | #
365 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
366 | # screenshots whenever they are needed.
367 | # For more information about the recommended setup visit:
368 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
369 |
370 |
371 | # Code Injection
372 | #
373 | # After new code Injection tools there's a generated folder /iOSInjectionProject
374 | # https://github.com/johnno1962/injectionforxcode
375 |
376 |
377 | ### VisualStudioCode ###
378 | .vscode/*
379 | !.vscode/settings.json
380 | !.vscode/tasks.json
381 | !.vscode/launch.json
382 | !.vscode/extensions.json
383 |
384 | ### VisualStudioCode Patch ###
385 | # Ignore all local history of files
386 | .history
387 |
388 | ### Xcode ###
389 | # Xcode
390 | #
391 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
392 |
393 | ## User settings
394 |
395 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
396 |
397 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
398 |
399 | ### Xcode Patch ###
400 | *.xcodeproj/*
401 | !*.xcodeproj/project.pbxproj
402 | !*.xcodeproj/xcshareddata/
403 | !*.xcworkspace/contents.xcworkspacedata
404 | /*.gcno
405 | **/xcshareddata/WorkspaceSettings.xcsettings
406 |
407 | # End of https://www.gitignore.io/api/java,xcode,swift,kotlin,flutter,intellij,objective-c,androidstudio,visualstudiocode
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.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/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 |
--------------------------------------------------------------------------------
/.idea/libraries/Flutter_Plugins.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
19 |
31 |
32 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.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 |
41 |
42 |
43 |
44 | color
45 | circleColor
46 | activeIconColor
47 | barBackgroundColor
48 | textColor
49 | inactiveIconColor
50 | activeIcon
51 | alpha
52 | iconYAlign
53 | ALPHA_ON
54 | overla
55 | overl
56 | _overlayState
57 | anim
58 | setSta
59 | setSt
60 | maintainState
61 | _circleAlignX
62 | Create O
63 | currentIndex
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 | 1546626504166
158 |
159 |
160 | 1546626504166
161 |
162 |
163 |
164 |
165 |
166 |
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 | file://$PROJECT_DIR$/test/fancy_widget_tests.dart
202 | 29
203 |
204 |
205 |
206 | file://$PROJECT_DIR$/lib/fancy_bottom_navigation.dart
207 | 103
208 |
209 |
210 |
211 | file://$PROJECT_DIR$/lib/fancy_bottom_navigation.dart
212 | 63
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 | widget.tabs
222 | Dart
223 | EXPRESSION
224 |
225 |
226 | state
227 | Dart
228 | EXPRESSION
229 |
230 |
231 | widget
232 | Dart
233 | EXPRESSION
234 |
235 |
236 |
237 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: a226c0f0d9f5d699a3d706fd9060edf6da45b13b
8 | channel: master
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # [0.3.3] - Null safety
2 | * Contributed by rkishan516, thanks. Updates the lib for null safety
3 |
4 | # [0.3.2] - Add optional click to active tab circle
5 | * Contributed by TheWithz, thanks. The circle can have a click event when active.
6 |
7 | # [0.3.1] - Fix wrong icon bug
8 | * Fixes bug where wrong icon is shown when navigating away and back
9 |
10 | # [0.3.0] - Remove Overlay widget causing huge problems
11 | * Removed Overlay widget
12 | * Added test
13 | * Changes to constructor, as RouteObserver is no longer needed.
14 |
15 | # [0.2.0] - Bug fixes, and new functionality
16 | * Breaking change!! Widget now requires a RouteObserver
17 | * Fixes bug where the active tabs circle is left on screen when navigating away
18 | * Adds key to the Widget to enable programmatic selection.
19 |
20 | # [0.1.1] - Small change to constructor
21 | * No longer required BuildContext to be passed.
22 | * Moves some init code outside initState
23 |
24 | # [0.1.0] - Initial Beta Release
25 | * Beta release
26 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # FancyBottomNavigation
2 |
3 | 
4 |
5 | ## Getting Started
6 |
7 | Add the plugin (pub coming soon):
8 |
9 | ```yaml
10 | dependencies:
11 | ...
12 | fancy_bottom_navigation: ^0.3.2
13 | ```
14 |
15 | ## Limitations
16 | For now this is limited to more than 1 tab, and less than 5. So 2-4 tabs.
17 |
18 | ## Basic Usage
19 |
20 | Adding the widget
21 | ```dart
22 | bottomNavigationBar: FancyBottomNavigation(
23 | tabs: [
24 | TabData(iconData: Icons.home, title: "Home"),
25 | TabData(iconData: Icons.search, title: "Search"),
26 | TabData(iconData: Icons.shopping_cart, title: "Basket")
27 | ],
28 | onTabChangedListener: (position) {
29 | setState(() {
30 | currentPage = position;
31 | });
32 | },
33 | )
34 | ```
35 |
36 | ## TabData
37 | **iconData** -> Icon to be used for the tab
38 | **title** -> String to be used for the tab
39 | **onClick** -> Optional function to be used when the circle itself is clicked, on an active tab
40 |
41 | ## Attributes
42 | ### required
43 | **tabs** -> List of `TabData` objects
44 | **onTabChangedListener** -> Function to handle a tap on a tab, receives `int position`
45 |
46 | ### optional
47 | **initialSelection** -> Defaults to 0
48 | **circleColor** -> Defaults to null, derives from `Theme`
49 | **activeIconColor** -> Defaults to null, derives from `Theme`
50 | **inactiveIconColor** -> Defaults to null, derives from `Theme`
51 | **textColor** -> Defaults to null, derives from `Theme`
52 | **barBackgroundColor** -> Defaults to null, derives from `Theme`
53 | **key** -> Defaults to null
54 |
55 | ## Theming
56 |
57 | The bar will attempt to use your current theme out of the box, however you may want to theme it. Here are the attributes:
58 |
59 |
60 | 
61 |
62 | ## Programmatic Selection
63 |
64 | To select a tab programmatically you will need to assign a GlobalKey to the widget. When you want to change tabs you will need to access the State using this key, and then call `setPage(position)`.
65 | See example project, main.dart, line 75 for an example.
66 |
67 | ## Showcase
68 | Using this package in a live app, let me know and I'll add you app here.
69 |
70 |
71 | ## Inspiration
72 |
73 | This package was inspired by a design on dribbble by Manoj Rajput:
74 | https://dribbble.com/shots/5419022-Tab
75 |
76 | ## Contributing
77 |
78 | Contributions are welcome, please submit a PR :)
79 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.lock
4 | *.log
5 | *.pyc
6 | *.swp
7 | .DS_Store
8 | .atom/
9 | .buildlog/
10 | .history
11 | .svn/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # Visual Studio Code related
20 | .vscode/
21 |
22 | # Flutter/Dart/Pub related
23 | **/doc/api/
24 | .dart_tool/
25 | .flutter-plugins
26 | .packages
27 | .pub-cache/
28 | .pub/
29 | build/
30 |
31 | # Android related
32 | **/android/**/gradle-wrapper.jar
33 | **/android/.gradle
34 | **/android/captures/
35 | **/android/gradlew
36 | **/android/gradlew.bat
37 | **/android/local.properties
38 | **/android/**/GeneratedPluginRegistrant.java
39 |
40 | # iOS/XCode related
41 | **/ios/**/*.mode1v3
42 | **/ios/**/*.mode2v3
43 | **/ios/**/*.moved-aside
44 | **/ios/**/*.pbxuser
45 | **/ios/**/*.perspectivev3
46 | **/ios/**/*sync/
47 | **/ios/**/.sconsign.dblite
48 | **/ios/**/.tags*
49 | **/ios/**/.vagrant/
50 | **/ios/**/DerivedData/
51 | **/ios/**/Icon?
52 | **/ios/**/Pods/
53 | **/ios/**/.symlinks/
54 | **/ios/**/profile
55 | **/ios/**/xcuserdata
56 | **/ios/.generated/
57 | **/ios/Flutter/App.framework
58 | **/ios/Flutter/Flutter.framework
59 | **/ios/Flutter/Generated.xcconfig
60 | **/ios/Flutter/app.flx
61 | **/ios/Flutter/app.zip
62 | **/ios/Flutter/flutter_assets/
63 | **/ios/ServiceDefinitions.json
64 | **/ios/Runner/GeneratedPluginRegistrant.*
65 |
66 | # Exceptions to above rules.
67 | !**/ios/**/default.mode1v3
68 | !**/ios/**/default.mode2v3
69 | !**/ios/**/default.pbxuser
70 | !**/ios/**/default.perspectivev3
71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
72 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: a226c0f0d9f5d699a3d706fd9060edf6da45b13b
8 | channel: master
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # example
2 |
3 | A new Flutter application.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.io/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.io/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.io/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/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.smartapeth.example"
42 | minSdkVersion 16
43 | targetSdkVersion 27
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "android.support.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 'com.android.support.test:runner:1.0.2'
66 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
67 | }
68 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
15 |
18 |
25 |
29 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/com/smartapeth/example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.smartapeth.example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.2.71'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.2.1'
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 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/example/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-4.10.2-all.zip
7 |
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Flutter/flutter_export_environment.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # This is a generated file; do not edit or check into version control.
3 | export "FLUTTER_ROOT=/Users/tonyowen/dev/sdk/flutter"
4 | export "FLUTTER_APPLICATION_PATH=/Users/tonyowen/dev/projects/flutter/fancy_bottom_navigation/example"
5 | export "FLUTTER_TARGET=lib/main.dart"
6 | export "FLUTTER_BUILD_DIR=build"
7 | export "SYMROOT=${SOURCE_ROOT}/../build/ios"
8 | export "FLUTTER_BUILD_NAME=1.0.0"
9 | export "FLUTTER_BUILD_NUMBER=1"
10 | export "DART_OBFUSCATION=false"
11 | export "TRACK_WIDGET_CREATION=false"
12 | export "TREE_SHAKE_ICONS=false"
13 | export "PACKAGE_CONFIG=.packages"
14 |
--------------------------------------------------------------------------------
/example/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 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
15 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
16 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
17 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
22 | /* End PBXBuildFile section */
23 |
24 | /* Begin PBXCopyFilesBuildPhase section */
25 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
26 | isa = PBXCopyFilesBuildPhase;
27 | buildActionMask = 2147483647;
28 | dstPath = "";
29 | dstSubfolderSpec = 10;
30 | files = (
31 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
32 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
33 | );
34 | name = "Embed Frameworks";
35 | runOnlyForDeploymentPostprocessing = 0;
36 | };
37 | /* End PBXCopyFilesBuildPhase section */
38 |
39 | /* Begin PBXFileReference section */
40 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
41 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
42 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
43 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
44 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
45 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
46 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
47 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
48 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
49 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
50 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
51 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
52 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
53 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
54 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
55 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
56 | /* End PBXFileReference section */
57 |
58 | /* Begin PBXFrameworksBuildPhase section */
59 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
60 | isa = PBXFrameworksBuildPhase;
61 | buildActionMask = 2147483647;
62 | files = (
63 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
64 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | /* End PBXFrameworksBuildPhase section */
69 |
70 | /* Begin PBXGroup section */
71 | 9740EEB11CF90186004384FC /* Flutter */ = {
72 | isa = PBXGroup;
73 | children = (
74 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
75 | 3B80C3931E831B6300D905FE /* App.framework */,
76 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
77 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
78 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
79 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
80 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
81 | );
82 | name = Flutter;
83 | sourceTree = "";
84 | };
85 | 97C146E51CF9000F007C117D = {
86 | isa = PBXGroup;
87 | children = (
88 | 9740EEB11CF90186004384FC /* Flutter */,
89 | 97C146F01CF9000F007C117D /* Runner */,
90 | 97C146EF1CF9000F007C117D /* Products */,
91 | );
92 | sourceTree = "";
93 | };
94 | 97C146EF1CF9000F007C117D /* Products */ = {
95 | isa = PBXGroup;
96 | children = (
97 | 97C146EE1CF9000F007C117D /* Runner.app */,
98 | );
99 | name = Products;
100 | sourceTree = "";
101 | };
102 | 97C146F01CF9000F007C117D /* Runner */ = {
103 | isa = PBXGroup;
104 | children = (
105 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
106 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
107 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
108 | 97C147021CF9000F007C117D /* Info.plist */,
109 | 97C146F11CF9000F007C117D /* Supporting Files */,
110 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
111 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
112 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
113 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
114 | );
115 | path = Runner;
116 | sourceTree = "";
117 | };
118 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
119 | isa = PBXGroup;
120 | children = (
121 | );
122 | name = "Supporting Files";
123 | sourceTree = "";
124 | };
125 | /* End PBXGroup section */
126 |
127 | /* Begin PBXNativeTarget section */
128 | 97C146ED1CF9000F007C117D /* Runner */ = {
129 | isa = PBXNativeTarget;
130 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
131 | buildPhases = (
132 | 9740EEB61CF901F6004384FC /* Run Script */,
133 | 97C146EA1CF9000F007C117D /* Sources */,
134 | 97C146EB1CF9000F007C117D /* Frameworks */,
135 | 97C146EC1CF9000F007C117D /* Resources */,
136 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
137 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
138 | );
139 | buildRules = (
140 | );
141 | dependencies = (
142 | );
143 | name = Runner;
144 | productName = Runner;
145 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
146 | productType = "com.apple.product-type.application";
147 | };
148 | /* End PBXNativeTarget section */
149 |
150 | /* Begin PBXProject section */
151 | 97C146E61CF9000F007C117D /* Project object */ = {
152 | isa = PBXProject;
153 | attributes = {
154 | LastUpgradeCheck = 0910;
155 | ORGANIZATIONNAME = "The Chromium Authors";
156 | TargetAttributes = {
157 | 97C146ED1CF9000F007C117D = {
158 | CreatedOnToolsVersion = 7.3.1;
159 | LastSwiftMigration = 0910;
160 | };
161 | };
162 | };
163 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
164 | compatibilityVersion = "Xcode 3.2";
165 | developmentRegion = English;
166 | hasScannedForEncodings = 0;
167 | knownRegions = (
168 | en,
169 | Base,
170 | );
171 | mainGroup = 97C146E51CF9000F007C117D;
172 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
173 | projectDirPath = "";
174 | projectRoot = "";
175 | targets = (
176 | 97C146ED1CF9000F007C117D /* Runner */,
177 | );
178 | };
179 | /* End PBXProject section */
180 |
181 | /* Begin PBXResourcesBuildPhase section */
182 | 97C146EC1CF9000F007C117D /* Resources */ = {
183 | isa = PBXResourcesBuildPhase;
184 | buildActionMask = 2147483647;
185 | files = (
186 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
187 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
188 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
189 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
190 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
191 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
192 | );
193 | runOnlyForDeploymentPostprocessing = 0;
194 | };
195 | /* End PBXResourcesBuildPhase section */
196 |
197 | /* Begin PBXShellScriptBuildPhase section */
198 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
199 | isa = PBXShellScriptBuildPhase;
200 | buildActionMask = 2147483647;
201 | files = (
202 | );
203 | inputPaths = (
204 | );
205 | name = "Thin Binary";
206 | outputPaths = (
207 | );
208 | runOnlyForDeploymentPostprocessing = 0;
209 | shellPath = /bin/sh;
210 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
211 | };
212 | 9740EEB61CF901F6004384FC /* Run Script */ = {
213 | isa = PBXShellScriptBuildPhase;
214 | buildActionMask = 2147483647;
215 | files = (
216 | );
217 | inputPaths = (
218 | );
219 | name = "Run Script";
220 | outputPaths = (
221 | );
222 | runOnlyForDeploymentPostprocessing = 0;
223 | shellPath = /bin/sh;
224 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
225 | };
226 | /* End PBXShellScriptBuildPhase section */
227 |
228 | /* Begin PBXSourcesBuildPhase section */
229 | 97C146EA1CF9000F007C117D /* Sources */ = {
230 | isa = PBXSourcesBuildPhase;
231 | buildActionMask = 2147483647;
232 | files = (
233 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
234 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
235 | );
236 | runOnlyForDeploymentPostprocessing = 0;
237 | };
238 | /* End PBXSourcesBuildPhase section */
239 |
240 | /* Begin PBXVariantGroup section */
241 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
242 | isa = PBXVariantGroup;
243 | children = (
244 | 97C146FB1CF9000F007C117D /* Base */,
245 | );
246 | name = Main.storyboard;
247 | sourceTree = "";
248 | };
249 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
250 | isa = PBXVariantGroup;
251 | children = (
252 | 97C147001CF9000F007C117D /* Base */,
253 | );
254 | name = LaunchScreen.storyboard;
255 | sourceTree = "";
256 | };
257 | /* End PBXVariantGroup section */
258 |
259 | /* Begin XCBuildConfiguration section */
260 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
261 | isa = XCBuildConfiguration;
262 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
263 | buildSettings = {
264 | ALWAYS_SEARCH_USER_PATHS = NO;
265 | CLANG_ANALYZER_NONNULL = YES;
266 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
267 | CLANG_CXX_LIBRARY = "libc++";
268 | CLANG_ENABLE_MODULES = YES;
269 | CLANG_ENABLE_OBJC_ARC = YES;
270 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
271 | CLANG_WARN_BOOL_CONVERSION = YES;
272 | CLANG_WARN_COMMA = YES;
273 | CLANG_WARN_CONSTANT_CONVERSION = YES;
274 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
275 | CLANG_WARN_EMPTY_BODY = YES;
276 | CLANG_WARN_ENUM_CONVERSION = YES;
277 | CLANG_WARN_INFINITE_RECURSION = YES;
278 | CLANG_WARN_INT_CONVERSION = YES;
279 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
280 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
281 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
282 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
283 | CLANG_WARN_STRICT_PROTOTYPES = YES;
284 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
285 | CLANG_WARN_UNREACHABLE_CODE = YES;
286 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
287 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
288 | COPY_PHASE_STRIP = NO;
289 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
290 | ENABLE_NS_ASSERTIONS = NO;
291 | ENABLE_STRICT_OBJC_MSGSEND = YES;
292 | GCC_C_LANGUAGE_STANDARD = gnu99;
293 | GCC_NO_COMMON_BLOCKS = YES;
294 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
295 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
296 | GCC_WARN_UNDECLARED_SELECTOR = YES;
297 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
298 | GCC_WARN_UNUSED_FUNCTION = YES;
299 | GCC_WARN_UNUSED_VARIABLE = YES;
300 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
301 | MTL_ENABLE_DEBUG_INFO = NO;
302 | SDKROOT = iphoneos;
303 | TARGETED_DEVICE_FAMILY = "1,2";
304 | VALIDATE_PRODUCT = YES;
305 | };
306 | name = Profile;
307 | };
308 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
309 | isa = XCBuildConfiguration;
310 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
311 | buildSettings = {
312 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
313 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
314 | DEVELOPMENT_TEAM = S8QB4VV633;
315 | ENABLE_BITCODE = NO;
316 | FRAMEWORK_SEARCH_PATHS = (
317 | "$(inherited)",
318 | "$(PROJECT_DIR)/Flutter",
319 | );
320 | INFOPLIST_FILE = Runner/Info.plist;
321 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
322 | LIBRARY_SEARCH_PATHS = (
323 | "$(inherited)",
324 | "$(PROJECT_DIR)/Flutter",
325 | );
326 | PRODUCT_BUNDLE_IDENTIFIER = com.smartapeth.example;
327 | PRODUCT_NAME = "$(TARGET_NAME)";
328 | SWIFT_VERSION = 4.0;
329 | VERSIONING_SYSTEM = "apple-generic";
330 | };
331 | name = Profile;
332 | };
333 | 97C147031CF9000F007C117D /* Debug */ = {
334 | isa = XCBuildConfiguration;
335 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
336 | buildSettings = {
337 | ALWAYS_SEARCH_USER_PATHS = NO;
338 | CLANG_ANALYZER_NONNULL = YES;
339 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
340 | CLANG_CXX_LIBRARY = "libc++";
341 | CLANG_ENABLE_MODULES = YES;
342 | CLANG_ENABLE_OBJC_ARC = YES;
343 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
344 | CLANG_WARN_BOOL_CONVERSION = YES;
345 | CLANG_WARN_COMMA = YES;
346 | CLANG_WARN_CONSTANT_CONVERSION = YES;
347 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
348 | CLANG_WARN_EMPTY_BODY = YES;
349 | CLANG_WARN_ENUM_CONVERSION = YES;
350 | CLANG_WARN_INFINITE_RECURSION = YES;
351 | CLANG_WARN_INT_CONVERSION = YES;
352 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = 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_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
402 | CLANG_WARN_EMPTY_BODY = YES;
403 | CLANG_WARN_ENUM_CONVERSION = YES;
404 | CLANG_WARN_INFINITE_RECURSION = YES;
405 | CLANG_WARN_INT_CONVERSION = YES;
406 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
407 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
408 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
409 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
410 | CLANG_WARN_STRICT_PROTOTYPES = YES;
411 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
412 | CLANG_WARN_UNREACHABLE_CODE = YES;
413 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
414 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
415 | COPY_PHASE_STRIP = NO;
416 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
417 | ENABLE_NS_ASSERTIONS = NO;
418 | ENABLE_STRICT_OBJC_MSGSEND = YES;
419 | GCC_C_LANGUAGE_STANDARD = gnu99;
420 | GCC_NO_COMMON_BLOCKS = YES;
421 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
422 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
423 | GCC_WARN_UNDECLARED_SELECTOR = YES;
424 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
425 | GCC_WARN_UNUSED_FUNCTION = YES;
426 | GCC_WARN_UNUSED_VARIABLE = YES;
427 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
428 | MTL_ENABLE_DEBUG_INFO = NO;
429 | SDKROOT = iphoneos;
430 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
431 | TARGETED_DEVICE_FAMILY = "1,2";
432 | VALIDATE_PRODUCT = YES;
433 | };
434 | name = Release;
435 | };
436 | 97C147061CF9000F007C117D /* Debug */ = {
437 | isa = XCBuildConfiguration;
438 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
439 | buildSettings = {
440 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
441 | CLANG_ENABLE_MODULES = YES;
442 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
443 | ENABLE_BITCODE = NO;
444 | FRAMEWORK_SEARCH_PATHS = (
445 | "$(inherited)",
446 | "$(PROJECT_DIR)/Flutter",
447 | );
448 | INFOPLIST_FILE = Runner/Info.plist;
449 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
450 | LIBRARY_SEARCH_PATHS = (
451 | "$(inherited)",
452 | "$(PROJECT_DIR)/Flutter",
453 | );
454 | PRODUCT_BUNDLE_IDENTIFIER = com.smartapeth.example;
455 | PRODUCT_NAME = "$(TARGET_NAME)";
456 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
457 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
458 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
459 | SWIFT_VERSION = 4.0;
460 | VERSIONING_SYSTEM = "apple-generic";
461 | };
462 | name = Debug;
463 | };
464 | 97C147071CF9000F007C117D /* Release */ = {
465 | isa = XCBuildConfiguration;
466 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
467 | buildSettings = {
468 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
469 | CLANG_ENABLE_MODULES = YES;
470 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
471 | ENABLE_BITCODE = NO;
472 | FRAMEWORK_SEARCH_PATHS = (
473 | "$(inherited)",
474 | "$(PROJECT_DIR)/Flutter",
475 | );
476 | INFOPLIST_FILE = Runner/Info.plist;
477 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
478 | LIBRARY_SEARCH_PATHS = (
479 | "$(inherited)",
480 | "$(PROJECT_DIR)/Flutter",
481 | );
482 | PRODUCT_BUNDLE_IDENTIFIER = com.smartapeth.example;
483 | PRODUCT_NAME = "$(TARGET_NAME)";
484 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
485 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
486 | SWIFT_VERSION = 4.0;
487 | VERSIONING_SYSTEM = "apple-generic";
488 | };
489 | name = Release;
490 | };
491 | /* End XCBuildConfiguration section */
492 |
493 | /* Begin XCConfigurationList section */
494 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
495 | isa = XCConfigurationList;
496 | buildConfigurations = (
497 | 97C147031CF9000F007C117D /* Debug */,
498 | 97C147041CF9000F007C117D /* Release */,
499 | 249021D3217E4FDB00AE95B9 /* Profile */,
500 | );
501 | defaultConfigurationIsVisible = 0;
502 | defaultConfigurationName = Release;
503 | };
504 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
505 | isa = XCConfigurationList;
506 | buildConfigurations = (
507 | 97C147061CF9000F007C117D /* Debug */,
508 | 97C147071CF9000F007C117D /* Release */,
509 | 249021D4217E4FDB00AE95B9 /* Profile */,
510 | );
511 | defaultConfigurationIsVisible = 0;
512 | defaultConfigurationName = Release;
513 | };
514 | /* End XCConfigurationList section */
515 |
516 | };
517 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
518 | }
519 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/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: [UIApplicationLaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/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.
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | example
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 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:example/second_page.dart';
2 | import 'package:fancy_bottom_navigation/fancy_bottom_navigation.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | void main() => runApp(MyApp());
6 |
7 | class MyApp extends StatelessWidget {
8 | @override
9 | Widget build(BuildContext context) {
10 | return MaterialApp(
11 | title: 'Flutter Demo',
12 | theme: ThemeData(
13 | primarySwatch: Colors.deepOrange,
14 | ),
15 | home: MyHomePage(),
16 | );
17 | }
18 | }
19 |
20 | class MyHomePage extends StatefulWidget {
21 | @override
22 | _MyHomePageState createState() => _MyHomePageState();
23 | }
24 |
25 | class _MyHomePageState extends State {
26 | int currentPage = 0;
27 |
28 | GlobalKey bottomNavigationKey = GlobalKey();
29 |
30 | @override
31 | Widget build(BuildContext context) {
32 | return Scaffold(
33 | appBar: AppBar(
34 | title: Text("Fancy Bottom Navigation"),
35 | ),
36 | body: Container(
37 | decoration: BoxDecoration(color: Colors.white),
38 | child: Center(
39 | child: _getPage(currentPage),
40 | ),
41 | ),
42 | bottomNavigationBar: FancyBottomNavigation(
43 | tabs: [
44 | TabData(
45 | iconData: Icons.home,
46 | title: "Home",
47 | onclick: () {
48 | final FancyBottomNavigationState fState = bottomNavigationKey
49 | .currentState as FancyBottomNavigationState;
50 | fState.setPage(2);
51 | }),
52 | TabData(
53 | iconData: Icons.search,
54 | title: "Search",
55 | onclick: () => Navigator.of(context)
56 | .push(MaterialPageRoute(builder: (context) => SecondPage()))),
57 | TabData(iconData: Icons.shopping_cart, title: "Basket")
58 | ],
59 | initialSelection: 1,
60 | key: bottomNavigationKey,
61 | onTabChangedListener: (position) {
62 | setState(() {
63 | currentPage = position;
64 | });
65 | },
66 | ),
67 | drawer: Drawer(
68 | child: ListView(
69 | children: [Text("Hello"), Text("World")],
70 | ),
71 | ),
72 | );
73 | }
74 |
75 | _getPage(int page) {
76 | switch (page) {
77 | case 0:
78 | return Column(
79 | mainAxisSize: MainAxisSize.min,
80 | children: [
81 | Text("This is the home page"),
82 | RaisedButton(
83 | child: Text(
84 | "Start new page",
85 | style: TextStyle(color: Colors.white),
86 | ),
87 | color: Theme.of(context).primaryColor,
88 | onPressed: () {
89 | Navigator.of(context).push(
90 | MaterialPageRoute(builder: (context) => SecondPage()));
91 | },
92 | ),
93 | RaisedButton(
94 | child: Text(
95 | "Change to page 3",
96 | style: TextStyle(color: Colors.white),
97 | ),
98 | color: Theme.of(context).accentColor,
99 | onPressed: () {
100 | final FancyBottomNavigationState fState = bottomNavigationKey
101 | .currentState as FancyBottomNavigationState;
102 | fState.setPage(2);
103 | },
104 | )
105 | ],
106 | );
107 | case 1:
108 | return Column(
109 | mainAxisSize: MainAxisSize.min,
110 | children: [
111 | Text("This is the search page"),
112 | RaisedButton(
113 | child: Text(
114 | "Start new page",
115 | style: TextStyle(color: Colors.white),
116 | ),
117 | color: Theme.of(context).primaryColor,
118 | onPressed: () {
119 | Navigator.of(context).push(
120 | MaterialPageRoute(builder: (context) => SecondPage()));
121 | },
122 | )
123 | ],
124 | );
125 | default:
126 | return Column(
127 | mainAxisSize: MainAxisSize.min,
128 | children: [
129 | Text("This is the basket page"),
130 | RaisedButton(
131 | child: Text(
132 | "Start new page",
133 | style: TextStyle(color: Colors.white),
134 | ),
135 | color: Theme.of(context).primaryColor,
136 | onPressed: () {},
137 | )
138 | ],
139 | );
140 | }
141 | }
142 | }
143 |
--------------------------------------------------------------------------------
/example/lib/second_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class SecondPage extends StatefulWidget {
4 | @override
5 | _SecondPageState createState() => _SecondPageState();
6 | }
7 |
8 | class _SecondPageState extends State {
9 | @override
10 | Widget build(BuildContext context) {
11 | return Scaffold(
12 | appBar: AppBar(title: Text("Second page"),),
13 | body: Center(child: Text("Nothing to see here"),),
14 | );
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: example
2 | description: A new Flutter application.
3 |
4 | version: 1.0.0+1
5 |
6 | environment:
7 | sdk: ">=2.0.0-dev.68.0 <3.0.0"
8 |
9 | dependencies:
10 | flutter:
11 | sdk: flutter
12 | fancy_bottom_navigation:
13 | path: ../
14 |
15 | dev_dependencies:
16 | flutter_test:
17 | sdk: flutter
18 |
19 | flutter:
20 | uses-material-design: true
--------------------------------------------------------------------------------
/fancy_bottom_navigation.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/fancy_gif.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/fancy_gif.gif
--------------------------------------------------------------------------------
/fancy_theming.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunitowen/fancy_bottom_navigation/a376f24987b2fd0ddb600db0682578fc7322cf72/fancy_theming.png
--------------------------------------------------------------------------------
/lib/fancy_bottom_navigation.dart:
--------------------------------------------------------------------------------
1 | library fancy_bottom_navigation;
2 |
3 | import 'package:fancy_bottom_navigation/internal/tab_item.dart';
4 | import 'package:fancy_bottom_navigation/paint/half_clipper.dart';
5 | import 'package:fancy_bottom_navigation/paint/half_painter.dart';
6 | import 'package:flutter/material.dart';
7 |
8 | const double CIRCLE_SIZE = 60;
9 | const double ARC_HEIGHT = 70;
10 | const double ARC_WIDTH = 90;
11 | const double CIRCLE_OUTLINE = 10;
12 | const double SHADOW_ALLOWANCE = 20;
13 | const double BAR_HEIGHT = 60;
14 |
15 | class FancyBottomNavigation extends StatefulWidget {
16 | FancyBottomNavigation(
17 | {required this.tabs,
18 | required this.onTabChangedListener,
19 | this.key,
20 | this.initialSelection = 0,
21 | this.circleColor,
22 | this.activeIconColor,
23 | this.inactiveIconColor,
24 | this.textColor,
25 | this.barBackgroundColor})
26 | : assert(onTabChangedListener != null),
27 | assert(tabs != null),
28 | assert(tabs.length > 1 && tabs.length < 5);
29 |
30 | final Function(int position) onTabChangedListener;
31 | final Color? circleColor;
32 | final Color? activeIconColor;
33 | final Color? inactiveIconColor;
34 | final Color? textColor;
35 | final Color? barBackgroundColor;
36 | final List tabs;
37 | final int initialSelection;
38 |
39 | final Key? key;
40 |
41 | @override
42 | FancyBottomNavigationState createState() => FancyBottomNavigationState();
43 | }
44 |
45 | class FancyBottomNavigationState extends State
46 | with TickerProviderStateMixin, RouteAware {
47 | IconData nextIcon = Icons.search;
48 | IconData activeIcon = Icons.search;
49 |
50 | int currentSelected = 0;
51 | double _circleAlignX = 0;
52 | double _circleIconAlpha = 1;
53 |
54 | late Color circleColor;
55 | late Color activeIconColor;
56 | late Color inactiveIconColor;
57 | late Color barBackgroundColor;
58 | late Color textColor;
59 |
60 | @override
61 | void didChangeDependencies() {
62 | super.didChangeDependencies();
63 |
64 | activeIcon = widget.tabs[currentSelected].iconData;
65 |
66 | circleColor = widget.circleColor ??
67 | ((Theme.of(context).brightness == Brightness.dark)
68 | ? Colors.white
69 | : Theme.of(context).primaryColor);
70 |
71 | activeIconColor = widget.activeIconColor ??
72 | ((Theme.of(context).brightness == Brightness.dark)
73 | ? Colors.black54
74 | : Colors.white);
75 |
76 | barBackgroundColor = widget.barBackgroundColor ??
77 | ((Theme.of(context).brightness == Brightness.dark)
78 | ? Color(0xFF212121)
79 | : Colors.white);
80 | textColor = widget.textColor ??
81 | ((Theme.of(context).brightness == Brightness.dark)
82 | ? Colors.white
83 | : Colors.black54);
84 | inactiveIconColor = (widget.inactiveIconColor) ??
85 | ((Theme.of(context).brightness == Brightness.dark)
86 | ? Colors.white
87 | : Theme.of(context).primaryColor);
88 | }
89 |
90 | @override
91 | void initState() {
92 | super.initState();
93 | _setSelected(widget.tabs[widget.initialSelection].key);
94 | }
95 |
96 | _setSelected(UniqueKey key) {
97 | int selected = widget.tabs.indexWhere((tabData) => tabData.key == key);
98 |
99 | if (mounted) {
100 | setState(() {
101 | currentSelected = selected;
102 | _circleAlignX = -1 + (2 / (widget.tabs.length - 1) * selected);
103 | nextIcon = widget.tabs[selected].iconData;
104 | });
105 | }
106 | }
107 |
108 | @override
109 | Widget build(BuildContext context) {
110 | return Stack(
111 | overflow: Overflow.visible,
112 | alignment: Alignment.bottomCenter,
113 | children: [
114 | Container(
115 | height: BAR_HEIGHT,
116 | decoration: BoxDecoration(color: barBackgroundColor, boxShadow: [
117 | BoxShadow(
118 | color: Colors.black12, offset: Offset(0, -1), blurRadius: 8)
119 | ]),
120 | child: Row(
121 | mainAxisSize: MainAxisSize.max,
122 | crossAxisAlignment: CrossAxisAlignment.center,
123 | children: widget.tabs
124 | .map((t) => TabItem(
125 | uniqueKey: t.key,
126 | selected: t.key == widget.tabs[currentSelected].key,
127 | iconData: t.iconData,
128 | title: t.title,
129 | iconColor: inactiveIconColor,
130 | textColor: textColor,
131 | callbackFunction: (uniqueKey) {
132 | int selected = widget.tabs
133 | .indexWhere((tabData) => tabData.key == uniqueKey);
134 | widget.onTabChangedListener(selected);
135 | _setSelected(uniqueKey);
136 | _initAnimationAndStart(_circleAlignX, 1);
137 | }))
138 | .toList(),
139 | ),
140 | ),
141 | Positioned.fill(
142 | top: -(CIRCLE_SIZE + CIRCLE_OUTLINE + SHADOW_ALLOWANCE) / 2,
143 | child: Container(
144 | child: AnimatedAlign(
145 | duration: Duration(milliseconds: ANIM_DURATION),
146 | curve: Curves.easeOut,
147 | alignment: Alignment(_circleAlignX, 1),
148 | child: Padding(
149 | padding: const EdgeInsets.only(bottom: 15),
150 | child: FractionallySizedBox(
151 | widthFactor: 1 / widget.tabs.length,
152 | child: GestureDetector(
153 | onTap: widget.tabs[currentSelected].onclick as void
154 | Function()?,
155 | child: Stack(
156 | alignment: Alignment.center,
157 | children: [
158 | SizedBox(
159 | height:
160 | CIRCLE_SIZE + CIRCLE_OUTLINE + SHADOW_ALLOWANCE,
161 | width:
162 | CIRCLE_SIZE + CIRCLE_OUTLINE + SHADOW_ALLOWANCE,
163 | child: ClipRect(
164 | clipper: HalfClipper(),
165 | child: Container(
166 | child: Center(
167 | child: Container(
168 | width: CIRCLE_SIZE + CIRCLE_OUTLINE,
169 | height: CIRCLE_SIZE + CIRCLE_OUTLINE,
170 | decoration: BoxDecoration(
171 | color: Colors.white,
172 | shape: BoxShape.circle,
173 | boxShadow: [
174 | BoxShadow(
175 | color: Colors.black12,
176 | blurRadius: 8)
177 | ])),
178 | ),
179 | )),
180 | ),
181 | SizedBox(
182 | height: ARC_HEIGHT,
183 | width: ARC_WIDTH,
184 | child: CustomPaint(
185 | painter: HalfPainter(barBackgroundColor),
186 | )),
187 | SizedBox(
188 | height: CIRCLE_SIZE,
189 | width: CIRCLE_SIZE,
190 | child: Container(
191 | decoration: BoxDecoration(
192 | shape: BoxShape.circle, color: circleColor),
193 | child: Padding(
194 | padding: const EdgeInsets.all(0.0),
195 | child: AnimatedOpacity(
196 | duration:
197 | Duration(milliseconds: ANIM_DURATION ~/ 5),
198 | opacity: _circleIconAlpha,
199 | child: Icon(
200 | activeIcon,
201 | color: activeIconColor,
202 | ),
203 | ),
204 | ),
205 | ),
206 | )
207 | ],
208 | ),
209 | ),
210 | ),
211 | ),
212 | ),
213 | ),
214 | )
215 | ],
216 | );
217 | }
218 |
219 | _initAnimationAndStart(double from, double to) {
220 | _circleIconAlpha = 0;
221 |
222 | Future.delayed(Duration(milliseconds: ANIM_DURATION ~/ 5), () {
223 | setState(() {
224 | activeIcon = nextIcon;
225 | });
226 | }).then((_) {
227 | Future.delayed(Duration(milliseconds: (ANIM_DURATION ~/ 5 * 3)), () {
228 | setState(() {
229 | _circleIconAlpha = 1;
230 | });
231 | });
232 | });
233 | }
234 |
235 | void setPage(int page) {
236 | widget.onTabChangedListener(page);
237 | _setSelected(widget.tabs[page].key);
238 | _initAnimationAndStart(_circleAlignX, 1);
239 |
240 | setState(() {
241 | currentSelected = page;
242 | });
243 | }
244 | }
245 |
246 | class TabData {
247 | TabData({required this.iconData, required this.title, this.onclick});
248 |
249 | IconData iconData;
250 | String title;
251 | Function? onclick;
252 | final UniqueKey key = UniqueKey();
253 | }
254 |
--------------------------------------------------------------------------------
/lib/internal/tab_item.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | const double ICON_OFF = -3;
4 | const double ICON_ON = 0;
5 | const double TEXT_OFF = 3;
6 | const double TEXT_ON = 1;
7 | const double ALPHA_OFF = 0;
8 | const double ALPHA_ON = 1;
9 | const int ANIM_DURATION = 300;
10 |
11 | class TabItem extends StatelessWidget {
12 | TabItem(
13 | {required this.uniqueKey,
14 | required this.selected,
15 | required this.iconData,
16 | required this.title,
17 | required this.callbackFunction,
18 | required this.textColor,
19 | required this.iconColor});
20 |
21 | final UniqueKey uniqueKey;
22 | final String title;
23 | final IconData iconData;
24 | final bool selected;
25 | final Function(UniqueKey uniqueKey) callbackFunction;
26 | final Color textColor;
27 | final Color iconColor;
28 |
29 | final double iconYAlign = ICON_ON;
30 | final double textYAlign = TEXT_OFF;
31 | final double iconAlpha = ALPHA_ON;
32 |
33 | @override
34 | Widget build(BuildContext context) {
35 | return Expanded(
36 | child: Stack(
37 | fit: StackFit.expand,
38 | children: [
39 | Container(
40 | height: double.infinity,
41 | width: double.infinity,
42 | child: AnimatedAlign(
43 | duration: Duration(milliseconds: ANIM_DURATION),
44 | alignment: Alignment(0, (selected) ? TEXT_ON : TEXT_OFF),
45 | child: Padding(
46 | padding: const EdgeInsets.all(8.0),
47 | child: Text(
48 | title,
49 | overflow: TextOverflow.ellipsis,
50 | maxLines: 1,
51 | style: TextStyle(
52 | fontWeight: FontWeight.w600, color: textColor),
53 | ),
54 | )),
55 | ),
56 | Container(
57 | height: double.infinity,
58 | width: double.infinity,
59 | child: AnimatedAlign(
60 | duration: Duration(milliseconds: ANIM_DURATION),
61 | curve: Curves.easeIn,
62 | alignment: Alignment(0, (selected) ? ICON_OFF : ICON_ON),
63 | child: AnimatedOpacity(
64 | duration: Duration(milliseconds: ANIM_DURATION),
65 | opacity: (selected) ? ALPHA_OFF : ALPHA_ON,
66 | child: IconButton(
67 | highlightColor: Colors.transparent,
68 | splashColor: Colors.transparent,
69 | padding: EdgeInsets.all(0),
70 | alignment: Alignment(0, 0),
71 | icon: Icon(
72 | iconData,
73 | color: iconColor,
74 | ),
75 | onPressed: () {
76 | callbackFunction(uniqueKey);
77 | },
78 | ),
79 | ),
80 | ),
81 | )
82 | ],
83 | ),
84 | );
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/lib/paint/half_clipper.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class HalfClipper extends CustomClipper {
4 | @override
5 | Rect getClip(Size size) {
6 | final rect = Rect.fromLTWH(0, 0, size.width, size.height / 2);
7 | return rect;
8 | }
9 |
10 | @override
11 | bool shouldReclip(CustomClipper oldClipper) {
12 | return true;
13 | }
14 | }
--------------------------------------------------------------------------------
/lib/paint/half_painter.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:vector_math/vector_math.dart';
3 |
4 | class HalfPainter extends CustomPainter {
5 | HalfPainter(Color paintColor) {
6 | this.arcPaint = Paint()..color = paintColor;
7 | }
8 |
9 | late Paint arcPaint;
10 |
11 | @override
12 | void paint(Canvas canvas, Size size) {
13 | final Rect beforeRect = Rect.fromLTWH(0, (size.height / 2) - 10, 10, 10);
14 | final Rect largeRect = Rect.fromLTWH(10, 0, size.width - 20, 70);
15 | final Rect afterRect =
16 | Rect.fromLTWH(size.width - 10, (size.height / 2) - 10, 10, 10);
17 |
18 | final path = Path();
19 | path.arcTo(beforeRect, radians(0), radians(90), false);
20 | path.lineTo(20, size.height / 2);
21 | path.arcTo(largeRect, radians(0), -radians(180), false);
22 | path.moveTo(size.width - 10, size.height / 2);
23 | path.lineTo(size.width - 10, (size.height / 2) - 10);
24 | path.arcTo(afterRect, radians(180), radians(-90), false);
25 | path.close();
26 |
27 | canvas.drawPath(path, arcPaint);
28 | }
29 |
30 | @override
31 | bool shouldRepaint(CustomPainter oldDelegate) {
32 | return true;
33 | }
34 | }
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.5.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.1.0"
18 | characters:
19 | dependency: transitive
20 | description:
21 | name: characters
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.0"
25 | charcode:
26 | dependency: transitive
27 | description:
28 | name: charcode
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.2.0"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.0"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.15.0"
46 | fake_async:
47 | dependency: transitive
48 | description:
49 | name: fake_async
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "1.2.0"
53 | flutter:
54 | dependency: "direct main"
55 | description: flutter
56 | source: sdk
57 | version: "0.0.0"
58 | flutter_test:
59 | dependency: "direct dev"
60 | description: flutter
61 | source: sdk
62 | version: "0.0.0"
63 | matcher:
64 | dependency: transitive
65 | description:
66 | name: matcher
67 | url: "https://pub.dartlang.org"
68 | source: hosted
69 | version: "0.12.10"
70 | meta:
71 | dependency: transitive
72 | description:
73 | name: meta
74 | url: "https://pub.dartlang.org"
75 | source: hosted
76 | version: "1.3.0"
77 | mockito:
78 | dependency: "direct dev"
79 | description:
80 | name: mockito
81 | url: "https://pub.dartlang.org"
82 | source: hosted
83 | version: "4.0.0"
84 | path:
85 | dependency: transitive
86 | description:
87 | name: path
88 | url: "https://pub.dartlang.org"
89 | source: hosted
90 | version: "1.8.0"
91 | sky_engine:
92 | dependency: transitive
93 | description: flutter
94 | source: sdk
95 | version: "0.0.99"
96 | source_span:
97 | dependency: transitive
98 | description:
99 | name: source_span
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "1.8.0"
103 | stack_trace:
104 | dependency: transitive
105 | description:
106 | name: stack_trace
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "1.10.0"
110 | stream_channel:
111 | dependency: transitive
112 | description:
113 | name: stream_channel
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "2.1.0"
117 | string_scanner:
118 | dependency: transitive
119 | description:
120 | name: string_scanner
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "1.1.0"
124 | term_glyph:
125 | dependency: transitive
126 | description:
127 | name: term_glyph
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "1.2.0"
131 | test_api:
132 | dependency: transitive
133 | description:
134 | name: test_api
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "0.2.19"
138 | typed_data:
139 | dependency: transitive
140 | description:
141 | name: typed_data
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "1.3.0"
145 | vector_math:
146 | dependency: "direct main"
147 | description:
148 | name: vector_math
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "2.1.0"
152 | sdks:
153 | dart: ">=2.12.0 <3.0.0"
154 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: fancy_bottom_navigation
2 | description: An animated Bottom Navigation Bar for Flutter apps, icon animates into place, colors are customisable..
3 | version: 0.3.3
4 | author: Smart Apeth
5 | homepage: https://github.com/tunitowen/fancy_bottom_navigation
6 |
7 | environment:
8 | sdk: '>=2.12.0 <3.0.0'
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 | vector_math: ^2.0.8
14 |
15 | dev_dependencies:
16 | flutter_test:
17 | sdk: flutter
18 | mockito: ^4.0.0
19 |
20 | # For information on the generic Dart part of this file, see the
21 | # following page: https://www.dartlang.org/tools/pub/pubspec
22 |
23 | # The following section is specific to Flutter.
24 | flutter:
25 |
26 | # To add assets to your package, add an assets section, like this:
27 | # assets:
28 | # - images/a_dot_burr.jpeg
29 | # - images/a_dot_ham.jpeg
30 | #
31 | # For details regarding assets in packages, see
32 | # https://flutter.io/assets-and-images/#from-packages
33 | #
34 | # An image asset can refer to one or more resolution-specific "variants", see
35 | # https://flutter.io/assets-and-images/#resolution-aware.
36 |
37 | # To add custom fonts to your package, add a fonts section here,
38 | # in this "flutter" section. Each entry in this list should have a
39 | # "family" key with the font family name, and a "fonts" key with a
40 | # list giving the asset and other descriptors for the font. For
41 | # example:
42 | # fonts:
43 | # - family: Schyler
44 | # fonts:
45 | # - asset: fonts/Schyler-Regular.ttf
46 | # - asset: fonts/Schyler-Italic.ttf
47 | # style: italic
48 | # - family: Trajan Pro
49 | # fonts:
50 | # - asset: fonts/TrajanPro.ttf
51 | # - asset: fonts/TrajanPro_Bold.ttf
52 | # weight: 700
53 | #
54 | # For details regarding fonts in packages, see
55 | # https://flutter.io/custom-fonts/#from-packages
56 |
--------------------------------------------------------------------------------
/test/fancy_widget_tests.dart:
--------------------------------------------------------------------------------
1 | import 'package:fancy_bottom_navigation/fancy_bottom_navigation.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_test/flutter_test.dart';
4 |
5 | void main() {
6 | Widget makeTestableWidget({required Widget child}) {
7 | return MaterialApp(
8 | theme: ThemeData(primaryColor: Colors.pink,
9 | brightness: Brightness.light),
10 | home: Scaffold(
11 | body: Center(),
12 | bottomNavigationBar: child));
13 | }
14 |
15 | testWidgets('Fancy Nav has correct tabs', (WidgetTester tester) async {
16 | FancyBottomNavigation fn = FancyBottomNavigation(
17 | tabs: [
18 | TabData(iconData: Icons.home, title: "Home"),
19 | TabData(iconData: Icons.search, title: "Search")
20 | ],
21 | onTabChangedListener: (position) {},
22 | );
23 |
24 | await tester.pumpWidget(makeTestableWidget(child: fn));
25 |
26 | final homeFinder = find.text("Home");
27 | expect(homeFinder, findsOneWidget);
28 |
29 | final homeIconFinder = find.byIcon(Icons.home);
30 | expect(homeIconFinder, findsNWidgets(2));
31 |
32 | final searchIconFinder = find.byIcon(Icons.search);
33 | expect(searchIconFinder, findsOneWidget);
34 |
35 | final searchFinder = find.text("Search");
36 | expect(searchFinder, findsOneWidget);
37 |
38 | final randomFinder = find.text("Hello");
39 | expect(randomFinder, findsNothing);
40 |
41 | });
42 |
43 | testWidgets('Clicking icon moves the circle', (WidgetTester tester) async {
44 | FancyBottomNavigation fn = FancyBottomNavigation(
45 | tabs: [
46 | TabData(iconData: Icons.home, title: "Home"),
47 | TabData(iconData: Icons.search, title: "Search")
48 | ],
49 | onTabChangedListener: (position) {},
50 | );
51 |
52 | await tester.pumpWidget(makeTestableWidget(child: fn));
53 |
54 | final homeFinder = find.text("Home");
55 | final homeIconFinder = find.byIcon(Icons.home);
56 | final searchIconFinder = find.byIcon(Icons.search);
57 | final searchFinder = find.text("Search");
58 | final randomFinder = find.text("Hello");
59 |
60 | expect(homeFinder, findsOneWidget);
61 | expect(homeIconFinder, findsNWidgets(2));
62 | expect(searchIconFinder, findsOneWidget);
63 | expect(searchFinder, findsOneWidget);
64 | expect(randomFinder, findsNothing);
65 |
66 | await tester.tap(searchIconFinder);
67 | await tester.pumpAndSettle();
68 |
69 | expect(searchIconFinder, findsNWidgets(2));
70 | expect(homeIconFinder, findsOneWidget);
71 |
72 | });
73 |
74 | }
--------------------------------------------------------------------------------