Negative margin is generally not needed but there are situations where it’s really useful. For example: why use negative margins?
For now, when I set margin for a container to a negative value, I got the following error:
I/flutter ( 3173): 'package:flutter/src/widgets/container.dart': Failed assertion: line 251: 'margin == null || I/flutter ( 3173): margin.isNonNegative': is not true.
If the re-entry has a clockwise direction, the flutter waves are positive in lead II, III, aVF and the P-waves typically have a notch on the apex.
It is possible to give margins a negative value. This allows you to draw the element closer to its top or left neighbour, or draw its right and bottom neighbour closer to it.
In this example, you will learn different ways to add padding and margin on the Text widget in Flutter. We will use, Padding() and Container() widget to wrap Text() widget and apply padding and margin. Furthermore, you will learn about EdgeInsets method.
The container has a useful transform property.
child: Container( color: Theme.of(context).accentColor, transform: Matrix4.translationValues(0.0, -50.0, 0.0), ),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With