├── README.md └── flutter_parallax ├── .gitignore ├── .metadata ├── android ├── app │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── napo │ │ │ └── example │ │ │ └── parallax │ │ │ └── flutterparallax │ │ │ └── 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 ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── back.png ├── banner │ ├── img1.jpg │ ├── img2.jpeg │ ├── img3.jpg │ ├── img4.jpg │ └── img5.jpg ├── bg1.jpg ├── bg2.jpg ├── bg3.jpeg ├── bg4.jpg ├── bg5.jpg ├── bg6.png ├── fonts │ └── HELR45W.ttf ├── ic │ └── tab │ │ ├── ic_tab_category.png │ │ ├── ic_tab_category_non.png │ │ ├── ic_tab_home.png │ │ ├── ic_tab_home_non.png │ │ ├── ic_tab_love.png │ │ ├── ic_tab_love_non.png │ │ ├── ic_tab_profile.png │ │ └── ic_tab_profile_non.png ├── ic_launcher.png ├── ic_launcher_2.png └── topic │ ├── t1.jpg │ ├── t2.jpg │ ├── t3.jpg │ ├── t4.jpg │ └── t5.jpg ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── entities │ ├── TimelineTopicEntity.dart │ └── UserEntity.dart ├── main.dart ├── screens │ ├── home │ │ ├── Attr.dart │ │ ├── Home.dart │ │ └── HomeView.dart │ ├── tab_cat │ │ ├── Attr.dart │ │ ├── TabCat.dart │ │ └── TabCatView.dart │ ├── tab_home │ │ ├── Attr.dart │ │ ├── TabHome.dart │ │ └── TabHomeView.dart │ ├── tab_love │ │ ├── TabLove.dart │ │ └── TabLoveView.dart │ └── tab_profile │ │ ├── TabProfile.dart │ │ └── TabProfileView.dart ├── styles │ ├── ColorsConst.dart │ └── StyleConst.dart └── widgets │ ├── BaseAppBar.dart │ ├── DotsIndicator.dart │ ├── ListBasic.dart │ ├── ListImageItems.dart │ ├── PagerBannerItems.dart │ └── TimelineTopicItem.dart ├── pubspec.yaml └── test └── widget_test.dart /README.md: -------------------------------------------------------------------------------- 1 | # Flutter Example [1] 2 | Flutter Example, (ViewPager Parallax, VerticalList, HorizontalList, Tab, Custom Dot Indicator, Action Click, Clean) 3 | 4 | 5 | # Output : 6 | ### Running on Device (Ios & Android) 7 | 8 | https://www.youtube.com/watch?v=zBGmVRNHBCo 9 | 10 | IMAGE ALT TEXT HERE 12 | 13 | 14 | # Point 15 | - ViewPager - Parallax effect 16 | - Custom Dot Indicator (ViewPager) 17 | - AppBar 18 | - TabBarView 19 | - ListView Vertical 20 | - ListView Horizontal 21 | - Action Click 22 | - State Management 23 | - Bottom Navigation Bar 24 | 25 | 26 | ### Dependencies 27 | - flutter sdk 28 | - cupertino_icons 29 | 30 | ### Assets 31 | - Image 32 | - Font 33 | 34 | 35 | # Details 36 | 37 | ### 1. TabBarView 38 | home/HomeView 39 | 40 | ```Dart 41 | ... 42 | return new Scaffold( 43 | key: attr.scfdRootKey, 44 | ... 45 | body: TabBarView( 46 | controller: attr.tabControl, 47 | children: [ 48 | new TabHome(), 49 | new TabCat(), 50 | new TabLove(), 51 | new TabProfile(), 52 | ], 53 | ), 54 | ... 55 | ``` 56 | 57 | ### 2. ViewPager Items, Parallax Effect 58 | widgets/PagerBannerItems , type StatefulWidget 59 | 60 | 61 | Calculation 62 | ```Dart 63 | ... 64 | void _handleScroll() { 65 | final double delta = widget.controller.offset - initOffset; 66 | final int viewportFraction = 67 | (100 * delta / viewportSize).round().clamp(-100, 100); 68 | final double offset = -1 * speedCoefficient * viewportFraction; 69 | 70 | if (offset != imageOffset) { 71 | setState(() { 72 | imageOffset = offset; 73 | }); 74 | } 75 | } 76 | ... 77 | ``` 78 | 79 | Alignment Implementation 80 | ```Dart 81 | ... 82 | @override 83 | Widget build(BuildContext ctx) { 84 | double x = imageOffset / 100; 85 | var alignment = Alignment.center.add(new Alignment(x, 0.0)); 86 | return Container( 87 | margin: EdgeInsets.all(5), 88 | child: new Card( 89 | ... 90 | ... 91 | child: new ClipRRect( 92 | borderRadius: new BorderRadius.circular(5.0), 93 | child: new Stack( 94 | alignment: alignment, 95 | ... 96 | ... 97 | )), 98 | ), 99 | ); 100 | } 101 | ... 102 | ``` 103 | 104 | 105 | 106 | ### 2. Dot Indicator, Multiple Types 107 | widgets/DotsIndicator , type AnimatedWidget 108 | 109 | 110 | Dot Type 111 | ```Dart 112 | ... 113 | enum DotType { 114 | CIRCLE, 115 | BOX, 116 | ICON, 117 | } 118 | ... 119 | ``` 120 | 121 | 122 | Implementation 123 | tab_home/TabHomeView 124 | 125 | ```Dart 126 | ... 127 | new DotsIndicator( 128 | colorActive: ColorsConst.base, 129 | colorInActive: ColorsConst.white, 130 | controller: attr.bannerViewPagerControl, 131 | itemCount: attr.bannerImages.length, 132 | spacing: 12, 133 | size: 4.0, 134 | activedZoom: 1.5, 135 | dotType: DotType.BOX, 136 | icon: Icons.adjust, 137 | onPageSelected: (int page) { 138 | attr.bannerViewPagerControl.animateToPage( 139 | page, 140 | duration: Duration(milliseconds: 300), 141 | curve: Curves.ease, 142 | ); 143 | }, 144 | ), 145 | ... 146 | ``` 147 | 148 | 149 | -------------------------------------------------------------------------------- /flutter_parallax/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .vscode/ 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | .dart_tool/ 25 | .flutter-plugins 26 | .packages 27 | .pub-cache/ 28 | .pub/ 29 | build/ 30 | 31 | # Android related 32 | **/android/**/gradle-wrapper.jar 33 | **/android/.gradle 34 | **/android/captures/ 35 | **/android/gradlew 36 | **/android/gradlew.bat 37 | **/android/local.properties 38 | **/android/**/GeneratedPluginRegistrant.java 39 | 40 | # iOS/XCode related 41 | **/ios/**/*.mode1v3 42 | **/ios/**/*.mode2v3 43 | **/ios/**/*.moved-aside 44 | **/ios/**/*.pbxuser 45 | **/ios/**/*.perspectivev3 46 | **/ios/**/*sync/ 47 | **/ios/**/.sconsign.dblite 48 | **/ios/**/.tags* 49 | **/ios/**/.vagrant/ 50 | **/ios/**/DerivedData/ 51 | **/ios/**/Icon? 52 | **/ios/**/Pods/ 53 | **/ios/**/.symlinks/ 54 | **/ios/**/profile 55 | **/ios/**/xcuserdata 56 | **/ios/.generated/ 57 | **/ios/Flutter/App.framework 58 | **/ios/Flutter/Flutter.framework 59 | **/ios/Flutter/Generated.xcconfig 60 | **/ios/Flutter/app.flx 61 | **/ios/Flutter/app.zip 62 | **/ios/Flutter/flutter_assets/ 63 | **/ios/ServiceDefinitions.json 64 | **/ios/Runner/GeneratedPluginRegistrant.* 65 | 66 | # Exceptions to above rules. 67 | !**/ios/**/default.mode1v3 68 | !**/ios/**/default.mode2v3 69 | !**/ios/**/default.pbxuser 70 | !**/ios/**/default.perspectivev3 71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 72 | -------------------------------------------------------------------------------- /flutter_parallax/.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: 5391447fae6209bb21a89e6a5a6583cac1af9b4b 8 | channel: beta 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /flutter_parallax/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 27 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 "napo.example.parallax.flutterparallax" 37 | minSdkVersion 16 38 | targetSdkVersion 27 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.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 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /flutter_parallax/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /flutter_parallax/android/app/src/main/java/napo/example/parallax/flutterparallax/MainActivity.java: -------------------------------------------------------------------------------- 1 | package napo.example.parallax.flutterparallax; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /flutter_parallax/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /flutter_parallax/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_parallax/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_parallax/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_parallax/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_parallax/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_parallax/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_parallax/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 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 | -------------------------------------------------------------------------------- /flutter_parallax/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /flutter_parallax/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /flutter_parallax/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 | -------------------------------------------------------------------------------- /flutter_parallax/assets/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/back.png -------------------------------------------------------------------------------- /flutter_parallax/assets/banner/img1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/banner/img1.jpg -------------------------------------------------------------------------------- /flutter_parallax/assets/banner/img2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/banner/img2.jpeg -------------------------------------------------------------------------------- /flutter_parallax/assets/banner/img3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/banner/img3.jpg -------------------------------------------------------------------------------- /flutter_parallax/assets/banner/img4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/banner/img4.jpg -------------------------------------------------------------------------------- /flutter_parallax/assets/banner/img5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/banner/img5.jpg -------------------------------------------------------------------------------- /flutter_parallax/assets/bg1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/bg1.jpg -------------------------------------------------------------------------------- /flutter_parallax/assets/bg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/bg2.jpg -------------------------------------------------------------------------------- /flutter_parallax/assets/bg3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/bg3.jpeg -------------------------------------------------------------------------------- /flutter_parallax/assets/bg4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/bg4.jpg -------------------------------------------------------------------------------- /flutter_parallax/assets/bg5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/bg5.jpg -------------------------------------------------------------------------------- /flutter_parallax/assets/bg6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/bg6.png -------------------------------------------------------------------------------- /flutter_parallax/assets/fonts/HELR45W.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/fonts/HELR45W.ttf -------------------------------------------------------------------------------- /flutter_parallax/assets/ic/tab/ic_tab_category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/ic/tab/ic_tab_category.png -------------------------------------------------------------------------------- /flutter_parallax/assets/ic/tab/ic_tab_category_non.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/ic/tab/ic_tab_category_non.png -------------------------------------------------------------------------------- /flutter_parallax/assets/ic/tab/ic_tab_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/ic/tab/ic_tab_home.png -------------------------------------------------------------------------------- /flutter_parallax/assets/ic/tab/ic_tab_home_non.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/ic/tab/ic_tab_home_non.png -------------------------------------------------------------------------------- /flutter_parallax/assets/ic/tab/ic_tab_love.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/ic/tab/ic_tab_love.png -------------------------------------------------------------------------------- /flutter_parallax/assets/ic/tab/ic_tab_love_non.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/ic/tab/ic_tab_love_non.png -------------------------------------------------------------------------------- /flutter_parallax/assets/ic/tab/ic_tab_profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/ic/tab/ic_tab_profile.png -------------------------------------------------------------------------------- /flutter_parallax/assets/ic/tab/ic_tab_profile_non.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/ic/tab/ic_tab_profile_non.png -------------------------------------------------------------------------------- /flutter_parallax/assets/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/ic_launcher.png -------------------------------------------------------------------------------- /flutter_parallax/assets/ic_launcher_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/ic_launcher_2.png -------------------------------------------------------------------------------- /flutter_parallax/assets/topic/t1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/topic/t1.jpg -------------------------------------------------------------------------------- /flutter_parallax/assets/topic/t2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/topic/t2.jpg -------------------------------------------------------------------------------- /flutter_parallax/assets/topic/t3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/topic/t3.jpg -------------------------------------------------------------------------------- /flutter_parallax/assets/topic/t4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/topic/t4.jpg -------------------------------------------------------------------------------- /flutter_parallax/assets/topic/t5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/assets/topic/t5.jpg -------------------------------------------------------------------------------- /flutter_parallax/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /flutter_parallax/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /flutter_parallax/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 16 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 17 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 18 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXCopyFilesBuildPhase section */ 25 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 26 | isa = PBXCopyFilesBuildPhase; 27 | buildActionMask = 2147483647; 28 | dstPath = ""; 29 | dstSubfolderSpec = 10; 30 | files = ( 31 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 32 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 33 | ); 34 | name = "Embed Frameworks"; 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXCopyFilesBuildPhase section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 41 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 42 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; 43 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 44 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 45 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 46 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 47 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 48 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 49 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 50 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 51 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 53 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 54 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 55 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 64 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | 9740EEB11CF90186004384FC /* Flutter */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 75 | 3B80C3931E831B6300D905FE /* App.framework */, 76 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 77 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 78 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 79 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 80 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 81 | ); 82 | name = Flutter; 83 | sourceTree = ""; 84 | }; 85 | 97C146E51CF9000F007C117D = { 86 | isa = PBXGroup; 87 | children = ( 88 | 9740EEB11CF90186004384FC /* Flutter */, 89 | 97C146F01CF9000F007C117D /* Runner */, 90 | 97C146EF1CF9000F007C117D /* Products */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 97C146EF1CF9000F007C117D /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 97C146EE1CF9000F007C117D /* Runner.app */, 98 | ); 99 | name = Products; 100 | sourceTree = ""; 101 | }; 102 | 97C146F01CF9000F007C117D /* Runner */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 106 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 107 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 108 | 97C147021CF9000F007C117D /* Info.plist */, 109 | 97C146F11CF9000F007C117D /* Supporting Files */, 110 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 111 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 112 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 113 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 114 | ); 115 | path = Runner; 116 | sourceTree = ""; 117 | }; 118 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | ); 122 | name = "Supporting Files"; 123 | sourceTree = ""; 124 | }; 125 | /* End PBXGroup section */ 126 | 127 | /* Begin PBXNativeTarget section */ 128 | 97C146ED1CF9000F007C117D /* Runner */ = { 129 | isa = PBXNativeTarget; 130 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 131 | buildPhases = ( 132 | 9740EEB61CF901F6004384FC /* Run Script */, 133 | 97C146EA1CF9000F007C117D /* Sources */, 134 | 97C146EB1CF9000F007C117D /* Frameworks */, 135 | 97C146EC1CF9000F007C117D /* Resources */, 136 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 137 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 138 | ); 139 | buildRules = ( 140 | ); 141 | dependencies = ( 142 | ); 143 | name = Runner; 144 | productName = Runner; 145 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 146 | productType = "com.apple.product-type.application"; 147 | }; 148 | /* End PBXNativeTarget section */ 149 | 150 | /* Begin PBXProject section */ 151 | 97C146E61CF9000F007C117D /* Project object */ = { 152 | isa = PBXProject; 153 | attributes = { 154 | LastUpgradeCheck = 0910; 155 | ORGANIZATIONNAME = "The Chromium Authors"; 156 | TargetAttributes = { 157 | 97C146ED1CF9000F007C117D = { 158 | CreatedOnToolsVersion = 7.3.1; 159 | DevelopmentTeam = W3PW964GBG; 160 | LastSwiftMigration = 0910; 161 | }; 162 | }; 163 | }; 164 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 165 | compatibilityVersion = "Xcode 3.2"; 166 | developmentRegion = English; 167 | hasScannedForEncodings = 0; 168 | knownRegions = ( 169 | en, 170 | Base, 171 | ); 172 | mainGroup = 97C146E51CF9000F007C117D; 173 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 174 | projectDirPath = ""; 175 | projectRoot = ""; 176 | targets = ( 177 | 97C146ED1CF9000F007C117D /* Runner */, 178 | ); 179 | }; 180 | /* End PBXProject section */ 181 | 182 | /* Begin PBXResourcesBuildPhase section */ 183 | 97C146EC1CF9000F007C117D /* Resources */ = { 184 | isa = PBXResourcesBuildPhase; 185 | buildActionMask = 2147483647; 186 | files = ( 187 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 188 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 189 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 190 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 191 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 192 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 193 | ); 194 | runOnlyForDeploymentPostprocessing = 0; 195 | }; 196 | /* End PBXResourcesBuildPhase section */ 197 | 198 | /* Begin PBXShellScriptBuildPhase section */ 199 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 200 | isa = PBXShellScriptBuildPhase; 201 | buildActionMask = 2147483647; 202 | files = ( 203 | ); 204 | inputPaths = ( 205 | ); 206 | name = "Thin Binary"; 207 | outputPaths = ( 208 | ); 209 | runOnlyForDeploymentPostprocessing = 0; 210 | shellPath = /bin/sh; 211 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 212 | }; 213 | 9740EEB61CF901F6004384FC /* Run Script */ = { 214 | isa = PBXShellScriptBuildPhase; 215 | buildActionMask = 2147483647; 216 | files = ( 217 | ); 218 | inputPaths = ( 219 | ); 220 | name = "Run Script"; 221 | outputPaths = ( 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | shellPath = /bin/sh; 225 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 226 | }; 227 | /* End PBXShellScriptBuildPhase section */ 228 | 229 | /* Begin PBXSourcesBuildPhase section */ 230 | 97C146EA1CF9000F007C117D /* Sources */ = { 231 | isa = PBXSourcesBuildPhase; 232 | buildActionMask = 2147483647; 233 | files = ( 234 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 235 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | }; 239 | /* End PBXSourcesBuildPhase section */ 240 | 241 | /* Begin PBXVariantGroup section */ 242 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 243 | isa = PBXVariantGroup; 244 | children = ( 245 | 97C146FB1CF9000F007C117D /* Base */, 246 | ); 247 | name = Main.storyboard; 248 | sourceTree = ""; 249 | }; 250 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 251 | isa = PBXVariantGroup; 252 | children = ( 253 | 97C147001CF9000F007C117D /* Base */, 254 | ); 255 | name = LaunchScreen.storyboard; 256 | sourceTree = ""; 257 | }; 258 | /* End PBXVariantGroup section */ 259 | 260 | /* Begin XCBuildConfiguration section */ 261 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 262 | isa = XCBuildConfiguration; 263 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 264 | buildSettings = { 265 | ALWAYS_SEARCH_USER_PATHS = NO; 266 | CLANG_ANALYZER_NONNULL = YES; 267 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 268 | CLANG_CXX_LIBRARY = "libc++"; 269 | CLANG_ENABLE_MODULES = YES; 270 | CLANG_ENABLE_OBJC_ARC = YES; 271 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 272 | CLANG_WARN_BOOL_CONVERSION = YES; 273 | CLANG_WARN_COMMA = YES; 274 | CLANG_WARN_CONSTANT_CONVERSION = YES; 275 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 276 | CLANG_WARN_EMPTY_BODY = YES; 277 | CLANG_WARN_ENUM_CONVERSION = YES; 278 | CLANG_WARN_INFINITE_RECURSION = YES; 279 | CLANG_WARN_INT_CONVERSION = YES; 280 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 281 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 282 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 283 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 284 | CLANG_WARN_STRICT_PROTOTYPES = YES; 285 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 286 | CLANG_WARN_UNREACHABLE_CODE = YES; 287 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 288 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 289 | COPY_PHASE_STRIP = NO; 290 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 291 | ENABLE_NS_ASSERTIONS = NO; 292 | ENABLE_STRICT_OBJC_MSGSEND = YES; 293 | GCC_C_LANGUAGE_STANDARD = gnu99; 294 | GCC_NO_COMMON_BLOCKS = YES; 295 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 296 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 297 | GCC_WARN_UNDECLARED_SELECTOR = YES; 298 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 299 | GCC_WARN_UNUSED_FUNCTION = YES; 300 | GCC_WARN_UNUSED_VARIABLE = YES; 301 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 302 | MTL_ENABLE_DEBUG_INFO = NO; 303 | SDKROOT = 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 | DEVELOPMENT_TEAM = W3PW964GBG; 316 | ENABLE_BITCODE = NO; 317 | FRAMEWORK_SEARCH_PATHS = ( 318 | "$(inherited)", 319 | "$(PROJECT_DIR)/Flutter", 320 | ); 321 | INFOPLIST_FILE = Runner/Info.plist; 322 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 323 | LIBRARY_SEARCH_PATHS = ( 324 | "$(inherited)", 325 | "$(PROJECT_DIR)/Flutter", 326 | ); 327 | PRODUCT_BUNDLE_IDENTIFIER = napo.example.parallax.flutterParallax; 328 | PRODUCT_NAME = "$(TARGET_NAME)"; 329 | SWIFT_VERSION = 4.0; 330 | VERSIONING_SYSTEM = "apple-generic"; 331 | }; 332 | name = Profile; 333 | }; 334 | 97C147031CF9000F007C117D /* Debug */ = { 335 | isa = XCBuildConfiguration; 336 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 337 | buildSettings = { 338 | ALWAYS_SEARCH_USER_PATHS = NO; 339 | CLANG_ANALYZER_NONNULL = YES; 340 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 341 | CLANG_CXX_LIBRARY = "libc++"; 342 | CLANG_ENABLE_MODULES = YES; 343 | CLANG_ENABLE_OBJC_ARC = YES; 344 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 345 | CLANG_WARN_BOOL_CONVERSION = YES; 346 | CLANG_WARN_COMMA = YES; 347 | CLANG_WARN_CONSTANT_CONVERSION = YES; 348 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 349 | CLANG_WARN_EMPTY_BODY = YES; 350 | CLANG_WARN_ENUM_CONVERSION = YES; 351 | CLANG_WARN_INFINITE_RECURSION = YES; 352 | CLANG_WARN_INT_CONVERSION = YES; 353 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = 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_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 403 | CLANG_WARN_EMPTY_BODY = YES; 404 | CLANG_WARN_ENUM_CONVERSION = YES; 405 | CLANG_WARN_INFINITE_RECURSION = YES; 406 | CLANG_WARN_INT_CONVERSION = YES; 407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 408 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 409 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 410 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 411 | CLANG_WARN_STRICT_PROTOTYPES = YES; 412 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 413 | CLANG_WARN_UNREACHABLE_CODE = YES; 414 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 415 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 416 | COPY_PHASE_STRIP = NO; 417 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 418 | ENABLE_NS_ASSERTIONS = NO; 419 | ENABLE_STRICT_OBJC_MSGSEND = YES; 420 | GCC_C_LANGUAGE_STANDARD = gnu99; 421 | GCC_NO_COMMON_BLOCKS = YES; 422 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 423 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 424 | GCC_WARN_UNDECLARED_SELECTOR = YES; 425 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 426 | GCC_WARN_UNUSED_FUNCTION = YES; 427 | GCC_WARN_UNUSED_VARIABLE = YES; 428 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 429 | MTL_ENABLE_DEBUG_INFO = NO; 430 | SDKROOT = iphoneos; 431 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 432 | TARGETED_DEVICE_FAMILY = "1,2"; 433 | VALIDATE_PRODUCT = YES; 434 | }; 435 | name = Release; 436 | }; 437 | 97C147061CF9000F007C117D /* Debug */ = { 438 | isa = XCBuildConfiguration; 439 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 440 | buildSettings = { 441 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 442 | CLANG_ENABLE_MODULES = YES; 443 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 444 | DEVELOPMENT_TEAM = W3PW964GBG; 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 = napo.example.parallax.flutterParallax; 457 | PRODUCT_NAME = "$(TARGET_NAME)"; 458 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 459 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 460 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 461 | SWIFT_VERSION = 4.0; 462 | VERSIONING_SYSTEM = "apple-generic"; 463 | }; 464 | name = Debug; 465 | }; 466 | 97C147071CF9000F007C117D /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 469 | buildSettings = { 470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 471 | CLANG_ENABLE_MODULES = YES; 472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 473 | DEVELOPMENT_TEAM = W3PW964GBG; 474 | ENABLE_BITCODE = NO; 475 | FRAMEWORK_SEARCH_PATHS = ( 476 | "$(inherited)", 477 | "$(PROJECT_DIR)/Flutter", 478 | ); 479 | INFOPLIST_FILE = Runner/Info.plist; 480 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 481 | LIBRARY_SEARCH_PATHS = ( 482 | "$(inherited)", 483 | "$(PROJECT_DIR)/Flutter", 484 | ); 485 | PRODUCT_BUNDLE_IDENTIFIER = napo.example.parallax.flutterParallax; 486 | PRODUCT_NAME = "$(TARGET_NAME)"; 487 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 488 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 489 | SWIFT_VERSION = 4.0; 490 | VERSIONING_SYSTEM = "apple-generic"; 491 | }; 492 | name = Release; 493 | }; 494 | /* End XCBuildConfiguration section */ 495 | 496 | /* Begin XCConfigurationList section */ 497 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 498 | isa = XCConfigurationList; 499 | buildConfigurations = ( 500 | 97C147031CF9000F007C117D /* Debug */, 501 | 97C147041CF9000F007C117D /* Release */, 502 | 249021D3217E4FDB00AE95B9 /* Profile */, 503 | ); 504 | defaultConfigurationIsVisible = 0; 505 | defaultConfigurationName = Release; 506 | }; 507 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 508 | isa = XCConfigurationList; 509 | buildConfigurations = ( 510 | 97C147061CF9000F007C117D /* Debug */, 511 | 97C147071CF9000F007C117D /* Release */, 512 | 249021D4217E4FDB00AE95B9 /* Profile */, 513 | ); 514 | defaultConfigurationIsVisible = 0; 515 | defaultConfigurationName = Release; 516 | }; 517 | /* End XCConfigurationList section */ 518 | }; 519 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 520 | } 521 | -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /flutter_parallax/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 | -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /flutter_parallax/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 | -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /flutter_parallax/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 | -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opannapo/Flutter-Example-1/7ec9ce413c8ac87fdd74d8b48c3b8a4d9650c3f7/flutter_parallax/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /flutter_parallax/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. -------------------------------------------------------------------------------- /flutter_parallax/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 | -------------------------------------------------------------------------------- /flutter_parallax/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 | -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | flutter_parralax 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_parallax 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /flutter_parallax/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /flutter_parallax/lib/entities/TimelineTopicEntity.dart: -------------------------------------------------------------------------------- 1 | class TimelineTopicEntity { 2 | String title; 3 | int dateTime; 4 | String content; 5 | String image; 6 | } 7 | -------------------------------------------------------------------------------- /flutter_parallax/lib/entities/UserEntity.dart: -------------------------------------------------------------------------------- 1 | class UserEntity { 2 | String fullname; 3 | String bio; 4 | String photo; 5 | String email; 6 | String gender; 7 | String phone; 8 | Address address; 9 | 10 | UserEntity( 11 | {this.fullname, 12 | this.bio, 13 | this.photo, 14 | this.email, 15 | this.gender, 16 | this.phone, 17 | this.address}); 18 | 19 | factory UserEntity.fromJson(Map json) { 20 | Map user = json['data']; 21 | 22 | Address address = Address.fromJson(user['address']); 23 | 24 | return UserEntity( 25 | fullname: user['fullname'] as String, 26 | bio: user['bio'] as String, 27 | photo: user['photo'] as String, 28 | email: user['email'] as String, 29 | gender: user['gender'] as String, 30 | phone: user['phone'] as String, 31 | address: address); 32 | } 33 | } 34 | 35 | class Address { 36 | String address; 37 | String city; 38 | String region; 39 | String area; 40 | 41 | Address({this.address, this.city, this.region, this.area}); 42 | 43 | factory Address.fromJson(Map json) { 44 | return Address( 45 | address: json['address'] as String, 46 | city: json['city'] as String, 47 | region: json['region'] as String, 48 | area: json['area'] as String); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /flutter_parallax/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_parallax/screens/home/Home.dart'; 3 | 4 | void main() { 5 | runApp(MyApp()); 6 | } 7 | 8 | class MyApp extends StatelessWidget { 9 | @override 10 | Widget build(BuildContext ctxt) { 11 | return new MaterialApp( 12 | theme: ThemeData( 13 | brightness: Brightness.light, 14 | primaryColor: Colors.white, 15 | backgroundColor: Colors.white, 16 | fontFamily: 'helvetica', 17 | canvasColor: Colors.transparent, 18 | ), 19 | home: new Home()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /flutter_parallax/lib/screens/home/Attr.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_parallax/entities/UserEntity.dart'; 3 | 4 | class Attr { 5 | TabController tabControl; 6 | var scfdRootKey = new GlobalKey(); 7 | 8 | UserEntity user; 9 | int tabIdx; 10 | int tabIdxPrev; 11 | String title; 12 | List titleTabs = new List(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /flutter_parallax/lib/screens/home/Home.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_parallax/entities/UserEntity.dart'; 3 | import 'package:flutter_parallax/screens/home/Attr.dart'; 4 | import 'package:flutter_parallax/screens/home/HomeView.dart'; 5 | 6 | class Home extends StatefulWidget { 7 | UserEntity user; 8 | 9 | Home({this.user}); 10 | 11 | @override 12 | State createState() => new HomeState(this.user); 13 | } 14 | 15 | class HomeState extends State 16 | with SingleTickerProviderStateMixin 17 | implements ActionAbs { 18 | Attr attr = new Attr(); 19 | 20 | HomeState(UserEntity user) { 21 | if (user != null) { 22 | attr.user = user; 23 | } 24 | } 25 | 26 | @override 27 | void initState() { 28 | super.initState(); 29 | attr.title = "Home"; 30 | attr.scfdRootKey = new GlobalKey(); 31 | attr.tabIdx = 0; 32 | attr.tabIdxPrev = 0; 33 | attr.titleTabs = ["Home", "Categories", "Loved", "Profile"]; 34 | attr.tabControl = new TabController(length: 4, vsync: this); 35 | attr.tabControl.addListener(_tabListener); 36 | } 37 | 38 | @override 39 | void dispose() { 40 | attr.tabControl.dispose(); 41 | super.dispose(); 42 | } 43 | 44 | @override 45 | Widget build(BuildContext context) => new HomeView(attr, this); 46 | 47 | void onLeftPress() { 48 | Navigator.pop(context); // Pop from stack 49 | } 50 | 51 | void onRightPress() { 52 | final snackBar = SnackBar( 53 | content: Text('Hi... !'), 54 | action: SnackBarAction( 55 | label: 'Close', 56 | onPressed: () { 57 | // Some code to undo the change! 58 | }, 59 | ), 60 | ); 61 | attr.scfdRootKey.currentState.showSnackBar(snackBar); 62 | } 63 | 64 | void changeTab(int index) { 65 | if (index == attr.tabIdx) return; 66 | setState(() { 67 | attr.tabIdxPrev = attr.tabIdx; 68 | attr.tabIdx = index; 69 | attr.title = attr.titleTabs[index]; 70 | attr.tabControl.index = index; 71 | }); 72 | } 73 | 74 | _tabListener() { 75 | changeTab(attr.tabControl.index); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /flutter_parallax/lib/screens/home/HomeView.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_parallax/screens/home/Attr.dart'; 3 | import 'package:flutter_parallax/screens/tab_cat/TabCat.dart'; 4 | import 'package:flutter_parallax/screens/tab_home/TabHome.dart'; 5 | import 'package:flutter_parallax/screens/tab_love/TabLove.dart'; 6 | import 'package:flutter_parallax/screens/tab_profile/TabProfile.dart'; 7 | import 'package:flutter_parallax/widgets/BaseAppBar.dart'; 8 | 9 | class HomeView extends StatelessWidget { 10 | Attr attr; 11 | ActionAbs act; 12 | 13 | HomeView(this.attr, this.act); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return new Scaffold( 18 | key: attr.scfdRootKey, 19 | appBar: BaseToolBar( 20 | title: attr.title, 21 | //leftIcon: Icons.arrow_back_ios, 22 | //onLeftPress: viewModel.onLeftPress, 23 | rightIcon: Icons.info, 24 | onRightPress: act.onRightPress, 25 | ).build(context), 26 | body: TabBarView( 27 | controller: attr.tabControl, 28 | children: [ 29 | new TabHome(), 30 | new TabCat(), 31 | new TabLove(), 32 | new TabProfile(), 33 | ], 34 | ), 35 | bottomNavigationBar: new Container( 36 | height: 50, 37 | decoration: new BoxDecoration(color: Colors.white, boxShadow: [ 38 | new BoxShadow( 39 | color: Colors.grey[500], 40 | blurRadius: 10.0, 41 | spreadRadius: 0.0, 42 | ), 43 | ]), 44 | child: new Row( 45 | mainAxisAlignment: MainAxisAlignment.center, 46 | children: [ 47 | new Flexible( 48 | flex: 50, 49 | child: new FlatButton( 50 | onPressed: () => act.changeTab(0), 51 | child: attr.tabIdx == 0 52 | ? new Image( 53 | image: 54 | new AssetImage("assets/ic/tab/ic_tab_home.png"), 55 | width: 25.0, 56 | height: 25.0) 57 | : new Image( 58 | image: new AssetImage( 59 | "assets/ic/tab/ic_tab_home_non.png"), 60 | width: 20.0, 61 | height: 20.0), 62 | ), 63 | ), 64 | new Flexible( 65 | flex: 50, 66 | child: new FlatButton( 67 | onPressed: () => act.changeTab(1), 68 | child: attr.tabIdx == 1 69 | ? new Image( 70 | image: new AssetImage( 71 | "assets/ic/tab/ic_tab_category.png"), 72 | width: 25.0, 73 | height: 25.0) 74 | : new Image( 75 | image: new AssetImage( 76 | "assets/ic/tab/ic_tab_category_non.png"), 77 | width: 20.0, 78 | height: 20.0), 79 | ), 80 | ), 81 | new Flexible( 82 | flex: 50, 83 | child: new FlatButton( 84 | onPressed: () => act.changeTab(2), 85 | child: attr.tabIdx == 2 86 | ? new Image( 87 | image: 88 | new AssetImage("assets/ic/tab/ic_tab_love.png"), 89 | width: 25.0, 90 | height: 25.0) 91 | : new Image( 92 | image: new AssetImage( 93 | "assets/ic/tab/ic_tab_love_non.png"), 94 | width: 20.0, 95 | height: 20.0), 96 | ), 97 | ), 98 | new Flexible( 99 | flex: 50, 100 | child: new FlatButton( 101 | onPressed: () => act.changeTab(3), 102 | child: attr.tabIdx == 3 103 | ? new Image( 104 | image: new AssetImage( 105 | "assets/ic/tab/ic_tab_profile.png"), 106 | width: 25.0, 107 | height: 25.0) 108 | : new Image( 109 | image: new AssetImage( 110 | "assets/ic/tab/ic_tab_profile_non.png"), 111 | width: 20.0, 112 | height: 20.0), 113 | ), 114 | ), 115 | ], 116 | ), 117 | )); 118 | } 119 | } 120 | 121 | abstract class ActionAbs { 122 | void onLeftPress() {} 123 | 124 | void onRightPress() {} 125 | 126 | void changeTab(int index) {} 127 | } 128 | -------------------------------------------------------------------------------- /flutter_parallax/lib/screens/tab_cat/Attr.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_parallax/widgets/ListBasic.dart'; 3 | class Attr { 4 | //Widget 5 | var keyScaffold2 = new GlobalKey(); 6 | var tSearchControl = TextEditingController(); 7 | 8 | //Values 9 | List listItems; 10 | } 11 | -------------------------------------------------------------------------------- /flutter_parallax/lib/screens/tab_cat/TabCat.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_parallax/screens/tab_cat/Attr.dart'; 3 | import 'package:flutter_parallax/screens/tab_cat/TabCatView.dart'; 4 | import 'package:flutter_parallax/widgets/ListBasic.dart'; 5 | 6 | class TabCat extends StatefulWidget { 7 | TabCat(); 8 | 9 | @override 10 | State createState() { 11 | print('HomeTabCat Create State '); 12 | return new TabCatState(); 13 | } 14 | } 15 | 16 | class TabCatState extends State 17 | with AutomaticKeepAliveClientMixin 18 | implements ActionAbs, ListClickCallback { 19 | Attr attr = new Attr(); 20 | List catNames = new List(); 21 | 22 | TabCatState(); 23 | 24 | @override 25 | void initState() { 26 | super.initState(); 27 | setupCategoryNames(); 28 | } 29 | 30 | @override 31 | void dispose() { 32 | attr.keyScaffold2.currentState.dispose(); 33 | attr.tSearchControl.dispose(); 34 | attr.listItems = null; 35 | super.dispose(); 36 | } 37 | 38 | @override 39 | Widget build(BuildContext context) => new TabCatView(attr, this); 40 | 41 | void setupCategoryNames() { 42 | attr.listItems = new List(); 43 | 44 | catNames.add("Promosi"); 45 | catNames.add("Terdekat"); 46 | catNames.add("Hemat"); 47 | catNames.add("Sarapan"); 48 | catNames.add("Minuman"); 49 | catNames.add("Cemilan"); 50 | catNames.add("Rokok"); 51 | catNames.add("Batu"); 52 | catNames.add("Rumput"); 53 | catNames.add("Tanah Liat"); 54 | catNames.add("Gorengan"); 55 | catNames.add("Air Putih"); 56 | catNames.add("Kipas Angin"); 57 | catNames.add("Jahe Gas"); 58 | 59 | for (int i = 0; i < catNames.length; i++) { 60 | String text = catNames[i]; 61 | attr.listItems.add(new ListBasic(i, text, this)); 62 | } 63 | } 64 | 65 | @override 66 | void onThumbCatPress(int idx) { 67 | showSnackBar(catNames[idx]); 68 | } 69 | 70 | @override 71 | void onSearchPress(String key) { 72 | showSnackBar('Searching ${key} ...'); 73 | attr.tSearchControl.text = ""; 74 | } 75 | 76 | @override 77 | bool get wantKeepAlive => true; 78 | 79 | @override 80 | void onListClicked(int idx) { 81 | showSnackBar('${catNames[idx]}'); 82 | } 83 | 84 | void showSnackBar(String text) { 85 | final snackBar = SnackBar( 86 | content: Text(text), 87 | action: SnackBarAction(label: 'Close', onPressed: () {}), 88 | ); 89 | attr.keyScaffold2.currentState.showSnackBar(snackBar); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /flutter_parallax/lib/screens/tab_cat/TabCatView.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_parallax/screens/tab_cat/Attr.dart'; 3 | import 'package:flutter_parallax/styles/ColorsConst.dart'; 4 | 5 | class TabCatView extends StatelessWidget { 6 | Attr root; 7 | ActionAbs act; 8 | 9 | TabCatView(this.root, this.act); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | key: root.keyScaffold2, 15 | backgroundColor: Colors.white, 16 | resizeToAvoidBottomPadding: false, 17 | body: Container( 18 | child: new SingleChildScrollView( 19 | child: new Column( 20 | children: [ 21 | new Container( 22 | color: ColorsConst.white, 23 | padding: EdgeInsets.fromLTRB(40, 10, 40, 10), 24 | child: new Row( 25 | children: [ 26 | new Flexible( 27 | child: new Container( 28 | decoration: new BoxDecoration( 29 | color: Colors.grey[200], 30 | borderRadius: new BorderRadius.only( 31 | bottomLeft: const Radius.circular(20.0), 32 | bottomRight: const Radius.circular(20.0), 33 | topLeft: const Radius.circular(20.0), 34 | topRight: const Radius.circular(20.0))), 35 | padding: EdgeInsets.all(10), 36 | child: TextField( 37 | decoration: new InputDecoration.collapsed( 38 | hintText: 'Search Product ...', 39 | hintStyle: new TextStyle( 40 | color: Colors.grey[400], 41 | fontSize: 14, 42 | letterSpacing: 1, 43 | fontWeight: FontWeight.w300, 44 | )), 45 | controller: root.tSearchControl, 46 | style: new TextStyle( 47 | letterSpacing: 1, 48 | color: ColorsConst.base, 49 | ), 50 | ), 51 | ), 52 | flex: 90, 53 | ), 54 | new Flexible( 55 | child: new FlatButton( 56 | padding: EdgeInsets.all(0), 57 | onPressed: () => 58 | act.onSearchPress(root.tSearchControl.text), 59 | child: Row( 60 | mainAxisAlignment: MainAxisAlignment.center, 61 | children: [ 62 | Icon( 63 | Icons.search, 64 | color: ColorsConst.base, 65 | size: 25, 66 | ) 67 | ], 68 | ), 69 | ), 70 | flex: 10, 71 | ), 72 | ], 73 | ), 74 | ), 75 | new Container( 76 | margin: EdgeInsets.fromLTRB(20, 10, 20, 0), 77 | child: new Column( 78 | mainAxisAlignment: MainAxisAlignment.center, 79 | children: [ 80 | new Container( 81 | margin: EdgeInsets.all(10), 82 | child: new Row( 83 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 84 | children: [ 85 | new Container( 86 | width: 100, 87 | height: 100, 88 | child: new FlatButton( 89 | padding: EdgeInsets.all(20), 90 | color: Colors.grey[100], 91 | onPressed: () => act.onThumbCatPress(0), 92 | child: Column( 93 | mainAxisAlignment: MainAxisAlignment.center, 94 | children: [ 95 | Icon( 96 | Icons.pages, 97 | color: Colors.black, 98 | size: 30, 99 | ), 100 | Text( 101 | "Promosi", 102 | style: TextStyle( 103 | fontSize: 12, 104 | fontWeight: FontWeight.w500, 105 | letterSpacing: 1, 106 | color: Colors.black), 107 | ) 108 | ], 109 | ), 110 | ), 111 | ), 112 | new Container( 113 | width: 100, 114 | height: 100, 115 | child: new FlatButton( 116 | padding: EdgeInsets.all(20), 117 | color: Colors.grey[100], 118 | onPressed: () => act.onThumbCatPress(1), 119 | child: Column( 120 | mainAxisAlignment: MainAxisAlignment.center, 121 | children: [ 122 | Icon( 123 | Icons.location_on, 124 | color: Colors.black, 125 | size: 30, 126 | ), 127 | Text( 128 | "Terdekat", 129 | style: TextStyle( 130 | fontSize: 12, 131 | fontWeight: FontWeight.w500, 132 | letterSpacing: 1, 133 | color: Colors.black), 134 | ) 135 | ], 136 | ), 137 | ), 138 | ), 139 | new Container( 140 | width: 100, 141 | height: 100, 142 | child: new FlatButton( 143 | padding: EdgeInsets.all(20), 144 | color: Colors.grey[100], 145 | onPressed: () => act.onThumbCatPress(2), 146 | child: Column( 147 | mainAxisAlignment: MainAxisAlignment.center, 148 | children: [ 149 | Icon( 150 | Icons.attach_money, 151 | color: Colors.black, 152 | size: 30, 153 | ), 154 | Text( 155 | "Hemat", 156 | style: TextStyle( 157 | fontSize: 12, 158 | fontWeight: FontWeight.w500, 159 | letterSpacing: 1, 160 | color: Colors.black), 161 | ) 162 | ], 163 | ), 164 | ), 165 | ) 166 | ], 167 | ), 168 | ), 169 | new Container( 170 | margin: EdgeInsets.all(10), 171 | child: new Row( 172 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 173 | children: [ 174 | new Container( 175 | width: 100, 176 | height: 100, 177 | child: new FlatButton( 178 | padding: EdgeInsets.all(20), 179 | color: Colors.grey[100], 180 | onPressed: () => act.onThumbCatPress(3), 181 | child: Column( 182 | mainAxisAlignment: MainAxisAlignment.center, 183 | children: [ 184 | Icon( 185 | Icons.alarm, 186 | color: Colors.black, 187 | size: 30, 188 | ), 189 | Text( 190 | "Sarapan", 191 | style: TextStyle( 192 | fontSize: 12, 193 | fontWeight: FontWeight.w500, 194 | letterSpacing: 1, 195 | color: Colors.black), 196 | ) 197 | ], 198 | ), 199 | ), 200 | ), 201 | new Container( 202 | width: 100, 203 | height: 100, 204 | child: new FlatButton( 205 | padding: EdgeInsets.all(20), 206 | color: Colors.grey[100], 207 | onPressed: () => act.onThumbCatPress(4), 208 | child: Column( 209 | mainAxisAlignment: MainAxisAlignment.center, 210 | children: [ 211 | Icon( 212 | Icons.local_drink, 213 | color: Colors.black, 214 | size: 30, 215 | ), 216 | Text( 217 | "Minuman", 218 | style: TextStyle( 219 | fontSize: 12, 220 | fontWeight: FontWeight.w500, 221 | letterSpacing: 1, 222 | color: Colors.black), 223 | ) 224 | ], 225 | ), 226 | ), 227 | ), 228 | new Container( 229 | width: 100, 230 | height: 100, 231 | child: new FlatButton( 232 | padding: EdgeInsets.all(20), 233 | color: Colors.grey[100], 234 | onPressed: () => act.onThumbCatPress(5), 235 | child: Column( 236 | mainAxisAlignment: MainAxisAlignment.center, 237 | children: [ 238 | Icon( 239 | Icons.beach_access, 240 | color: Colors.black, 241 | size: 30, 242 | ), 243 | Text( 244 | "Cemilan", 245 | style: TextStyle( 246 | fontSize: 12, 247 | fontWeight: FontWeight.w500, 248 | letterSpacing: 1, 249 | color: Colors.black), 250 | ) 251 | ], 252 | ), 253 | ), 254 | ), 255 | ], 256 | ), 257 | ), 258 | ], 259 | ), 260 | ), 261 | new Container( 262 | margin: EdgeInsets.fromLTRB(10, 20, 10, 20), 263 | child: Text( 264 | "All Categories", 265 | style: TextStyle( 266 | fontSize: 14, 267 | fontWeight: FontWeight.bold, 268 | letterSpacing: 2, 269 | color: Colors.black), 270 | ), 271 | ), 272 | new Container( 273 | decoration: new BoxDecoration( 274 | color: ColorsConst.base, 275 | borderRadius: new BorderRadius.only( 276 | bottomLeft: const Radius.circular(0.0), 277 | bottomRight: const Radius.circular(0.0), 278 | topLeft: const Radius.circular(20.0), 279 | topRight: const Radius.circular(20.0))), 280 | width: 350, 281 | padding: EdgeInsets.all(10), 282 | child: new ListView( 283 | shrinkWrap: true, 284 | physics: BouncingScrollPhysics(), 285 | scrollDirection: Axis.vertical, 286 | children: root.listItems, 287 | ), 288 | ), 289 | ], 290 | ), 291 | )), 292 | ); 293 | } 294 | } 295 | 296 | abstract class ActionAbs { 297 | void onThumbCatPress(int idx) {} 298 | 299 | void onSearchPress(String key) {} 300 | } 301 | -------------------------------------------------------------------------------- /flutter_parallax/lib/screens/tab_home/Attr.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_parallax/widgets/ListImageItems.dart'; 3 | import 'package:flutter_parallax/widgets/PagerBannerItems.dart'; 4 | import 'package:flutter_parallax/widgets/TimelineTopicItem.dart'; 5 | 6 | class Attr { 7 | //Widget 8 | PageController bannerViewPagerControl; 9 | var keyScaffold = new GlobalKey(); 10 | 11 | //Values 12 | int totalViews = 0; 13 | List bannerImages = new List(); 14 | List itemImages = new List(); 15 | List itemTopic = new List(); 16 | } 17 | -------------------------------------------------------------------------------- /flutter_parallax/lib/screens/tab_home/TabHome.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_parallax/entities/TimelineTopicEntity.dart'; 3 | import 'package:flutter_parallax/screens/tab_home/Attr.dart'; 4 | import 'package:flutter_parallax/screens/tab_home/TabHomeView.dart'; 5 | import 'package:flutter_parallax/widgets/ListImageItems.dart'; 6 | import 'package:flutter_parallax/widgets/PagerBannerItems.dart'; 7 | import 'package:flutter_parallax/widgets/TimelineTopicItem.dart'; 8 | 9 | class TabHome extends StatefulWidget { 10 | TabHome(); 11 | 12 | @override 13 | State createState() { 14 | print('HomeTabHome Create State '); 15 | return new TabHomeState(); 16 | } 17 | } 18 | 19 | class TabHomeState extends State 20 | with AutomaticKeepAliveClientMixin 21 | implements ActionAbs { 22 | TabHomeState(); 23 | 24 | Attr attr = new Attr(); 25 | 26 | @override 27 | bool get wantKeepAlive => true; 28 | 29 | @override 30 | void initState() { 31 | super.initState(); 32 | attr.bannerViewPagerControl = new PageController( 33 | viewportFraction: 0.7, 34 | initialPage: 2, 35 | ); 36 | 37 | setupBannerData(); 38 | setupTopData(); 39 | setupTopicData(); 40 | } 41 | 42 | @override 43 | void dispose() { 44 | attr.bannerViewPagerControl.dispose(); 45 | attr.keyScaffold.currentState.dispose(); 46 | attr.totalViews = null; 47 | attr.bannerImages = null; 48 | attr.itemImages = null; 49 | attr.itemTopic = null; 50 | super.dispose(); 51 | } 52 | 53 | @override 54 | Widget build(BuildContext context) => new TabHomeView(attr, this); 55 | 56 | @override 57 | void changeTab(int index) { 58 | // TODO: implement changeTab 59 | } 60 | 61 | @override 62 | void onPress() { 63 | final snackBar = SnackBar( 64 | content: Text('Tampil SnackBar!'), 65 | action: SnackBarAction(label: 'Close', onPressed: () {}), 66 | ); 67 | 68 | attr.keyScaffold.currentState.showSnackBar(snackBar); 69 | setState(() { 70 | attr.totalViews++; 71 | }); 72 | } 73 | 74 | void addTotalView() { 75 | setState(() { 76 | attr.totalViews++; 77 | }); 78 | } 79 | 80 | void setupBannerData() { 81 | attr.bannerImages.add(new PagerBannerItems( 82 | "assets/banner/img1.jpg", attr.bannerViewPagerControl)); 83 | attr.bannerImages.add(new PagerBannerItems( 84 | "assets/banner/img2.jpeg", attr.bannerViewPagerControl)); 85 | attr.bannerImages.add(new PagerBannerItems( 86 | "assets/banner/img3.jpg", attr.bannerViewPagerControl)); 87 | attr.bannerImages.add(new PagerBannerItems( 88 | "assets/banner/img4.jpg", attr.bannerViewPagerControl)); 89 | attr.bannerImages.add(new PagerBannerItems( 90 | "assets/banner/img5.jpg", attr.bannerViewPagerControl)); 91 | } 92 | 93 | void setupTopData() { 94 | attr.itemImages.add(new ListImageItems("assets/banner/img5.jpg")); 95 | attr.itemImages.add(new ListImageItems("assets/banner/img4.jpg")); 96 | attr.itemImages.add(new ListImageItems("assets/banner/img3.jpg")); 97 | attr.itemImages.add(new ListImageItems("assets/banner/img2.jpeg")); 98 | attr.itemImages.add(new ListImageItems("assets/banner/img1.jpg")); 99 | attr.itemImages.add(new ListImageItems("assets/banner/img2.jpeg")); 100 | attr.itemImages.add(new ListImageItems("assets/banner/img1.jpg")); 101 | attr.itemImages.add(new ListImageItems("assets/banner/img4.jpg")); 102 | attr.itemImages.add(new ListImageItems("assets/banner/img3.jpg")); 103 | attr.itemImages.add(new ListImageItems("assets/banner/img5.jpg")); 104 | } 105 | 106 | void setupTopicData() { 107 | TimelineTopicEntity e1 = new TimelineTopicEntity(); 108 | TimelineTopicEntity e2 = new TimelineTopicEntity(); 109 | TimelineTopicEntity e3 = new TimelineTopicEntity(); 110 | TimelineTopicEntity e4 = new TimelineTopicEntity(); 111 | TimelineTopicEntity e5 = new TimelineTopicEntity(); 112 | 113 | e1.title = 'Makanan Sehat'; 114 | e1.dateTime = 1548017606; 115 | e1.content = 116 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'; 117 | e1.image = "assets/topic/t1.jpg"; 118 | 119 | e2.title = 'Resep Risol Abon'; 120 | e2.dateTime = 1548104007; 121 | e2.content = 122 | 'Sed blandit libero volutpat sed cras ornare arcu dui. Eu augue ut lectus arcu bibendum at varius vel pharetra. Donec ultrices tincidunt arcu non sodales neque. In hac habitasse platea dictumst vestibulum rhoncus est. Placerat orci nulla pellentesque dignissim enim. Mauris a diam maecenas sed enim ut sem viverra aliquet. Etiam erat velit scelerisque in dictum non consectetur a erat. Semper auctor neque vitae tempus quam pellentesque nec. Potenti nullam ac tortor vitae purus. Euismod in pellentesque massa placerat duis ultricies lacus. Non arcu risus quis varius. Nisl suscipit adipiscing bibendum est ultricies. Id semper risus in hendrerit gravida. Quam elementum pulvinar etiam non quam lacus suspendisse faucibus interdum.'; 123 | e2.image = "assets/topic/t5.jpg"; 124 | 125 | e3.title = 'Hati-hati dengan 7 makanan ini'; 126 | e3.dateTime = 1548104007; 127 | e3.content = 128 | 'Sed blandit libero volutpat sed cras ornare arcu dui. Eu augue ut lectus arcu bibendum at varius vel pharetra. Donec ultrices tincidunt arcu non sodales neque. In hac habitasse platea dictumst vestibulum rhoncus est. Placerat orci nulla pellentesque dignissim enim. Mauris a diam maecenas sed enim ut sem viverra aliquet. Etiam erat velit scelerisque in dictum non consectetur a erat. Semper auctor neque vitae tempus quam pellentesque nec. Potenti nullam ac tortor vitae purus. Euismod in pellentesque massa placerat duis ultricies lacus. Non arcu risus quis varius. Nisl suscipit adipiscing bibendum est ultricies. Id semper risus in hendrerit gravida. Quam elementum pulvinar etiam non quam lacus suspendisse faucibus interdum.'; 129 | e3.image = "assets/topic/t2.jpg"; 130 | 131 | e4.title = 'Event Jakarta-Foods'; 132 | e4.dateTime = 1548190406; 133 | e4.content = 134 | 'Id venenatis a condimentum vitae sapien. Elit eget gravida cum sociis natoque penatibus. Lectus urna duis convallis convallis tellus id interdum velit laoreet. Tempor commodo ullamcorper a lacus vestibulum sed. Tortor dignissim convallis aenean et. Purus ut faucibus pulvinar elementum integer. Lobortis feugiat vivamus at augue. Potenti nullam ac tortor vitae. Cras fermentum odio eu feugiat pretium nibh. Nisi lacus sed viverra tellus in hac habitasse platea. Tellus id interdum velit laoreet id donec ultrices tincidunt arcu.'; 135 | e4.image = "assets/topic/t3.jpg"; 136 | 137 | e5.title = 'Jakarta Halal Resto'; 138 | e5.dateTime = 1548276806; 139 | e5.content = 140 | 'Vel pharetra vel turpis nunc eget lorem dolor sed. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc. Scelerisque mauris pellentesque pulvinar pellentesque habitant. Volutpat consequat mauris nunc congue nisi vitae suscipit. Proin libero nunc consequat interdum varius sit amet mattis vulputate. Tellus id interdum velit laoreet. Non enim praesent elementum facilisis leo vel fringilla. Arcu vitae elementum curabitur vitae nunc sed velit dignissim. At tempor commodo ullamcorper a lacus vestibulum sed arcu. In nisl nisi scelerisque eu ultrices vitae auctor. At augue eget arcu dictum varius. Nec dui nunc mattis enim ut. Mauris rhoncus aenean vel elit scelerisque mauris. Non quam lacus suspendisse faucibus interdum. Tristique senectus et netus et malesuada fames ac. Elit pellentesque habitant morbi tristique. Facilisis mauris sit amet massa.'; 141 | e5.image = "assets/topic/t4.jpg"; 142 | 143 | attr.itemTopic.add(new TimelineTopicItem(e1)); 144 | attr.itemTopic.add(new TimelineTopicItem(e2)); 145 | attr.itemTopic.add(new TimelineTopicItem(e3)); 146 | attr.itemTopic.add(new TimelineTopicItem(e4)); 147 | attr.itemTopic.add(new TimelineTopicItem(e5)); 148 | } 149 | 150 | @override 151 | void onShowAll(String flag) { 152 | final snackBar = SnackBar( 153 | content: Text('${flag}'), 154 | action: SnackBarAction(label: 'Close', onPressed: () {}), 155 | ); 156 | 157 | attr.keyScaffold.currentState.showSnackBar(snackBar); 158 | setState(() { 159 | attr.totalViews++; 160 | }); 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /flutter_parallax/lib/screens/tab_home/TabHomeView.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_parallax/screens/tab_home/Attr.dart'; 4 | import 'package:flutter_parallax/styles/ColorsConst.dart'; 5 | import 'package:flutter_parallax/styles/StyleConst.dart'; 6 | import 'package:flutter_parallax/widgets/DotsIndicator.dart'; 7 | 8 | class TabHomeView extends StatelessWidget { 9 | Attr attr; 10 | ActionAbs act; 11 | 12 | TabHomeView(this.attr, this.act); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | key: attr.keyScaffold, 18 | backgroundColor: Colors.white, 19 | body: Container( 20 | child: new SingleChildScrollView( 21 | child: Column( 22 | children: [ 23 | new Container( 24 | width: double.infinity, 25 | height: MediaQuery.of(context).size.width + 20, 26 | child: new Stack( 27 | children: [ 28 | new Container( 29 | color: ColorsConst.white, 30 | constraints: BoxConstraints.expand( 31 | width: double.infinity, 32 | height: MediaQuery.of(context).size.width), 33 | child: PageView( 34 | physics: BouncingScrollPhysics(), 35 | controller: attr.bannerViewPagerControl, 36 | children: attr.bannerImages, 37 | ), 38 | ), 39 | new Positioned( 40 | bottom: 40, 41 | height: 30, 42 | right: 0, 43 | child: new Container( 44 | width: double.parse('${20 * attr.bannerImages.length}'), 45 | child: new ClipRRect( 46 | borderRadius: BorderRadius.only( 47 | bottomLeft: Radius.circular(20), 48 | bottomRight: Radius.circular(0), 49 | topLeft: Radius.circular(20), 50 | topRight: Radius.circular(0)), 51 | child: new BackdropFilter( 52 | filter: 53 | new ImageFilter.blur(sigmaX: 2.0, sigmaY: 5.0), 54 | child: new Container( 55 | decoration: new BoxDecoration( 56 | borderRadius: BorderRadius.only( 57 | bottomLeft: Radius.circular(0), 58 | bottomRight: Radius.circular(0), 59 | topLeft: Radius.circular(0), 60 | topRight: Radius.circular(0)), 61 | color: ColorsConst.black.withOpacity(0.6)), 62 | padding: EdgeInsets.all(0), 63 | width: MediaQuery.of(context).size.width, 64 | child: new Row( 65 | mainAxisAlignment: MainAxisAlignment.center, 66 | children: [ 67 | new DotsIndicator( 68 | colorActive: ColorsConst.base, 69 | colorInActive: ColorsConst.white, 70 | controller: attr.bannerViewPagerControl, 71 | itemCount: attr.bannerImages.length, 72 | spacing: 12, 73 | size: 4.0, 74 | activedZoom: 1.5, 75 | dotType: DotType.BOX, 76 | icon: Icons.adjust, 77 | onPageSelected: (int page) { 78 | attr.bannerViewPagerControl.animateToPage( 79 | page, 80 | duration: Duration(milliseconds: 300), 81 | curve: Curves.ease, 82 | ); 83 | }, 84 | ), 85 | ], 86 | ), 87 | ), 88 | ), 89 | ), 90 | ), 91 | ), 92 | ], 93 | ), 94 | ), 95 | new Container( 96 | color: Colors.white, 97 | padding: EdgeInsets.fromLTRB(10, 0, 10, 0), 98 | child: Row( 99 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 100 | children: [ 101 | new Flexible( 102 | child: new Text( 103 | "TOP", 104 | style: new TextStyle( 105 | letterSpacing: 4, 106 | fontSize: 12, 107 | fontWeight: FontWeight.bold), 108 | ), 109 | flex: 50, 110 | ), 111 | new Flexible( 112 | child: new FlatButton( 113 | padding: EdgeInsets.all(0), 114 | onPressed: () => act.onShowAll("TOP ITEMS"), 115 | child: Row( 116 | mainAxisAlignment: MainAxisAlignment.end, 117 | children: [ 118 | new Text("SHOW ALL", 119 | textAlign: TextAlign.justify, 120 | style: TextStyleConst.b12( 121 | color: ColorsConst.grey, letterSpacing: 1)), 122 | Icon( 123 | Icons.navigate_next, 124 | color: Colors.black.withOpacity(0.5), 125 | size: 16, 126 | ) 127 | ], 128 | ), 129 | ), 130 | flex: 50, 131 | ), 132 | ], 133 | ), 134 | ), 135 | new Container( 136 | constraints: 137 | BoxConstraints.expand(width: double.infinity, height: 150), 138 | child: ListView( 139 | scrollDirection: Axis.horizontal, 140 | children: attr.itemImages, 141 | ), 142 | ), 143 | new Container( 144 | color: Colors.white, 145 | padding: EdgeInsets.fromLTRB(10, 20, 10, 0), 146 | child: Row( 147 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 148 | children: [ 149 | new Flexible( 150 | child: new Text( 151 | "TOPIC", 152 | style: new TextStyle( 153 | letterSpacing: 4, 154 | fontSize: 12, 155 | fontWeight: FontWeight.bold), 156 | ), 157 | flex: 50, 158 | ), 159 | new Flexible( 160 | child: new FlatButton( 161 | padding: EdgeInsets.all(0), 162 | onPressed: () => act.onShowAll("TOPIC"), 163 | child: Row( 164 | mainAxisAlignment: MainAxisAlignment.end, 165 | children: [ 166 | new Text("SHOW ALL", 167 | textAlign: TextAlign.justify, 168 | style: TextStyleConst.b12( 169 | color: ColorsConst.grey, letterSpacing: 1)), 170 | Icon( 171 | Icons.navigate_next, 172 | color: Colors.black.withOpacity(0.5), 173 | size: 16, 174 | ) 175 | ], 176 | ), 177 | ), 178 | flex: 50, 179 | ), 180 | ], 181 | ), 182 | ), 183 | new Container( 184 | child: ListView( 185 | shrinkWrap: true, 186 | physics: BouncingScrollPhysics(), 187 | scrollDirection: Axis.vertical, 188 | children: attr.itemTopic, 189 | ), 190 | ), 191 | ], 192 | ), 193 | ), 194 | ), 195 | ); 196 | } 197 | } 198 | 199 | abstract class ActionAbs { 200 | void onPress() {} 201 | 202 | void onShowAll(String flag) {} 203 | } 204 | -------------------------------------------------------------------------------- /flutter_parallax/lib/screens/tab_love/TabLove.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_parallax/screens/tab_love/TabLoveView.dart'; 3 | 4 | class TabLove extends StatefulWidget { 5 | @override 6 | State createState() { 7 | print('HomeTabLove Create State '); 8 | return new TabLoveState(); 9 | } 10 | } 11 | 12 | class TabLoveState extends State { 13 | @override 14 | void initState() { 15 | super.initState(); 16 | } 17 | 18 | @override 19 | Widget build(BuildContext context) => new TabLoveView(); 20 | } 21 | -------------------------------------------------------------------------------- /flutter_parallax/lib/screens/tab_love/TabLoveView.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_parallax/styles/ColorsConst.dart'; 3 | 4 | class TabLoveView extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return new Scaffold( 8 | backgroundColor: Colors.transparent, 9 | body: new Container( 10 | color: ColorsConst.white, 11 | )); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /flutter_parallax/lib/screens/tab_profile/TabProfile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_parallax/screens/tab_profile/TabProfileView.dart'; 3 | 4 | class TabProfile extends StatefulWidget { 5 | TabProfile(); 6 | 7 | @override 8 | State createState() { 9 | print('HomeTabProfile Create State '); 10 | return new TabProfileState(); 11 | } 12 | } 13 | 14 | class TabProfileState extends State{ 15 | 16 | @override 17 | void initState() { 18 | super.initState(); 19 | print('HomeTabProfile INIT State '); 20 | } 21 | 22 | @override 23 | void dispose() { 24 | super.dispose(); 25 | } 26 | 27 | @override 28 | Widget build(BuildContext context) => new TabProfileView(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /flutter_parallax/lib/screens/tab_profile/TabProfileView.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class TabProfileView extends StatelessWidget { 4 | @override 5 | Widget build(BuildContext context) { 6 | return new Scaffold(body: new Container()); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /flutter_parallax/lib/styles/ColorsConst.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ColorsConst { 4 | static final Color base = const Color(0xFF29b6da); 5 | static final Color black = Colors.black.withOpacity(0.8); 6 | static final Color grey = Colors.grey[500]; 7 | static final Color white = const Color(0xFFFFFFFF); 8 | static final Color baseGreen = const Color(0xFF53c3af); 9 | static final Color baseRed= const Color(0xFFd71052); 10 | static final Color baseYellow= const Color(0xFFf0f80c); 11 | } -------------------------------------------------------------------------------- /flutter_parallax/lib/styles/StyleConst.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class TextStyleConst { 4 | /*Normal 12*/ 5 | static TextStyle n12({Color color}) { 6 | return new TextStyle( 7 | color: color ?? Colors.black, 8 | letterSpacing: 1, 9 | fontSize: 12, 10 | fontFamily: 'helvetica', 11 | fontStyle: FontStyle.normal, 12 | ); 13 | } 14 | 15 | static TextStyle n14({Color color}) { 16 | return new TextStyle( 17 | color: color ?? Colors.black, 18 | letterSpacing: 1, 19 | fontSize: 14, 20 | fontFamily: 'helvetica', 21 | fontStyle: FontStyle.normal, 22 | ); 23 | } 24 | 25 | static TextStyle n16({Color color}) { 26 | return new TextStyle( 27 | color: color ?? Colors.black, 28 | letterSpacing: 1, 29 | fontSize: 16, 30 | fontFamily: 'helvetica', 31 | fontWeight: FontWeight.normal, 32 | ); 33 | } 34 | 35 | static TextStyle n20({Color color, double letterSpacing}) { 36 | return new TextStyle( 37 | color: color ?? Colors.black, 38 | letterSpacing: letterSpacing ?? 1, 39 | fontSize: 20, 40 | fontFamily: 'helvetica', 41 | fontWeight: FontWeight.normal, 42 | ); 43 | } 44 | 45 | /*BOld 12*/ 46 | static TextStyle b12({Color color, double letterSpacing}) { 47 | return new TextStyle( 48 | color: color ?? Colors.black, 49 | letterSpacing: letterSpacing ?? 1, 50 | fontSize: 12, 51 | fontFamily: 'helvetica', 52 | fontWeight: FontWeight.bold, 53 | ); 54 | } 55 | 56 | /*BOld 14*/ 57 | static TextStyle b14({Color color, double letterSpacing}) { 58 | return new TextStyle( 59 | color: color ?? Colors.black, 60 | letterSpacing: letterSpacing ?? 1, 61 | fontSize: 14, 62 | fontFamily: 'helvetica', 63 | fontWeight: FontWeight.bold, 64 | ); 65 | } 66 | 67 | /*BOld 16*/ 68 | static TextStyle b16({Color color, double letterSpacing}) { 69 | return new TextStyle( 70 | color: color ?? Colors.black, 71 | letterSpacing: letterSpacing ?? 1, 72 | fontSize: 16, 73 | fontFamily: 'helvetica', 74 | fontWeight: FontWeight.bold, 75 | ); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /flutter_parallax/lib/widgets/BaseAppBar.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_parallax/styles/ColorsConst.dart'; 5 | 6 | class BaseToolBar extends StatelessWidget { 7 | String title; 8 | VoidCallback onLeftPress; 9 | VoidCallback onRightPress; 10 | IconData leftIcon; 11 | IconData rightIcon; 12 | 13 | bool hasLeftIcon; 14 | bool hasRightIcon; 15 | 16 | BaseToolBar( 17 | {this.title, 18 | this.leftIcon, 19 | this.onLeftPress, 20 | this.rightIcon, 21 | this.onRightPress}) { 22 | hasLeftIcon = this.leftIcon != null; 23 | hasRightIcon = this.rightIcon != null; 24 | } 25 | 26 | @override 27 | Widget build(BuildContext ctx) { 28 | return new AppBar( 29 | automaticallyImplyLeading: false, 30 | titleSpacing: 0.0, 31 | elevation: 0.0, 32 | backgroundColor: ColorsConst.white, 33 | title: Row( 34 | children: [ 35 | new Flexible( 36 | child: hasLeftIcon 37 | ? Container( 38 | color: Colors.transparent, 39 | padding: EdgeInsets.fromLTRB(0, 0, 0, 0), 40 | alignment: Alignment.centerLeft, 41 | child: IconButton( 42 | //icon: new Image.asset('assets/back.png'), 43 | icon: new Icon( 44 | leftIcon, 45 | color: ColorsConst.base, 46 | ), 47 | onPressed: onLeftPress, 48 | ), 49 | ) 50 | : new Container(), 51 | flex: 50, 52 | ), 53 | new Flexible( 54 | child: Container( 55 | color: Colors.transparent, 56 | padding: EdgeInsets.fromLTRB(0, 0, 0, 0), 57 | alignment: Alignment.center, 58 | child: Text( 59 | title ?? '', 60 | style: TextStyle( 61 | fontSize: 14.0, 62 | fontWeight: FontWeight.w600, 63 | letterSpacing: 4, 64 | color: ColorsConst.base), 65 | ), 66 | ), 67 | flex: 50, 68 | ), 69 | new Flexible( 70 | child: hasRightIcon 71 | ? Container( 72 | color: Colors.transparent, 73 | padding: EdgeInsets.fromLTRB(0, 0, 0, 0), 74 | alignment: Alignment.centerRight, 75 | child: IconButton( 76 | icon: new Icon( 77 | rightIcon, 78 | color: ColorsConst.base, 79 | ), 80 | onPressed: onRightPress, 81 | ), 82 | ) 83 | : new Container(), 84 | flex: 50, 85 | ), 86 | ], 87 | ), 88 | ); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /flutter_parallax/lib/widgets/DotsIndicator.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class DotsIndicator extends AnimatedWidget { 6 | DotsIndicator({ 7 | this.controller, 8 | this.itemCount, 9 | this.onPageSelected, 10 | this.colorActive: Colors.white, 11 | this.colorInActive: Colors.black54, 12 | this.spacing: 20, 13 | this.size: 5.0, 14 | this.activedZoom: 2.0, 15 | this.dotType: DotType.CIRCLE, 16 | this.icon: Icons.album, 17 | }) : super(listenable: controller); 18 | 19 | final DotType dotType; 20 | 21 | final PageController controller; 22 | 23 | final int itemCount; 24 | 25 | final ValueChanged onPageSelected; 26 | 27 | final double spacing; 28 | 29 | final Color colorActive; 30 | 31 | final Color colorInActive; 32 | 33 | final double size; 34 | 35 | final double activedZoom; 36 | 37 | final IconData icon; 38 | 39 | Widget _buildDot(int index) { 40 | double selectedness = Curves.easeOut.transform( 41 | max( 42 | 0.0, 43 | 1.0 - ((controller.page ?? controller.initialPage) - index).abs(), 44 | ), 45 | ); 46 | double opacity = Curves.easeOut.transform( 47 | max( 48 | 0.3, 49 | 1.0 - ((controller.page ?? controller.initialPage) - index).abs(), 50 | ), 51 | ); 52 | 53 | Color colorsTwin = 54 | ColorTween(begin: colorInActive, end: colorActive).transform( 55 | max(0.0, 56 | 1.0 - ((controller.page ?? controller.initialPage) - index).abs()), 57 | ); 58 | 59 | double zoom = 1.0 + (activedZoom - 1.0) * selectedness; 60 | return dotType == DotType.CIRCLE 61 | ? dotCircle(colorsTwin, zoom, index) 62 | : dotType == DotType.BOX 63 | ? dotBox(colorsTwin, zoom, index) 64 | : dotIcon(icon, colorsTwin, zoom, index); 65 | } 66 | 67 | Widget build(BuildContext context) { 68 | return new Row( 69 | mainAxisAlignment: MainAxisAlignment.center, 70 | children: new List.generate(itemCount, _buildDot), 71 | ); 72 | } 73 | 74 | Widget dotCircle(colorsTwin, zoom, index) { 75 | return new Container( 76 | width: spacing, 77 | child: new Center( 78 | child: new Material( 79 | color: colorsTwin, 80 | type: MaterialType.circle, 81 | child: new Container( 82 | width: size * zoom, 83 | height: size * zoom, 84 | child: new InkWell( 85 | onTap: () => onPageSelected(index), 86 | ), 87 | ), 88 | ), 89 | ), 90 | ); 91 | } 92 | 93 | Widget dotBox(colorsTwin, zoom, index) { 94 | return new Container( 95 | width: spacing, 96 | child: new Center( 97 | child: new Material( 98 | color: colorsTwin, 99 | type: MaterialType.card, 100 | child: new Container( 101 | width: size * zoom, 102 | height: size * zoom, 103 | child: new InkWell( 104 | onTap: () => onPageSelected(index), 105 | ), 106 | ), 107 | ), 108 | ), 109 | ); 110 | } 111 | 112 | Widget dotIcon(icon, colorsTwin, zoom, index) { 113 | return new Container( 114 | width: spacing, 115 | child: new Center( 116 | child: new Material( 117 | color: colorsTwin, 118 | type: MaterialType.transparency, 119 | child: new Container( 120 | child: new InkWell( 121 | child: new Icon( 122 | icon, 123 | size: size * zoom, 124 | color: colorsTwin, 125 | ), 126 | onTap: () => onPageSelected(index), 127 | ), 128 | ), 129 | ), 130 | ), 131 | ); 132 | } 133 | } 134 | 135 | enum DotType { 136 | CIRCLE, 137 | BOX, 138 | ICON, 139 | } 140 | -------------------------------------------------------------------------------- /flutter_parallax/lib/widgets/ListBasic.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ListBasic extends StatelessWidget { 4 | int idx; 5 | String text; 6 | ListClickCallback listClickCallback; 7 | 8 | ListBasic(this.idx, this.text, this.listClickCallback); 9 | 10 | @override 11 | Widget build(BuildContext ctx) { 12 | return new Container( 13 | child: new FlatButton( 14 | onPressed: () => listClickCallback.onListClicked(idx), 15 | child: Row( 16 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 17 | children: [ 18 | new Text( 19 | text, 20 | style: TextStyle( 21 | letterSpacing: 2, fontSize: 12, color: Colors.white), 22 | ), 23 | Icon( 24 | Icons.navigate_next, 25 | color: Colors.white, 26 | size: 20, 27 | ) 28 | ], 29 | ), 30 | ), 31 | ); 32 | } 33 | } 34 | 35 | abstract class ListClickCallback { 36 | void onListClicked(int idx) {} 37 | } 38 | -------------------------------------------------------------------------------- /flutter_parallax/lib/widgets/ListImageItems.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ListImageItems extends StatelessWidget { 4 | String image; 5 | 6 | ListImageItems(this.image); 7 | 8 | @override 9 | Widget build(BuildContext ctx) { 10 | return Container( 11 | margin: EdgeInsets.fromLTRB(10, 0, 10, 0), 12 | width: 100, 13 | color: Colors.white, 14 | child: new Card( 15 | elevation: 3, 16 | shape: BeveledRectangleBorder( 17 | borderRadius: BorderRadius.circular(3.0), 18 | ), 19 | child: new ClipRRect( 20 | borderRadius: new BorderRadius.circular(5.0), 21 | child: new Image( 22 | image: new AssetImage(image), 23 | fit: BoxFit.cover, 24 | )), 25 | ), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /flutter_parallax/lib/widgets/PagerBannerItems.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_parallax/styles/ColorsConst.dart'; 5 | import 'package:flutter_parallax/styles/StyleConst.dart'; 6 | 7 | class PagerBannerItems extends StatefulWidget { 8 | String image; 9 | PageController controller; 10 | 11 | PagerBannerItems(this.image, this.controller); 12 | 13 | @override 14 | State createState() { 15 | return new PagerBannerItemsState(); 16 | } 17 | } 18 | 19 | class PagerBannerItemsState extends State { 20 | static const double speedCoefficient = 0.7; 21 | double initOffset; 22 | double viewportSize; 23 | double imageOffset = 0.0; 24 | 25 | void _handleScroll() { 26 | final double delta = widget.controller.offset - initOffset; 27 | final int viewportFraction = 28 | (100 * delta / viewportSize).round().clamp(-100, 100); 29 | final double offset = -1 * speedCoefficient * viewportFraction; 30 | 31 | if (offset != imageOffset) { 32 | setState(() { 33 | imageOffset = offset; 34 | }); 35 | } 36 | } 37 | 38 | @override 39 | void initState() { 40 | super.initState(); 41 | initOffset = widget.controller.offset; 42 | viewportSize = widget.controller.position.viewportDimension; 43 | widget.controller.addListener(_handleScroll); 44 | } 45 | 46 | @override 47 | void dispose() { 48 | widget.controller?.removeListener(_handleScroll); 49 | super.dispose(); 50 | } 51 | 52 | @override 53 | Widget build(BuildContext ctx) { 54 | double x = imageOffset / 100; 55 | var alignment = Alignment.center.add(new Alignment(x, 0.0)); 56 | return Container( 57 | margin: EdgeInsets.all(5), 58 | child: new Card( 59 | elevation: 3, 60 | shape: BeveledRectangleBorder( 61 | borderRadius: BorderRadius.circular(3.0), 62 | ), 63 | child: new ClipRRect( 64 | borderRadius: new BorderRadius.circular(5.0), 65 | child: new Stack( 66 | alignment: alignment, 67 | fit: StackFit.expand, 68 | children: [ 69 | new Image( 70 | alignment: alignment, 71 | image: new AssetImage(widget.image), 72 | fit: BoxFit.cover, 73 | ), 74 | new Container( 75 | decoration: new BoxDecoration( 76 | borderRadius: BorderRadius.all(Radius.circular(5.0)), 77 | gradient: new LinearGradient( 78 | begin: Alignment.topCenter, 79 | end: Alignment.bottomCenter, 80 | stops: [0.6, 0.80], 81 | colors: [ 82 | Colors.transparent, 83 | const Color(0xFF000000).withOpacity(0.7), 84 | ], 85 | ), 86 | ), 87 | padding: EdgeInsets.all(50), 88 | width: MediaQuery.of(context).size.width, 89 | height: MediaQuery.of(context).size.width, 90 | child: new Column( 91 | mainAxisAlignment: MainAxisAlignment.end, 92 | crossAxisAlignment: CrossAxisAlignment.center, 93 | children: [ 94 | new Text( 95 | "Vel pharetra vel turpis nunc eget lorem dolor sed. Pulvinar sapien et ligula ullamcorper", 96 | textAlign: TextAlign.justify, 97 | style: TextStyleConst.b14( 98 | color: ColorsConst.white, letterSpacing: 1)), 99 | ], 100 | ), 101 | ), 102 | ], 103 | )), 104 | ), 105 | ); 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /flutter_parallax/lib/widgets/TimelineTopicItem.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_parallax/entities/TimelineTopicEntity.dart'; 3 | import 'package:flutter_parallax/styles/ColorsConst.dart'; 4 | 5 | class TimelineTopicItem extends StatelessWidget { 6 | TimelineTopicEntity topic; 7 | 8 | TimelineTopicItem(this.topic); 9 | 10 | @override 11 | Widget build(BuildContext ctx) { 12 | return Container( 13 | width: double.infinity, 14 | height: 250, 15 | margin: EdgeInsets.fromLTRB(10, 0, 10, 5), 16 | color: Colors.white, 17 | child: new Card( 18 | elevation: 3, 19 | shape: BeveledRectangleBorder( 20 | borderRadius: BorderRadius.circular(3.0), 21 | ), 22 | child: new ClipRRect( 23 | borderRadius: new BorderRadius.circular(5.0), 24 | child: new Container( 25 | decoration: new BoxDecoration( 26 | image: new DecorationImage( 27 | image: new AssetImage(topic.image), 28 | fit: BoxFit.cover, 29 | ), 30 | ), 31 | child: new Column( 32 | mainAxisAlignment: MainAxisAlignment.end, 33 | children: [ 34 | new Container( 35 | padding: EdgeInsets.all(5), 36 | width: double.infinity, 37 | color: Colors.white.withOpacity(0.8), 38 | child: new Column( 39 | crossAxisAlignment: CrossAxisAlignment.start, 40 | children: [ 41 | new Text( 42 | topic.title, 43 | style: new TextStyle( 44 | color: ColorsConst.base, 45 | letterSpacing: 1, 46 | fontWeight: FontWeight.w500, 47 | fontSize: 14, 48 | fontFamily: 'helvetica'), 49 | ), 50 | new Container( 51 | margin: EdgeInsets.fromLTRB(0, 10, 0, 0), 52 | child: new Text( 53 | topic.content, 54 | maxLines: 2, 55 | style: new TextStyle( 56 | color: Colors.black, 57 | letterSpacing: 1, 58 | fontWeight: FontWeight.w400, 59 | fontSize: 12, 60 | ), 61 | ), 62 | ), 63 | ], 64 | ), 65 | ) 66 | ], 67 | ), 68 | ), 69 | ), 70 | ), 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /flutter_parallax/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_parallax 2 | description: A new Flutter project. 3 | 4 | version: 1.0.0+1 5 | 6 | environment: 7 | sdk: ">=2.0.0-dev.68.0 <3.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | cupertino_icons: ^0.1.2 13 | 14 | dev_dependencies: 15 | flutter_test: 16 | sdk: flutter 17 | 18 | 19 | 20 | flutter: 21 | uses-material-design: true 22 | assets: 23 | - assets/ 24 | - assets/ic/tab/ 25 | - assets/banner/ 26 | - assets/topic/ 27 | 28 | fonts: 29 | - family: helvetica 30 | fonts: 31 | - asset: fonts/HELR45W.ttf -------------------------------------------------------------------------------- /flutter_parallax/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:flutter_parallax/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 | --------------------------------------------------------------------------------