Skip to content
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
1 change: 1 addition & 0 deletions .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_webview_plugin","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/git/flutter_webview_plugin-b9dfe40cc6c66f69fe55bd224ccf81110e631094/","dependencies":[]},{"name":"connectivity","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.4/","dependencies":[]},{"name":"get_version","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/get_version-0.1.0/","dependencies":["package_info"]},{"name":"package_info","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.3/","dependencies":[]},{"name":"path_provider","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.22/","dependencies":[]},{"name":"shared_preferences","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.3+2/","dependencies":[]},{"name":"url_launcher","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.1.0/","dependencies":[]}],"android":[{"name":"flutter_webview_plugin","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/git/flutter_webview_plugin-b9dfe40cc6c66f69fe55bd224ccf81110e631094/","dependencies":[]},{"name":"connectivity","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.4/","dependencies":[]},{"name":"get_version","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/get_version-0.1.0/","dependencies":["package_info"]},{"name":"package_info","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.3/","dependencies":[]},{"name":"path_provider","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.22/","dependencies":[]},{"name":"shared_preferences","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.3+2/","dependencies":[]},{"name":"url_launcher","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.1.0/","dependencies":[]}],"macos":[{"name":"package_info","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.3/","dependencies":[]},{"name":"path_provider_macos","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+4/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+2/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/balvinderz/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+1/","dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"flutter_webview_plugin","dependencies":[]},{"name":"connectivity","dependencies":[]},{"name":"get_version","dependencies":["package_info"]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":[]},{"name":"url_launcher","dependencies":[]}],"date_created":"2020-10-30 22:53:23.994149","version":"1.24.0-4.0.pre.56"}
8 changes: 7 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application
android:name="io.flutter.app.FlutterApplication"
android:label="OfyPets"
android:usesCleartextTraffic="true"
android:icon="@mipmap/launcher_icon">
Expand All @@ -27,6 +26,13 @@
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
package com.example.ofypets_mobile_app;

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);
}

}
3 changes: 3 additions & 0 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:windowFullscreen">true</item>
</style>
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<color name="green">#7ED956</color>
</resources>
3 changes: 3 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
Binary file removed fonts/RobotoCondensed-Bold.ttf
Binary file not shown.
Binary file removed fonts/RobotoCondensed-Light.ttf
Binary file not shown.
Empty file modified fonts/RobotoCondensed-Regular.ttf
100755 → 100644
Empty file.
11 changes: 8 additions & 3 deletions ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/sakina/development/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/sakina/development/ofypets/flutter-ecommerce"
export "FLUTTER_ROOT=/Users/balvinderz/Downloads/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/balvinderz/AndroidStudioProjects/flutter-ecommerce"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "FLUTTER_FRAMEWORK_DIR=/Users/sakina/development/flutter/bin/cache/artifacts/engine/ios-release"
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
export "FLUTTER_FRAMEWORK_DIR=/Users/balvinderz/Downloads/flutter/bin/cache/artifacts/engine/ios"
export "FLUTTER_BUILD_NAME=1.0.19"
export "FLUTTER_BUILD_NUMBER=36"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.packages"
21 changes: 12 additions & 9 deletions lib/screens/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'dart:convert';

import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:http/http.dart' as http;
import 'package:ofypets_mobile_app/models/category.dart';
import 'package:ofypets_mobile_app/models/option_type.dart';
Expand Down Expand Up @@ -124,10 +125,11 @@ class _HomeScreenState extends State<HomeScreen> {
width: 8.0,
),
Text('Shop by Category',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.normal,
fontFamily: fontFamily)),
style: GoogleFonts.robotoCondensed(
textStyle: TextStyle(
fontSize: 14,
fontWeight: FontWeight.normal,
))),
],
),
),
Expand Down Expand Up @@ -194,10 +196,11 @@ class _HomeScreenState extends State<HomeScreen> {
width: 8.0,
),
Text('Today\'s Deals',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.normal,
fontFamily: fontFamily)),
style: GoogleFonts.robotoCondensed(
textStyle: TextStyle(
fontSize: 14,
fontWeight: FontWeight.normal,
))),
],
),
))
Expand Down Expand Up @@ -480,7 +483,7 @@ class _HomeScreenState extends State<HomeScreen> {
'api/v1/taxonomies?q[name_cont]=Landing_Banner&set=nested')
.then((response) {
responseBody = json.decode(response.body);
responseBody['taxonomies'][0]['root']['taxons'].forEach((banner) {
responseBody['taxonomies'][0]['root']['taxons']?.forEach((banner) {
setState(() {
banners.add(BannerImage(
imageSlug: banner['meta_title'], imageUrl: banner['icon']));
Expand Down
88 changes: 46 additions & 42 deletions lib/screens/product_detail.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:convert';
import 'package:google_fonts/google_fonts.dart';

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
Expand Down Expand Up @@ -28,7 +29,9 @@ import 'package:shared_preferences/shared_preferences.dart';

class ProductDetailScreen extends StatefulWidget {
final Product product;

ProductDetailScreen(this.product);

@override
State<StatefulWidget> createState() {
return _ProductDetailScreenState();
Expand Down Expand Up @@ -767,14 +770,14 @@ class _ProductDetailScreenState extends State<ProductDetailScreen>
children: <Widget>[
Padding(
padding: const EdgeInsets.only(left: 10.0),
child: Text(
'By ${selectedProduct.name.split(' ')[0]}',
style: TextStyle(
fontSize: 17,
fontWeight: FontWeight.normal,
color: Colors.green,
fontFamily: fontFamily),
),
child: Text('By ${selectedProduct.name.split(' ')[0]}',
style: GoogleFonts.robotoCondensed(
textStyle: TextStyle(
fontSize: 17,
fontWeight: FontWeight.normal,
color: Colors.green,
),
)),
),
Row(
children: <Widget>[
Expand All @@ -793,11 +796,12 @@ class _ProductDetailScreenState extends State<ProductDetailScreen>
padding: EdgeInsets.all(10),
child: Text(
selectedProduct.name,
style: TextStyle(
fontSize: 17,
letterSpacing: 0.5,
fontWeight: FontWeight.bold,
fontFamily: fontFamily),
style: GoogleFonts.robotoCondensed(
textStyle: TextStyle(
fontSize: 17,
letterSpacing: 0.5,
fontWeight: FontWeight.bold,
)),
textAlign: TextAlign.start,
),
),
Expand All @@ -809,13 +813,12 @@ class _ProductDetailScreenState extends State<ProductDetailScreen>
? Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.all(10),
child: Text(
'Size ',
style: TextStyle(
fontSize: 14,
fontFamily: fontFamily,
),
),
child: Text('Size ',
style: GoogleFonts.robotoCondensed(
textStyle: TextStyle(
fontSize: 14,
),
)),
)
: Container(),
widget.product.hasVariants &&
Expand All @@ -831,7 +834,8 @@ class _ProductDetailScreenState extends State<ProductDetailScreen>
padding: EdgeInsets.all(10),
child: Text(
'Quantity ',
style: TextStyle(fontSize: 14, fontFamily: fontFamily),
style: GoogleFonts.robotoCondensed(
textStyle: TextStyle(fontSize: 14)),
),
)
: Container(),
Expand Down Expand Up @@ -1131,13 +1135,12 @@ class _ProductDetailScreenState extends State<ProductDetailScreen>
Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.all(10),
child: Text(
key,
style: TextStyle(
fontSize: 17,
fontFamily: fontFamily,
),
),
child: Text(key,
style: GoogleFonts.robotoCondensed(
textStyle: TextStyle(
fontSize: 17,
),
)),
),
Container(
alignment: Alignment.centerLeft,
Expand All @@ -1152,12 +1155,13 @@ class _ProductDetailScreenState extends State<ProductDetailScreen>
decoration: TextDecoration.lineThrough)),
TextSpan(text: ' '),
TextSpan(
text: value,
style: TextStyle(
fontSize: 18,
color: Colors.red,
fontFamily: fontFamily,
fontWeight: FontWeight.bold)),
text: value,
style: GoogleFonts.robotoCondensed(
textStyle: TextStyle(
fontSize: 18,
color: Colors.red,
fontWeight: FontWeight.bold)),
)
]),
)
: discount
Expand All @@ -1170,21 +1174,21 @@ class _ProductDetailScreenState extends State<ProductDetailScreen>
)),
TextSpan(
text: value,
style: TextStyle(
fontSize: 18,
color: Colors.red,
fontFamily: fontFamily,
fontWeight: FontWeight.bold)),
style: GoogleFonts.robotoCondensed(
textStyle: TextStyle(
fontSize: 18,
color: Colors.red,
fontWeight: FontWeight.bold))),
]),
)
: Text(
value,
style: TextStyle(
style: GoogleFonts.robotoCondensed(
textStyle: TextStyle(
fontSize: 18,
color: Colors.red,
fontWeight: FontWeight.bold,
fontFamily: fontFamily,
),
)),
),
),
],
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ final int ONE = 1;
final int ZERO = 0;
final int TWENTY = 20;

final String privacyPolicy = 'By placing this order, you agree to Ofypets.com’\s Privacy Policy and Terms of Use.';
final String privacyPolicy =
'By placing this order, you agree to Ofypets.com’\s Privacy Policy and Terms of Use.';

final returnPolicyHeading1 = 'Return Policy';
final String retunPolicyText1 =
Expand Down Expand Up @@ -41,4 +42,3 @@ final String returnPolicyText8 =
final String returnPolicyHeading9 = 'Shipping';
final String returnPolicyText9 =
'To return your product, you should mail your product to: 59 MN Nagar, Kolathur, Chennai, Tamil Nadu, INDIA 600099\n\nYou will be responsible for paying for your own shipping costs for returning your item. Shipping costs are non-refundable. If you receive a refund, the cost of return shipping will be deducted from your refund.\n\nDepending on where you live, the time it may take for your exchanged product to reach you, may vary. \n\nIf you are shipping an item over 1000 Rs, you should consider using a trackable shipping service or purchasing shipping insurance. We don’t guarantee that we will receive your returned item.';
final fontFamily = 'RobotoCondensed';
19 changes: 17 additions & 2 deletions lib/utils/drawer_homescreen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:http/http.dart' as http;
import 'package:ofypets_mobile_app/scoped-models/main.dart';
import 'package:ofypets_mobile_app/screens/account.dart';
Expand All @@ -9,6 +10,7 @@ import 'package:ofypets_mobile_app/screens/favorites.dart';
import 'package:ofypets_mobile_app/screens/order_history.dart';
import 'package:ofypets_mobile_app/screens/retun_policy.dart';
import 'package:ofypets_mobile_app/utils/constants.dart';
import 'package:package_info/package_info.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:url_launcher/url_launcher.dart';
Expand All @@ -24,10 +26,14 @@ class HomeDrawer extends StatefulWidget {

class _HomeDrawer extends State<HomeDrawer> {
int favCount = 0;
PackageInfo packageInfo ;

@override
void initState() {
super.initState();
getFavoritesCount();
getAppVersion();

}

getFavoritesCount() async {
Expand All @@ -41,7 +47,7 @@ class _HomeDrawer extends State<HomeDrawer> {
headers: headers)
.then((response) {
responseBody = json.decode(response.body);
responseBody['data'].forEach((favoriteObj) {
responseBody['data']?.forEach((favoriteObj) {
setState(() {
favCount++;
});
Expand Down Expand Up @@ -317,7 +323,7 @@ class _HomeDrawer extends State<HomeDrawer> {
fontFamily: 'HolyFat', fontSize: 65, color: Colors.white),
),
Text(
'1.0.0',
packageInfo == null ? '' : packageInfo.version,
style:
TextStyle(color: Colors.white, fontWeight: FontWeight.w300),
),
Expand Down Expand Up @@ -394,6 +400,15 @@ class _HomeDrawer extends State<HomeDrawer> {
),
);
}

Future<void> getAppVersion() async {
packageInfo = await PackageInfo.fromPlatform();

setState(() {

});

}
}

_sendMail(String email) async {
Expand Down
Loading