diff --git a/lib/models/ListingCard.dart b/lib/models/ListingCard.dart index 624a62a..39c3c99 100644 --- a/lib/models/ListingCard.dart +++ b/lib/models/ListingCard.dart @@ -110,8 +110,7 @@ class _ListingCardState extends State { children: [ CircleAvatar( radius: 11, - backgroundImage: - NetworkImage(widget.snap['profImageUrl'].toString()), + backgroundImage: NetworkImage(widget.snap['imageUrl'].toString()), ), const SizedBox( width: 10, diff --git a/lib/models/enlarged_listing.dart b/lib/models/enlarged_listing.dart index ecac357..08c1127 100644 --- a/lib/models/enlarged_listing.dart +++ b/lib/models/enlarged_listing.dart @@ -230,7 +230,7 @@ class _PostedByState extends State { padding: EdgeInsets.all(10), child: Row(children: [ ProfileWidget( - imageUrl: widget.snap["profImageUrl"], + imageUrl: widget.snap["imageUrl"], onClicked: () => {}, ), SizedBox( diff --git a/lib/pages/edit_profile.dart b/lib/pages/edit_profile.dart index b2733fe..2df7efd 100644 --- a/lib/pages/edit_profile.dart +++ b/lib/pages/edit_profile.dart @@ -116,13 +116,8 @@ class _EditProfilePageState extends State { backgroundImage: MemoryImage(_image!), ) : CircleAvatar( - backgroundColor: Colors.white, - radius: 70, - child: ClipRRect( - borderRadius: BorderRadius.zero, - child: Image.asset('images/def_dp.png', - width: 250, height: 200), - ), + radius: 60, + backgroundImage: NetworkImage(userData.imageUrl!), ), Positioned( bottom: -10, diff --git a/lib/pages/favourites.dart b/lib/pages/favourites.dart index 1e980d3..644f947 100644 --- a/lib/pages/favourites.dart +++ b/lib/pages/favourites.dart @@ -1,6 +1,7 @@ import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; +import 'package:justsharelah_v1/utils/appbar.dart'; import 'package:justsharelah_v1/utils/const_templates.dart'; import 'package:justsharelah_v1/models/ListingCard.dart'; import 'package:justsharelah_v1/models/enlarged_listing.dart'; @@ -25,14 +26,8 @@ class _FavouritesState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - leading: IconButton( - icon: const Icon(Icons.arrow_back_rounded), - onPressed: () { - Navigator.pop(context); - }, - ), - ), + appBar: + MyAppBar().buildAppBar(const Text("Favourites"), context, '/feed'), body: ListView(padding: const EdgeInsets.all(defaultPadding), children: [ Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -119,30 +114,6 @@ class _FavouritesState extends State { ), )), ); - - // // print("going to cast listing data"); - - // // return Row( - // // crossAxisAlignment: CrossAxisAlignment.start, - // // children: List.generate( - // // listingData.length, - // // (index) => Padding( - // // padding: const EdgeInsets.only(right: defaultPadding), - // // child: ListingCard( - // // image: listingData[index].imageUrl, - // // title: listingData[index].title, - // // price: listingData[index].price, - // // press: () { - // // Navigator.push( - // // context, - // // MaterialPageRoute( - // // builder: (context) => EnlargedScreen( - // // listing: listingData[index]), - // // )); - // // }, - // ), - // ), - // )); }, ) ]));