I’m trying to make a progress bar and I'd like to place the progress bar in the middle and a text next to it, but I don't know how
I don't want both elements centralized just the progress bar
The result I get:
The result I'm expecting:
My code:
import 'package:flutter/material.dart';
class ProgressBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: [
Text("Progress Bar"),
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
Container(
decoration: BoxDecoration(
color: Colors.grey, borderRadius: BorderRadius.circular(4)),
alignment: Alignment.centerLeft,
width: 95,
height: 6,
child: Container(
decoration: BoxDecoration(
color: Colors.red, borderRadius: BorderRadius.circular(4)),
width: 47.5,
),
),
Text('50 %'),
]),
],
);
}
}