fluent2ChosenRow function
Widget
fluent2ChosenRow({
- required Widget row,
- required bool chosen,
- required Fluent2Colors colors,
- required Fluent2Press press,
row with the selection indicator at its leading edge while chosen.
Implementation
Widget fluent2ChosenRow({
required Widget row,
required bool chosen,
required Fluent2Colors colors,
required Fluent2Press press,
}) {
if (!chosen) return row;
return Stack(
children: [
row,
PositionedDirectional(
start: 0,
top: 0,
bottom: 0,
child: Center(
child: Container(
width: 3,
height: 16,
decoration: BoxDecoration(
color: press == Fluent2Press.disabled
? colors.neutralForegroundDisabled
: colors.compoundBrandStroke,
borderRadius: BorderRadius.circular(1.5),
),
),
),
),
],
);
}