added common app bar in edit_profile_view.dart and shifted every common packages to common_packages folder
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../core/route_constants.dart';
|
||||
|
||||
class CommonAppBar extends StatelessWidget {
|
||||
const CommonAppBar({super.key, required this.isWhiteLogo});
|
||||
const CommonAppBar({super.key, required this.isWhiteLogo, required this.isProfilePage});
|
||||
|
||||
final bool isWhiteLogo;
|
||||
final bool isProfilePage;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -11,9 +14,8 @@ class CommonAppBar extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Image.asset(
|
||||
|
||||
isWhiteLogo ? "assets/logo/logo_city_cards_white.png" :"assets/logo/logo_city_cards.png",
|
||||
height: 50),
|
||||
scale: 4,),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
@@ -28,11 +30,16 @@ class CommonAppBar extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const CircleAvatar(
|
||||
backgroundColor: Color(0xffFFDFDF),
|
||||
backgroundImage:
|
||||
AssetImage("assets/images/profile_img.png"),
|
||||
),
|
||||
if(!isProfilePage)
|
||||
GestureDetector(
|
||||
onTap: (){
|
||||
Navigator.pushNamed(context, RouteConstants.profile);
|
||||
},
|
||||
child: CircleAvatar(
|
||||
backgroundColor: Color(0xffFFDFDF),
|
||||
backgroundImage:
|
||||
AssetImage("assets/images/profile_img.png")),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:citycards_customer/common_package/custom_text.dart';
|
||||
import 'package:citycards_customer/common_packages/custom_text.dart';
|
||||
|
||||
class CustomTextField extends StatelessWidget {
|
||||
final String label;
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:citycards_customer/common_package/custom_text.dart';
|
||||
import 'package:citycards_customer/common_package/custom_textfield.dart';
|
||||
import 'package:citycards_customer/common_packages/custom_text.dart';
|
||||
import 'package:citycards_customer/common_packages/custom_textfield.dart';
|
||||
|
||||
class ContactUsPage extends StatelessWidget {
|
||||
const ContactUsPage({super.key});
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:citycards_customer/common_package/custom_textfield.dart';
|
||||
import 'package:citycards_customer/common_packages/app_bar.dart';
|
||||
import 'package:citycards_customer/common_packages/custom_textfield.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:citycards_customer/common_package/custom_text.dart';
|
||||
import 'package:citycards_customer/common_packages/custom_text.dart';
|
||||
|
||||
class EditProfilePage extends StatelessWidget {
|
||||
const EditProfilePage({super.key});
|
||||
@@ -22,21 +23,7 @@ class EditProfilePage extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
// Header
|
||||
Container(
|
||||
padding: const EdgeInsets.only(bottom: 10),
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(color: Color(0xFFD9D9D9), width: 0.7),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Image.asset("assets/logo/logo_city_cards.png", scale: 4),
|
||||
Image.asset("assets/icons/shopping_cart.png", scale: 4),
|
||||
],
|
||||
),
|
||||
),
|
||||
CommonAppBar(isWhiteLogo: false, isProfilePage: true),
|
||||
const SizedBox(height: 22),
|
||||
|
||||
// Back + title
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:citycards_customer/common_package/custom_expansiontile.dart';
|
||||
import 'package:citycards_customer/common_package/custom_text.dart';
|
||||
import 'package:citycards_customer/common_packages/custom_expansion_tile.dart';
|
||||
import 'package:citycards_customer/common_packages/custom_text.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class FaqPage extends StatelessWidget {
|
||||
|
||||
@@ -115,7 +115,7 @@ class _HomePageState extends State<HomePage> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CommonAppBar(isWhiteLogo: false),
|
||||
CommonAppBar(isWhiteLogo: false , isProfilePage: false),
|
||||
const SizedBox(height: 140),
|
||||
const Text(
|
||||
"CityCards.\nSee More,\nSpend Less.",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import 'package:citycards_customer/common_package/custom_text.dart';
|
||||
import 'package:citycards_customer/common_packages/custom_text.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PrivacyPolicyPage extends StatelessWidget {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:citycards_customer/common_package/custom_text.dart';
|
||||
import 'package:citycards_customer/common_packages/app_bar.dart';
|
||||
import 'package:citycards_customer/common_packages/custom_text.dart';
|
||||
import 'package:citycards_customer/core/route_constants.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -15,24 +16,8 @@ class ProfilePage extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.only(bottom: 10),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(color: Color(0xFFD9D9D9), width: .7),
|
||||
),
|
||||
),
|
||||
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Image.asset("assets/logo/logo_city_cards.png", scale: 4),
|
||||
Image.asset("assets/icons/shopping_cart.png", scale: 4),
|
||||
],
|
||||
),
|
||||
),
|
||||
CommonAppBar(isWhiteLogo: false, isProfilePage: true),
|
||||
SizedBox(height: 22),
|
||||
|
||||
Row(
|
||||
children: [
|
||||
GestureDetector(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import 'package:citycards_customer/common_package/custom_text.dart';
|
||||
import 'package:citycards_customer/common_packages/custom_text.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TermsAndCondition extends StatelessWidget {
|
||||
|
||||
Reference in New Issue
Block a user