diff --git a/lib/features/calendar/presentation/pages/calendar_screen.dart b/lib/features/calendar/presentation/pages/calendar_screen.dart index 0457c9bc..393337f1 100644 --- a/lib/features/calendar/presentation/pages/calendar_screen.dart +++ b/lib/features/calendar/presentation/pages/calendar_screen.dart @@ -49,39 +49,43 @@ class CalendarScreen extends StatelessWidget { } Widget _buildCalendar(BuildContext context, CalendarStateLoaded state) { - return Stack(alignment: Alignment.bottomCenter, children: [ - FormBuilder( - child: Scaffold( - appBar: AppBar( - toolbarHeight: 0, - automaticallyImplyLeading: false, - ), - backgroundColor: Colors.white, - resizeToAvoidBottomInset: true, - body: SizedBox( - width: double.maxFinite, - child: Column( - children: [ - Expanded( - child: SingleChildScrollView( - child: Padding( - padding: EdgeInsets.only(bottom: 8), - child: Column( - children: [ - SizedBox(height: 24), - _buildCalendarBody(context, state), - SizedBox(height: 24), - ], + return Stack( + alignment: Alignment.bottomCenter, + children: [ + FormBuilder( + child: Scaffold( + appBar: AppBar( + title: Text( + 'Календарь', + ), + ), + backgroundColor: Colors.white, + resizeToAvoidBottomInset: true, + body: SizedBox( + width: double.maxFinite, + child: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.only(bottom: 8), + child: Column( + children: [ + SizedBox(height: 24), + _buildCalendarBody(context, state), + SizedBox(height: 24), + ], + ), ), ), ), - ), - ], + ], + ), ), ), ), - ), - ],); + ], + ); } _buildCalendarBody(BuildContext context, CalendarStateLoaded state) { @@ -180,44 +184,46 @@ class CalendarScreen extends StatelessWidget { style: theme.textTheme.titleMedium, ), SizedBox(height: 4), - Row(children: [ - Container( - padding: EdgeInsets.all(4.0), // Отступы внутри контейнера - decoration: BoxDecoration( - color: diary['state'] == 'finished' ? Color.fromRGBO(1, 154, 62, 1) : Color.fromRGBO(154, 74, 1, 1), - borderRadius: BorderRadius.circular(24.0), // Закругленные углы - ), - child: Text( - _getStateText(diary['state'] ?? ''), - style: CustomTextStyles.titleSmallBold, // Предполагается, что текст белый - ), - ), - SizedBox(width: 4), - if (diary['state'] == 'started') + Row( + children: [ Container( padding: EdgeInsets.all(4.0), // Отступы внутри контейнера decoration: BoxDecoration( - color: Color.fromRGBO(13, 110, 253, 1), + color: diary['state'] == 'finished' ? Color.fromRGBO(1, 154, 62, 1) : Color.fromRGBO(154, 74, 1, 1), borderRadius: BorderRadius.circular(24.0), // Закругленные углы ), child: Text( - 'Заполнить отчет', + _getStateText(diary['state'] ?? ''), style: CustomTextStyles.titleSmallBold, // Предполагается, что текст белый ), ), - if (diary['state'] == 'finished') - Container( - padding: EdgeInsets.all(4.0), // Отступы внутри контейнера - decoration: BoxDecoration( - color: Color.fromRGBO(13, 110, 253, 1), - borderRadius: BorderRadius.circular(24.0), // Закругленные углы + SizedBox(width: 4), + if (diary['state'] == 'started') + Container( + padding: EdgeInsets.all(4.0), // Отступы внутри контейнера + decoration: BoxDecoration( + color: Color.fromRGBO(13, 110, 253, 1), + borderRadius: BorderRadius.circular(24.0), // Закругленные углы + ), + child: Text( + 'Заполнить отчет', + style: CustomTextStyles.titleSmallBold, // Предполагается, что текст белый + ), ), - child: Text( - 'Изменить отчет', - style: CustomTextStyles.titleSmallBold, // Предполагается, что текст белый + if (diary['state'] == 'finished') + Container( + padding: EdgeInsets.all(4.0), // Отступы внутри контейнера + decoration: BoxDecoration( + color: Color.fromRGBO(13, 110, 253, 1), + borderRadius: BorderRadius.circular(24.0), // Закругленные углы + ), + child: Text( + 'Изменить отчет', + style: CustomTextStyles.titleSmallBold, // Предполагается, что текст белый + ), ), - ), - ],), + ], + ), ], ), ), diff --git a/lib/features/feed/presentation/widgets/comments_widget.dart b/lib/features/feed/presentation/widgets/comments_widget.dart index fd931541..24205961 100644 --- a/lib/features/feed/presentation/widgets/comments_widget.dart +++ b/lib/features/feed/presentation/widgets/comments_widget.dart @@ -78,7 +78,7 @@ class _CommentsWidgetState extends State { ), SizedBox(height: 4), SizedBox( - width: MediaQuery.of(context).size.width * 0.8, + width: isChild ? MediaQuery.of(context).size.width * 0.72 : MediaQuery.of(context).size.width * 0.8, child: Text( comment.body, style: TextStyle(