Skip to content
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

How to use padding? #38

Open
chuhemiao opened this issue Jun 13, 2020 · 2 comments
Open

How to use padding? #38

chuhemiao opened this issue Jun 13, 2020 · 2 comments

Comments

@chuhemiao
Copy link

I modify the image to text , How do it add Text padding? cardBuilder example :

cardBuilder: (context, index) => Card(
margin: const EdgeInsets.only(top:1.0),
child: Text('${welcomeImages[index]}'),
),

@elias97850
Copy link

wrap the Card() widget with a Padding() widget

Padding(
padding: const EdgeInsets.only(top:1.0),
Card(
margin: const EdgeInsets.only(top:1.0),
child: Text('${welcomeImages[index]}'),
),
),

@chuhemiao
Copy link
Author

@elias97850 thanks, I'm try it

Padding( padding: const EdgeInsets.only(top:20.0), child: Card( margin: const EdgeInsets.only(top:1.0), child: Text('${welcomeImages[index]}'), ), ),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants