fixing some issues
This commit is contained in:
parent
e39a507954
commit
d3252e931f
|
|
@ -1,5 +1,3 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:didvan/models/enums.dart';
|
||||
import 'package:didvan/models/new_statistic/general_item_model.dart';
|
||||
import 'package:didvan/models/requests/newstats_general.dart';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:didvan/config/theme_data.dart';
|
||||
import 'package:didvan/constants/app_icons.dart';
|
||||
import 'package:didvan/models/new_statistic/general_item_model.dart';
|
||||
|
|
|
|||
|
|
@ -82,11 +82,12 @@ class _RadarState extends State<Radar> {
|
|||
!state.searching &&
|
||||
state.appState != AppState.failed)
|
||||
const SliverToBoxAdapter(
|
||||
child: SizedBox(height: 300),
|
||||
child: SizedBox(height: 320),
|
||||
),
|
||||
if (state.appState != AppState.failed)
|
||||
SliverPadding(
|
||||
padding: const EdgeInsets.only(right: 16, bottom: 20),
|
||||
padding: const EdgeInsets.only(
|
||||
right: 16, bottom: 20, top: 20),
|
||||
sliver: SliverToBoxAdapter(
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
|
|
@ -167,7 +168,7 @@ class _RadarState extends State<Radar> {
|
|||
),
|
||||
if (state.appState != AppState.failed)
|
||||
CategoriesRow1(
|
||||
topPadding: 192,
|
||||
topPadding: 212,
|
||||
rightPadding: 124,
|
||||
onSelected: _onCategorySelected,
|
||||
categories: state.categories,
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ class CategoriesRow1 extends StatelessWidget {
|
|||
top: isColapsed ? -60 : topPadding + d.padding.top,
|
||||
left: isColapsed ? -rightPadding : 0,
|
||||
right: isColapsed ? rightPadding : 0,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 40),
|
||||
child: Row(
|
||||
children: categories
|
||||
.sublist(0, 3)
|
||||
|
|
@ -46,7 +44,6 @@ class CategoriesRow1 extends StatelessWidget {
|
|||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -72,8 +69,6 @@ class CategoriesRow2 extends StatelessWidget {
|
|||
top: isColapsed ? 12 : 92 + d.padding.top,
|
||||
left: isColapsed ? -d.size.width : 0,
|
||||
right: isColapsed ? d.size.width : 0,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 40),
|
||||
child: Row(
|
||||
children: categories
|
||||
.sublist(3, 6)
|
||||
|
|
@ -88,7 +83,6 @@ class CategoriesRow2 extends StatelessWidget {
|
|||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class CategoryItem extends StatelessWidget {
|
|||
return ds.height / 16 * 9 / 3;
|
||||
}
|
||||
}
|
||||
return (ds.width - 40) / 4;
|
||||
return ds.width / 3;
|
||||
}
|
||||
|
||||
bool _useWebMobileLayout(context) {
|
||||
|
|
@ -79,8 +79,7 @@ class CategoryItem extends StatelessWidget {
|
|||
DidvanText(
|
||||
category.label,
|
||||
color: Theme.of(context).colorScheme.title,
|
||||
style: Theme.of(context).textTheme.labelSmall,
|
||||
fontWeight: FontWeight.w600,
|
||||
style: Theme.of(context).textTheme.titleSmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -163,6 +163,9 @@ class MultitypeOverview extends StatelessWidget {
|
|||
Flexible(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Icon(
|
||||
DidvanIcons.calendar_day_light,
|
||||
|
|
@ -170,11 +173,17 @@ class MultitypeOverview extends StatelessWidget {
|
|||
),
|
||||
const SizedBox(width: 4),
|
||||
DidvanText(
|
||||
DateTime.parse(item.createdAt).toPersianDateStr(),
|
||||
DateTime.parse(item.createdAt)
|
||||
.toPersianDateStr(),
|
||||
style: Theme.of(context).textTheme.labelSmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
if ((item.timeToRead ?? item.duration) != null) ...[
|
||||
if ((item.timeToRead ?? item.duration) != null)
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Icon(
|
||||
DidvanIcons.timer_light,
|
||||
size: 16,
|
||||
|
|
@ -186,9 +195,11 @@ class MultitypeOverview extends StatelessWidget {
|
|||
: DateTimeUtils.normalizeTimeDuration(
|
||||
Duration(seconds: item.duration!),
|
||||
),
|
||||
style: Theme.of(context).textTheme.labelSmall,
|
||||
style:
|
||||
Theme.of(context).textTheme.labelSmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
]
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue