Skip to content

Commit

Permalink
fix firestore error
Browse files Browse the repository at this point in the history
  • Loading branch information
LiquidatorCoder committed May 24, 2021
1 parent ef04110 commit 13e5168
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 25 deletions.
57 changes: 37 additions & 20 deletions lib/ui/pages/profile/profileWallViewScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,14 @@ class _ProfileWallViewScreenState extends State<ProfileWallViewScreen>
thumb = widget.arguments![1].toString();
isLoading = true;
updateViews(Provider.of<ProfileWallProvider>(context, listen: false)
.profileWalls![index]["id"]
.profileWalls![index]
.data()["id"]
.toString()
.toUpperCase());
_futureView = getViews(
Provider.of<ProfileWallProvider>(context, listen: false)
.profileWalls![index]["id"]
.profileWalls![index]
.data()["id"]
.toString()
.toUpperCase());
_updatePaletteGenerator();
Expand Down Expand Up @@ -275,7 +277,8 @@ class _ProfileWallViewScreenState extends State<ProfileWallViewScreen>
Provider.of<ProfileWallProvider>(
context,
listen: false)
.profileWalls![index]["id"]
.profileWalls![index]
.data()["id"]
.toString()
.toUpperCase(),
style: Theme.of(context)
Expand Down Expand Up @@ -375,7 +378,8 @@ class _ProfileWallViewScreenState extends State<ProfileWallViewScreen>
Provider.of<ProfileWallProvider>(
context,
listen: false)
.profileWalls![index]["by"]
.profileWalls![index]
.data()["by"]
.toString(),
style: Theme.of(context)
.textTheme
Expand All @@ -401,7 +405,8 @@ class _ProfileWallViewScreenState extends State<ProfileWallViewScreen>
Provider.of<ProfileWallProvider>(
context,
listen: false)
.profileWalls![index]["desc"]
.profileWalls![index]
.data()["desc"]
.toString(),
style: Theme.of(context)
.textTheme
Expand All @@ -427,7 +432,8 @@ class _ProfileWallViewScreenState extends State<ProfileWallViewScreen>
Provider.of<ProfileWallProvider>(
context,
listen: false)
.profileWalls![index]["size"]
.profileWalls![index]
.data()["size"]
.toString(),
style: Theme.of(context)
.textTheme
Expand All @@ -451,7 +457,7 @@ class _ProfileWallViewScreenState extends State<ProfileWallViewScreen>
context,
listen: false)
.profileWalls![index]
["resolution"]
.data()["resolution"]
.toString(),
style: Theme.of(context)
.textTheme
Expand All @@ -478,7 +484,7 @@ class _ProfileWallViewScreenState extends State<ProfileWallViewScreen>
context,
listen: false)
.profileWalls![index]
["wallpaper_provider"]
.data()["wallpaper_provider"]
.toString(),
style: Theme.of(context)
.textTheme
Expand Down Expand Up @@ -514,7 +520,8 @@ class _ProfileWallViewScreenState extends State<ProfileWallViewScreen>
? _imageFile.path
: Provider.of<ProfileWallProvider>(context,
listen: false)
.profileWalls![index]["wallpaper_url"]
.profileWalls![index]
.data()["wallpaper_url"]
.toString(),
),
SetWallpaperButton(
Expand All @@ -523,48 +530,56 @@ class _ProfileWallViewScreenState extends State<ProfileWallViewScreen>
? _imageFile.path
: Provider.of<ProfileWallProvider>(context,
listen: false)
.profileWalls![index]["wallpaper_url"]
.profileWalls![index]
.data()["wallpaper_url"]
.toString(),
),
FavouriteWallpaperButton(
id: Provider.of<ProfileWallProvider>(context,
listen: false)
.profileWalls![index]["id"]
.profileWalls![index]
.data()["id"]
.toString(),
provider: Provider.of<ProfileWallProvider>(
context,
listen: false)
.profileWalls![index]["wallpaper_provider"]
.profileWalls![index]
.data()["wallpaper_provider"]
.toString(),
prism: Provider.of<ProfileWallProvider>(context,
listen: false)
.profileWalls![index] as Map,
.profileWalls![index]
.data(),
trash: false,
),
ShareButton(
id: Provider.of<ProfileWallProvider>(context,
listen: false)
.profileWalls![index]["id"]
.profileWalls![index]
.data()["id"]
.toString(),
provider: Provider.of<ProfileWallProvider>(
context,
listen: false)
.profileWalls![index]
["wallpaper_provider"]
.data()["wallpaper_provider"]
.toString(),
url: Provider.of<ProfileWallProvider>(context,
listen: false)
.profileWalls![index]["wallpaper_url"]
.profileWalls![index]
.data()["wallpaper_url"]
.toString(),
thumbUrl: Provider.of<ProfileWallProvider>(
context,
listen: false)
.profileWalls![index]["wallpaper_thumb"]
.profileWalls![index]
.data()["wallpaper_thumb"]
.toString()),
EditButton(
url: Provider.of<ProfileWallProvider>(context,
listen: false)
.profileWalls![index]["wallpaper_url"]
.profileWalls![index]
.data()["wallpaper_url"]
.toString(),
),
],
Expand Down Expand Up @@ -605,7 +620,8 @@ class _ProfileWallViewScreenState extends State<ProfileWallViewScreen>
child: CachedNetworkImage(
imageUrl: Provider.of<ProfileWallProvider>(context,
listen: false)
.profileWalls![index]["wallpaper_url"]
.profileWalls![index]
.data()["wallpaper_url"]
.toString(),
imageBuilder: (context, imageProvider) => Screenshot(
controller: screenshotController,
Expand Down Expand Up @@ -682,7 +698,8 @@ class _ProfileWallViewScreenState extends State<ProfileWallViewScreen>
onPressed: () {
final link = Provider.of<ProfileWallProvider>(context,
listen: false)
.profileWalls![index]["wallpaper_url"];
.profileWalls![index]
.data()["wallpaper_url"];
Navigator.push(
context,
PageRouteBuilder(
Expand Down
10 changes: 5 additions & 5 deletions lib/ui/widgets/profile/uploadedWallsGrid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class _ProfileGridState extends State<ProfileGrid>
Provider.of<ProfileWallProvider>(
context)
.profileWalls![index]
["wallpaper_thumb"]
.data()["wallpaper_thumb"]
.toString(),
),
fit: BoxFit.cover)),
Expand Down Expand Up @@ -302,10 +302,10 @@ class _ProfileGridState extends State<ProfileGrid>
arguments: [
index,
Provider.of<ProfileWallProvider>(
context,
listen: false)
.profileWalls![index]
["wallpaper_thumb"],
context,
listen: false)
.profileWalls![index]
.data()["wallpaper_thumb"],
]);
}
},
Expand Down

0 comments on commit 13e5168

Please sign in to comment.