-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This widget is not vertically Centered. #10
Comments
If you want to fork, I was able to solve this problem with the class _JumpingDot extends AnimatedWidget {
final Color color;
final double fontSize;
const _JumpingDot({
required Animation<double> animation,
required this.color,
required this.fontSize,
}) : super(listenable: animation);
Animation<double> get _animation => listenable as Animation<double>;
@override
Widget build(BuildContext context) => SizedBox(
height: _animation.value + fontSize,
child: Text(
'.',
style: TextStyle(
color: color,
fontSize: fontSize,
// Center the text vertically within its line height
height: 1,
),
),
);
} The use of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the Build Method there is a
SizedBox
with Height = 1.5 * fontSize.I have fontsize = 100, so my Height is 150pixels.
Inside of it there is a Row.
However when you wrap the whole widget in a Container and give color you can see that it is in the bottom of the container.
Could you implement a way to Center vertically?
The text was updated successfully, but these errors were encountered: