fix some visual issues

This commit is contained in:
Amir Hossein Mousavi 2024-04-15 16:50:15 +03:30
parent 4c46d7fabb
commit 9ef214be69
6 changed files with 33 additions and 29 deletions

View File

@ -42,7 +42,7 @@ class _HashtagState extends State<Hashtag> {
builder: (context, state, child) => SliverStateHandler<HashtagState>( builder: (context, state, child) => SliverStateHandler<HashtagState>(
emptyState: const EmptyList(), emptyState: const EmptyList(),
enableEmptyState: state.items.isEmpty, enableEmptyState: state.items.isEmpty,
itemPadding: const EdgeInsets.only(bottom: 8), itemPadding: const EdgeInsets.symmetric(vertical: 8.0),
state: state, state: state,
placeholder: RadarOverview.placeholder, placeholder: RadarOverview.placeholder,
builder: (context, state, index) { builder: (context, state, index) {

View File

@ -180,7 +180,7 @@ class _InfographyScreenState extends State<InfographyScreen> {
children: [ children: [
placeholder, placeholder,
const SizedBox( const SizedBox(
height: 4, height: 8.0,
), ),
placeholder placeholder
], ],
@ -191,13 +191,16 @@ class _InfographyScreenState extends State<InfographyScreen> {
), ),
enableEmptyState: enableEmptyState:
context.watch<InfographyScreenState>().contents.isEmpty, context.watch<InfographyScreenState>().contents.isEmpty,
topPadding: 16, topPadding: 16.0,
onRetry: context.read<InfographyScreenState>().init, onRetry: context.read<InfographyScreenState>().init,
state: context.watch<InfographyScreenState>(), state: context.watch<InfographyScreenState>(),
builder: (context, state) => Expanded( builder: (context, state) => Expanded(
child: ListView.builder( child: ListView.separated(
controller: _scrollController, controller: _scrollController,
itemCount: state.contents.length, itemCount: state.contents.length,
padding: const EdgeInsets.symmetric(vertical: 8.0),
separatorBuilder: (BuildContext context, i) =>
const SizedBox(height: 8.0),
itemBuilder: (context, index) => InfographyItem( itemBuilder: (context, index) => InfographyItem(
id: state.contents[index].id, id: state.contents[index].id,
onMarkChanged: (id, value, _) => state.changeMark(id, value), onMarkChanged: (id, value, _) => state.changeMark(id, value),
@ -217,7 +220,6 @@ class _InfographyScreenState extends State<InfographyScreen> {
} }
static Widget get placeholder => const DidvanCard( static Widget get placeholder => const DidvanCard(
margin: EdgeInsets.all(8),
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,

View File

@ -96,7 +96,6 @@ class InfographyItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return DidvanCard( return DidvanCard(
margin: const EdgeInsets.all(12),
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
child: Column( child: Column(
children: [ children: [

View File

@ -240,7 +240,7 @@ class _PodcastsState extends State<Podcasts> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
ItemTitle( ItemTitle(
title: 'تاریخ رادار', title: 'تاریخ ایجاد',
style: Theme.of(context).textTheme.bodyMedium, style: Theme.of(context).textTheme.bodyMedium,
icon: DidvanIcons.calendar_range_regular, icon: DidvanIcons.calendar_range_regular,
), ),

View File

@ -142,7 +142,9 @@ class StudioDetailsWidget extends StatelessWidget {
), ),
); );
} }
return Column( return Padding(
padding: const EdgeInsets.only(top: 24.0),
child: Column(
children: [ children: [
if (state.studio.relatedContents.isEmpty && if (state.studio.relatedContents.isEmpty &&
!state.studio.relatedContentsIsEmpty) !state.studio.relatedContentsIsEmpty)
@ -170,6 +172,7 @@ class StudioDetailsWidget extends StatelessWidget {
), ),
), ),
], ],
),
); );
}, },
), ),

View File

@ -285,7 +285,7 @@ class _RadarState extends State<Radar> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
ItemTitle( ItemTitle(
title: 'تاریخ رادار', title: 'تاریخ ایجاد',
style: Theme.of(context).textTheme.bodyMedium, style: Theme.of(context).textTheme.bodyMedium,
icon: DidvanIcons.calendar_range_regular, icon: DidvanIcons.calendar_range_regular,
), ),