I am creating a ruler app where I can measure anything in millimetre.
Something similar to this app https://play.google.com/store/apps/details?id=org.nixgame.ruler&hl=en_IN but very basic.
I am repeating the Divider widget into a Column widget and keeping a gap of 6.299 as given.
class Ruler extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: rulerPin(350),
),
);
}
List<Divider> rulerPin(int count) {
return List.generate(count, (i) {
return Divider(
height: 6.299,
thickness: 1,
);
}).toList();
}
}
But the problem is when I measure with the physical ruler on my mobile phone the values do not match. Check the given screenshots.
I am using this reference Calculate logical pixels from millimeters
Kindly suggest if I am following the correct approach.