Skip to content

Commit

Permalink
style: impl anilist carousel on profile page
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanYuuki committed Nov 29, 2024
1 parent 6ae0803 commit 52dc730
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 92 deletions.
35 changes: 26 additions & 9 deletions lib/pages/Android/user/profile.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'dart:ui';
import 'package:aurora/auth/auth_provider.dart';
import 'package:aurora/components/android/anilistExclusive/animeListCarousels.dart';
import 'package:aurora/components/desktop/animeListCarousels.dart';
import 'package:aurora/components/platform_builder.dart';
import 'package:flutter/material.dart';
import 'package:iconly/iconly.dart';
import 'package:provider/provider.dart';
Expand Down Expand Up @@ -260,16 +262,31 @@ class _ProfilePageState extends State<ProfilePage> {
),
),
const SizedBox(height: 20),
anilistCarousel(
title: 'Currently Watching',
carouselData: animeList,
tag: 'currently-watching',
PlatformBuilder(
androidBuilder: anilistCarousel(
title: 'Currently Watching',
carouselData: animeList,
tag: 'currently-watching',
),
desktopBuilder: DesktopAnilistCarousel(
title: 'Currently Watching',
carouselData: animeList,
tag: 'currently-watching',
),
),
anilistCarousel(
title: 'Currently Reading',
carouselData: mangaList,
tag: 'currently-reading',
isManga: true,
PlatformBuilder(
androidBuilder: anilistCarousel(
title: 'Currently Reading',
carouselData: mangaList,
tag: 'currently-reading',
isManga: true,
),
desktopBuilder: DesktopAnilistCarousel(
title: 'Currently Reading',
carouselData: mangaList,
tag: 'currently-reading',
isManga: true,
),
),
],
),
Expand Down
162 changes: 79 additions & 83 deletions lib/pages/Android/user/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,91 +35,87 @@ class SettingsPage extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Theme.of(context).colorScheme.surface,
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 60),
IconButton(
onPressed: () {
Navigator.pop(context);
},
icon: const Icon(
IconlyBroken.arrow_left_2,
size: 30,
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 60),
IconButton(
onPressed: () {
Navigator.pop(context);
},
icon: const Icon(
IconlyBroken.arrow_left_2,
size: 30,
),
),
),
const SizedBox(height: 30),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 20),
child: Text(
'Settings',
style: TextStyle(fontSize: 34, fontWeight: FontWeight.bold),
const SizedBox(height: 30),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 20),
child: Text(
'Settings',
style: TextStyle(fontSize: 34, fontWeight: FontWeight.bold),
),
),
),
const SizedBox(height: 30),
CustomTile(
icon: HugeIcons.strokeRoundedPaintBrush02,
title: 'UI',
description: 'Play Around with UI Tweaks',
onTap: () {
Navigator.push(context, _createSlideRoute(const LayoutPage()));
},
),
CustomTile(
icon: Icons.source,
title: 'Downloads',
description: 'Tweak Download Settings',
onTap: () {
Navigator.push(
context, _createSlideRoute(const SettingsDownload()));
},
),
CustomTile(
icon: Iconsax.play5,
title: 'Player',
description: 'Change Video Player Settings',
onTap: () {
Navigator.push(
context, _createSlideRoute(const VideoPlayerSettings()));
},
),
CustomTile(
icon: Iconsax.paintbucket5,
title: 'Theme',
description: 'Change the app theme',
onTap: () {
Navigator.push(context, _createSlideRoute(const ThemePage()));
},
),
CustomTile(
icon: Icons.language,
title: 'Language (Soon)',
description: 'Change the app language',
onTap: () {},
),
CustomTile(
icon: Iconsax.trash,
title: 'Clear Cache',
description: 'This will remove everything (Fav List)',
onTap: () async {
await Hive.box('app-data').clear();
},
),
CustomTile(
icon: Iconsax.info_circle5,
title: 'About',
description: 'About this app',
onTap: () {
Navigator.push(context, _createSlideRoute(const AboutPage()));
},
),
CustomTile(
icon: Iconsax.info_circle5,
title: 'Fetch Data',
description: 'Test FUNC',
onTap: () async {},
),
],
const SizedBox(height: 30),
CustomTile(
icon: HugeIcons.strokeRoundedPaintBrush02,
title: 'UI',
description: 'Play Around with UI Tweaks',
onTap: () {
Navigator.push(context, _createSlideRoute(const LayoutPage()));
},
),
CustomTile(
icon: Icons.source,
title: 'Downloads',
description: 'Tweak Download Settings',
onTap: () {
Navigator.push(
context, _createSlideRoute(const SettingsDownload()));
},
),
CustomTile(
icon: Iconsax.play5,
title: 'Player',
description: 'Change Video Player Settings',
onTap: () {
Navigator.push(
context, _createSlideRoute(const VideoPlayerSettings()));
},
),
CustomTile(
icon: Iconsax.paintbucket5,
title: 'Theme',
description: 'Change the app theme',
onTap: () {
Navigator.push(context, _createSlideRoute(const ThemePage()));
},
),
CustomTile(
icon: Icons.language,
title: 'Language (Soon)',
description: 'Change the app language',
onTap: () {},
),
CustomTile(
icon: Iconsax.trash,
title: 'Clear Cache',
description: 'This will remove everything (Fav List)',
onTap: () async {
await Hive.box('app-data').clear();
},
),
CustomTile(
icon: Iconsax.info_circle5,
title: 'About',
description: 'About this app',
onTap: () {
Navigator.push(context, _createSlideRoute(const AboutPage()));
},
),
],
),
),
);
}
Expand Down

0 comments on commit 52dc730

Please sign in to comment.