Skip to content

Commit

Permalink
- fixed minor layout and text overflowing
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanYuuki committed Oct 1, 2024
1 parent c08c4c0 commit 31d602e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions lib/components/character_cards.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ class CharacterCards extends StatelessWidget {

@override
Widget build(BuildContext context) {
ColorScheme customScheme = Theme.of(context).colorScheme;
if (carouselData == null || carouselData!.isEmpty) {
return Container();
}
Expand All @@ -19,13 +18,12 @@ class CharacterCards extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 10),
Text(
const Text(
'Characters',
style: TextStyle(
fontSize: 22,
fontFamily: 'Poppins',
fontWeight: FontWeight.bold,
color: customScheme.primary,
),
),
const SizedBox(height: 15),
Expand Down Expand Up @@ -72,18 +70,19 @@ class CharacterCards extends StatelessWidget {
children: [
Text(
title.toString(),
style: const TextStyle(fontSize: 14),
style: const TextStyle(fontSize: 12),
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
const SizedBox(height: 3),
Align(
alignment: Alignment.bottomRight,
child: Text('- $role',
style: const TextStyle(
child: Text(role,
style: TextStyle(
fontSize: 12,
fontStyle: FontStyle.italic),
fontStyle: FontStyle.italic,
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.7)),
textAlign: TextAlign.right),
),
],
Expand All @@ -101,21 +100,20 @@ class CharacterCards extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 10),
Text(
const Text(
'Voice Actors',
style: TextStyle(
fontSize: 22,
fontFamily: 'Poppins',
fontWeight: FontWeight.bold,
color: customScheme.primary,
),
),
const SizedBox(height: 15),
SizedBox(
height: 220,
child: InfiniteCarousel.builder(
itemCount: carouselData!.length,
itemExtent: MediaQuery.of(context).size.width / 3,
itemExtent: MediaQuery.of(context).size.width / 3.3,
center: false,
anchor: 0.0,
loop: false,
Expand Down Expand Up @@ -150,7 +148,9 @@ class CharacterCards extends StatelessWidget {
child: Text(title.toString(),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.bodyLarge,
style: const TextStyle(
fontSize: 12,
),
textAlign: TextAlign.center),
)
],
Expand Down
4 changes: 2 additions & 2 deletions lib/components/homepage/manga_homepage_carousel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class MangaHomepageCarousel extends StatelessWidget {
log(itemData.toString());
final String posterUrl = itemData['poster'] ?? '??';
final tagg = itemData.toString() + tag!;
String extraData = itemData['currentChapter'] ?? '??';
String? extraData = itemData['currentChapter']!.toString().length > 20 ? itemData['currentChapter']?.toString().substring(0,20) : itemData['currentChapter']?.toString() ?? '??';

return Padding(
padding: const EdgeInsets.only(right: 8.0),
Expand Down Expand Up @@ -205,7 +205,7 @@ class MangaHomepageCarousel extends StatelessWidget {
const Color(0xffe2e2e2)
? Colors.black
: Colors.white,
name: extraData,
name: extraData!,
isVertical: false,
borderRadius: BorderRadius.circular(5),
backgroundColor: Theme.of(context)
Expand Down

0 comments on commit 31d602e

Please sign in to comment.