I am trying to do this particular design for the Login page.
But the result I got it is on below:
The code I tried is:
Stack(
fit: StackFit.passthrough,
children: [
Container(height: 2, color: Colors.grey),
Positioned(
child: Center(
child: Transform.rotate(
alignment: Alignment.center,
angle: 45,
child: Container(
height: 18,
width: 18,
color: colorController.primaryColor.value,
),
),
),
),
],
),
Line Widget (Container with color ) size is 2 that's cause result mismatch from what you want
fix it to this
Stack(
fit: StackFit.passthrough,
children: [
const SizedBox(
height: 18,
child: Divider(
color: Colors.grey,
height: 2,
thickness: 2,
),
),
Positioned(
child: Center(
child: Transform.rotate(
alignment: Alignment.center,
angle: 40,
child: Container(
height: 18,
width: 18,
color: Colors.blue,
),
),
),
)
],
),