2

I want to increase the width of Chip(). How can I achieve this?

Chip(                                       
  elevation: 6.0,                                      
  backgroundColor:  Colors.white,                                          
  shape: 
   RoundedRectangleBorder(                                            
   borderRadius: BorderRadius.circular(12.0)                                          ),                                          
   label: Text('09AM - 10AM'),                                 
),
Peter Haddad
  • 78,874
  • 25
  • 140
  • 134
Himanshu Sharma
  • 984
  • 2
  • 15
  • 40

1 Answers1

3

You can use the padding property:

Chip(                                       
  elevation: 6.0,                                      
  backgroundColor:  Colors.white, 
  padding: const EdgeInsets.only(left :20, right : 20),
  shape: 
   RoundedRectangleBorder(                                            
   borderRadius: BorderRadius.circular(12.0)),                                          
   label: Text('09AM - 10AM'),                                 
),

https://api.flutter.dev/flutter/material/Chip/padding.html

https://api.flutter.dev/flutter/painting/EdgeInsets-class.html

Peter Haddad
  • 78,874
  • 25
  • 140
  • 134