"Adjusted heights and widths of various widgets in radar and categories grid"
This commit adjusts the heights and widths of various widgets in the `Radar` and `CategoriesGrid` components. Specifically, it changes the height of the `SizedBox` in `Radar` from 320 to 300, the top padding of `CategoriesRow1` from 212 to 192, and the width of each `CategoryItem` in `CategoryItem` from `ds.width / 3` to `(ds.width - 40) / 4`. Additionally, it updates the font weight of the label in `CategoryItem`.
This commit is contained in:
parent
ecc549e124
commit
3aa39c82cd
|
|
@ -82,7 +82,7 @@ class _RadarState extends State<Radar> {
|
|||
!state.searching &&
|
||||
state.appState != AppState.failed)
|
||||
const SliverToBoxAdapter(
|
||||
child: SizedBox(height: 320),
|
||||
child: SizedBox(height: 300),
|
||||
),
|
||||
if (state.appState != AppState.failed)
|
||||
SliverPadding(
|
||||
|
|
@ -167,7 +167,7 @@ class _RadarState extends State<Radar> {
|
|||
),
|
||||
if (state.appState != AppState.failed)
|
||||
CategoriesRow1(
|
||||
topPadding: 212,
|
||||
topPadding: 192,
|
||||
rightPadding: 124,
|
||||
onSelected: _onCategorySelected,
|
||||
categories: state.categories,
|
||||
|
|
|
|||
|
|
@ -27,22 +27,25 @@ class CategoriesRow1 extends StatelessWidget {
|
|||
top: isColapsed ? -60 : topPadding + d.padding.top,
|
||||
left: isColapsed ? -rightPadding : 0,
|
||||
right: isColapsed ? rightPadding : 0,
|
||||
child: Row(
|
||||
children: categories
|
||||
.sublist(0, 3)
|
||||
.map(
|
||||
(category) => Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 6),
|
||||
child: CategoryItem(
|
||||
category: category,
|
||||
isColapsed: isColapsed,
|
||||
onSelected: () => onSelected(category),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 40),
|
||||
child: Row(
|
||||
children: categories
|
||||
.sublist(0, 3)
|
||||
.map(
|
||||
(category) => Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 6),
|
||||
child: CategoryItem(
|
||||
category: category,
|
||||
isColapsed: isColapsed,
|
||||
onSelected: () => onSelected(category),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -69,19 +72,22 @@ class CategoriesRow2 extends StatelessWidget {
|
|||
top: isColapsed ? 12 : 92 + d.padding.top,
|
||||
left: isColapsed ? -d.size.width : 0,
|
||||
right: isColapsed ? d.size.width : 0,
|
||||
child: Row(
|
||||
children: categories
|
||||
.sublist(3, 6)
|
||||
.map(
|
||||
(category) => Expanded(
|
||||
child: CategoryItem(
|
||||
category: category,
|
||||
onSelected: () => onSelected(category),
|
||||
isColapsed: isColapsed,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 40),
|
||||
child: Row(
|
||||
children: categories
|
||||
.sublist(3, 6)
|
||||
.map(
|
||||
(category) => Expanded(
|
||||
child: CategoryItem(
|
||||
category: category,
|
||||
onSelected: () => onSelected(category),
|
||||
isColapsed: isColapsed,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class CategoryItem extends StatelessWidget {
|
|||
return ds.height / 16 * 9 / 3;
|
||||
}
|
||||
}
|
||||
return ds.width / 3;
|
||||
return (ds.width - 40) / 4;
|
||||
}
|
||||
|
||||
bool _useWebMobileLayout(context) {
|
||||
|
|
@ -78,8 +78,9 @@ class CategoryItem extends StatelessWidget {
|
|||
),
|
||||
DidvanText(
|
||||
category.label,
|
||||
style: Theme.of(context).textTheme.titleSmall,
|
||||
color: Theme.of(context).colorScheme.title,
|
||||
style: Theme.of(context).textTheme.labelSmall,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue