feat(order info): added order info screen

This commit is contained in:
Username1548
2025-04-04 20:21:31 +07:00
parent 9715f4cac9
commit 748484cf8f
387 changed files with 16171 additions and 18199 deletions

View File

@@ -85,7 +85,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
if (isFirstFetch) {
canSub = !state.profile.isEntitySubscribedByMe;
if (state.profile.roles.contains('consultant')) {
plansCubit..getPlans(state.profile.slug);
plansCubit.getPlans(state.profile.slug);
}
isFirstFetch = false;
}
@@ -116,7 +116,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.vertical(
bottom: Radius.circular(16),
@@ -133,7 +133,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
Row(
children: [
const SizedBox(width: 16),
Text(
const Text(
'Консультант',
style: TextStyle(
fontSize: 16,
@@ -148,7 +148,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
decoration: BoxDecoration(
color: Color(0xFFF6FAFF),
color: const Color(0xFFF6FAFF),
borderRadius: BorderRadius.circular(12),
),
child: Text(
@@ -163,9 +163,9 @@ class _ProfileScreenState extends State<ProfileScreen> {
],
),
if (state.profile.educationResource?.hasMedicalEducation == 1)
Row(
const Row(
children: [
const SizedBox(width: 16),
SizedBox(width: 16),
Icon(
Icons.done_rounded,
color: Colors.green,
@@ -190,7 +190,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
),
_subscriptionsAndSubscribers(state),
if (state.profile.badges.isNotEmpty) Padding(padding: EdgeInsets.only(bottom: 16), child: _badges(state)),
if (state.profile.badges.isNotEmpty) Padding(padding: const EdgeInsets.only(bottom: 16), child: _badges(state)),
if (state.profile.roles.contains('consultant')) _socialLinks(state),
if (state.profile.roles.contains('consultant')) _education(state),
if (state.profile.roles.contains('consultant')) _diplomasAndCertificates(state),
@@ -211,7 +211,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.vertical(
bottom: Radius.circular(16),
@@ -226,11 +226,11 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
),
_subscriptionsAndSubscribers(state),
if (state.profile.badges.isNotEmpty) Padding(padding: EdgeInsets.only(bottom: 16), child: _badges(state)),
if (state.profile.badges.isNotEmpty) Padding(padding: const EdgeInsets.only(bottom: 16), child: _badges(state)),
if (state.profile.roles.contains('consultant')) _socialLinks(state),
if (state.profile.roles.contains('consultant')) _education(state),
if (state.profile.roles.contains('consultant')) _diplomasAndCertificates(state),
Padding(padding: EdgeInsets.only(bottom: 16), child: _charts()),
Padding(padding: const EdgeInsets.only(bottom: 16), child: _charts()),
if (state.profile.roles.contains('consultant')) _activePlans(state),
_newBlogPostButton(),
_blogPosts(state),
@@ -253,8 +253,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
}
return Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 16),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@@ -293,7 +293,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
],
);
}
return Loader();
return const Loader();
},
);
}
@@ -321,9 +321,9 @@ class _ProfileScreenState extends State<ProfileScreen> {
return AnimatedContainer(
width: isActive ? 10 : 8,
height: isActive ? 10 : 8,
duration: Duration(milliseconds: 150),
duration: const Duration(milliseconds: 150),
decoration: BoxDecoration(
color: isActive ? appTheme.blueA400 : Color(0xFFD7D9DC),
color: isActive ? appTheme.blueA400 : const Color(0xFFD7D9DC),
shape: BoxShape.circle,
),
);
@@ -341,19 +341,19 @@ class _ProfileScreenState extends State<ProfileScreen> {
},
borderRadius: BorderRadius.circular(8),
child: Ink(
padding: EdgeInsets.all(12),
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: Color(0xFFF6FAFF),
color: const Color(0xFFF6FAFF),
borderRadius: BorderRadius.circular(8),
),
child: Row(
child: const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.add_circle_outline_rounded,
color: Color(0xFF2F80ED),
),
const SizedBox(width: 12),
SizedBox(width: 12),
Text(
'Новая запись',
style: TextStyle(
@@ -383,7 +383,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
const Text(
'Дипломы\nи сертификаты',
style: TextStyle(
color: Color(0xFF323F4B),
@@ -394,7 +394,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
Text(
widget.author == null ? 'Редактировать' : '',
style: TextStyle(
style: const TextStyle(
color: Color(0xFF2F80ED),
fontSize: 16,
fontWeight: FontWeight.w500,
@@ -417,7 +417,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
child: Row(
children: [
if (state.profile.diplomasAndCertificates != null)
...state.profile.diplomasAndCertificates!.map((d) => _diplomaImage(baseUrl + '/storage/' + d.path)).toList(),
...state.profile.diplomasAndCertificates!.map((d) => _diplomaImage('$baseUrl/storage/${d.path}')),
],
),
),
@@ -457,7 +457,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
_education(ProfileStateLoaded state) {
if (!state.profile.roles.contains('consultant') ||
state.profile.educationResource?.completedCourses == null ||
state.profile.educationResource?.completedCourses?.length == 0) {
(state.profile.educationResource?.completedCourses?.isEmpty ?? false)) {
return const SizedBox.shrink();
}
return Padding(
@@ -469,7 +469,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
const Text(
'Образование',
style: TextStyle(
color: Color(0xFF323F4B),
@@ -479,7 +479,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
Text(
widget.author == null ? 'Редактировать' : '',
style: TextStyle(
style: const TextStyle(
color: Color(0xFF2F80ED),
fontSize: 16,
fontWeight: FontWeight.w500,
@@ -499,7 +499,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
child: Column(
children: [
if (state.profile.educationResource?.completedCourses != null)
...state.profile.educationResource!.completedCourses!.map((c) => _educationBlock(c.values.first.title, c.values.first.date)).toList(),
...state.profile.educationResource!.completedCourses!.map((c) => _educationBlock(c.values.first.title, c.values.first.date)),
],
),
),
@@ -514,7 +514,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
return SizedBox(
width: double.infinity,
child: Material(
color: Color(0xFFF6FAFF),
color: const Color(0xFFF6FAFF),
borderRadius: BorderRadius.circular(12),
child: Padding(
padding: const EdgeInsets.all(12),
@@ -523,7 +523,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
children: [
Text(
title,
style: TextStyle(
style: const TextStyle(
height: 1,
color: Color(0xFF323F4B),
fontWeight: FontWeight.w500,
@@ -533,7 +533,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
const SizedBox(height: 4),
Text(
date,
style: TextStyle(
style: const TextStyle(
height: 1,
color: Color(0xFF6D6F71),
fontWeight: FontWeight.w500,
@@ -613,14 +613,14 @@ class _ProfileScreenState extends State<ProfileScreen> {
width: MediaQuery.of(context).size.width / 3 - (56 / 3),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Color(0xFFF6F6F6),
color: const Color(0xFFF6F6F6),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 40, vertical: 16),
child: SvgPicture.asset(
icon,
width: 24,
colorFilter: ColorFilter.mode(Colors.black12, BlendMode.srcIn),
colorFilter: const ColorFilter.mode(Colors.black12, BlendMode.srcIn),
),
),
),
@@ -636,10 +636,14 @@ class _ProfileScreenState extends State<ProfileScreen> {
child: Ink(
padding: const EdgeInsets.all(8),
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
const Text(
'Достижения',
style: TextStyle(
color: Color(0xFF6D6F71),
@@ -655,12 +659,12 @@ class _ProfileScreenState extends State<ProfileScreen> {
for (int i = 0; i < state.profile.badges.length; i++) ...[
state.profile.badges[i].image.contains('svg')
? SvgPicture.network(
baseUrl + '/storage/' + state.profile.badges[i].image,
'$baseUrl/storage/${state.profile.badges[i].image}',
width: 40,
height: 40,
)
: CachedNetworkImage(
imageUrl: baseUrl + '/storage/' + state.profile.badges[i].image,
imageUrl: '$baseUrl/storage/${state.profile.badges[i].image}',
width: 40,
height: 40,
),
@@ -671,10 +675,6 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
],
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
),
),
),
);
@@ -688,7 +688,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
InkWell(
onTap: () => GoRouter.of(context).pushNamed(
'subsScreen',
extra: SubType.Subscriptions,
extra: SubType.subscriptions,
pathParameters: {
'slug': state.profile.slug,
},
@@ -697,6 +697,10 @@ class _ProfileScreenState extends State<ProfileScreen> {
child: Ink(
padding: const EdgeInsets.all(8),
width: MediaQuery.of(context).size.width / 2 - 6,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
@@ -704,7 +708,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
const Text(
'Подписки',
style: TextStyle(
color: Color(0xFF6D6F71),
@@ -714,7 +718,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
Text(
'${state.profile.subscriptions.length}',
style: TextStyle(
style: const TextStyle(
color: Color(0xFF323F4B),
fontSize: 22,
fontWeight: FontWeight.w700,
@@ -723,22 +727,18 @@ class _ProfileScreenState extends State<ProfileScreen> {
],
),
Padding(
padding: EdgeInsets.only(right: 8),
padding: const EdgeInsets.only(right: 8),
child: _miniAvatars(state.profile.subscriptions.map((e) => e.profilePhotoUrl).toList()),
),
],
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
),
),
),
SizedBox(width: 4),
const SizedBox(width: 4),
InkWell(
onTap: () => GoRouter.of(context).pushNamed(
'subsScreen',
extra: SubType.Subscribers,
extra: SubType.subscribers,
pathParameters: {
'slug': state.profile.slug,
},
@@ -747,6 +747,10 @@ class _ProfileScreenState extends State<ProfileScreen> {
child: Ink(
padding: const EdgeInsets.all(8),
width: MediaQuery.of(context).size.width / 2 - 6,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
@@ -754,7 +758,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
const Text(
'Подписчики',
style: TextStyle(
color: Color(0xFF6D6F71),
@@ -764,7 +768,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
Text(
'${state.profile.subscribers.length}',
style: TextStyle(
style: const TextStyle(
color: Color(0xFF323F4B),
fontSize: 22,
fontWeight: FontWeight.w700,
@@ -773,15 +777,11 @@ class _ProfileScreenState extends State<ProfileScreen> {
],
),
Padding(
padding: EdgeInsets.only(right: 8),
padding: const EdgeInsets.only(right: 8),
child: _miniAvatars(state.profile.subscribers.map((e) => e.profilePhotoUrl).toList()),
),
],
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
),
),
),
],
@@ -810,14 +810,14 @@ class _ProfileScreenState extends State<ProfileScreen> {
_blogPosts(ProfileStateLoaded state) {
return ListView.separated(
padding: EdgeInsets.symmetric(vertical: 16),
padding: const EdgeInsets.symmetric(vertical: 16),
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) => ProfileBlogPostWidget(
index: index,
profileCubit: profileCubit,
),
separatorBuilder: (context, index) => SizedBox(height: 8),
separatorBuilder: (context, index) => const SizedBox(height: 8),
itemCount: state.blogPosts.length,
);
}
@@ -872,7 +872,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
}
},
child: const Row(
children: const [
children: [
Icon(Icons.photo_camera),
SizedBox(width: 8),
Text('Фото'),
@@ -890,7 +890,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
}
},
child: const Row(
children: const [
children: [
Icon(Icons.photo),
SizedBox(width: 8),
Text('Галерея'),
@@ -912,17 +912,17 @@ class _ProfileScreenState extends State<ProfileScreen> {
}
},
itemBuilder: (context) => [
PopupMenuItem(
const PopupMenuItem(
value: 'view',
child: Text('Посмотреть'),
),
if (widget.author == null)
PopupMenuItem(
const PopupMenuItem(
value: 'replace',
child: Text('Заменить'),
),
if (widget.author == null)
PopupMenuItem(
const PopupMenuItem(
value: 'delete',
child: Text('Удалить'),
),
@@ -932,7 +932,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
child: CircleAvatar(
radius: 32,
foregroundImage: NetworkImage(state.profile.profilePhotoUrl),
backgroundImage: AssetImage('assets/images/no_avatar.png'),
backgroundImage: const AssetImage('assets/images/no_avatar.png'),
),
),
),
@@ -941,8 +941,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
state.profileDetails.firstName + ' ' + state.profileDetails.lastName,
style: TextStyle(
'${state.profileDetails.firstName} ${state.profileDetails.lastName}',
style: const TextStyle(
color: Colors.black,
fontWeight: FontWeight.w600,
fontSize: 16,
@@ -963,7 +963,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(
const Text(
'Подробнее',
style: TextStyle(
fontSize: 20,
@@ -972,13 +972,13 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
),
const SizedBox(height: 16),
_additional('Дата рожденя: ', '${state.profileDetails.birthdate}'),
_additional('Дата рожденя: ', state.profileDetails.birthdate),
const SizedBox(height: 12),
_additional('Страна: ', '${state.profileDetails.country}'),
_additional('Страна: ', state.profileDetails.country),
const SizedBox(height: 12),
_additional('Город: ', '${state.profileDetails.city}'),
_additional('Город: ', state.profileDetails.city),
const SizedBox(height: 12),
_additional('Язык общения: ', '${state.profileDetails.lang}'),
_additional('Язык общения: ', state.profileDetails.lang),
const SizedBox(height: 12),
_additional('В Eatvio с: ', '${state.profile.createdAt?.format('d.MM.yyyy', 'ru')}'),
const SizedBox(height: 12),
@@ -987,14 +987,14 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
);
},
child: Row(
child: const Row(
children: [
Icon(
Icons.info_outline,
size: 20,
color: Color(0xFF6D6F71),
),
const SizedBox(width: 4),
SizedBox(width: 4),
Text(
'Дополнительно',
style: TextStyle(
@@ -1015,7 +1015,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
final box = context.findRenderObject() as RenderBox?;
Share.shareUri(
Uri.parse(
baseUrl + '/ru/profile/' + state.profile.slug,
'$baseUrl/ru/profile/${state.profile.slug}',
),
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
);
@@ -1031,17 +1031,17 @@ class _ProfileScreenState extends State<ProfileScreen> {
}
},
itemBuilder: (context) => [
PopupMenuItem(
const PopupMenuItem(
value: 'share',
child: Text('Поделиться'),
),
if (widget.author != null)
PopupMenuItem(
const PopupMenuItem(
value: 'complain',
child: Text('Пожаловаться'),
),
],
child: Icon(Icons.more_horiz_rounded),
child: const Icon(Icons.more_horiz_rounded),
),
],
),
@@ -1053,7 +1053,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
children: [
Text(
title,
style: TextStyle(
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Color(0xFF6D6F71),
@@ -1061,7 +1061,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
Text(
value,
style: TextStyle(
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Color(0xFF323F4B),
@@ -1074,7 +1074,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
_messageAndSubscribe(ProfileStateLoaded state) {
return Row(
children: [
SizedBox(width: 16),
const SizedBox(width: 16),
GestureDetector(
onTap: () async {
GoRouter.of(context).pushNamed(
@@ -1086,7 +1086,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
},
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.all(8),
padding: const EdgeInsets.all(8),
width: (MediaQuery.of(context).size.width - 40) / 2,
decoration: BoxDecoration(
color: appTheme.blueA400.withValues(alpha: 0.1),
@@ -1100,7 +1100,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
),
),
SizedBox(width: 8),
const SizedBox(width: 8),
GestureDetector(
onTap: () {
setState(() {
@@ -1110,7 +1110,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
},
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.all(8),
padding: const EdgeInsets.all(8),
width: (MediaQuery.of(context).size.width - 40) / 2,
decoration: BoxDecoration(
color: !canSub ? Colors.grey.shade200 : appTheme.blueA400,
@@ -1124,7 +1124,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
),
),
SizedBox(width: 16),
const SizedBox(width: 16),
],
);
}
@@ -1138,14 +1138,14 @@ class _ProfileScreenState extends State<ProfileScreen> {
children: [
const SizedBox(height: 8),
SingleChildScrollView(
padding: EdgeInsets.symmetric(horizontal: 16),
padding: const EdgeInsets.symmetric(horizontal: 16),
scrollDirection: Axis.horizontal,
child: Row(
children: [
_choiceChipWidget(0),
SizedBox(width: 8),
const SizedBox(width: 8),
_choiceChipWidget(1),
SizedBox(width: 8),
const SizedBox(width: 8),
_choiceChipWidget(2),
],
),
@@ -1168,26 +1168,26 @@ class _ProfileScreenState extends State<ProfileScreen> {
weightPoints: weightPoints,
);
default:
return SizedBox.shrink();
return const SizedBox.shrink();
}
},
),
SizedBox(height: 8),
const SizedBox(height: 8),
Row(
children: [
SizedBox(width: 16),
const SizedBox(width: 16),
_choiceIntervalChipWidget(0),
SizedBox(width: 8),
const SizedBox(width: 8),
_choiceIntervalChipWidget(1),
SizedBox(width: 8),
const SizedBox(width: 8),
_choiceIntervalChipWidget(2),
SizedBox(width: 8),
const SizedBox(width: 8),
_choiceIntervalChipWidget(3),
SizedBox(width: 8),
const SizedBox(width: 8),
_choiceIntervalChipWidget(4),
],
),
SizedBox(height: 8),
const SizedBox(height: 8),
],
),
);

View File

@@ -8,7 +8,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
enum SubType { Subscribers, Subscriptions }
enum SubType { subscribers, subscriptions }
class SubsScreen extends StatefulWidget {
final SubType subType;
@@ -28,7 +28,7 @@ class _SubsScreenState extends State<SubsScreen> {
@override
Widget build(BuildContext context) {
return BlocProvider<SubCubit>(
create: (BuildContext context) => widget.subType == SubType.Subscriptions
create: (BuildContext context) => widget.subType == SubType.subscriptions
? (sl<SubCubit>()
..getSubscriptions(
widget.slug,
@@ -46,21 +46,21 @@ class _SubsScreenState extends State<SubsScreen> {
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: CupertinoSearchTextField(
prefixIcon: Icon(Icons.search),
prefixIcon: const Icon(Icons.search),
placeholder: 'Поиск',
onChanged: (query) {
if (query.length > 2) {
EasyDebounce.debounce(
'searchSubs',
Duration(milliseconds: 300),
const Duration(milliseconds: 300),
() {
widget.subType == SubType.Subscriptions
widget.subType == SubType.subscriptions
? (context.read<SubCubit>().getSubscriptions(widget.slug, query))
: (context.read<SubCubit>().getSubscribers(widget.slug, query));
},
);
} else {
widget.subType == SubType.Subscriptions
widget.subType == SubType.subscriptions
? (context.read<SubCubit>().getSubscriptions(widget.slug))
: (context.read<SubCubit>().getSubscribers(widget.slug));
}
@@ -69,7 +69,7 @@ class _SubsScreenState extends State<SubsScreen> {
),
),
title: Text(
widget.subType == SubType.Subscriptions ? 'Подписки' : 'Подписчики',
widget.subType == SubType.subscriptions ? 'Подписки' : 'Подписчики',
),
),
body: _buildStates(state),
@@ -81,7 +81,7 @@ class _SubsScreenState extends State<SubsScreen> {
_buildStates(SubState state) {
if (state is SubStateLoading) {
return Loader();
return const Loader();
}
if (state is SubStateError) {
return Text(state.errorMessage);