diff --git a/lib/app/features/dapps/views/pages/dapps.dart b/lib/app/features/dapps/views/pages/dapps.dart index bc2bd965b..aa783823c 100644 --- a/lib/app/features/dapps/views/pages/dapps.dart +++ b/lib/app/features/dapps/views/pages/dapps.dart @@ -5,6 +5,7 @@ import 'package:ice/app/extensions/theme_data.dart'; import 'package:ice/app/features/dapps/views/pages/mocks/mocked_apps.dart'; import 'package:ice/app/features/dapps/views/pages/widgets/apps.dart'; import 'package:ice/app/features/dapps/views/pages/widgets/categories.dart'; +import 'package:ice/app/features/dapps/views/pages/widgets/favourites.dart'; import 'package:ice/app/features/dapps/views/pages/widgets/featured.dart'; import 'package:ice/app/shared/widgets/wallet_header/wallet_header.dart'; @@ -24,6 +25,7 @@ class DAppsPage extends HookConsumerWidget { const Categories(), Apps(title: 'Highest ranked', items: featured, onPress: () {}), Apps(title: 'Recently added', items: featured, onPress: () {}), + const Favourites(), ], ), ), diff --git a/lib/app/features/dapps/views/pages/widgets/favourites.dart b/lib/app/features/dapps/views/pages/widgets/favourites.dart new file mode 100644 index 000000000..8e95209e8 --- /dev/null +++ b/lib/app/features/dapps/views/pages/widgets/favourites.dart @@ -0,0 +1,73 @@ +import 'package:flutter/material.dart'; +import 'package:ice/app/extensions/build_context.dart'; +import 'package:ice/app/extensions/theme_data.dart'; +import 'package:ice/app/shared/widgets/favourite_icon/favorite_icon.dart'; +import 'package:ice/app/values/constants.dart'; +import 'package:ice/generated/assets.gen.dart'; + +const double containerHeight = 60.0; + +class Favourites extends StatelessWidget { + const Favourites({super.key}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric( + horizontal: kDefaultSidePadding, + vertical: 24, + ), + child: GestureDetector( + onTap: () {}, + child: Container( + height: containerHeight, + width: double.infinity, + padding: const EdgeInsets.symmetric(horizontal: kDefaultSidePadding), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16), + color: context.theme.appColors.tertararyBackground, + border: Border.all( + color: context.theme.appColors.onTerararyFill, + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + const FavouriteIcon(), + const SizedBox(width: 8), + SizedBox( + height: 36, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Favourites', + style: context.theme.appTextThemes.body.copyWith( + color: context.theme.appColors.primaryText, + ), + ), + Text( + '17 added dApps', + style: context.theme.appTextThemes.caption3.copyWith( + color: context.theme.appColors.secondaryText, + ), + ), + ], + ), + ), + ], + ), + Image.asset( + Assets.images.forwardArrow.path, + width: 12, + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/app/shared/widgets/favorite_icon/favorite_icon.dart b/lib/app/shared/widgets/favourite_icon/favorite_icon.dart similarity index 86% rename from lib/app/shared/widgets/favorite_icon/favorite_icon.dart rename to lib/app/shared/widgets/favourite_icon/favorite_icon.dart index b70f8ebbf..2d9efad7c 100644 --- a/lib/app/shared/widgets/favorite_icon/favorite_icon.dart +++ b/lib/app/shared/widgets/favourite_icon/favorite_icon.dart @@ -5,19 +5,19 @@ import 'package:ice/generated/assets.gen.dart'; const double iconSideDimension = 36.0; -class FavoriteIcon extends StatelessWidget { - const FavoriteIcon({ +class FavouriteIcon extends StatelessWidget { + const FavouriteIcon({ super.key, - this.isFavorite = false, + this.isFavourite = false, this.backgroundColor, }); - final bool isFavorite; + final bool isFavourite; final Color? backgroundColor; @override Widget build(BuildContext context) { - final String iconPath = isFavorite + final String iconPath = isFavourite ? Assets.images.bookmarksOn.path : Assets.images.bookmarks.path;