"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.searching &&
|
||||||
state.appState != AppState.failed)
|
state.appState != AppState.failed)
|
||||||
const SliverToBoxAdapter(
|
const SliverToBoxAdapter(
|
||||||
child: SizedBox(height: 320),
|
child: SizedBox(height: 300),
|
||||||
),
|
),
|
||||||
if (state.appState != AppState.failed)
|
if (state.appState != AppState.failed)
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
|
|
@ -167,7 +167,7 @@ class _RadarState extends State<Radar> {
|
||||||
),
|
),
|
||||||
if (state.appState != AppState.failed)
|
if (state.appState != AppState.failed)
|
||||||
CategoriesRow1(
|
CategoriesRow1(
|
||||||
topPadding: 212,
|
topPadding: 192,
|
||||||
rightPadding: 124,
|
rightPadding: 124,
|
||||||
onSelected: _onCategorySelected,
|
onSelected: _onCategorySelected,
|
||||||
categories: state.categories,
|
categories: state.categories,
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ class CategoriesRow1 extends StatelessWidget {
|
||||||
top: isColapsed ? -60 : topPadding + d.padding.top,
|
top: isColapsed ? -60 : topPadding + d.padding.top,
|
||||||
left: isColapsed ? -rightPadding : 0,
|
left: isColapsed ? -rightPadding : 0,
|
||||||
right: isColapsed ? rightPadding : 0,
|
right: isColapsed ? rightPadding : 0,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 40),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: categories
|
children: categories
|
||||||
.sublist(0, 3)
|
.sublist(0, 3)
|
||||||
|
|
@ -44,6 +46,7 @@ class CategoriesRow1 extends StatelessWidget {
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -69,6 +72,8 @@ class CategoriesRow2 extends StatelessWidget {
|
||||||
top: isColapsed ? 12 : 92 + d.padding.top,
|
top: isColapsed ? 12 : 92 + d.padding.top,
|
||||||
left: isColapsed ? -d.size.width : 0,
|
left: isColapsed ? -d.size.width : 0,
|
||||||
right: isColapsed ? d.size.width : 0,
|
right: isColapsed ? d.size.width : 0,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 40),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: categories
|
children: categories
|
||||||
.sublist(3, 6)
|
.sublist(3, 6)
|
||||||
|
|
@ -83,6 +88,7 @@ class CategoriesRow2 extends StatelessWidget {
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class CategoryItem extends StatelessWidget {
|
||||||
return ds.height / 16 * 9 / 3;
|
return ds.height / 16 * 9 / 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ds.width / 3;
|
return (ds.width - 40) / 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _useWebMobileLayout(context) {
|
bool _useWebMobileLayout(context) {
|
||||||
|
|
@ -78,8 +78,9 @@ class CategoryItem extends StatelessWidget {
|
||||||
),
|
),
|
||||||
DidvanText(
|
DidvanText(
|
||||||
category.label,
|
category.label,
|
||||||
style: Theme.of(context).textTheme.titleSmall,
|
|
||||||
color: Theme.of(context).colorScheme.title,
|
color: Theme.of(context).colorScheme.title,
|
||||||
|
style: Theme.of(context).textTheme.labelSmall,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue