fix: black screen

This commit is contained in:
Alex
2025-01-10 11:32:19 +03:00
parent 7f2e4df309
commit 9ccb1d08c3
11 changed files with 71 additions and 50 deletions

View File

@@ -26,12 +26,12 @@ import 'package:eatvio_app/core/theme/theme_helper.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';
import 'package:go_router/go_router.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:image_picker/image_picker.dart';
import 'package:share_plus/share_plus.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';
class ProfileScreen extends StatefulWidget {
final Author? author;
@@ -456,7 +456,9 @@ class _ProfileScreenState extends State<ProfileScreen> {
}
_education(ProfileStateLoaded state) {
if (state.profile.role != 'consultant' || state.profile.educationResource?.completedCourses == null) {
if (state.profile.role != 'consultant' ||
state.profile.educationResource?.completedCourses == null ||
state.profile.educationResource?.completedCourses?.length == 0) {
return const SizedBox.shrink();
}
return Padding(
@@ -911,15 +913,15 @@ class _ProfileScreenState extends State<ProfileScreen> {
child: Text('Посмотреть'),
),
if (widget.author == null)
PopupMenuItem(
value: 'replace',
child: Text('Заменить'),
),
PopupMenuItem(
value: 'replace',
child: Text('Заменить'),
),
if (widget.author == null)
PopupMenuItem(
value: 'delete',
child: Text('Удалить'),
),
PopupMenuItem(
value: 'delete',
child: Text('Удалить'),
),
],
child: Hero(
tag: state.profile.profilePhotoUrl,
@@ -1102,7 +1104,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
_charts() {
_charts() {
return Material(
color: Colors.white,
borderRadius: BorderRadius.circular(16),