Added proper linting and linted the code

This commit is contained in:
2025-10-14 13:40:30 +01:00
parent 1f948ac456
commit bd849f009a
34 changed files with 124 additions and 116 deletions

6
.editorconfig Normal file
View File

@@ -0,0 +1,6 @@
root = true
[*.dart]
indent_style = space
indent_size = 2
max_line_length = 140

View File

@@ -21,6 +21,13 @@ linter:
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
prefer_const_constructors: true
prefer_const_constructors_in_immutables: true
prefer_const_literals_to_create_immutables: true
prefer_final_fields: true
avoid_unnecessary_containers: true
sized_box_for_whitespace: true
use_key_in_widget_constructors: true
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

View File

@@ -46,7 +46,7 @@ class LoginCubit extends Cubit<LoginState> with EffectMixin<LoginState> {
this._colorImageService,
this._themeService,
) : super(
LoginState(
const LoginState(
availableUsers: [],
selectedLoginCard: LoginCardType.anilist,
),

View File

@@ -74,12 +74,8 @@ class TabsCubit extends Cubit<TabsState>
changeRouteTabEffect(path: "/anime", context);
case SelectedMenuOption.manga:
changeRouteTabEffect(path: "/manga", context);
case SelectedMenuOption.calendar:
case SelectedMenuOption.search:
case SelectedMenuOption.library:
case SelectedMenuOption.extensions:
case SelectedMenuOption.settings:
case SelectedMenuOption.exit:
}
emit(state.copyWith(selectedMenuOption: option));
}

View File

@@ -2,10 +2,6 @@ enum SelectedMenuOption {
home,
anime,
manga,
search,
settings,
extensions,
library,
calendar,
exit
settings,
}

View File

@@ -21,7 +21,7 @@ class GraphQLService {
Map<String, String>? headers,
required T Function(Map<String, dynamic>) fromJson,
}) async {
_logger.i("Executing GraphQL QUERY operation");
_logger.d("Executing GraphQL QUERY operation");
return _sendRequest(
query: query,
variables: variables,
@@ -36,7 +36,7 @@ class GraphQLService {
Map<String, String>? headers,
required T Function(Map<String, dynamic>) fromJson,
}) async {
_logger.i("Executing GraphQL MUTATION operation");
_logger.d("Executing GraphQL MUTATION operation");
return _sendRequest(
query: query,
variables: variables,

View File

@@ -30,7 +30,7 @@ class HttpService {
Map<String, String>? headers,
required T Function(Map<String, dynamic>) fromJson,
}) async {
_logger.i("GET request to $endpoint attempting to return instance of $T");
_logger.d("GET request to $endpoint attempting to return instance of $T");
ApiResponse<T>? cachedApiResponse = _getCachedResponse<T>(
'GET',
endpoint,
@@ -38,7 +38,7 @@ class HttpService {
fromJson: fromJson,
);
if (cachedApiResponse != null) {
_logger.i("Returning cached response instance of $T for $endpoint ");
_logger.d("Returning cached response instance of $T for $endpoint ");
return cachedApiResponse;
}
ApiResponse<T> apiResponse = await _request(
@@ -63,7 +63,7 @@ class HttpService {
Object? body,
required T Function(Map<String, dynamic>) fromJson,
}) async {
_logger.i("POST request to $endpoint attempting to return instance of $T");
_logger.d("POST request to $endpoint attempting to return instance of $T");
final encodedBody = json.encode(body);
ApiResponse<T>? cachedApiResponse = _getCachedResponse<T>(
'POST',
@@ -73,7 +73,7 @@ class HttpService {
fromJson: fromJson,
);
if (cachedApiResponse != null) {
_logger.i("Returning cached response instance of $T for $endpoint ");
_logger.d("Returning cached response instance of $T for $endpoint ");
return cachedApiResponse;
}
ApiResponse<T> apiResponse = await _request(

View File

@@ -87,7 +87,7 @@ class AppEffectHandler {
contentType: effect.contentType,
inMaterialBanner: true,
),
actions: [SizedBox.shrink()],
actions: const [SizedBox.shrink()],
);
ScaffoldMessenger.of(context)

View File

@@ -51,7 +51,7 @@ final _defaultTheme = ThemeData(
// onSecondary: Colors.white,
// onTertiary: Colors.white,
// ),
textTheme: TextTheme(
textTheme: const TextTheme(
// Display styles (largest) - white
displayLarge: TextStyle(
color: Colors.white,

View File

@@ -98,11 +98,11 @@ class AnimeRepositoryAnilist with RepositoryMixin implements AnimeRepository {
.map((schedule) => AnilistAnimeModel.fromScheduleEntry(schedule))
.toList();
Map<int, Anime> uniqueRecentlyReleasedAnimes = {};
recentlyReleasedAnimes.forEach((anime) {
for (var anime in recentlyReleasedAnimes) {
if (!uniqueRecentlyReleasedAnimes.containsKey(anime.id)) {
uniqueRecentlyReleasedAnimes[anime.id] = anime;
}
});
}
return (true, uniqueRecentlyReleasedAnimes.values.toList());
}
@@ -224,10 +224,10 @@ class AnimeRepositoryAnilist with RepositoryMixin implements AnimeRepository {
Future<List<Anime>> _getCalendarReleasesPage(int page) async {
DateTime now = DateTime.now();
// Calculate yesterday 00:00:00
DateTime start = DateTime(now.year, now.month, now.day, 0, 0, 0, 0).subtract(Duration(days: 1));
DateTime start = DateTime(now.year, now.month, now.day, 0, 0, 0, 0).subtract(const Duration(days: 1));
// Calculate today + 6 days
DateTime end = start.add(Duration(days: 6));
DateTime end = start.add(const Duration(days: 6));
end = DateTime(end.year, end.month, end.day, 23, 59, 59, 999);
// Unix timestamps

View File

@@ -28,9 +28,9 @@ void main() async {
//Run Flutter app with localization and screen utilities
runApp(
EasyLocalization(
supportedLocales: [Locale('en')],
supportedLocales: const [Locale('en')],
path: 'assets/translations',
fallbackLocale: Locale('en'),
fallbackLocale: const Locale('en'),
useOnlyLangCode: true,
child: ScreenUtilInit(
designSize: const Size(1280, 720),
@@ -54,7 +54,7 @@ class MyApp extends StatelessWidget {
builder: (BuildContext context, AsyncSnapshot<ThemeData> snapshot) {
// Handle loading and error states
if (snapshot.connectionState == ConnectionState.waiting) {
return MaterialApp(
return const MaterialApp(
home: Scaffold(body: Center(child: CircularProgressIndicator())),
debugShowCheckedModeBanner: false,
);
@@ -64,7 +64,7 @@ class MyApp extends StatelessWidget {
sl<Logger>().e("Theme stream error: ${snapshot.error}");
return MaterialApp(
theme: ThemeData.dark(),
home: Scaffold(body: Center(child: Text("Error loading theme"))),
home: const Scaffold(body: Center(child: Text("Error loading theme"))),
debugShowCheckedModeBanner: false,
);
}

View File

@@ -27,13 +27,13 @@ class AnimeDetailsScreen extends StatelessWidget {
Widget build(BuildContext context) {
return BlocProvider(
create: (context) => sl<AnimeDetailsCubit>(),
child: _AnimeDetailsListener(),
child: const _AnimeDetailsListener(),
);
}
}
class _AnimeDetailsListener extends StatelessWidget {
const _AnimeDetailsListener({super.key});
const _AnimeDetailsListener();
@override
Widget build(BuildContext context) {
@@ -48,14 +48,14 @@ class _AnimeDetailsListener extends StatelessWidget {
}
},
child: BlocBuilder<AnimeDetailsCubit, AnimeDetailsState>(
builder: (context, state) => _AnimeDetailsView(),
builder: (context, state) => const _AnimeDetailsView(),
),
);
}
}
class _AnimeDetailsView extends StatefulWidget {
const _AnimeDetailsView({super.key});
const _AnimeDetailsView();
@override
State<_AnimeDetailsView> createState() => _AnimeDetailsViewState();
@@ -83,7 +83,7 @@ class _AnimeDetailsViewState extends State<_AnimeDetailsView> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(height: 80.h),
Text(
const Text(
"Nothing to see here! Come back later :D",
style: TextStyle(
color: Colors.white,
@@ -148,7 +148,7 @@ class _AnimeDetailsViewState extends State<_AnimeDetailsView> {
context
.read<AnimeDetailsCubit>()
.navigateBackToAnimePage(),
icon: Icon(Icons.arrow_back, color: Colors.white),
icon: const Icon(Icons.arrow_back, color: Colors.white),
),
),
],
@@ -234,25 +234,27 @@ class _AnimeDetailsViewState extends State<_AnimeDetailsView> {
height: 27.h,
child: DarkUnyoButton(
text: "Update Status",
color: Colors.grey.withOpacity(0.3),
color: Colors.grey
.withOpacity(0.3),
onPressed: () {},
),
),
SizedBox(width: 10.w,),
SizedBox(width: 10.w),
SizedBox(
height: 27.h,
child: DarkUnyoButton(
text: "Wrong / No Title",
color: Colors.grey.withOpacity(0.3),
color: Colors.grey
.withOpacity(0.3),
onPressed: () {},
),
),
SizedBox(width: 10.w,),
SizedBox(width: 10.w),
UnyoDropdown(
selected:
state.selectedExtension,
onPressed: null,
width: 130.w,
width: 120.w,
height: 27.h,
children: [
...state.installedExtensions
@@ -264,10 +266,11 @@ class _AnimeDetailsViewState extends State<_AnimeDetailsView> {
.installedExtensions
.isEmpty)
SizedBox(
width: 100.w,
width: 80.w,
child: const Text(
"No extensions found",
overflow: TextOverflow.fade,
overflow:
TextOverflow.fade,
),
),
],
@@ -289,7 +292,7 @@ class _AnimeDetailsViewState extends State<_AnimeDetailsView> {
),
maxLines: 8,
overflow: TextOverflow.ellipsis,
style: TextStyle(
style: const TextStyle(
color: Colors.grey,
),
),
@@ -372,7 +375,7 @@ class _AnimeDetailsViewState extends State<_AnimeDetailsView> {
height: 1.sh - 60,
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.3),
borderRadius: BorderRadius.only(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(12),
topRight: Radius.circular(12),
),

View File

@@ -21,13 +21,13 @@ class AnimeScreen extends StatelessWidget {
Widget build(BuildContext context) {
return BlocProvider(
create: (context) => sl<AnimeCubit>(),
child: _AnimeListener(),
child: const _AnimeListener(),
);
}
}
class _AnimeListener extends StatelessWidget {
const _AnimeListener({super.key});
const _AnimeListener();
@override
Widget build(BuildContext context) {
@@ -42,7 +42,7 @@ class _AnimeListener extends StatelessWidget {
}
},
child: BlocBuilder<AnimeCubit, AnimeState>(
builder: (context, state) => state.isLoading ? LoadingView() : _AnimeView(),
builder: (context, state) => state.isLoading ? const LoadingView() : const _AnimeView(),
)
);
}
@@ -50,7 +50,7 @@ class _AnimeListener extends StatelessWidget {
class _AnimeView extends StatefulWidget {
const _AnimeView({super.key});
const _AnimeView();
@override
State<_AnimeView> createState() => _AnimeViewState();

View File

@@ -23,14 +23,14 @@ class CalendarScreen extends StatelessWidget {
Widget build(BuildContext context) {
return BlocProvider(
create: (context) => sl<CalendarCubit>(),
child: _CalendarListener()
child: const _CalendarListener()
);
}
}
class _CalendarListener extends StatelessWidget {
const _CalendarListener({super.key});
const _CalendarListener();
@override
Widget build(BuildContext context) {
@@ -46,14 +46,14 @@ class _CalendarListener extends StatelessWidget {
);
}
},
child: _CalendarView(),
child: const _CalendarView(),
);
}
}
class _CalendarView extends StatefulWidget {
const _CalendarView({super.key});
const _CalendarView();
@override
State<_CalendarView> createState() => _CalendarViewState();
@@ -100,14 +100,14 @@ class _CalendarViewState extends State<_CalendarView>
fontWeight: FontWeight.bold,
),
),
TextHeadlineMedium(
const TextHeadlineMedium(
text:
" Calendar",
style: TextStyle(fontWeight: FontWeight.bold),
),
],
),
Row(
const Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
TextBodyLarge(
@@ -171,7 +171,7 @@ class _CalendarViewState extends State<_CalendarView>
return GridView.builder(
scrollDirection: Axis.vertical,
gridDelegate:
SliverGridDelegateWithMaxCrossAxisExtent(
const SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: 165,
mainAxisExtent: 260,
crossAxisSpacing: 5,
@@ -191,7 +191,7 @@ class _CalendarViewState extends State<_CalendarView>
entry.value[index].averageScore,
coverImage:
entry.value[index].coverImage,
onPressed: () => context.read<CalendarCubit>().navigateToAnimeDetails(entry.value[index], MediaListModel(name: "Calendar", mediaType: MediaType.anime)),
onPressed: () => context.read<CalendarCubit>().navigateToAnimeDetails(entry.value[index], const MediaListModel(name: "Calendar", mediaType: MediaType.anime)),
status:
entry.value[index].status,
year:

View File

@@ -21,13 +21,13 @@ class HomeScreen extends StatelessWidget {
Widget build(BuildContext context) {
return BlocProvider(
create: (context) => sl<HomeCubit>(),
child: _HomeListener(),
child: const _HomeListener(),
);
}
}
class _HomeListener extends StatelessWidget {
const _HomeListener({super.key});
const _HomeListener();
@override
Widget build(BuildContext context) {
@@ -43,14 +43,14 @@ class _HomeListener extends StatelessWidget {
},
child: BlocBuilder<HomeCubit, HomeState>(
builder:
(context, state) => state.isLoading ? LoadingView() : _HomeView(),
(context, state) => state.isLoading ? const LoadingView() : const _HomeView(),
),
);
}
}
class _HomeView extends StatefulWidget {
const _HomeView({super.key});
const _HomeView();
@override
State<_HomeView> createState() => _HomeViewState();
@@ -85,18 +85,18 @@ class _HomeViewState extends State<_HomeView> {
children: [
Row(
children: [
TextDisplaySmall(text: "Welcome back "),
const TextDisplaySmall(text: "Welcome back "),
TextDisplaySmall(
text: state.loggedUser.name,
style: TextStyle(
color: ColorScheme.of(context).tertiary,
),
),
TextDisplaySmall(text: " , enjoy your journey!"),
Spacer(),
const TextDisplaySmall(text: " , enjoy your journey!"),
const Spacer(),
],
),
Row(
const Row(
children: [
TextBodyLarge(
text: "Find your next favorite anime or manga!",

View File

@@ -21,13 +21,13 @@ class LoginScreen extends StatelessWidget {
Widget build(BuildContext context) {
return BlocProvider(
create: (context) => sl<LoginCubit>(),
child: _LoginListener(),
child: const _LoginListener(),
);
}
}
class _LoginListener extends StatelessWidget {
const _LoginListener({super.key});
const _LoginListener();
@override
Widget build(BuildContext context) {
@@ -41,13 +41,13 @@ class _LoginListener extends StatelessWidget {
);
}
},
child: _LoginView(),
child: const _LoginView(),
);
}
}
class _LoginView extends StatefulWidget {
const _LoginView({super.key});
const _LoginView();
@override
State<_LoginView> createState() => _LoginViewState();
@@ -78,7 +78,7 @@ class _LoginViewState extends State<_LoginView> {
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Spacer(flex: 1),
const Spacer(flex: 1),
TextDisplayLarge(text: context.tr("select_user")),
SizedBox(height: 0.07.sh),
SizedBox(
@@ -98,7 +98,7 @@ class _LoginViewState extends State<_LoginView> {
),
),
),
Spacer(flex: 1),
const Spacer(flex: 1),
Align(
alignment: Alignment.bottomRight,
child: Padding(

View File

@@ -22,13 +22,13 @@ class MangaScreen extends StatelessWidget {
Widget build(BuildContext context) {
return BlocProvider(
create: (context) => sl<MangaCubit>(),
child: _MangaListener(),
child: const _MangaListener(),
);
}
}
class _MangaListener extends StatelessWidget {
const _MangaListener({super.key});
const _MangaListener();
@override
Widget build(BuildContext context) {
@@ -44,14 +44,14 @@ class _MangaListener extends StatelessWidget {
},
child: BlocBuilder<MangaCubit, MangaState>(
builder:
(context, state) => state.isLoading ? LoadingView() : _MangaView(),
(context, state) => state.isLoading ? const LoadingView() : const _MangaView(),
),
);
}
}
class _MangaView extends StatefulWidget {
const _MangaView({super.key});
const _MangaView();
@override
State<_MangaView> createState() => _MangaViewState();

View File

@@ -31,7 +31,7 @@ class MediaListScreen extends StatelessWidget {
class _MediaListListener extends StatelessWidget {
final MediaType type;
const _MediaListListener({super.key, required this.type});
const _MediaListListener({required this.type});
@override
Widget build(BuildContext context) {
@@ -53,7 +53,7 @@ class _MediaListListener extends StatelessWidget {
class _MediaListView extends StatefulWidget {
final MediaType type;
const _MediaListView({super.key, required this.type});
const _MediaListView({required this.type});
@override
State<_MediaListView> createState() => _MediaListViewState();
@@ -95,7 +95,7 @@ class _MediaListViewState extends State<_MediaListView>
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
TextHeadlineMedium(
const TextHeadlineMedium(
text: "Hi ",
style: TextStyle(fontWeight: FontWeight.bold),
),
@@ -109,7 +109,7 @@ class _MediaListViewState extends State<_MediaListView>
TextHeadlineMedium(
text:
"Welcome to your ${widget.type == MediaType.anime ? "Anime" : "Manga"} Lists!",
style: TextStyle(fontWeight: FontWeight.bold),
style: const TextStyle(fontWeight: FontWeight.bold),
),
],
),
@@ -119,7 +119,7 @@ class _MediaListViewState extends State<_MediaListView>
TextBodyLarge(
text:
"You can find and remember your favorite ${widget.type == MediaType.anime ? "anime" : "manga"} here",
style: TextStyle(color: Colors.grey),
style: const TextStyle(color: Colors.grey),
),
],
),
@@ -187,7 +187,7 @@ class _MediaListViewState extends State<_MediaListView>
return GridView.builder(
scrollDirection: Axis.vertical,
gridDelegate:
SliverGridDelegateWithMaxCrossAxisExtent(
const SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: 165,
mainAxisExtent: 260,
crossAxisSpacing: 5,

View File

@@ -58,7 +58,7 @@ class _RootScreenState extends State<RootScreen> {
child: Container(color: Colors.transparent),
),
),
HeroControllerScope(controller: controller, child: AutoRouter()),
HeroControllerScope(controller: controller, child: const AutoRouter()),
]
)
);

View File

@@ -25,7 +25,7 @@ class TabsScreen extends StatelessWidget {
}
class _TabsListener extends StatelessWidget {
const _TabsListener({super.key});
const _TabsListener();
@override
Widget build(BuildContext context) {
@@ -39,13 +39,13 @@ class _TabsListener extends StatelessWidget {
);
}
},
child: _TabsView(),
child: const _TabsView(),
);
}
}
class _TabsView extends StatelessWidget {
const _TabsView({super.key});
const _TabsView();
@override
Widget build(BuildContext context) {
@@ -53,7 +53,7 @@ class _TabsView extends StatelessWidget {
builder: (context, state) {
return AutoTabsRouter(
lazyLoad: true,
routes: [
routes: const [
HomeRoute(),
AnimeRoute(),
MangaRoute(),
@@ -104,18 +104,6 @@ class _TabsView extends StatelessWidget {
unselectedIcon: Icons.menu_book_outlined,
selectedIcon: Icons.menu_book,
),
UnyoMenuIcon(
isSelected:
state.selectedMenuOption ==
SelectedMenuOption.settings,
onPressed:
() => context.read<TabsCubit>().selectMenuOption(
SelectedMenuOption.settings,
context,
),
unselectedIcon: Icons.settings_outlined,
selectedIcon: Icons.settings,
),
UnyoMenuIcon(
isSelected:
state.selectedMenuOption ==
@@ -128,6 +116,18 @@ class _TabsView extends StatelessWidget {
unselectedIcon: Icons.extension_outlined,
selectedIcon: Icons.extension,
),
UnyoMenuIcon(
isSelected:
state.selectedMenuOption ==
SelectedMenuOption.settings,
onPressed:
() => context.read<TabsCubit>().selectMenuOption(
SelectedMenuOption.settings,
context,
),
unselectedIcon: Icons.settings_outlined,
selectedIcon: Icons.settings,
),
],
)
: const SizedBox.shrink(),

View File

@@ -38,7 +38,7 @@ class AddUserAvatar extends StatelessWidget {
child: CircleAvatar(
radius: 0.125.sh,
backgroundColor: Colors.transparent,
backgroundImage: NetworkImage(config.plusImageUrl),
backgroundImage: const NetworkImage(config.plusImageUrl),
),
),
),

View File

@@ -50,7 +50,7 @@ class AnimeCardList extends StatelessWidget {
color: Colors.grey,
),
),
Spacer(),
const Spacer(),
MediaListArrows(
controller: controller,
visible: animeList.length * 144 > (1.sw - 140),

View File

@@ -52,7 +52,7 @@ class AnimeRecommendationCardList extends StatelessWidget {
color: Colors.grey,
),
),
Spacer(),
const Spacer(),
MediaListArrows(
controller: controller,
visible: animeList.length * 144 > 0.75.sw,

View File

@@ -46,7 +46,7 @@ class ImageCard extends StatelessWidget {
children: [
Text(
title,
style: TextStyle(
style: const TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold,

View File

@@ -20,7 +20,7 @@ class LightUnyoButton extends StatelessWidget {
return ElevatedButton(
style: ButtonStyle(
minimumSize: WidgetStatePropertyAll( Size(100.w, 40.h)),
backgroundColor: WidgetStatePropertyAll(Colors.white),
backgroundColor: const WidgetStatePropertyAll(Colors.white),
foregroundColor: const WidgetStatePropertyAll(
Color.fromARGB(255, 37, 37, 37),
),

View File

@@ -45,7 +45,7 @@ class MangaCardList extends StatelessWidget {
color: Colors.grey,
),
),
Spacer(),
const Spacer(),
MediaListArrows(
controller: controller,
visible: mangaList.length * 144 > (1.sw - 140),

View File

@@ -72,7 +72,7 @@ class MediaCard extends StatelessWidget {
child: Container(
decoration: BoxDecoration(
color: ColorScheme.of(context).primary,
borderRadius: BorderRadius.only(
borderRadius: const BorderRadius.only(
bottomRight: Radius.circular(50),
topLeft: Radius.circular(50),
),
@@ -120,7 +120,7 @@ class MediaCard extends StatelessWidget {
SizedBox(
// width: 128.w,
child: Padding(
padding: EdgeInsets.only(bottom: 5.0, left: 5.0),
padding: const EdgeInsets.only(bottom: 5.0, left: 5.0),
child: Align(
alignment: Alignment.bottomLeft,
child: CircleAvatar(
@@ -148,11 +148,11 @@ class MediaCard extends StatelessWidget {
child: Center(
child: Tooltip(
message: title,
waitDuration: Duration(milliseconds: 1000),
waitDuration: const Duration(milliseconds: 1000),
child: Text(
title,
overflow: TextOverflow.ellipsis,
style: TextStyle(
style: const TextStyle(
fontSize: 14,
color: Colors.white,
fontWeight: FontWeight.bold,
@@ -184,7 +184,7 @@ class MediaCard extends StatelessWidget {
overflow: TextOverflow.ellipsis,
),
),
Spacer(),
const Spacer(),
Text(
"${format.replaceAll("_", " ")} ",
style: TextStyle(

View File

@@ -160,7 +160,7 @@ class _UnyoBannerCarouselState extends State<UnyoBannerCarousel> {
.title
.userPreferred ??
widget.mangaList![_currentPage].title.userPreferred,
style: TextStyle(fontWeight: FontWeight.bold),
style: const TextStyle(fontWeight: FontWeight.bold),
),
Container(
width: 50,
@@ -178,7 +178,7 @@ class _UnyoBannerCarouselState extends State<UnyoBannerCarousel> {
size: 17,
),
TextLabelLarge(
style: TextStyle(
style: const TextStyle(
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.white,
@@ -204,7 +204,7 @@ class _UnyoBannerCarouselState extends State<UnyoBannerCarousel> {
widget.mangaList![_currentPage].description),
maxLines: 6,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: Colors.grey),
style: const TextStyle(color: Colors.grey),
),
),
],

View File

@@ -24,7 +24,7 @@ class UnyoBannerIcon extends StatelessWidget {
iconData != null ? Icon(iconData, color: ColorScheme.of(context).tertiary, size: 17) : const SizedBox.shrink(),
const SizedBox(width: 4),
TextLabelLarge(
style: TextStyle(
style: const TextStyle(
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.white,

View File

@@ -59,11 +59,11 @@ class UnyoCharacter extends StatelessWidget {
child: Center(
child: Tooltip(
message: name,
waitDuration: Duration(milliseconds: 1000),
waitDuration: const Duration(milliseconds: 1000),
child: Text(
name,
overflow: TextOverflow.ellipsis,
style: TextStyle(
style: const TextStyle(
fontSize: 14,
color: Colors.white,
fontWeight: FontWeight.bold,

View File

@@ -40,7 +40,7 @@ class UnyoCharacterList extends StatelessWidget {
color: Colors.grey,
),
),
Spacer(),
const Spacer(),
MediaListArrows(
controller: controller,
visible: characters.length * 144 > (0.75.sw),

View File

@@ -44,8 +44,8 @@ class UnyoEpisodeButton extends StatelessWidget {
width: double.infinity,
hoverWidth: double.infinity,
hoverCursor: SystemMouseCursors.click,
decoration: BoxDecoration(),
hoverDecoration: BoxDecoration(),
decoration: const BoxDecoration(),
hoverDecoration: const BoxDecoration(),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,

View File

@@ -38,7 +38,7 @@ class UnyoMediaBanner extends StatelessWidget {
Container(
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.5),
gradient: LinearGradient(
gradient: const LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Colors.transparent, Colors.black],

View File

@@ -34,7 +34,7 @@ class UnyoMenuIcon extends StatelessWidget {
children: [
AnimatedContainer(
height: isSelected ? 33.0 : 0,
duration: Duration(milliseconds: 200),
duration: const Duration(milliseconds: 200),
width: 3.5,
decoration: BoxDecoration(
color: ColorScheme.of(context).tertiary,