Skip to content

Commit

Permalink
Localization merge
Browse files Browse the repository at this point in the history
  • Loading branch information
4seer committed Feb 17, 2020
2 parents 8cf6608 + b204d7c commit 7f05cd0
Show file tree
Hide file tree
Showing 60 changed files with 1,379 additions and 151 deletions.
Binary file added assets/images/checkout/bags.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/checkout/dark_card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/checkout/dhl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/checkout/fedex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/checkout/light_card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/checkout/mastercard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/checkout/success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/checkout/usps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 1 addition & 0 deletions ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
66 changes: 66 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
F821E4F7499F31FC3552ADF3 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 591BB2C9B9333B32BDFBD5C7 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -39,6 +40,9 @@
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
3B9CC7B3762CD13F71A85A9B /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
3F44D75436C4DD89C59726FF /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
591BB2C9B9333B32BDFBD5C7 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
Expand All @@ -50,6 +54,7 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9B0A26276ABF171DE36BEEAE /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -59,6 +64,7 @@
files = (
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
F821E4F7499F31FC3552ADF3 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -84,6 +90,8 @@
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
FCA609B3975DD31A2AD3AD62 /* Pods */,
C2F634981E5363BA02E35F7D /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -118,19 +126,40 @@
name = "Supporting Files";
sourceTree = "<group>";
};
C2F634981E5363BA02E35F7D /* Frameworks */ = {
isa = PBXGroup;
children = (
591BB2C9B9333B32BDFBD5C7 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
FCA609B3975DD31A2AD3AD62 /* Pods */ = {
isa = PBXGroup;
children = (
3B9CC7B3762CD13F71A85A9B /* Pods-Runner.debug.xcconfig */,
9B0A26276ABF171DE36BEEAE /* Pods-Runner.release.xcconfig */,
3F44D75436C4DD89C59726FF /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
464C10B199D0292F9B67E53E /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
7650B0023506C1D4B8B42E25 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -203,6 +232,43 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
};
464C10B199D0292F9B67E53E /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
7650B0023506C1D4B8B42E25 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
3 changes: 3 additions & 0 deletions ios/Runner.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 10 additions & 8 deletions lib/config/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
// Date: 2020-02-06

class OpenFlutterEcommerceRoutes {
static final home = "/";
static final shop = "shop";
static final cart = "cart";
static final favourites = "favourites";
static final profile = "profile";
static const SIGNUP = "signup";
static const SIGNIN = "signin";
static const FORGET_PASSWORD = "forget_pass";
static const home = "/";
static const shop = "shop";
static const cart = "cart";
static const favourites = "favourites";
static const profile = "profile";
static const checkout = "checkout";
static const signup = "signup";
static const signin = "signin";
static const forgotPassword = "forgot_pass";
static const settings = "settings";
}
100 changes: 54 additions & 46 deletions lib/config/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
import 'package:flutter/material.dart';

class AppSizes {
static int splashScreenTitleFontSize = 48;
static int titleFontSize = 34;
static double sidePadding = 15;
static double widgetSidePadding = 20;
static double buttonRadius = 25;
static double imageRadius = 8;
static double linePadding = 4;
static double widgetBorderRadius = 34;
static const TEXT_FIELD_RADIUS = 4.0;
static const int splashScreenTitleFontSize = 48;
static const int titleFontSize = 34;
static const double sidePadding = 15;
static const double widgetSidePadding = 20;
static const double buttonRadius = 25;
static const double imageRadius = 8;
static const double linePadding = 4;
static const double widgetBorderRadius = 34;
static const double textFieldRadius = 4.0;
static const EdgeInsets bottomSheetPadding = EdgeInsets.symmetric(horizontal: 16, vertical: 10);
}

class AppColors {
Expand All @@ -25,6 +26,7 @@ class AppColors {
static const orange = Color(0xFFFFBA49);
static const background = Color(0xFFE5E5E5);
static const transparent = Color(0x00000000);
static const success = Color(0xFF2AA952);
}

class OpenFlutterEcommerceTheme {
Expand All @@ -38,44 +40,50 @@ class OpenFlutterEcommerceTheme {
backgroundColor: AppColors.background,
errorColor: AppColors.red,
appBarTheme: theme.appBarTheme.copyWith(
color: AppColors.white,
iconTheme: IconThemeData(color: AppColors.black),
textTheme: theme.textTheme.copyWith(
caption: TextStyle(color: AppColors.black, fontSize: 18))),
color: AppColors.white,
iconTheme: IconThemeData(color: AppColors.black),
textTheme: theme.textTheme.copyWith(
caption: TextStyle(color: AppColors.black, fontSize: 18))),
textTheme: theme.textTheme.copyWith(
//over image white text
headline: theme.textTheme.headline
.copyWith(fontSize: 48, color: AppColors.white),
subtitle: theme.textTheme.headline
.copyWith(fontSize: 18, color: AppColors.black),
subhead: theme.textTheme.headline.copyWith(
fontSize: 24,
color: AppColors.white,
fontWeight: FontWeight.bold),
//red button with white text
button: theme.textTheme.button
.copyWith(fontSize: 14, color: AppColors.white),
//black caption title
caption: theme.textTheme.caption.copyWith(
fontSize: 34,
color: AppColors.black,
),
//light gray small text
display1: theme.textTheme.display1.copyWith(
color: AppColors.lightGray,
fontSize: 11,
),
//view all link
display2: theme.textTheme.display2
.copyWith(color: AppColors.black, fontSize: 11),
//product title
display3: theme.textTheme.display2.copyWith(
color: AppColors.black,
fontSize: 16,
fontWeight: FontWeight.bold),
//product price
display4: theme.textTheme.display2
.copyWith(color: AppColors.lightGray, fontSize: 14)),
//over image white text
headline1: theme.textTheme.headline1
.copyWith(fontSize: 48, color: AppColors.white),
headline2: theme.textTheme.headline2,

//product title
headline3: theme.textTheme.headline3.copyWith(
color: AppColors.black,
fontSize: 16,
fontWeight: FontWeight.bold),

headline4: theme.textTheme.headline4,
//product price
headline5: theme.textTheme.headline5
.copyWith(color: AppColors.lightGray, fontSize: 14),
headline6: theme.textTheme.headline6,

subtitle1: theme.textTheme.headline1
.copyWith(fontSize: 18, color: AppColors.black),
subtitle2: theme.textTheme.headline1.copyWith(
fontSize: 24,
color: AppColors.white,
fontWeight: FontWeight.bold),
//red button with white text
button: theme.textTheme.button
.copyWith(fontSize: 14, color: AppColors.white),
//black caption title
caption: theme.textTheme.caption.copyWith(
fontSize: 34,
color: AppColors.black,
),
//light gray small text
bodyText1: theme.textTheme.bodyText1.copyWith(
color: AppColors.lightGray,
fontSize: 11,
),
//view all link
bodyText2: theme.textTheme.bodyText2
.copyWith(color: AppColors.black, fontSize: 11),),
buttonTheme: theme.buttonTheme.copyWith(
minWidth: 50,
buttonColor: AppColors.red,
Expand Down
9 changes: 6 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:openflutterecommerce/config/routes.dart';
import 'package:openflutterecommerce/config/theme.dart';
import 'package:openflutterecommerce/screens/cart/cart_screen.dart';
import 'package:openflutterecommerce/screens/categories/categories_screen.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_translate/flutter_translate.dart';
import 'package:openflutterecommerce/screens/home/home_screen.dart';
import 'package:openflutterecommerce/screens/settings/settings_screen.dart';
import 'package:openflutterecommerce/screens/signin/forget_password.dart';
import 'package:openflutterecommerce/screens/signin/signup.dart';
import 'package:openflutterecommerce/screens/splash_screen.dart';
import 'authentication/authentication.dart';
import 'config/routes.dart';
import 'screens/checkout/checkout_screen.dart';
import 'screens/home/home_screen.dart';
import 'screens/signin/signin.dart';
import 'package:flutter_translate/flutter_translate.dart';
Expand Down Expand Up @@ -89,9 +92,9 @@ class OpenFlutterEcommerceApp extends StatelessWidget {
OpenFlutterEcommerceRoutes.home: (context) => HomeScreen(),
OpenFlutterEcommerceRoutes.cart: (context) => HomeScreen(),
OpenFlutterEcommerceRoutes.favourites: (context) => HomeScreen(),
OpenFlutterEcommerceRoutes.SIGNIN: (context) => _signIn,
OpenFlutterEcommerceRoutes.SIGNUP: (context) => _signUp,
OpenFlutterEcommerceRoutes.FORGET_PASSWORD: (context) =>
OpenFlutterEcommerceRoutes.signin: (context) => _signIn,
OpenFlutterEcommerceRoutes.signup: (context) => _signUp,
OpenFlutterEcommerceRoutes.forgotPassword: (context) =>
_forgetPassword,
OpenFlutterEcommerceRoutes.shop: (context) => CategoriesScreen(),
OpenFlutterEcommerceRoutes.profile: (context) =>
Expand Down
4 changes: 4 additions & 0 deletions lib/screens/cart/cart.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export 'cart_bloc.dart';
export 'cart_event.dart';
export 'cart_screen.dart';
export 'cart_state.dart';
32 changes: 32 additions & 0 deletions lib/screens/cart/cart_bloc.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Home Screen Bloc
// Author: openflutterproject@gmail.com
// Date: 2020-02-06

import 'package:bloc/bloc.dart';
import 'package:flutter/material.dart';
import 'package:openflutterecommerce/repos/product_repository.dart';

import 'cart.dart';

class CartBloc extends Bloc<CartEvent, CartState> {
final ProductRepository productRepository;

CartBloc({
@required this.productRepository,
}) : assert(productRepository != null);

@override
CartState get initialState => CartInitialState();

@override
Stream<CartState> mapEventToState(CartEvent event) async* {
if (event is CartLoadedEvent) {
if (this.state is CartInitialState) {
yield new CartLoadedState(
cartProducts: this.productRepository.getProducts(1));
} else if (this.state is CartLoadedState) {
yield this.state;
}
}
}
}
18 changes: 18 additions & 0 deletions lib/screens/cart/cart_event.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Home Screen Bloc Events
// Author: openflutterproject@gmail.com
// Date: 2020-02-06

import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';

@immutable
abstract class CartEvent extends Equatable {
@override
List<Object> get props => [];
}

@immutable
class CartLoadedEvent extends CartEvent {
@override
String toString() => 'Cart wass Loaded';
}
Loading

0 comments on commit 7f05cd0

Please sign in to comment.