super_extensions icon indicating copy to clipboard operation
super_extensions copied to clipboard

FEAT: Extension for Padding Class

Open deepraj02 opened this issue 2 years ago โ€ข 4 comments

Description

Added 3 types of Extension Method that deals with Padding for List<Widget> types (Row, Column)

paddingDirectional method provides fine-grained control over directional spacing, allowing you to customize padding for the top, bottom, left, and right sides individually.

paddingSymmetric method simplifies the process of achieving uniform spacing by applying consistent vertical and horizontal padding to each widget in the list.

paddingAll method streamlines layout adjustments by uniformly applying the same padding value to all sides of each widget, ensuring a cohesive and polished design.

  • [x] โœจ Ran dartdoc
  • [x] ๐Ÿ› ๏ธ Added proper documentation
  • [x] โŒ No warnings or errors in the code
  • [x] โœ… If added a new extension, added in Readme and example too
  • [x] ๐Ÿงช If added a new extension, written proper test cases for it

Type of Change

  • [x] โœจ New feature (non-breaking change which adds functionality)
  • [ ] ๐Ÿ› ๏ธ Bug fix (non-breaking change which fixes an issue)
  • [ ] โŒ Breaking change (fix or feature that would cause existing functionality to change)
  • [x] ๐Ÿงน Code refactor
  • [ ] โœ… Build configuration change
  • [x] ๐Ÿ“ Documentation
  • [ ] ๐Ÿ—‘๏ธ Chore

deepraj02 avatar Nov 18 '23 22:11 deepraj02

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (2a53519) 100.00% compared to head (49f245c) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #32   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         8    +1     
  Lines          104       119   +15     
=========================================
+ Hits           104       119   +15     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Nov 18 '23 22:11 codecov[bot]

Hey, I added some new extension methods also wrote tests for them @AbhishekDoshi26

deepraj02 avatar Nov 20 '23 12:11 deepraj02

@deepraj02 sorry for the delay, I was busy with the preps of Flutter Conf India.

I don't get the use-case of this extension. I mean, if I want to give padding to each element of my column/row, I will just give the padding to the column instead of giving to each element. As per your code that I understood, it is giving padding (only, symmetric and all) to the elements of List<Widget>.

Can you explain the use-case of the same?

AbhishekDoshi26 avatar Dec 18 '23 19:12 AbhishekDoshi26

@deepraj02 can you update me on this?

AbhishekDoshi26 avatar Jun 11 '24 12:06 AbhishekDoshi26