├── .gitignore ├── .metadata ├── LICENSE ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── bmicalculator │ │ │ │ └── MainActivity.java │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets └── fonts │ ├── Montserrat-Bold.ttf │ └── Montserrat-Regular.ttf ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── 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 │ └── main.m ├── lib ├── custom_widgets │ ├── custom_button.dart │ ├── custom_icon_button.dart │ ├── gesture_detecting_button.dart │ ├── info_card.dart │ ├── input_card.dart │ └── tips_card.dart ├── main.dart ├── pages │ ├── homepage.dart │ ├── info_page.dart │ ├── result_page.dart │ └── tips_page.dart └── utilities │ ├── bmi_calculator.dart │ └── constants.dart ├── pubspec.lock ├── pubspec.yaml ├── screenshots ├── BmiCalculator.gif ├── HomePage.jpg ├── InfoPage.jpg ├── ResultPage.jpg └── TipsPage.jpg └── test └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Exceptions to above rules. 37 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 38 | -------------------------------------------------------------------------------- /.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: 0b8abb4724aa590dd0f429683339b1e045a1594d 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Ali Raza 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

⌚ BMI Calculator 2 |
3 | 4 |

5 | 6 | A simple Flutter application based on Neumorphic UI design. 7 | 8 |

🔥 Feature

9 | 10 | - Calculate & Show BMI 11 | 12 |

📱 Screenshots

13 | 14 | | Homepage | Tips Page | 15 | |:----------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------:| 16 | | ![](https://github.com/alirzadev/BMI-Calculator/blob/master/screenshots/HomePage.jpg?raw=true) | ![](https://github.com/alirzadev/BMI-Calculator/blob/master/screenshots/TipsPage.jpg?raw=true) | 17 | 18 | | Result Page | Info Page | 19 | |:----------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------:| 20 | | ![](https://github.com/alirzadev/BMI-Calculator/blob/master/screenshots/ResultPage.jpg?raw=true) | ![](https://github.com/alirzadev/BMI-Calculator/blob/master/screenshots/InfoPage.jpg?raw=true) | 21 | 22 | | BMI Calculator Gif | 23 | |:----------------------------------------------------------------------------------------------------------------------:| 24 | | ![](https://github.com/alirzadev/BMI-Calculator/blob/master/screenshots/BmiCalculator.gif?raw=true) | 25 | 26 |

💡 UI Inspiration

27 | This UI is inspired from dribble [BMI Calculator App - Neumorphism](https://dribbble.com/shots/11368106-BMI-Calculator-App-Neumorphism) 28 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.example.bmicalculator" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'androidx.test:runner:1.1.1' 60 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 61 | } 62 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/bmicalculator/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.bmicalculator; 2 | 3 | import androidx.annotation.NonNull; 4 | import io.flutter.embedding.android.FlutterActivity; 5 | import io.flutter.embedding.engine.FlutterEngine; 6 | import io.flutter.plugins.GeneratedPluginRegistrant; 7 | 8 | public class MainActivity extends FlutterActivity { 9 | @Override 10 | public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { 11 | GeneratedPluginRegistrant.registerWith(flutterEngine); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.5.0' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /assets/fonts/Montserrat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/assets/fonts/Montserrat-Bold.ttf -------------------------------------------------------------------------------- /assets/fonts/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/assets/fonts/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 15 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 16 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 17 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 18 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 19 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 20 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXCopyFilesBuildPhase section */ 24 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 25 | isa = PBXCopyFilesBuildPhase; 26 | buildActionMask = 2147483647; 27 | dstPath = ""; 28 | dstSubfolderSpec = 10; 29 | files = ( 30 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 31 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 32 | ); 33 | name = "Embed Frameworks"; 34 | runOnlyForDeploymentPostprocessing = 0; 35 | }; 36 | /* End PBXCopyFilesBuildPhase section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 40 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 41 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 42 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 43 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 44 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 45 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 46 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 47 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 48 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 49 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 51 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 52 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 53 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 54 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | /* End PBXFileReference section */ 56 | 57 | /* Begin PBXFrameworksBuildPhase section */ 58 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 59 | isa = PBXFrameworksBuildPhase; 60 | buildActionMask = 2147483647; 61 | files = ( 62 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 63 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | /* End PBXFrameworksBuildPhase section */ 68 | 69 | /* Begin PBXGroup section */ 70 | 9740EEB11CF90186004384FC /* Flutter */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 3B80C3931E831B6300D905FE /* App.framework */, 74 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 75 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 76 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 77 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 78 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 79 | ); 80 | name = Flutter; 81 | sourceTree = ""; 82 | }; 83 | 97C146E51CF9000F007C117D = { 84 | isa = PBXGroup; 85 | children = ( 86 | 9740EEB11CF90186004384FC /* Flutter */, 87 | 97C146F01CF9000F007C117D /* Runner */, 88 | 97C146EF1CF9000F007C117D /* Products */, 89 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, 90 | ); 91 | sourceTree = ""; 92 | }; 93 | 97C146EF1CF9000F007C117D /* Products */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 97C146EE1CF9000F007C117D /* Runner.app */, 97 | ); 98 | name = Products; 99 | sourceTree = ""; 100 | }; 101 | 97C146F01CF9000F007C117D /* Runner */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 105 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 106 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 107 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 108 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 109 | 97C147021CF9000F007C117D /* Info.plist */, 110 | 97C146F11CF9000F007C117D /* Supporting Files */, 111 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 112 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 113 | ); 114 | path = Runner; 115 | sourceTree = ""; 116 | }; 117 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 97C146F21CF9000F007C117D /* main.m */, 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 = 1020; 155 | ORGANIZATIONNAME = "The Chromium Authors"; 156 | TargetAttributes = { 157 | 97C146ED1CF9000F007C117D = { 158 | CreatedOnToolsVersion = 7.3.1; 159 | }; 160 | }; 161 | }; 162 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 163 | compatibilityVersion = "Xcode 3.2"; 164 | developmentRegion = en; 165 | hasScannedForEncodings = 0; 166 | knownRegions = ( 167 | en, 168 | Base, 169 | ); 170 | mainGroup = 97C146E51CF9000F007C117D; 171 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 172 | projectDirPath = ""; 173 | projectRoot = ""; 174 | targets = ( 175 | 97C146ED1CF9000F007C117D /* Runner */, 176 | ); 177 | }; 178 | /* End PBXProject section */ 179 | 180 | /* Begin PBXResourcesBuildPhase section */ 181 | 97C146EC1CF9000F007C117D /* Resources */ = { 182 | isa = PBXResourcesBuildPhase; 183 | buildActionMask = 2147483647; 184 | files = ( 185 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 186 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 187 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 188 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 189 | ); 190 | runOnlyForDeploymentPostprocessing = 0; 191 | }; 192 | /* End PBXResourcesBuildPhase section */ 193 | 194 | /* Begin PBXShellScriptBuildPhase section */ 195 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 196 | isa = PBXShellScriptBuildPhase; 197 | buildActionMask = 2147483647; 198 | files = ( 199 | ); 200 | inputPaths = ( 201 | ); 202 | name = "Thin Binary"; 203 | outputPaths = ( 204 | ); 205 | runOnlyForDeploymentPostprocessing = 0; 206 | shellPath = /bin/sh; 207 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 208 | }; 209 | 9740EEB61CF901F6004384FC /* Run Script */ = { 210 | isa = PBXShellScriptBuildPhase; 211 | buildActionMask = 2147483647; 212 | files = ( 213 | ); 214 | inputPaths = ( 215 | ); 216 | name = "Run Script"; 217 | outputPaths = ( 218 | ); 219 | runOnlyForDeploymentPostprocessing = 0; 220 | shellPath = /bin/sh; 221 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 222 | }; 223 | /* End PBXShellScriptBuildPhase section */ 224 | 225 | /* Begin PBXSourcesBuildPhase section */ 226 | 97C146EA1CF9000F007C117D /* Sources */ = { 227 | isa = PBXSourcesBuildPhase; 228 | buildActionMask = 2147483647; 229 | files = ( 230 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 231 | 97C146F31CF9000F007C117D /* main.m in Sources */, 232 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 233 | ); 234 | runOnlyForDeploymentPostprocessing = 0; 235 | }; 236 | /* End PBXSourcesBuildPhase section */ 237 | 238 | /* Begin PBXVariantGroup section */ 239 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 240 | isa = PBXVariantGroup; 241 | children = ( 242 | 97C146FB1CF9000F007C117D /* Base */, 243 | ); 244 | name = Main.storyboard; 245 | sourceTree = ""; 246 | }; 247 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 248 | isa = PBXVariantGroup; 249 | children = ( 250 | 97C147001CF9000F007C117D /* Base */, 251 | ); 252 | name = LaunchScreen.storyboard; 253 | sourceTree = ""; 254 | }; 255 | /* End PBXVariantGroup section */ 256 | 257 | /* Begin XCBuildConfiguration section */ 258 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 259 | isa = XCBuildConfiguration; 260 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 261 | buildSettings = { 262 | ALWAYS_SEARCH_USER_PATHS = NO; 263 | CLANG_ANALYZER_NONNULL = YES; 264 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 265 | CLANG_CXX_LIBRARY = "libc++"; 266 | CLANG_ENABLE_MODULES = YES; 267 | CLANG_ENABLE_OBJC_ARC = YES; 268 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 269 | CLANG_WARN_BOOL_CONVERSION = YES; 270 | CLANG_WARN_COMMA = YES; 271 | CLANG_WARN_CONSTANT_CONVERSION = YES; 272 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 273 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 274 | CLANG_WARN_EMPTY_BODY = YES; 275 | CLANG_WARN_ENUM_CONVERSION = YES; 276 | CLANG_WARN_INFINITE_RECURSION = YES; 277 | CLANG_WARN_INT_CONVERSION = YES; 278 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 279 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = 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 | SUPPORTED_PLATFORMS = iphoneos; 304 | TARGETED_DEVICE_FAMILY = "1,2"; 305 | VALIDATE_PRODUCT = YES; 306 | }; 307 | name = Profile; 308 | }; 309 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 310 | isa = XCBuildConfiguration; 311 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 312 | buildSettings = { 313 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 314 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 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.example.bmicalculator; 327 | PRODUCT_NAME = "$(TARGET_NAME)"; 328 | VERSIONING_SYSTEM = "apple-generic"; 329 | }; 330 | name = Profile; 331 | }; 332 | 97C147031CF9000F007C117D /* Debug */ = { 333 | isa = XCBuildConfiguration; 334 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 335 | buildSettings = { 336 | ALWAYS_SEARCH_USER_PATHS = NO; 337 | CLANG_ANALYZER_NONNULL = YES; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 343 | CLANG_WARN_BOOL_CONVERSION = YES; 344 | CLANG_WARN_COMMA = YES; 345 | CLANG_WARN_CONSTANT_CONVERSION = YES; 346 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES; 354 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 355 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 356 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 357 | CLANG_WARN_STRICT_PROTOTYPES = YES; 358 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 359 | CLANG_WARN_UNREACHABLE_CODE = YES; 360 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 361 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 362 | COPY_PHASE_STRIP = NO; 363 | DEBUG_INFORMATION_FORMAT = dwarf; 364 | ENABLE_STRICT_OBJC_MSGSEND = YES; 365 | ENABLE_TESTABILITY = YES; 366 | GCC_C_LANGUAGE_STANDARD = gnu99; 367 | GCC_DYNAMIC_NO_PIC = NO; 368 | GCC_NO_COMMON_BLOCKS = YES; 369 | GCC_OPTIMIZATION_LEVEL = 0; 370 | GCC_PREPROCESSOR_DEFINITIONS = ( 371 | "DEBUG=1", 372 | "$(inherited)", 373 | ); 374 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 375 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 376 | GCC_WARN_UNDECLARED_SELECTOR = YES; 377 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 378 | GCC_WARN_UNUSED_FUNCTION = YES; 379 | GCC_WARN_UNUSED_VARIABLE = YES; 380 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 381 | MTL_ENABLE_DEBUG_INFO = YES; 382 | ONLY_ACTIVE_ARCH = YES; 383 | SDKROOT = iphoneos; 384 | TARGETED_DEVICE_FAMILY = "1,2"; 385 | }; 386 | name = Debug; 387 | }; 388 | 97C147041CF9000F007C117D /* Release */ = { 389 | isa = XCBuildConfiguration; 390 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 391 | buildSettings = { 392 | ALWAYS_SEARCH_USER_PATHS = NO; 393 | CLANG_ANALYZER_NONNULL = YES; 394 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 395 | CLANG_CXX_LIBRARY = "libc++"; 396 | CLANG_ENABLE_MODULES = YES; 397 | CLANG_ENABLE_OBJC_ARC = YES; 398 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 399 | CLANG_WARN_BOOL_CONVERSION = YES; 400 | CLANG_WARN_COMMA = YES; 401 | CLANG_WARN_CONSTANT_CONVERSION = YES; 402 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 403 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 404 | CLANG_WARN_EMPTY_BODY = YES; 405 | CLANG_WARN_ENUM_CONVERSION = YES; 406 | CLANG_WARN_INFINITE_RECURSION = YES; 407 | CLANG_WARN_INT_CONVERSION = YES; 408 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 409 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 410 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 411 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 412 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 413 | CLANG_WARN_STRICT_PROTOTYPES = YES; 414 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 415 | CLANG_WARN_UNREACHABLE_CODE = YES; 416 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 417 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 418 | COPY_PHASE_STRIP = NO; 419 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 420 | ENABLE_NS_ASSERTIONS = NO; 421 | ENABLE_STRICT_OBJC_MSGSEND = YES; 422 | GCC_C_LANGUAGE_STANDARD = gnu99; 423 | GCC_NO_COMMON_BLOCKS = YES; 424 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 425 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 426 | GCC_WARN_UNDECLARED_SELECTOR = YES; 427 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 428 | GCC_WARN_UNUSED_FUNCTION = YES; 429 | GCC_WARN_UNUSED_VARIABLE = YES; 430 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 431 | MTL_ENABLE_DEBUG_INFO = NO; 432 | SDKROOT = iphoneos; 433 | SUPPORTED_PLATFORMS = iphoneos; 434 | TARGETED_DEVICE_FAMILY = "1,2"; 435 | VALIDATE_PRODUCT = YES; 436 | }; 437 | name = Release; 438 | }; 439 | 97C147061CF9000F007C117D /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 442 | buildSettings = { 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 444 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 445 | ENABLE_BITCODE = NO; 446 | FRAMEWORK_SEARCH_PATHS = ( 447 | "$(inherited)", 448 | "$(PROJECT_DIR)/Flutter", 449 | ); 450 | INFOPLIST_FILE = Runner/Info.plist; 451 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 452 | LIBRARY_SEARCH_PATHS = ( 453 | "$(inherited)", 454 | "$(PROJECT_DIR)/Flutter", 455 | ); 456 | PRODUCT_BUNDLE_IDENTIFIER = com.example.bmicalculator; 457 | PRODUCT_NAME = "$(TARGET_NAME)"; 458 | VERSIONING_SYSTEM = "apple-generic"; 459 | }; 460 | name = Debug; 461 | }; 462 | 97C147071CF9000F007C117D /* Release */ = { 463 | isa = XCBuildConfiguration; 464 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 465 | buildSettings = { 466 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 467 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 468 | ENABLE_BITCODE = NO; 469 | FRAMEWORK_SEARCH_PATHS = ( 470 | "$(inherited)", 471 | "$(PROJECT_DIR)/Flutter", 472 | ); 473 | INFOPLIST_FILE = Runner/Info.plist; 474 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 475 | LIBRARY_SEARCH_PATHS = ( 476 | "$(inherited)", 477 | "$(PROJECT_DIR)/Flutter", 478 | ); 479 | PRODUCT_BUNDLE_IDENTIFIER = com.example.bmicalculator; 480 | PRODUCT_NAME = "$(TARGET_NAME)"; 481 | VERSIONING_SYSTEM = "apple-generic"; 482 | }; 483 | name = Release; 484 | }; 485 | /* End XCBuildConfiguration section */ 486 | 487 | /* Begin XCConfigurationList section */ 488 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 489 | isa = XCConfigurationList; 490 | buildConfigurations = ( 491 | 97C147031CF9000F007C117D /* Debug */, 492 | 97C147041CF9000F007C117D /* Release */, 493 | 249021D3217E4FDB00AE95B9 /* Profile */, 494 | ); 495 | defaultConfigurationIsVisible = 0; 496 | defaultConfigurationName = Release; 497 | }; 498 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 499 | isa = XCConfigurationList; 500 | buildConfigurations = ( 501 | 97C147061CF9000F007C117D /* Debug */, 502 | 97C147071CF9000F007C117D /* Release */, 503 | 249021D4217E4FDB00AE95B9 /* Profile */, 504 | ); 505 | defaultConfigurationIsVisible = 0; 506 | defaultConfigurationName = Release; 507 | }; 508 | /* End XCConfigurationList section */ 509 | }; 510 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 511 | } 512 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | bmicalculator 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/custom_widgets/custom_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:bmicalculator/utilities/constants.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class CustomButton extends StatelessWidget { 5 | final VoidCallback onPressed; 6 | final double width; 7 | final String text; 8 | final Color textColor; 9 | final Color buttonColor; 10 | final LinearGradient gradient; 11 | 12 | CustomButton( 13 | {this.onPressed, 14 | this.width, 15 | this.text, 16 | this.textColor, 17 | this.buttonColor, 18 | this.gradient}); 19 | @override 20 | Widget build(BuildContext context) { 21 | return GestureDetector( 22 | onTap: onPressed, 23 | child: Container( 24 | height: 50, 25 | width: width, 26 | decoration: BoxDecoration( 27 | color: buttonColor, 28 | gradient: gradient, 29 | borderRadius: BorderRadius.all(Radius.circular(20.0)), 30 | boxShadow: outerShadow, 31 | ), 32 | child: Center( 33 | child: Text( 34 | text, 35 | style: TextStyle( 36 | color: textColor, 37 | fontSize: 16.0, 38 | ), 39 | ), 40 | ), 41 | ), 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/custom_widgets/custom_icon_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:bmicalculator/utilities/constants.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class CustomIconButton extends StatefulWidget { 5 | final VoidCallback onPressed; 6 | final double width; 7 | final double height; 8 | final IconData icon; 9 | 10 | CustomIconButton({this.onPressed, this.width, this.height, this.icon}); 11 | 12 | @override 13 | _CustomIconButtonState createState() => _CustomIconButtonState(); 14 | } 15 | 16 | class _CustomIconButtonState extends State { 17 | bool isPressed = false; 18 | 19 | void whenNotPressed(PointerUpEvent event) { 20 | setState(() { 21 | isPressed = false; 22 | }); 23 | } 24 | 25 | void whenPressed(PointerDownEvent event) { 26 | setState(() { 27 | isPressed = true; 28 | }); 29 | } 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return Listener( 34 | onPointerUp: whenNotPressed, 35 | onPointerDown: whenPressed, 36 | child: isPressed 37 | ? GestureDetector( 38 | onTap: widget.onPressed, 39 | child: Container( 40 | width: widget.width, 41 | height: widget.height, 42 | decoration: BoxDecoration( 43 | color: foregroundColor, 44 | shape: BoxShape.circle, 45 | boxShadow: [ 46 | BoxShadow( 47 | blurRadius: 5.0, 48 | offset: Offset(-3, -3), 49 | color: Colors.white.withOpacity(0.7), 50 | ), 51 | BoxShadow( 52 | blurRadius: 5.0, 53 | offset: Offset(3, 3), 54 | color: Colors.white.withOpacity(0.15), 55 | ), 56 | ], 57 | ), 58 | child: Padding( 59 | padding: const EdgeInsets.all(3.0), 60 | child: Container( 61 | decoration: BoxDecoration( 62 | color: foregroundColor, 63 | shape: BoxShape.circle, 64 | ), 65 | child: Padding( 66 | padding: const EdgeInsets.all(2.0), 67 | child: Container( 68 | decoration: BoxDecoration( 69 | color: foregroundColor, 70 | shape: BoxShape.circle, 71 | boxShadow: [ 72 | BoxShadow( 73 | blurRadius: 2.0, 74 | offset: Offset(-2, -2), 75 | color: Colors.black.withOpacity(0.15), 76 | ), 77 | BoxShadow( 78 | blurRadius: 2.0, 79 | offset: Offset(2, 2), 80 | color: Colors.white.withOpacity(0.7), 81 | ), 82 | ], 83 | ), 84 | child: Icon( 85 | widget.icon, 86 | size: 20.0, 87 | color: Theme.of(context).accentColor, 88 | ), 89 | ), 90 | ), 91 | ), 92 | ), 93 | ), 94 | ) 95 | : GestureDetector( 96 | onTap: widget.onPressed, 97 | child: Container( 98 | width: widget.width, 99 | height: widget.height, 100 | decoration: BoxDecoration( 101 | color: foregroundColor, 102 | shape: BoxShape.circle, 103 | boxShadow: [ 104 | BoxShadow( 105 | blurRadius: 5.0, 106 | offset: Offset(-3, -3), 107 | color: Colors.white.withOpacity(0.7), 108 | ), 109 | BoxShadow( 110 | blurRadius: 5.0, 111 | offset: Offset(3, 3), 112 | color: Colors.black.withOpacity(0.15), 113 | ), 114 | ], 115 | ), 116 | child: Icon( 117 | widget.icon, 118 | size: 20.0, 119 | color: darkTextColor, 120 | ), 121 | ), 122 | ), 123 | ); 124 | } 125 | } 126 | 127 | //========= This is the simple icon button design without listener =========\\ 128 | //class CustomIconButton extends StatelessWidget { 129 | // final VoidCallback onPressed; 130 | // final double width; 131 | // final double height; 132 | // final IconData icon; 133 | // 134 | // CustomIconButton({this.onPressed, this.width, this.height, this.icon}); 135 | // 136 | // @override 137 | // Widget build(BuildContext context) { 138 | // return InkWell( 139 | // onTap: onPressed, 140 | // child: Container( 141 | // width: width, 142 | // height: height, 143 | // decoration: BoxDecoration( 144 | // color: foregroundColor, 145 | // shape: BoxShape.circle, 146 | // boxShadow: [ 147 | // BoxShadow( 148 | // blurRadius: 5.0, 149 | // offset: Offset(-3, -3), 150 | // color: Colors.white.withOpacity(0.7), 151 | // ), 152 | // BoxShadow( 153 | // blurRadius: 5.0, 154 | // offset: Offset(3, 3), 155 | // color: Colors.black.withOpacity(0.15), 156 | // ), 157 | // ], 158 | // ), 159 | // child: Icon( 160 | // icon, 161 | // size: 20.0, 162 | // color: darkTextColor, 163 | // ), 164 | // ), 165 | // ); 166 | // } 167 | //} 168 | -------------------------------------------------------------------------------- /lib/custom_widgets/gesture_detecting_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:bmicalculator/utilities/constants.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class GestureDetectingButton extends StatefulWidget { 5 | final VoidCallback onPressed; 6 | final double width; 7 | final String text; 8 | 9 | GestureDetectingButton({this.onPressed, this.width, this.text}); 10 | 11 | @override 12 | _GestureDetectingButtonState createState() => _GestureDetectingButtonState(); 13 | } 14 | 15 | class _GestureDetectingButtonState extends State { 16 | bool isPressed = false; 17 | 18 | void whenNotPressed(PointerUpEvent event) { 19 | setState(() { 20 | isPressed = false; 21 | }); 22 | } 23 | 24 | void whenPressed(PointerDownEvent event) { 25 | setState(() { 26 | isPressed = true; 27 | }); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return Listener( 33 | onPointerUp: whenNotPressed, 34 | onPointerDown: whenPressed, 35 | child: isPressed 36 | ? GestureDetector( 37 | onTap: widget.onPressed, 38 | child: Container( 39 | width: widget.width, 40 | height: 50, 41 | decoration: BoxDecoration( 42 | color: foregroundColor, 43 | borderRadius: BorderRadius.all(Radius.circular(20.0)), 44 | boxShadow: [ 45 | BoxShadow( 46 | blurRadius: 5.0, 47 | offset: Offset(2, 2), 48 | color: Colors.white.withOpacity(0.7), 49 | ), 50 | BoxShadow( 51 | blurRadius: 5.0, 52 | offset: Offset(-2, -2), 53 | color: Colors.white.withOpacity(0.15), 54 | ), 55 | ], 56 | ), 57 | child: Container( 58 | padding: const EdgeInsets.all(3.0), 59 | decoration: BoxDecoration( 60 | color: foregroundColor, 61 | borderRadius: BorderRadius.all(Radius.circular(20.0)), 62 | ), 63 | child: Container( 64 | padding: const EdgeInsets.all(2.0), 65 | decoration: BoxDecoration( 66 | color: foregroundColor, 67 | borderRadius: BorderRadius.all(Radius.circular(20.0)), 68 | boxShadow: [ 69 | BoxShadow( 70 | blurRadius: 2.0, 71 | offset: Offset(-2, -2), 72 | color: Colors.black.withOpacity(0.15), 73 | ), 74 | BoxShadow( 75 | blurRadius: 2.0, 76 | offset: Offset(2, 2), 77 | color: Colors.white.withOpacity(0.7), 78 | ), 79 | ], 80 | ), 81 | child: Center( 82 | child: Text( 83 | widget.text, 84 | style: TextStyle( 85 | color: Theme.of(context).accentColor, 86 | fontSize: 16.0, 87 | ), 88 | ), 89 | ), 90 | ), 91 | ), 92 | ), 93 | ) 94 | : GestureDetector( 95 | onTap: widget.onPressed, 96 | child: Container( 97 | height: 50, 98 | width: widget.width, 99 | decoration: BoxDecoration( 100 | color: foregroundColor, 101 | borderRadius: BorderRadius.all(Radius.circular(20.0)), 102 | boxShadow: outerShadow, 103 | ), 104 | child: Center( 105 | child: Text( 106 | widget.text, 107 | style: TextStyle( 108 | color: darkTextColor, 109 | fontSize: 16.0, 110 | ), 111 | ), 112 | ), 113 | ), 114 | ), 115 | ); 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /lib/custom_widgets/info_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:bmicalculator/utilities/constants.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class InfoCard extends StatelessWidget { 5 | final lowerBMI; 6 | final upperBMI; 7 | final bmiResult; 8 | 9 | InfoCard({this.lowerBMI, this.upperBMI, this.bmiResult}); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Row( 14 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 15 | children: [ 16 | Row( 17 | children: [ 18 | Text( 19 | lowerBMI.toString(), 20 | style: TextStyle( 21 | color: darkTextColor, 22 | fontSize: 12.0, 23 | ), 24 | ), 25 | upperBMI != null 26 | ? Text( 27 | ' to ' + upperBMI.toString(), 28 | style: TextStyle( 29 | color: darkTextColor, 30 | fontSize: 12.0, 31 | ), 32 | ) 33 | : Text(''), 34 | ], 35 | ), 36 | Text( 37 | bmiResult.toString(), 38 | style: TextStyle( 39 | color: darkTextColor, 40 | fontSize: 12.0, 41 | fontWeight: FontWeight.bold, 42 | ), 43 | ), 44 | ], 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/custom_widgets/input_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:bmicalculator/custom_widgets/custom_icon_button.dart'; 2 | import 'package:bmicalculator/utilities/constants.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class CustomCard extends StatelessWidget { 6 | final VoidCallback onPressedAdd; 7 | final VoidCallback onPressedRemove; 8 | final String text; 9 | final number; 10 | 11 | CustomCard({this.onPressedAdd, this.onPressedRemove, this.text, this.number}); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Container( 16 | width: double.infinity, 17 | height: 100, 18 | decoration: BoxDecoration( 19 | color: foregroundColor, 20 | borderRadius: BorderRadius.all(Radius.circular(20.0)), 21 | boxShadow: outerShadow, 22 | ), 23 | child: Column( 24 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 25 | children: [ 26 | Text( 27 | text, 28 | style: TextStyle( 29 | color: lightTextColor, 30 | ), 31 | ), 32 | Text( 33 | number, 34 | style: TextStyle( 35 | color: Colors.black54, 36 | fontSize: 36.0, 37 | ), 38 | ), 39 | Row( 40 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 41 | children: [ 42 | CustomIconButton( 43 | onPressed: onPressedAdd, 44 | width: 40, 45 | height: 40, 46 | icon: Icons.add, 47 | ), 48 | CustomIconButton( 49 | onPressed: onPressedRemove, 50 | width: 40, 51 | height: 40, 52 | icon: Icons.remove, 53 | ), 54 | ], 55 | ), 56 | ], 57 | ), 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/custom_widgets/tips_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:bmicalculator/utilities/constants.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class TIpsCard extends StatelessWidget { 6 | final String tipText; 7 | final IconData icon; 8 | 9 | TIpsCard({this.tipText, this.icon}); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Container( 14 | padding: const EdgeInsets.all(10.0), 15 | height: 80, 16 | decoration: BoxDecoration( 17 | color: foregroundColor, 18 | borderRadius: BorderRadius.all(Radius.circular(20.0)), 19 | boxShadow: outerShadow, 20 | ), 21 | child: Row( 22 | children: [ 23 | Container( 24 | width: 60, 25 | height: 60, 26 | decoration: BoxDecoration( 27 | color: Color(0xFFDEE2E5), 28 | borderRadius: BorderRadius.all( 29 | Radius.circular(10.0), 30 | ), 31 | ), 32 | child: Icon( 33 | icon, 34 | size: 36, 35 | color: darkTextColor, 36 | ), 37 | ), 38 | SizedBox(width: 10.0), 39 | Text( 40 | tipText, 41 | style: TextStyle( 42 | color: darkTextColor, 43 | fontWeight: FontWeight.bold, 44 | ), 45 | ), 46 | Expanded(child: SizedBox(width: 5)), 47 | Icon( 48 | Icons.arrow_forward_ios, 49 | size: 16, 50 | color: darkTextColor, 51 | ), 52 | ], 53 | ), 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:bmicalculator/pages/homepage.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/rendering.dart'; 4 | 5 | void main() => runApp(MyApp()); 6 | 7 | class MyApp extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | return MaterialApp( 11 | debugShowCheckedModeBanner: false, 12 | title: 'BMI Calculator', 13 | theme: ThemeData( 14 | fontFamily: 'Montserrat', 15 | accentColor: Color(0xFF56D0DB), 16 | ), 17 | home: HomePage(), 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/pages/homepage.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:bmicalculator/custom_widgets/custom_button.dart'; 4 | import 'package:bmicalculator/custom_widgets/custom_icon_button.dart'; 5 | import 'package:bmicalculator/custom_widgets/input_card.dart'; 6 | import 'package:bmicalculator/pages/result_page.dart'; 7 | import 'package:bmicalculator/pages/tips_page.dart'; 8 | import 'package:bmicalculator/utilities/bmi_calculator.dart'; 9 | import 'package:bmicalculator/utilities/constants.dart'; 10 | import 'package:flutter/material.dart'; 11 | import 'package:flutter_icons/flutter_icons.dart'; 12 | 13 | enum Gender { 14 | male, 15 | female, 16 | } 17 | 18 | class HomePage extends StatefulWidget { 19 | @override 20 | _HomePageState createState() => _HomePageState(); 21 | } 22 | 23 | class _HomePageState extends State { 24 | Gender selectedGender; 25 | double height = 170; 26 | int weight = 60; 27 | int age = 25; 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | return Scaffold( 32 | body: SafeArea( 33 | child: Container( 34 | padding: const EdgeInsets.symmetric(horizontal: 20.0), 35 | color: backgroundColor, 36 | child: Column( 37 | children: [ 38 | Padding( 39 | padding: const EdgeInsets.only(top: 20.0), 40 | child: Row( 41 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 42 | children: [ 43 | CustomIconButton( 44 | onPressed: () { 45 | Navigator.of(context).push( 46 | MaterialPageRoute( 47 | builder: (context) => TipsPage(), 48 | ), 49 | ); 50 | }, 51 | width: 45, 52 | height: 45, 53 | icon: FontAwesome.bell_o, 54 | ), 55 | Text( 56 | 'BMI Calculator', 57 | style: TextStyle( 58 | color: darkTextColor, 59 | fontSize: 20.0, 60 | fontWeight: FontWeight.bold, 61 | ), 62 | ), 63 | CustomIconButton( 64 | onPressed: () {}, 65 | width: 45, 66 | height: 45, 67 | icon: FontAwesome.user_o, 68 | ), 69 | ], 70 | ), 71 | ), 72 | SizedBox(height: 30.0), 73 | Row( 74 | children: [ 75 | Expanded( 76 | child: CustomButton( 77 | onPressed: () { 78 | setState(() { 79 | selectedGender = Gender.male; 80 | print('Male was selected!'); 81 | }); 82 | }, 83 | text: 'Male', 84 | textColor: selectedGender == Gender.male 85 | ? Colors.white 86 | : lightTextColor, 87 | gradient: selectedGender == Gender.male 88 | ? LinearGradient( 89 | begin: Alignment.centerRight, 90 | end: Alignment.centerLeft, 91 | colors: [ 92 | Color(0xFF56D0DB), 93 | Color(0xFF59C8E3), 94 | ], 95 | ) 96 | : LinearGradient( 97 | begin: Alignment.centerRight, 98 | end: Alignment.centerLeft, 99 | colors: [ 100 | Color(0xFFF0EEF3), 101 | Color(0xFFF0EEF3), 102 | ], 103 | ), 104 | ), 105 | ), 106 | SizedBox(width: 20.0), 107 | Expanded( 108 | child: CustomButton( 109 | onPressed: () { 110 | setState(() { 111 | selectedGender = Gender.female; 112 | }); 113 | }, 114 | text: 'Female', 115 | textColor: selectedGender == Gender.female 116 | ? Colors.white 117 | : lightTextColor, 118 | gradient: selectedGender == Gender.female 119 | ? LinearGradient( 120 | begin: Alignment.centerRight, 121 | end: Alignment.centerLeft, 122 | colors: [ 123 | Color(0xFF56D0DB), 124 | Color(0xFF59C8E3), 125 | ], 126 | ) 127 | : LinearGradient( 128 | begin: Alignment.centerRight, 129 | end: Alignment.centerLeft, 130 | colors: [ 131 | Color(0xFFF0EEF3), 132 | Color(0xFFF0EEF3), 133 | ], 134 | ), 135 | ), 136 | ), 137 | ], 138 | ), 139 | SizedBox(height: 20.0), 140 | Expanded( 141 | child: Row( 142 | crossAxisAlignment: CrossAxisAlignment.start, 143 | children: [ 144 | Expanded( 145 | child: Container( 146 | width: 50, 147 | height: double.infinity, 148 | decoration: BoxDecoration( 149 | color: foregroundColor, 150 | borderRadius: BorderRadius.all(Radius.circular(20.0)), 151 | boxShadow: outerShadow, 152 | ), 153 | child: Column( 154 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 155 | children: [ 156 | Text( 157 | 'Height', 158 | style: TextStyle( 159 | color: lightTextColor, 160 | ), 161 | ), 162 | Transform.rotate( 163 | angle: 3 * pi / 2, 164 | child: SliderTheme( 165 | data: SliderTheme.of(context).copyWith( 166 | thumbColor: Colors.white70, 167 | activeTrackColor: 168 | Theme.of(context).accentColor, 169 | inactiveTrackColor: Colors.black12, 170 | ), 171 | child: Slider( 172 | min: 110, 173 | max: 230, 174 | value: height, 175 | onChanged: (value) { 176 | setState(() { 177 | height = value; 178 | }); 179 | }, 180 | ), 181 | ), 182 | ), 183 | Row( 184 | mainAxisAlignment: MainAxisAlignment.center, 185 | crossAxisAlignment: CrossAxisAlignment.end, 186 | children: [ 187 | Text( 188 | height.toInt().toString(), 189 | style: TextStyle( 190 | color: darkTextColor, 191 | fontSize: 36.0, 192 | ), 193 | ), 194 | Padding( 195 | padding: const EdgeInsets.only( 196 | left: 5.0, bottom: 8.0), 197 | child: Text( 198 | 'cm', 199 | style: TextStyle( 200 | color: lightTextColor, 201 | fontSize: 12.0, 202 | ), 203 | ), 204 | ), 205 | ], 206 | ) 207 | ], 208 | ), 209 | ), 210 | ), 211 | SizedBox(width: 20.0), 212 | Expanded( 213 | child: Container( 214 | height: double.infinity, 215 | child: Column( 216 | children: [ 217 | Expanded( 218 | child: CustomCard( 219 | onPressedAdd: () { 220 | setState(() { 221 | weight++; 222 | }); 223 | }, 224 | onPressedRemove: () { 225 | setState(() { 226 | weight--; 227 | }); 228 | }, 229 | text: 'Weight', 230 | number: weight.toString(), 231 | ), 232 | ), 233 | SizedBox(height: 20.0), 234 | Expanded( 235 | child: CustomCard( 236 | onPressedAdd: () { 237 | setState(() { 238 | age++; 239 | print(age); 240 | }); 241 | }, 242 | onPressedRemove: () { 243 | setState(() { 244 | age--; 245 | }); 246 | }, 247 | text: 'Age', 248 | number: age.toString(), 249 | ), 250 | ), 251 | ], 252 | ), 253 | ), 254 | ) 255 | ], 256 | ), 257 | ), 258 | SizedBox(height: 40.0), 259 | CustomButton( 260 | width: double.infinity, 261 | onPressed: () { 262 | BMICalculator calc = 263 | BMICalculator(height: height.toInt(), weight: weight); 264 | setState(() { 265 | if (selectedGender != null) { 266 | Navigator.of(context).push( 267 | MaterialPageRoute( 268 | builder: (context) => ResultPage( 269 | bmiResult: calc.getBMI(), 270 | textResult: calc.getResult(), 271 | bmiPercentage: calc.getBMIPercentage(), 272 | ), 273 | ), 274 | ); 275 | } 276 | }); 277 | }, 278 | text: 'Lets Begin', 279 | textColor: Colors.white, 280 | gradient: LinearGradient( 281 | begin: Alignment.centerRight, 282 | end: Alignment.centerLeft, 283 | colors: [ 284 | Color(0xFF56D0DB), 285 | Color(0xFF59C8E3), 286 | ], 287 | ), 288 | ), 289 | SizedBox(height: 30.0) 290 | ], 291 | ), 292 | ), 293 | ), 294 | ); 295 | } 296 | } 297 | -------------------------------------------------------------------------------- /lib/pages/info_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:bmicalculator/custom_widgets/custom_button.dart'; 2 | import 'package:bmicalculator/custom_widgets/custom_icon_button.dart'; 3 | import 'package:bmicalculator/custom_widgets/info_card.dart'; 4 | import 'package:bmicalculator/utilities/constants.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter_icons/flutter_icons.dart'; 8 | 9 | class InfoPage extends StatelessWidget { 10 | final String bmi; 11 | final String resultText; 12 | 13 | InfoPage({this.bmi, this.resultText}); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | body: SafeArea( 19 | child: Container( 20 | padding: const EdgeInsets.symmetric(horizontal: 20.0), 21 | color: backgroundColor, 22 | child: Column( 23 | children: [ 24 | Padding( 25 | padding: const EdgeInsets.only(top: 20.0), 26 | child: Row( 27 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 28 | children: [ 29 | CustomIconButton( 30 | onPressed: () { 31 | Navigator.pop(context); 32 | }, 33 | width: 45, 34 | height: 45, 35 | icon: FontAwesome.angle_left, 36 | ), 37 | Text( 38 | 'BMI Info', 39 | style: TextStyle( 40 | color: darkTextColor, 41 | fontSize: 20.0, 42 | fontWeight: FontWeight.bold, 43 | ), 44 | ), 45 | CustomIconButton( 46 | onPressed: () {}, 47 | width: 45, 48 | height: 45, 49 | icon: FontAwesome.user_o, 50 | ), 51 | ], 52 | ), 53 | ), 54 | SizedBox(height: 30.0), 55 | Container( 56 | height: 100, 57 | decoration: BoxDecoration( 58 | color: foregroundColor, 59 | borderRadius: BorderRadius.all(Radius.circular(20.0)), 60 | boxShadow: outerShadow, 61 | ), 62 | child: Padding( 63 | padding: const EdgeInsets.symmetric(horizontal: 20.0), 64 | child: Row( 65 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 66 | children: [ 67 | Text( 68 | 'Your BMI', 69 | style: TextStyle( 70 | color: darkTextColor, 71 | ), 72 | ), 73 | Text( 74 | bmi, 75 | style: TextStyle( 76 | color: darkTextColor, 77 | fontSize: 48.0, 78 | ), 79 | ), 80 | Text( 81 | resultText, 82 | style: TextStyle( 83 | color: Theme.of(context).accentColor, 84 | fontWeight: FontWeight.bold, 85 | ), 86 | ), 87 | ], 88 | ), 89 | ), 90 | ), 91 | SizedBox(height: 40.0), 92 | Container( 93 | height: 250, 94 | decoration: BoxDecoration( 95 | color: foregroundColor, 96 | borderRadius: BorderRadius.all(Radius.circular(20.0)), 97 | boxShadow: outerShadow, 98 | ), 99 | child: Padding( 100 | padding: const EdgeInsets.symmetric( 101 | horizontal: 20.0, vertical: 20.0), 102 | child: Column( 103 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 104 | children: [ 105 | InfoCard( 106 | lowerBMI: 'Less than 18.5', 107 | bmiResult: 'Underweight', 108 | ), 109 | Divider(height: 40.0), 110 | InfoCard( 111 | lowerBMI: '18.5', 112 | upperBMI: '24.5', 113 | bmiResult: 'Normal', 114 | ), 115 | Divider(height: 40.0), 116 | InfoCard( 117 | lowerBMI: '25', 118 | upperBMI: '29.5', 119 | bmiResult: 'Overweight', 120 | ), 121 | Divider(height: 40.0), 122 | InfoCard( 123 | lowerBMI: 'More than 29.5', 124 | bmiResult: 'Obesity', 125 | ), 126 | ], 127 | ), 128 | ), 129 | ), 130 | SizedBox(height: 30.0), 131 | CustomButton( 132 | onPressed: () {}, 133 | width: 200, 134 | text: 'Save Results', 135 | textColor: Colors.white, 136 | gradient: LinearGradient( 137 | begin: Alignment.centerRight, 138 | end: Alignment.centerLeft, 139 | colors: [ 140 | Color(0xFF56D0DB), 141 | Color(0xFF59C8E3), 142 | ], 143 | ), 144 | ), 145 | ], 146 | ), 147 | ), 148 | ), 149 | ); 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /lib/pages/result_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:bmicalculator/custom_widgets/custom_icon_button.dart'; 2 | import 'package:bmicalculator/custom_widgets/gesture_detecting_button.dart'; 3 | import 'package:bmicalculator/pages/info_page.dart'; 4 | import 'package:bmicalculator/utilities/constants.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter_circular_chart/flutter_circular_chart.dart'; 8 | import 'package:flutter_icons/flutter_icons.dart'; 9 | 10 | final GlobalKey _chartKey = 11 | new GlobalKey(); 12 | 13 | class ResultPage extends StatelessWidget { 14 | final String bmiResult; 15 | final String textResult; 16 | final double bmiPercentage; 17 | 18 | ResultPage({this.bmiResult, this.textResult, this.bmiPercentage}); 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return Scaffold( 23 | body: SafeArea( 24 | child: Container( 25 | padding: const EdgeInsets.symmetric(horizontal: 20.0), 26 | color: backgroundColor, 27 | child: Column( 28 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 29 | children: [ 30 | Padding( 31 | padding: const EdgeInsets.only(top: 20.0), 32 | child: Row( 33 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 34 | children: [ 35 | CustomIconButton( 36 | onPressed: () { 37 | Navigator.pop(context); 38 | }, 39 | width: 45, 40 | height: 45, 41 | icon: FontAwesome.angle_left, 42 | ), 43 | Text( 44 | 'BMI Results', 45 | style: TextStyle( 46 | color: darkTextColor, 47 | fontSize: 20.0, 48 | fontWeight: FontWeight.bold, 49 | ), 50 | ), 51 | CustomIconButton( 52 | onPressed: () {}, 53 | width: 45, 54 | height: 45, 55 | icon: FontAwesome.user_o, 56 | ), 57 | ], 58 | ), 59 | ), 60 | SizedBox(height: 30.0), 61 | Container( 62 | width: 200, 63 | height: 200, 64 | decoration: BoxDecoration( 65 | color: foregroundColor, 66 | shape: BoxShape.circle, 67 | boxShadow: outerShadow, 68 | ), 69 | child: AnimatedCircularChart( 70 | key: _chartKey, 71 | size: const Size(190, 190), 72 | holeLabel: bmiResult, 73 | labelStyle: TextStyle( 74 | color: darkTextColor, 75 | fontSize: 40.0, 76 | ), 77 | initialChartData: [ 78 | CircularStackEntry( 79 | [ 80 | CircularSegmentEntry( 81 | bmiPercentage, 82 | Theme.of(context).accentColor, 83 | rankKey: 'completed', 84 | ), 85 | CircularSegmentEntry( 86 | bmiPercentage <= 100 ? 100 - bmiPercentage : 0, 87 | Colors.black12, 88 | rankKey: 'remaining', 89 | ), 90 | ], 91 | rankKey: 'progress', 92 | ), 93 | ], 94 | chartType: CircularChartType.Radial, 95 | edgeStyle: SegmentEdgeStyle.round, 96 | percentageValues: true, 97 | ), 98 | ), 99 | SizedBox(height: 10.0), 100 | Row( 101 | mainAxisAlignment: MainAxisAlignment.center, 102 | children: [ 103 | Text( 104 | 'You have ', 105 | style: TextStyle( 106 | color: darkTextColor, 107 | ), 108 | ), 109 | Text( 110 | textResult, 111 | style: TextStyle( 112 | color: Theme.of(context).accentColor, 113 | fontWeight: FontWeight.bold, 114 | ), 115 | ), 116 | Text( 117 | ' body weight!', 118 | style: TextStyle( 119 | color: darkTextColor, 120 | ), 121 | ), 122 | ], 123 | ), 124 | SizedBox(height: 30.0), 125 | GestureDetectingButton( 126 | onPressed: () { 127 | Navigator.of(context).push( 128 | MaterialPageRoute( 129 | builder: (context) => InfoPage( 130 | bmi: bmiResult, 131 | resultText: textResult, 132 | ), 133 | ), 134 | ); 135 | }, 136 | width: 120, 137 | text: 'Details', 138 | ), 139 | SizedBox(height: 20.0), 140 | ], 141 | ), 142 | ), 143 | ), 144 | ); 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /lib/pages/tips_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:bmicalculator/custom_widgets/custom_icon_button.dart'; 2 | import 'package:bmicalculator/custom_widgets/tips_card.dart'; 3 | import 'package:bmicalculator/utilities/constants.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_icons/flutter_icons.dart'; 7 | 8 | class TipsPage extends StatelessWidget { 9 | @override 10 | Widget build(BuildContext context) { 11 | return Scaffold( 12 | body: SafeArea( 13 | child: Container( 14 | padding: const EdgeInsets.symmetric(horizontal: 20.0), 15 | color: backgroundColor, 16 | child: Column( 17 | // mainAxisAlignment: MainAxisAlignment.spaceBetween, 18 | children: [ 19 | Padding( 20 | padding: const EdgeInsets.only(top: 20.0), 21 | child: Row( 22 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 23 | children: [ 24 | CustomIconButton( 25 | onPressed: () { 26 | Navigator.pop(context); 27 | }, 28 | width: 45, 29 | height: 45, 30 | icon: FontAwesome.angle_left, 31 | ), 32 | Text( 33 | 'Health Tips', 34 | style: TextStyle( 35 | color: darkTextColor, 36 | fontSize: 20.0, 37 | fontWeight: FontWeight.bold, 38 | ), 39 | ), 40 | CustomIconButton( 41 | onPressed: () {}, 42 | width: 45, 43 | height: 45, 44 | icon: FontAwesome.user_o, 45 | ), 46 | ], 47 | ), 48 | ), 49 | SizedBox(height: 30.0), 50 | _welcomeNoteWidget(), 51 | SizedBox(height: 30.0), 52 | TIpsCard( 53 | tipText: 'Running', 54 | icon: FontAwesome5Solid.walking, 55 | ), 56 | SizedBox(height: 15.0), 57 | TIpsCard( 58 | tipText: 'Cycling', 59 | icon: FontAwesome5Solid.bicycle, 60 | ), 61 | SizedBox(height: 15.0), 62 | TIpsCard( 63 | tipText: 'Swimming', 64 | icon: FontAwesome5Solid.swimmer, 65 | ), 66 | ], 67 | ), 68 | ), 69 | ), 70 | ); 71 | } 72 | 73 | Container _welcomeNoteWidget() { 74 | return Container( 75 | height: 150, 76 | decoration: BoxDecoration( 77 | color: foregroundColor, 78 | borderRadius: BorderRadius.all(Radius.circular(20.0)), 79 | boxShadow: outerShadow, 80 | ), 81 | child: Padding( 82 | padding: const EdgeInsets.all(20.0), 83 | child: Row( 84 | children: [ 85 | Container( 86 | padding: const EdgeInsets.all(15.0), 87 | width: 100, 88 | height: 100, 89 | decoration: BoxDecoration( 90 | color: foregroundColor, 91 | shape: BoxShape.circle, 92 | boxShadow: outerShadow, 93 | ), 94 | child: Container( 95 | padding: const EdgeInsets.all(15.0), 96 | width: 50, 97 | height: 50, 98 | decoration: BoxDecoration( 99 | shape: BoxShape.circle, 100 | gradient: LinearGradient( 101 | begin: Alignment.centerRight, 102 | end: Alignment.centerLeft, 103 | colors: [ 104 | Color(0xFF56D0DB), 105 | Color(0xFF59C8E3), 106 | ], 107 | ), 108 | ), 109 | child: Container( 110 | width: 20, 111 | height: 20, 112 | decoration: BoxDecoration( 113 | color: foregroundColor, 114 | shape: BoxShape.circle, 115 | ), 116 | ), 117 | ), 118 | ), 119 | SizedBox(width: 15.0), 120 | Column( 121 | mainAxisAlignment: MainAxisAlignment.center, 122 | crossAxisAlignment: CrossAxisAlignment.start, 123 | children: [ 124 | Text( 125 | 'Hi Buddy!', 126 | style: TextStyle( 127 | color: darkTextColor, 128 | fontWeight: FontWeight.bold, 129 | ), 130 | ), 131 | SizedBox(height: 5.0), 132 | Container( 133 | width: 150, 134 | child: Text( 135 | 'I\'m your mentor to give you good tips', 136 | maxLines: 2, 137 | style: TextStyle( 138 | color: darkTextColor, 139 | fontSize: 12.0, 140 | ), 141 | ), 142 | ), 143 | ], 144 | ), 145 | ], 146 | ), 147 | ), 148 | ); 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /lib/utilities/bmi_calculator.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | class BMICalculator { 4 | BMICalculator({this.height, this.weight}); 5 | 6 | int height; 7 | int weight; 8 | double bmi; 9 | 10 | String getBMI() { 11 | bmi = weight / pow(height / 100, 2); 12 | return bmi.toStringAsFixed(1); 13 | } 14 | 15 | String getResult() { 16 | if (bmi < 18.5) 17 | return 'Underweight'; 18 | else if (bmi >= 18.5 && bmi <= 24.9) 19 | return 'Normal'; 20 | else 21 | return 'Overweight'; 22 | } 23 | 24 | double getBMIPercentage() { 25 | double percentage; 26 | //Above 25 person is overweight so after 29.9 bmi percentage chart will be full 100% 27 | percentage = bmi / 29.9 * 100; 28 | return percentage; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/utilities/constants.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Color backgroundColor = Color(0xFFF0EEF3); 4 | Color darkTextColor = Color(0xFF5B6275); 5 | Color lightTextColor = Colors.grey; 6 | Color foregroundColor = Color(0xFFF0EEF3); 7 | 8 | var outerShadow = [ 9 | BoxShadow( 10 | blurRadius: 3.0, 11 | offset: Offset(-2, -2), 12 | color: Colors.white.withOpacity(0.7), 13 | ), 14 | BoxShadow( 15 | blurRadius: 3.0, 16 | offset: Offset(2, 2), 17 | color: Colors.black.withOpacity(0.15), 18 | ), 19 | ]; 20 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: transitive 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.0.11" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.5.2" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.4.0" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.0.5" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.2" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.14.11" 46 | convert: 47 | dependency: transitive 48 | description: 49 | name: convert 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "2.1.1" 53 | crypto: 54 | dependency: transitive 55 | description: 56 | name: crypto 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.1.3" 60 | cupertino_icons: 61 | dependency: "direct main" 62 | description: 63 | name: cupertino_icons 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "0.1.3" 67 | flutter: 68 | dependency: "direct main" 69 | description: flutter 70 | source: sdk 71 | version: "0.0.0" 72 | flutter_circular_chart: 73 | dependency: "direct main" 74 | description: 75 | name: flutter_circular_chart 76 | url: "https://pub.dartlang.org" 77 | source: hosted 78 | version: "0.1.0" 79 | flutter_icons: 80 | dependency: "direct main" 81 | description: 82 | name: flutter_icons 83 | url: "https://pub.dartlang.org" 84 | source: hosted 85 | version: "1.1.0" 86 | flutter_test: 87 | dependency: "direct dev" 88 | description: flutter 89 | source: sdk 90 | version: "0.0.0" 91 | image: 92 | dependency: transitive 93 | description: 94 | name: image 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "2.1.4" 98 | matcher: 99 | dependency: transitive 100 | description: 101 | name: matcher 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "0.12.6" 105 | meta: 106 | dependency: transitive 107 | description: 108 | name: meta 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "1.1.8" 112 | path: 113 | dependency: transitive 114 | description: 115 | name: path 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "1.6.4" 119 | pedantic: 120 | dependency: transitive 121 | description: 122 | name: pedantic 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "1.8.0+1" 126 | petitparser: 127 | dependency: transitive 128 | description: 129 | name: petitparser 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "2.4.0" 133 | quiver: 134 | dependency: transitive 135 | description: 136 | name: quiver 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "2.0.5" 140 | sky_engine: 141 | dependency: transitive 142 | description: flutter 143 | source: sdk 144 | version: "0.0.99" 145 | source_span: 146 | dependency: transitive 147 | description: 148 | name: source_span 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "1.5.5" 152 | stack_trace: 153 | dependency: transitive 154 | description: 155 | name: stack_trace 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "1.9.3" 159 | stream_channel: 160 | dependency: transitive 161 | description: 162 | name: stream_channel 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "2.0.0" 166 | string_scanner: 167 | dependency: transitive 168 | description: 169 | name: string_scanner 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "1.0.5" 173 | term_glyph: 174 | dependency: transitive 175 | description: 176 | name: term_glyph 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.1.0" 180 | test_api: 181 | dependency: transitive 182 | description: 183 | name: test_api 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "0.2.11" 187 | typed_data: 188 | dependency: transitive 189 | description: 190 | name: typed_data 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "1.1.6" 194 | vector_math: 195 | dependency: transitive 196 | description: 197 | name: vector_math 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "2.0.8" 201 | xml: 202 | dependency: transitive 203 | description: 204 | name: xml 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "3.5.0" 208 | sdks: 209 | dart: ">=2.4.0 <3.0.0" 210 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: bmicalculator 2 | description: A new Flutter application. 3 | 4 | version: 1.0.0+1 5 | 6 | environment: 7 | sdk: ">=2.1.0 <3.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | 13 | cupertino_icons: ^0.1.2 14 | flutter_icons: ^1.1.0 15 | flutter_circular_chart: ^0.1.0 16 | 17 | dev_dependencies: 18 | flutter_test: 19 | sdk: flutter 20 | 21 | 22 | flutter: 23 | 24 | uses-material-design: true 25 | 26 | # assets: 27 | fonts: 28 | - family: Montserrat 29 | fonts: 30 | - asset: assets/fonts/Montserrat-Regular.ttf 31 | - asset: assets/fonts/Montserrat-Bold.ttf 32 | weight: 700 33 | # - asset: fonts/Schyler-Italic.ttf 34 | # style: italic 35 | # - family: Trajan Pro 36 | # fonts: 37 | # - asset: fonts/TrajanPro.ttf 38 | # - asset: fonts/TrajanPro_Bold.ttf 39 | # weight: 700 40 | # 41 | -------------------------------------------------------------------------------- /screenshots/BmiCalculator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/screenshots/BmiCalculator.gif -------------------------------------------------------------------------------- /screenshots/HomePage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/screenshots/HomePage.jpg -------------------------------------------------------------------------------- /screenshots/InfoPage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/screenshots/InfoPage.jpg -------------------------------------------------------------------------------- /screenshots/ResultPage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/screenshots/ResultPage.jpg -------------------------------------------------------------------------------- /screenshots/TipsPage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alirzadev/bmiCalculator/6bd00c87cd4b3371cbe01b8d6aa9f47618eacbfe/screenshots/TipsPage.jpg -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:bmicalculator/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | --------------------------------------------------------------------------------