diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies new file mode 100644 index 0000000..499de36 --- /dev/null +++ b/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"image_picker","path":"/home/danger-ahead/Flutter/flutter_linux_2.2.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/","dependencies":[]}],"android":[{"name":"image_picker","path":"/home/danger-ahead/Flutter/flutter_linux_2.2.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"image_picker","dependencies":[]}],"date_created":"2021-08-02 00:48:09.398231","version":"2.2.3"} \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 56a597e..843cf65 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 28 + compileSdkVersion 30 lintOptions { disable 'InvalidPackage' @@ -34,11 +34,11 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "aeologic.flutter_paytm_ui" - minSdkVersion 16 - targetSdkVersion 28 + minSdkVersion 21 + targetSdkVersion 30 versionCode flutterVersionCode.toInteger() versionName flutterVersionName - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } buildTypes { @@ -56,6 +56,6 @@ flutter { dependencies { testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 9d9e0a4..215ac29 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,26 +1,21 @@ - + android:label="flutter_paytm_ui" android:icon="@mipmap/ic_launcher"> + - + android:theme="@style/LaunchTheme"> + + + + diff --git a/android/app/src/main/java/aeologic/flutter_paytm_ui/MainActivity.java b/android/app/src/main/java/aeologic/flutter_paytm_ui/MainActivity.java index 34dc3ea..8a28591 100644 --- a/android/app/src/main/java/aeologic/flutter_paytm_ui/MainActivity.java +++ b/android/app/src/main/java/aeologic/flutter_paytm_ui/MainActivity.java @@ -1,13 +1,5 @@ package aeologic.flutter_paytm_ui; -import android.os.Bundle; -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; +import io.flutter.embedding.android.FlutterActivity; -public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } -} +public class MainActivity extends FlutterActivity{} diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 00fa441..a63ab46 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -5,4 +5,7 @@ Flutter draws its first frame --> @drawable/launch_background + diff --git a/android/build.gradle b/android/build.gradle index bb8a303..d755b4a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'com.android.tools.build:gradle:4.2.1' } } diff --git a/android/gradle.properties b/android/gradle.properties index 8bd86f6..53ae0ae 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1 +1,3 @@ +android.enableJetifier=true +android.useAndroidX=true org.gradle.jvmargs=-Xmx1536M diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 2819f02..939efa2 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip diff --git a/ios/Flutter/flutter_export_environment.sh b/ios/Flutter/flutter_export_environment.sh new file mode 100755 index 0000000..9b52823 --- /dev/null +++ b/ios/Flutter/flutter_export_environment.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=/home/danger-ahead/Flutter/flutter_linux_2.2.2-stable/flutter" +export "FLUTTER_APPLICATION_PATH=/home/danger-ahead/Documents/codes/flutter_paytm_clone" +export "COCOAPODS_PARALLEL_CODE_SIGN=true" +export "FLUTTER_TARGET=lib/main.dart" +export "FLUTTER_BUILD_DIR=build" +export "SYMROOT=${SOURCE_ROOT}/../build/ios" +export "FLUTTER_BUILD_NAME=1.0.0" +export "FLUTTER_BUILD_NUMBER=1" +export "DART_OBFUSCATION=false" +export "TRACK_WIDGET_CREATION=false" +export "TREE_SHAKE_ICONS=false" +export "PACKAGE_CONFIG=.packages" diff --git a/lib/constant/Constant.dart b/lib/constant/Constant.dart index 14b93f0..7543fac 100644 --- a/lib/constant/Constant.dart +++ b/lib/constant/Constant.dart @@ -1,3 +1 @@ -String SPLASH_SCREEN='/SplashScreen', -PAY_TM='/Paytm'; - +String SPLASH_SCREEN = '/SplashScreen', PAY_TM = '/Paytm'; diff --git a/lib/main.dart b/lib/main.dart index f10a2d7..db4c131 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -11,13 +11,12 @@ class MyApp extends StatelessWidget { return new MaterialApp( debugShowCheckedModeBanner: false, home: SplashScreen(), - theme: new ThemeData(primaryColor: Colors.blue[800], + theme: new ThemeData( + primaryColor: Colors.blue[800], ), routes: { SPLASH_SCREEN: (BuildContext context) => SplashScreen(), PAY_TM: (BuildContext context) => Paytm(), - - }, ); } diff --git a/lib/model/Gridmodel.dart b/lib/model/Gridmodel.dart index 9e8040d..bf16ac4 100644 --- a/lib/model/Gridmodel.dart +++ b/lib/model/Gridmodel.dart @@ -24,6 +24,4 @@ class GridModel { set imagePath(String value) { _imagePath = value; } - - -} \ No newline at end of file +} diff --git a/lib/model/ImageSliderModel.dart b/lib/model/ImageSliderModel.dart index 4bb71c0..ec95d6c 100644 --- a/lib/model/ImageSliderModel.dart +++ b/lib/model/ImageSliderModel.dart @@ -1,4 +1,4 @@ -class ImageSliderModel{ +class ImageSliderModel { String _path; ImageSliderModel(this._path); @@ -8,5 +8,4 @@ class ImageSliderModel{ set path(String value) { _path = value; } - -} \ No newline at end of file +} diff --git a/lib/ui/paytm.dart b/lib/ui/paytm.dart index f4cb00b..06ebdf2 100644 --- a/lib/ui/paytm.dart +++ b/lib/ui/paytm.dart @@ -35,20 +35,17 @@ class _PaytmState extends State { decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(10)), height: 40, - width: MediaQuery - .of(context) - .size - .width / 1.35, + width: MediaQuery.of(context).size.width / 1.35, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Padding( padding: const EdgeInsets.only(left: 20), - child: Icon(Icons.search,color: Colors.blue,), + child: Icon( + Icons.search, + color: Colors.blue, + ), ), - - Padding( padding: const EdgeInsets.only(right: 20), child: Image.asset( @@ -74,50 +71,45 @@ class _PaytmState extends State { type: BottomNavigationBarType.fixed, items: [ new BottomNavigationBarItem( - icon: Image.asset( - "assets/home.png", - width: 24.0, - height: 24.0, - ), - title: Text( - 'Home', - )), + icon: Image.asset( + "assets/home.png", + width: 24.0, + height: 24.0, + ), + label: 'Home', + ), new BottomNavigationBarItem( - icon: Image.asset( - "assets/shopping-bagg.png", - width: 24.0, - height: 24.0, - ), - title: Text( - 'Mall', - )), + icon: Image.asset( + "assets/shopping-bagg.png", + width: 24.0, + height: 24.0, + ), + label: 'Mall', + ), new BottomNavigationBarItem( - icon: Image.asset( - "assets/qr-code.png", - width: 24.0, - height: 24.0, - ), - title: Text( - 'Scan', - )), + icon: Image.asset( + "assets/qr-code.png", + width: 24.0, + height: 24.0, + ), + label: 'Scan', + ), new BottomNavigationBarItem( - icon: Image.asset( - "assets/bank.png", - width: 24.0, - height: 24.0, - ), - title: Text( - 'Bank', - )), + icon: Image.asset( + "assets/bank.png", + width: 24.0, + height: 24.0, + ), + label: 'Bank', + ), new BottomNavigationBarItem( - icon: Image.asset( - "assets/delivery.png", - width: 24.0, - height: 24.0, - ), - title: Text( - 'Inbox', - )), + icon: Image.asset( + "assets/delivery.png", + width: 24.0, + height: 24.0, + ), + label: 'Inbox', + ), ]); } @@ -129,7 +121,8 @@ class _PaytmState extends State { width: double.maxFinite, color: Colors.blue[800], child: Container( - child: CarouselSlider(reverse: false, + child: CarouselSlider( + reverse: false, aspectRatio: 5, viewportFraction: 1.0, initialPage: 0, @@ -141,8 +134,7 @@ class _PaytmState extends State { print(_currentIndexUp); }); }, - items: List.generate( - (2), (int index) { + items: List.generate((2), (int index) { return GridView.count( crossAxisCount: 4, children: List.generate((4), (int index) { @@ -163,15 +155,14 @@ class _PaytmState extends State { // return GridList(_getGridList()[index]); // }, // ), - ), - - - Container( color: Colors.blue[800], + ), + Container( + color: Colors.blue[800], child: new Row( - mainAxisAlignment: MainAxisAlignment.center, - children: List.generate(2, (int index) { - return dots(_currentIndexUp, index); - }), + mainAxisAlignment: MainAxisAlignment.center, + children: List.generate(2, (int index) { + return dots(_currentIndexUp, index); + }), ), ), Padding( @@ -183,10 +174,7 @@ class _PaytmState extends State { topLeft: Radius.circular(20), topRight: Radius.circular(20))), height: 40, - width: MediaQuery - .of(context) - .size - .width, + width: MediaQuery.of(context).size.width, child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ @@ -215,7 +203,6 @@ class _PaytmState extends State { child: Container( color: Colors.white, child: CarouselSlider( - aspectRatio: 2, viewportFraction: 1.0, initialPage: 0, @@ -271,7 +258,8 @@ class _PaytmState extends State { list.add(new GridModel( "assets/add_money_passbook.png", "Add Money", Colors.white)); list.add(new GridModel("assets/book.png", "Link Account", Colors.white)); - list.add(new GridModel("assets/ic_passbook_header.png", "Link Account", Colors.white)); + list.add(new GridModel( + "assets/ic_passbook_header.png", "Link Account", Colors.white)); list.add(new GridModel("assets/book.png", "Link Account", Colors.white)); return list; @@ -322,24 +310,16 @@ class _PaytmState extends State { decoration: BoxDecoration( shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(10), - color: dotColor(index) - )); + color: dotColor(index))); } } - Widget imageSliderItem(ImageSliderModel i) { return Container( padding: EdgeInsets.only(left: 8, right: 8), decoration: BoxDecoration(borderRadius: BorderRadius.circular(10)), - width: MediaQuery - .of(context) - .size - .width, - height: MediaQuery - .of(context) - .size - .height, + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height, child: ClipRRect( borderRadius: BorderRadius.circular(10), child: Image.asset( @@ -350,11 +330,8 @@ class _PaytmState extends State { } Color dotColor(int index) { - return _currentIndexUp == index - ? Colors.white - : Colors.grey; + return _currentIndexUp == index ? Colors.white : Colors.grey; } - } class GridItem extends StatelessWidget { @@ -405,7 +382,6 @@ class GridItemTop extends StatelessWidget { return Padding( padding: const EdgeInsets.all(1 / 2), child: Container( - child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -422,7 +398,10 @@ class GridItemTop extends StatelessWidget { child: Text( gridModel.title, textAlign: TextAlign.center, - style: TextStyle(fontSize: 12, color: Colors.white,), + style: TextStyle( + fontSize: 12, + color: Colors.white, + ), ), ), ], @@ -432,6 +411,3 @@ class GridItemTop extends StatelessWidget { ); } } - - - diff --git a/lib/ui/splashscreen.dart b/lib/ui/splashscreen.dart index af6b615..b4d3afc 100644 --- a/lib/ui/splashscreen.dart +++ b/lib/ui/splashscreen.dart @@ -3,7 +3,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_paytm_ui/constant/Constant.dart'; - class SplashScreen extends StatefulWidget { @override SplashScreenState createState() => new SplashScreenState(); diff --git a/pubspec.lock b/pubspec.lock index 0c17227..f5642ce 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,14 +7,14 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.6.1" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "2.1.0" carousel_slider: dependency: "direct main" description: @@ -22,20 +22,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.2.0" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.11" + version: "1.15.0" cupertino_icons: dependency: "direct main" description: @@ -43,6 +57,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.2" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -80,35 +101,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.5" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.3.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.2" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" + version: "1.8.0" sky_engine: dependency: transitive description: flutter @@ -120,42 +127,42 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.5.5" + version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.3" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.5" + version: "0.3.0" transformer_page_view: dependency: transitive description: @@ -169,14 +176,14 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.1.0" sdks: - dart: ">=2.2.2 <3.0.0" - flutter: ">=0.1.4 <2.0.0" + dart: ">=2.12.0 <3.0.0" + flutter: ">=0.1.4" diff --git a/pubspec.yaml b/pubspec.yaml index b898233..807a0cd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,16 +1,6 @@ name: flutter_paytm_ui description: A new Flutter application. -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html version: 1.0.0+1 environment: @@ -20,8 +10,6 @@ dependencies: flutter: sdk: flutter - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 image_picker: "^0.4.5" carousel_slider: any @@ -31,19 +19,10 @@ dev_dependencies: flutter_test: sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://www.dartlang.org/tools/pub/pubspec - -# The following section is specific to Flutter. flutter: - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. uses-material-design: true - # To add assets to your application, add an assets section, like this: assets: - assets/paytm_logo.png - assets/uanotif_nomessage.png @@ -75,29 +54,3 @@ flutter: - assets/placeholder_inapp_merchants.png - assets/home.png - assets/right-arrow.png - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages