Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apr/v2 embedding #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ android {
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
Expand All @@ -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:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
}
18 changes: 14 additions & 4 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name="io.flutter.app.FlutterApplication"
android:name="${applicationName}"
android:label="flipkart_flutter_ui"

android:icon="@mipmap/ic_launcher">
Expand All @@ -19,17 +19,27 @@
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">

<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />

<!-- Theme to apply as soon as Flutter begins rendering frames -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
package com.example.flipkart_flutter_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);
}

}
6 changes: 6 additions & 0 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>

<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
</resources>


2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:3.3.0'
}
}

Expand Down
2 changes: 2 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
13 changes: 8 additions & 5 deletions ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/home/shivanchal/flutter"
export "FLUTTER_APPLICATION_PATH=/home/shivanchal/projects_flutter/flutter_Flipkart_UI_clone_original"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_ROOT=D:\Flutter\Flutter-3.0.5\flutter"
export "FLUTTER_APPLICATION_PATH=D:\work\flutter_ecommerce_UI_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_FRAMEWORK_DIR=/home/shivanchal/flutter/bin/cache/artifacts/engine/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=.dart_tool/package_config.json"
4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class MyApp extends StatelessWidget {
primaryColor: Color(0xff2874F0),
),
routes: <String,WidgetBuilder>{
SPLASH_SCREEN: (BuildContext context)=> AnimatedSplashScreen(),
HOME_SCREEN: (BuildContext context)=> HomePage(),
splashScreen: (BuildContext context)=> AnimatedSplashScreen(),
homeScreen: (BuildContext context)=> HomePage(),
},
home: AnimatedSplashScreen(),
);
Expand Down
4 changes: 2 additions & 2 deletions lib/src/Constant/Constant.dart
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
String SPLASH_SCREEN = '/AnimatedSplashScreen',
HOME_SCREEN='/HomePage';
String splashScreen = '/AnimatedSplashScreen',
homeScreen='/HomePage';
3 changes: 1 addition & 2 deletions lib/src/splash/splash_screens.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:async';

import 'package:flipkart_flutter_ui/src/Constant/Constant.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class AnimatedSplashScreen extends StatefulWidget {
Expand All @@ -22,7 +21,7 @@ class SplashScreenState extends State<AnimatedSplashScreen>
}

void navigationPage() {
Navigator.of(context).pushReplacementNamed(HOME_SCREEN);
Navigator.of(context).pushReplacementNamed(homeScreen);
}

@override
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/widgets/DealsOfTheDay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class _FourthlistState extends State<Fourthlist> {
}

addDealItem() {
deal = List<deals>();
deal = <deals>[];
deal.add(deals(
"assets/female.png",
'Dresses & Tops',
Expand Down
3 changes: 1 addition & 2 deletions lib/src/ui/widgets/Drawerfile.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';

import 'Drawerfile.dart';

class Drawerfile extends StatefulWidget {
@override
Expand All @@ -17,7 +16,7 @@ class _DrawerfileState extends State<Drawerfile> {
}

addDrawerItem() {
drawerItemModel = List<DrawerItemModel>();
drawerItemModel = <DrawerItemModel>[];
drawerItemModel.add(DrawerItemModel("Flutter Devs Plus Zone",
"https://rukminim1.flixcart.com/www/50/50/promos/11/07/2018/70e5346e-fce4-4718-8e56-27be8492faa5.png?q=80"));
drawerItemModel.add(DrawerItemModel("Electronics",
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/widgets/DualCameraPhones.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class _SeventhlistState extends State<Seventhlist> {
}

addDealItem() {
deal = List<deals>();
deal = <deals>[];
deal.add(deals(
"assets/phone.png",
'Redmi Note 7 Pro',
Expand Down
Loading