├── android
├── gradle.properties
├── app
│ ├── src
│ │ └── main
│ │ │ ├── res
│ │ │ ├── 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
│ │ │ └── drawable
│ │ │ │ └── launch_background.xml
│ │ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── mayandro
│ │ │ │ └── flutteruplabonboarding
│ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── build.gradle
├── ios
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── 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-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── WorkspaceSettings.xcsettings
└── Runner.xcodeproj
│ ├── project.xcworkspace
│ └── contents.xcworkspacedata
│ ├── xcshareddata
│ └── xcschemes
│ │ └── Runner.xcscheme
│ └── project.pbxproj
├── assets
└── images
│ ├── doctor.jpg
│ ├── reminder.png
│ ├── reports.png
│ ├── appointment.png
│ └── yourappointments.png
├── .metadata
├── README.md
├── lib
├── utility
│ ├── color_utility.dart
│ └── app_constant.dart
├── widget
│ ├── rounded_button.dart
│ ├── trapezoid_left_cut.dart
│ ├── circular_reveal.dart
│ ├── trapezoid_down_cut_small.dart
│ ├── trapezoid_up_cut.dart
│ └── trapezoid_up_cut_small.dart
├── main.dart
└── screen
│ ├── home
│ ├── home_animation.dart
│ └── home_page.dart
│ └── login
│ ├── login_animation.dart
│ └── login_page.dart
├── LICENSE
├── test
└── widget_test.dart
├── .gitignore
└── pubspec.yaml
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/assets/images/doctor.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/assets/images/doctor.jpg
--------------------------------------------------------------------------------
/assets/images/reminder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/assets/images/reminder.png
--------------------------------------------------------------------------------
/assets/images/reports.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/assets/images/reports.png
--------------------------------------------------------------------------------
/assets/images/appointment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/assets/images/appointment.png
--------------------------------------------------------------------------------
/assets/images/yourappointments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/assets/images/yourappointments.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/may-andro/flutter_uplab_challenge_medical_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildSystemType
6 | Original
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.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: 985ccb6d14c6ce5ce74823a4d366df2438eac44f
8 | channel: beta
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/mayandro/flutteruplabonboarding/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.mayandro.flutteruplabonboarding
2 |
3 | import android.os.Bundle
4 |
5 | import io.flutter.app.FlutterActivity
6 | import io.flutter.plugins.GeneratedPluginRegistrant
7 |
8 | class MainActivity: FlutterActivity() {
9 | override fun onCreate(savedInstanceState: Bundle?) {
10 | super.onCreate(savedInstanceState)
11 | GeneratedPluginRegistrant.registerWith(this)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # UpLabs Challenge
2 |
3 | A new Flutter application based on Uplabs Challenge at : https://www.uplabs.com/posts/login-page-loading-fb74e4c5-008a-41e3-ae95-76c27c36faf1.
4 |
5 | ## Design Credit
6 | https://www.uplabs.com/nasrinkhodatars
7 |
8 | ## Expected Design
9 | 
10 |
11 | ## Implemented Design
12 | 
13 |
14 | ## Concept Used
15 | 1. Animations
16 | 2. CustomClipper
17 | 4. Canvas
18 |
19 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.2.71'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.2.1'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/lib/utility/color_utility.dart:
--------------------------------------------------------------------------------
1 | int getColorHexFromStr(String colorStr) {
2 | colorStr = "FF" + colorStr;
3 | colorStr = colorStr.replaceAll("#", "");
4 | int val = 0;
5 | int len = colorStr.length;
6 | for (int i = 0; i < len; i++) {
7 | int hexDigit = colorStr.codeUnitAt(i);
8 | if (hexDigit >= 48 && hexDigit <= 57) {
9 | val += (hexDigit - 48) * (1 << (4 * (len - 1 - i)));
10 | } else if (hexDigit >= 65 && hexDigit <= 70) {
11 | // A..F
12 | val += (hexDigit - 55) * (1 << (4 * (len - 1 - i)));
13 | } else if (hexDigit >= 97 && hexDigit <= 102) {
14 | // a..f
15 | val += (hexDigit - 87) * (1 << (4 * (len - 1 - i)));
16 | } else {
17 | throw new FormatException("An error occurred when converting a color");
18 | }
19 | }
20 | return val;
21 | }
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/widget/rounded_button.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | class RoundedButton extends StatelessWidget {
6 | final Function onPressed;
7 | final String text;
8 |
9 | RoundedButton(
10 | {@required this.onPressed,
11 | @required this.text});
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Container(
16 | height: 48.0,
17 | width: MediaQuery.of(context).size.height * 0.2,
18 | decoration: BoxDecoration(
19 | color: Theme.of(context).primaryColor,
20 | borderRadius: new BorderRadius.circular(30.0),
21 | ),
22 | child: InkWell(
23 | onTap: onPressed,
24 | child: Center(
25 | child: Text(text,
26 | style: Theme.of(context)
27 | .textTheme
28 | .title
29 | .copyWith(color: Colors.white)),
30 | )),
31 | );
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_uplab_onboarding/screen/home/home_page.dart';
3 | import 'package:flutter_uplab_onboarding/screen/login/login_page.dart';
4 | import 'package:flutter_uplab_onboarding/utility/color_utility.dart';
5 |
6 | void main() => runApp(MyApp());
7 |
8 | class MyApp extends StatelessWidget {
9 | // This widget is the root of your application.
10 | @override
11 | Widget build(BuildContext context) {
12 | return MaterialApp(
13 | title: 'Flutter Demo',
14 | theme: ThemeData(
15 | primaryColor: Color(getColorHexFromStr("#11C9C4")),
16 | indicatorColor: Color(getColorHexFromStr("#ffffff")),
17 | ),
18 | initialRoute: '/',
19 | routes: {
20 | '/login': (BuildContext context) => LoginPage(),
21 | '/home': (BuildContext context) => HomePage(),
22 | },
23 | home: LoginPage(),
24 | );
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/widget/trapezoid_left_cut.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:meta/meta.dart';
3 |
4 | class TrapezoidLeftCut extends StatelessWidget {
5 | TrapezoidLeftCut({@required this.child});
6 |
7 | final Widget child;
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return new ClipPath(
12 | clipper: new DiagonalClipper(),
13 | child: child,
14 | );
15 | }
16 | }
17 |
18 | class DiagonalClipper extends CustomClipper {
19 | @override
20 | Path getClip(Size size) {
21 | var path = new Path();
22 |
23 | path.lineTo(0.0, size.height * 0.9);
24 |
25 | path.lineTo(size.width * 0.8, size.height * 0.5);
26 |
27 | path.quadraticBezierTo(size.width, size.height * 0.4, size.width * 0.8, size.height * 0.3);
28 |
29 | path.lineTo(size.width * 0.2, 0.0);
30 |
31 | return path;
32 | }
33 |
34 | @override
35 | bool shouldReclip(CustomClipper oldClipper) => false;
36 | }
37 |
--------------------------------------------------------------------------------
/lib/widget/circular_reveal.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'dart:math';
3 |
4 | import 'package:flutter_uplab_onboarding/utility/color_utility.dart';
5 |
6 | class RevealProgressButtonPainter extends CustomPainter {
7 | double _fraction = 0.0;
8 | Size _screenSize;
9 |
10 | RevealProgressButtonPainter(this._fraction, this._screenSize);
11 |
12 | @override
13 | void paint(Canvas canvas, Size size) {
14 | var paint = Paint()
15 | ..color = Color(getColorHexFromStr("#11C9C4"))
16 | ..style = PaintingStyle.fill;
17 |
18 | var finalRadius = sqrt(pow(_screenSize.width / 2, 2) +
19 | pow(_screenSize.height - 32.0 - 48.0, 2));
20 | var radius = 24.0 + finalRadius * _fraction;
21 |
22 | canvas.drawCircle(Offset(size.width / 2, size.height / 2), radius, paint);
23 | }
24 |
25 | @override
26 | bool shouldRepaint(RevealProgressButtonPainter oldDelegate) {
27 | return oldDelegate._fraction != _fraction;
28 | }
29 | }
--------------------------------------------------------------------------------
/lib/widget/trapezoid_down_cut_small.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:meta/meta.dart';
3 |
4 | class TrapezoidDownCutSmall extends StatelessWidget {
5 | TrapezoidDownCutSmall({@required this.child});
6 |
7 | final Widget child;
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return new ClipPath(
12 | clipper: new DiagonalClipper(),
13 | child: child,
14 | );
15 | }
16 | }
17 |
18 | class DiagonalClipper extends CustomClipper {
19 | @override
20 | Path getClip(Size size) {
21 | var path = new Path();
22 |
23 | path.lineTo(size.width * 0.3, 0);
24 |
25 | path.lineTo(size.width * 0.74, size.height * 0.22);
26 |
27 | path.quadraticBezierTo(size.width * 0.84, size.height * 0.27, size.width * 0.9, size.height * 0.22);
28 |
29 | path.lineTo(size.width, size.height * 0.15);
30 |
31 | path.lineTo(size.width, 0);
32 |
33 | path.lineTo(size.width * 0.3, 0);
34 |
35 | return path;
36 | }
37 |
38 | @override
39 | bool shouldReclip(CustomClipper oldClipper) => false;
40 | }
41 |
--------------------------------------------------------------------------------
/lib/widget/trapezoid_up_cut.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:meta/meta.dart';
3 |
4 | class TrapezoidUpCut extends StatelessWidget {
5 | TrapezoidUpCut({@required this.child});
6 |
7 | final Widget child;
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return new ClipPath(
12 | clipper: new DiagonalClipper(),
13 | child: child,
14 | );
15 | }
16 | }
17 |
18 | class DiagonalClipper extends CustomClipper {
19 | @override
20 | Path getClip(Size size) {
21 | var path = new Path();
22 |
23 | path.lineTo(size.width * 0.02, size.height);
24 |
25 | path.lineTo(size.width * 0.64, size.height * 0.68);
26 |
27 | path.quadraticBezierTo(size.width * 0.8, size.height * 0.6, size.width * 0.92, size.height * 0.68);
28 |
29 | path.lineTo(size.width, size.height * 0.73);
30 |
31 | path.lineTo(size.width, size.height);
32 |
33 | path.lineTo(size.width * 0.02, size.height);
34 |
35 | return path;
36 | }
37 |
38 | @override
39 | bool shouldReclip(CustomClipper oldClipper) => false;
40 | }
41 |
--------------------------------------------------------------------------------
/lib/widget/trapezoid_up_cut_small.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:meta/meta.dart';
3 |
4 | class TrapezoidUpCutSmall extends StatelessWidget {
5 | TrapezoidUpCutSmall({@required this.child});
6 |
7 | final Widget child;
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return new ClipPath(
12 | clipper: new DiagonalClipper(),
13 | child: child,
14 | );
15 | }
16 | }
17 |
18 | class DiagonalClipper extends CustomClipper {
19 | @override
20 | Path getClip(Size size) {
21 | var path = new Path();
22 |
23 | path.lineTo(size.width * 0.3, size.height);
24 |
25 | path.lineTo(size.width * 0.67, size.height * 0.8);
26 |
27 | path.quadraticBezierTo(size.width * 0.77, size.height * 0.75, size.width * 0.87, size.height * 0.8);
28 |
29 | path.lineTo(size.width, size.height * 0.88);
30 |
31 | path.lineTo(size.width, size.height);
32 |
33 | path.lineTo(size.width * 0.3, size.height);
34 |
35 | return path;
36 | }
37 |
38 | @override
39 | bool shouldReclip(CustomClipper oldClipper) => false;
40 | }
41 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Mayank Rai
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/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_uplab_onboarding/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 |
--------------------------------------------------------------------------------
/lib/utility/app_constant.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | const PHONE_AUTH_HINT = "User Name";
4 | const PHONE_AUTH_VALIDATION_EMPTY = "Your phone number can\'t be empty!";
5 | const PHONE_AUTH_VALIDATION_INVALID = 'This phone number is invalid!';
6 |
7 | const PASSWORD_AUTH_HINT = "Password";
8 | const PASSWORD_AUTH_VALIDATION_EMPTY = "Your password number can\'t be empty!";
9 | const PASSWORD_AUTH_VALIDATION_INVALID = 'This password number is invalid!';
10 |
11 | const COLOR_WELCOME = "#FFD201";
12 | const COLOR_LOGIN = "#2C3949";
13 |
14 | const IMAGE_LOGIN_PATH = "assets/images/travel.jpeg";
15 | const IMAGE_WELCOME_PATH = "assets/images/background.png";
16 | const IMAGE_SLIPPER_PATH = "assets/images/slippers.png";
17 |
18 | const TEXT_SIGN_IN_LABEL = "SIGN IN";
19 | const TEXT_WELCOME_LABEL = "Follow the path you like,\nvisit the places you want to go but go with a guide.";
20 |
21 | const COLOR_FACEBOOK = "#4C76BE";
22 | const COLOR_TWITTER = "#00C7FF";
23 | const COLOR_GOOGLE = "#FC5345";
24 |
25 | const IMAGE_PATH_GOOGLE = 'assets/images/google.png';
26 | const IMAGE_PATH_TWITTER = 'assets/images/twitter.png';
27 | const IMAGE_PATH_FACEBOOK = 'assets/images/facebook.png';
28 |
29 | const BUTTON_PROCEED = "PROCEED";
30 | const BUTTON_GOAHEAD = "GO AHEAD";
31 |
32 | const BUTTON_LOGIN = "Login";
--------------------------------------------------------------------------------
/lib/screen/home/home_animation.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class HomeEnterAnimation {
4 | HomeEnterAnimation(this.controller)
5 | : scale = new Tween(begin: 0.0, end: 1.0).animate(
6 | new CurvedAnimation(
7 | parent: controller,
8 | curve: new Interval(
9 | 0.6,
10 | 0.9,
11 | curve: Curves.fastOutSlowIn,
12 | ),
13 | ),
14 | ),
15 | Ytranslation = new Tween(begin: 1000.0, end: 0.0).animate(
16 | new CurvedAnimation(
17 | parent: controller,
18 | curve: new Interval(
19 | 0.2,
20 | 0.6,
21 | curve: Curves.fastOutSlowIn,
22 | ),
23 | ),
24 | ),
25 | fadeTranslation = new Tween(begin: 0.0, end: 1.0).animate(
26 | new CurvedAnimation(
27 | parent: controller,
28 | curve: new Interval(
29 | 0.0,
30 | 0.3,
31 | curve: Curves.fastOutSlowIn,
32 | ),
33 | ),
34 | );
35 |
36 | final AnimationController controller;
37 | final Animation scale;
38 | final Animation Ytranslation;
39 | final Animation fadeTranslation;
40 | }
41 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | flutter_uplab_onboarding
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/lib/screen/login/login_animation.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class LoginEnterAnimation {
4 | LoginEnterAnimation(this.controller)
5 | : userNameOpacity = new Tween(begin: 0.0, end: 1.0).animate(
6 | new CurvedAnimation(
7 | parent: controller,
8 | curve: new Interval(
9 | 0.6,
10 | 0.7,
11 | curve: Curves.easeIn,
12 | ),
13 | ),
14 | ),
15 | passowrdOpacity = new Tween(begin: 0.0, end: 1.0).animate(
16 | new CurvedAnimation(
17 | parent: controller,
18 | curve: new Interval(
19 | 0.7,
20 | 0.8,
21 | curve: Curves.easeIn,
22 | ),
23 | ),
24 | ),
25 | translation = new Tween(begin: 1000.0, end: 0.0).animate(
26 | new CurvedAnimation(
27 | parent: controller,
28 | curve: new Interval(
29 | 0.4,
30 | 0.6,
31 | curve: Curves.fastOutSlowIn,
32 | ),
33 | ),
34 | ),
35 | backgroundTranslation = new Tween(begin: 1000.0, end: 0.0).animate(
36 | new CurvedAnimation(
37 | parent: controller,
38 | curve: new Interval(
39 | 0.0,
40 | 0.5,
41 | curve: Curves.fastOutSlowIn,
42 | ),
43 | ),
44 | ),
45 | buttontranslation = new Tween(begin: 1000.0, end: 0.0).animate(
46 | new CurvedAnimation(
47 | parent: controller,
48 | curve: new Interval(
49 | 0.8,
50 | 1.0,
51 | curve: Curves.fastOutSlowIn,
52 | ),
53 | ),
54 | )
55 |
56 | ;
57 |
58 | final AnimationController controller;
59 | final Animation userNameOpacity;
60 | final Animation passowrdOpacity;
61 | final Animation translation;
62 | final Animation backgroundTranslation;
63 | final Animation buttontranslation;
64 | }
65 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
15 |
19 |
26 |
30 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 27
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.mayandro.flutteruplabonboarding"
42 | minSdkVersion 16
43 | targetSdkVersion 27
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
47 | }
48 |
49 | buildTypes {
50 | release {
51 | // TODO: Add your own signing config for the release build.
52 | // Signing with the debug keys for now, so `flutter run --release` works.
53 | signingConfig signingConfigs.debug
54 | }
55 | }
56 | }
57 |
58 | flutter {
59 | source '../..'
60 | }
61 |
62 | dependencies {
63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64 | testImplementation 'junit:junit:4.12'
65 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
66 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
67 | }
68 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_uplab_onboarding
2 | description: A new Flutter application.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # Read more about versioning at semver.org.
10 | version: 1.0.0+1
11 |
12 | environment:
13 | sdk: ">=2.1.0 <3.0.0"
14 |
15 | dependencies:
16 | flutter:
17 | sdk: flutter
18 |
19 | # The following adds the Cupertino Icons font to your application.
20 | # Use with the CupertinoIcons class for iOS style icons.
21 | cupertino_icons: ^0.1.2
22 |
23 | dev_dependencies:
24 | flutter_test:
25 | sdk: flutter
26 |
27 |
28 | # For information on the generic Dart part of this file, see the
29 | # following page: https://www.dartlang.org/tools/pub/pubspec
30 |
31 | # The following section is specific to Flutter.
32 | flutter:
33 |
34 | # The following line ensures that the Material Icons font is
35 | # included with your application, so that you can use the icons in
36 | # the material Icons class.
37 | uses-material-design: true
38 |
39 | assets:
40 | - assets/images/doctor.jpg
41 | - assets/images/appointment.png
42 | - assets/images/reminder.png
43 | - assets/images/reports.png
44 | - assets/images/yourappointments.png
45 | # To add assets to your application, add an assets section, like this:
46 | # assets:
47 | # - images/a_dot_burr.jpeg
48 | # - images/a_dot_ham.jpeg
49 |
50 | # An image asset can refer to one or more resolution-specific "variants", see
51 | # https://flutter.io/assets-and-images/#resolution-aware.
52 |
53 | # For details regarding adding assets from package dependencies, see
54 | # https://flutter.io/assets-and-images/#from-packages
55 |
56 | # To add custom fonts to your application, add a fonts section here,
57 | # in this "flutter" section. Each entry in this list should have a
58 | # "family" key with the font family name, and a "fonts" key with a
59 | # list giving the asset and other descriptors for the font. For
60 | # example:
61 | # fonts:
62 | # - family: Schyler
63 | # fonts:
64 | # - asset: fonts/Schyler-Regular.ttf
65 | # - asset: fonts/Schyler-Italic.ttf
66 | # style: italic
67 | # - family: Trajan Pro
68 | # fonts:
69 | # - asset: fonts/TrajanPro.ttf
70 | # - asset: fonts/TrajanPro_Bold.ttf
71 | # weight: 700
72 | #
73 | # For details regarding fonts from package dependencies,
74 | # see https://flutter.io/custom-fonts/#from-packages
75 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/lib/screen/home/home_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_uplab_onboarding/screen/home/home_animation.dart';
3 |
4 | class HomePage extends StatefulWidget {
5 | @override
6 | HomePageState createState() {
7 | return new HomePageState();
8 | }
9 | }
10 |
11 | class HomePageState extends State with TickerProviderStateMixin{
12 |
13 | HomeEnterAnimation enterAnimation;
14 | AnimationController animationController;
15 |
16 | @override
17 | void initState() {
18 | super.initState();
19 |
20 | animationController = new AnimationController(
21 | duration: const Duration(milliseconds: 3000), vsync: this);
22 |
23 | enterAnimation = HomeEnterAnimation(animationController);
24 |
25 | animationController.forward();
26 | }
27 |
28 | @override
29 | void dispose() {
30 | animationController.dispose();
31 | super.dispose();
32 | }
33 |
34 | @override
35 | Widget build(BuildContext context) {
36 | final Size size = MediaQuery.of(context).size;
37 | final TextTheme textTheme = Theme.of(context).textTheme;
38 |
39 | return Scaffold(
40 | body: AnimatedBuilder(
41 | animation: animationController,
42 | builder: (BuildContext context, Widget child) {
43 | return Stack(
44 | fit: StackFit.expand,
45 | children: [
46 | _buildBackgroundImage(size),
47 | _buildBackgroundGradient(size),
48 | _buildCard(size, textTheme),
49 | ],
50 | );
51 | })
52 | );
53 | }
54 |
55 | _buildBackgroundImage(Size size) => Positioned(
56 | top: 0,
57 | bottom: size.height * 0.6,
58 | left: 0,
59 | right: 0,
60 | child: FadeTransition(
61 | opacity: enterAnimation.fadeTranslation,
62 | child: Container(
63 | decoration: BoxDecoration(
64 | image: new DecorationImage(
65 | image: new ExactAssetImage('assets/images/doctor.jpg'),
66 | fit: BoxFit.cover,
67 | ),
68 | )),
69 | ),
70 | );
71 |
72 | _buildBackgroundGradient(Size size) => Positioned(
73 | top: size.height * 0.4,
74 | bottom: 0,
75 | left: 0,
76 | right: 0,
77 | child: FadeTransition(
78 | opacity: enterAnimation.fadeTranslation,
79 | child: Container(
80 | decoration: BoxDecoration(
81 | gradient: const LinearGradient(
82 | begin: FractionalOffset.topCenter,
83 | end: FractionalOffset.bottomCenter,
84 | colors: [
85 | const Color(0xFF5DB09E),
86 | const Color(0xFF40858B),
87 | const Color(0xFF042C63),
88 | ],
89 | ),
90 | )),
91 | ),
92 | );
93 |
94 | _buildCard(Size size, TextTheme textTheme) => Positioned(
95 | top: size.height * 0.3,
96 | bottom: size.height * 0.1,
97 | left: size.width * 0.05,
98 | right: size.width * 0.05,
99 | child: Transform(
100 | transform: Matrix4.translationValues(0, enterAnimation.Ytranslation.value, 0),
101 | child: Card(
102 | elevation: 8,
103 | child: Padding(
104 | padding: const EdgeInsets.all(16.0),
105 | child: Column(
106 | crossAxisAlignment: CrossAxisAlignment.start,
107 | children: [
108 | Text(
109 | "Hello Nasrin",
110 | style: textTheme.caption.copyWith(
111 | color: Colors.black, fontWeight: FontWeight.w300),
112 | ),
113 | Text(
114 | "Welcome",
115 | style: textTheme.subtitle.copyWith(
116 | color: Colors.black, fontWeight: FontWeight.w700),
117 | ),
118 | SizedBox(
119 | height: 16,
120 | ),
121 | Expanded(
122 | child: GridView.count(
123 | crossAxisCount: 2,
124 | mainAxisSpacing: 16.0,
125 | crossAxisSpacing: 16.0,
126 | childAspectRatio: (size.width ) / ((size.height * 0.5)),
127 | controller: new ScrollController(keepScrollOffset: false),
128 | shrinkWrap: true,
129 | scrollDirection: Axis.vertical,
130 | children: menuItems.map((Menu menu) {
131 | return menuStack(context, menu);
132 | }).toList(),
133 | ),
134 | )
135 | ],
136 | )),
137 | ),
138 | ),
139 | );
140 |
141 | Widget menuStack(BuildContext context, Menu menu) => Container(
142 | decoration: BoxDecoration(
143 | border: new Border.all(
144 | color: Theme.of(context).primaryColor),
145 | borderRadius:
146 | BorderRadius.all(Radius.circular(4))),
147 | padding: EdgeInsets.all(8),
148 | child: Column(
149 | crossAxisAlignment: CrossAxisAlignment.center,
150 | mainAxisAlignment: MainAxisAlignment.center,
151 | children: [
152 | Expanded(
153 | child: Transform(
154 | transform: Matrix4.diagonal3Values(enterAnimation.scale.value, enterAnimation.scale.value, 0),
155 | alignment: Alignment.center,
156 | child: Padding(
157 | padding: const EdgeInsets.all(8.0),
158 | child: Image.asset(
159 | menu.image),
160 | ),
161 | )),
162 | Padding(
163 | padding: const EdgeInsets.all(8.0),
164 | child: Text(
165 | menu.title,
166 | style: TextStyle(
167 | fontSize: 8,
168 | fontWeight: FontWeight.w500),
169 | ),
170 | )
171 | ],
172 | ),
173 | );
174 | }
175 |
176 |
177 | class Menu {
178 | String title;
179 | String image;
180 |
181 | Menu(
182 | {this.title,
183 | this.image,
184 | });
185 | }
186 |
187 | final menuItems =