fix: fixed analyzer issues and merge conflicts

This commit is contained in:
Username1548
2025-07-02 19:01:37 +07:00
parent d42604dc87
commit e80b660210
85 changed files with 276 additions and 272 deletions

View File

@@ -119,7 +119,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_profileScreen(ProfileStateLoaded state) {
Scaffold _profileScreen(ProfileStateLoaded state) {
return Scaffold(
backgroundColor: Colors.grey.shade200,
appBar: AppBar(),
@@ -213,7 +213,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_myProfileScreen(ProfileStateLoaded state) {
Scaffold _myProfileScreen(ProfileStateLoaded state) {
return Scaffold(
backgroundColor: Colors.grey.shade200,
appBar: AppBar(toolbarHeight: 0),
@@ -306,7 +306,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_activePlans(ProfileStateLoaded state) {
Widget _activePlans(ProfileStateLoaded state) {
if (!state.profile.roles.contains('consultant')) {
return const SizedBox.shrink();
}
@@ -365,7 +365,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_bullets(int currentBullet, int bulletCount) {
Container _bullets(int currentBullet, int bulletCount) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
decoration: BoxDecoration(
@@ -384,7 +384,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_bullet(bool isActive) {
AnimatedContainer _bullet(bool isActive) {
return AnimatedContainer(
width: isActive ? 10 : 8,
height: isActive ? 10 : 8,
@@ -396,7 +396,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_newBlogPostButton() {
Material _newBlogPostButton() {
return Material(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
@@ -437,7 +437,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_diplomasAndCertificates(ProfileStateLoaded state) {
SingleChildRenderObjectWidget _diplomasAndCertificates(ProfileStateLoaded state) {
if (!state.profile.roles.contains('consultant') || state.consultantInfo!.photos.isEmpty) {
return const SizedBox.shrink();
}
@@ -510,7 +510,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_diplomaImage(String url) {
GestureDetector _diplomaImage(String url) {
return GestureDetector(
onTap: () {
context.pushTransparentRoute(
@@ -536,7 +536,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_education(ProfileStateLoaded state) {
SingleChildRenderObjectWidget _education(ProfileStateLoaded state) {
if (!state.profile.roles.contains('consultant') ||
state.consultantInfo!.educationModel.completedCourses == null ||
(state.consultantInfo!.educationModel.completedCourses?.isEmpty ?? false)) {
@@ -603,7 +603,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_educationBlock(String title, String date) {
SizedBox _educationBlock(String title, String date) {
final parsedDate = DateTime.tryParse(date);
final formattedDate = parsedDate != null ? DateFormat('d MMMM y', 'ru_RU').format(parsedDate) : date;
@@ -643,7 +643,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_socialLinks(ProfileStateLoaded state) {
SingleChildRenderObjectWidget _socialLinks(ProfileStateLoaded state) {
if (!state.profile.roles.contains('consultant')) {
return const SizedBox.shrink();
}
@@ -701,7 +701,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_socialLinkButton(Function() onTap, String icon, bool disabled) {
InkWell _socialLinkButton(Function() onTap, String icon, bool disabled) {
return InkWell(
onTap: disabled ? null : onTap,
borderRadius: BorderRadius.circular(20),
@@ -723,7 +723,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_badges(ProfileStateLoaded state) {
Padding _badges(ProfileStateLoaded state) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 4),
child: InkWell(
@@ -815,7 +815,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_subscriptionsAndSubscribers(ProfileStateLoaded state) {
Padding _subscriptionsAndSubscribers(ProfileStateLoaded state) {
return Padding(
padding: const EdgeInsets.all(4),
child: Row(
@@ -924,7 +924,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_miniAvatars(List<String> urls) {
Row _miniAvatars(List<String> urls) {
int maxLength = urls.length > 2 ? 3 : urls.length;
return Row(
mainAxisAlignment: MainAxisAlignment.center,
@@ -944,7 +944,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_blogPosts(ProfileStateLoaded state) {
ListView _blogPosts(ProfileStateLoaded state) {
return ListView.separated(
padding: const EdgeInsets.symmetric(vertical: 16),
shrinkWrap: true,
@@ -958,7 +958,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_additionalInfo(ProfileStateLoaded state) {
Container _additionalInfo(ProfileStateLoaded state) {
String text = state.profileDetails.additionalInfo;
if (state.profileDetails.additionalInfo.length > 250) {
text = state.profileDetails.additionalInfo.substring(0, 250);
@@ -976,7 +976,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_header(ProfileStateLoaded state) {
Padding _header(ProfileStateLoaded state) {
return Padding(
padding: const EdgeInsets.all(16),
child: Row(
@@ -1212,7 +1212,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_additional(String title, String value) {
Row _additional(String title, String value) {
return Row(
children: [
Text(
@@ -1235,7 +1235,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_messageAndSubscribe(ProfileStateLoaded state) {
Row _messageAndSubscribe(ProfileStateLoaded state) {
return Row(
children: [
const SizedBox(width: 16),
@@ -1286,7 +1286,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_charts() {
Material _charts() {
return Material(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
@@ -1350,7 +1350,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_choiceIntervalChipWidget(int index) {
ChoiceChip _choiceIntervalChipWidget(int index) {
return ChoiceChip(
selectedColor: Colors.grey.withValues(alpha: 0.1),
pressElevation: 0,
@@ -1376,7 +1376,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_choiceChipWidget(int index) {
ChoiceChip _choiceChipWidget(int index) {
return ChoiceChip(
selectedColor: appTheme.blueA400,
pressElevation: 0,

View File

@@ -79,7 +79,7 @@ class _SubsScreenState extends State<SubsScreen> {
);
}
_buildStates(SubState state) {
StatelessWidget? _buildStates(SubState state) {
if (state is SubStateLoading) {
return const Loader();
}
@@ -94,5 +94,6 @@ class _SubsScreenState extends State<SubsScreen> {
itemCount: state.subList.length,
);
}
return null;
}
}