@@ -93,16 +93,16 @@ Iterable<d.Node> _report(
9393 d.p (text: '' ),
9494 // illegal content
9595 if (subject.isPackage)
96- _block (
97- title: 'I believe the package contains illegal content.' ,
96+ _foldableSection (
97+ title: d. text ( 'I believe the package contains illegal content.' ) ,
9898 children: [
9999 d.markdown ('Please report illegal content through the '
100100 '[illegal content reporting form here]($lcpsDeepLink ).' )
101101 ],
102102 )
103103 else if (subject.isPublisher)
104- _block (
105- title: 'I believe the publisher contains illegal content.' ,
104+ _foldableSection (
105+ title: d. text ( 'I believe the publisher contains illegal content.' ) ,
106106 children: [
107107 d.markdown ('Please report illegal content through the '
108108 '[illegal content reporting form here]($lcpsDeepLink ).' )
@@ -111,9 +111,9 @@ Iterable<d.Node> _report(
111111
112112 // contact
113113 if (subject.isPackage)
114- _block (
115- title:
116- 'I have found a bug in the package / I need help using the package.' ,
114+ _foldableSection (
115+ title: d. text (
116+ 'I have found a bug in the package / I need help using the package.' ) ,
117117 children: [
118118 d.markdown ('Please consult the package page: '
119119 '[`pub.dev/packages/${subject .package }`](https://pub.dev/packages/${subject .package })' ),
@@ -131,8 +131,8 @@ Iterable<d.Node> _report(
131131 ],
132132 )
133133 else if (subject.isPublisher)
134- _block (
135- title: 'I want to contact the publisher.' ,
134+ _foldableSection (
135+ title: d. text ( 'I want to contact the publisher.' ) ,
136136 children: [
137137 d.markdown ('Please consult the publisher page: '
138138 '[`pub.dev/publishers/${subject .publisherId }`](https://pub.dev/publishers/${subject .publisherId })' ),
@@ -143,9 +143,9 @@ Iterable<d.Node> _report(
143143 ),
144144
145145 // direct report
146- _block (
147- classes : ['report-page-direct-report' ],
148- title: 'I believe the $kindLabel violates pub.dev/policy.' ,
146+ _foldableSection (
147+ buttonDivClasses : ['report-page-direct-report' ],
148+ title: d. text ( 'I believe the $kindLabel violates pub.dev/policy.' ) ,
149149 children: [
150150 if (! (sessionData? .isAuthenticated ?? false ))
151151 d.fragment ([
@@ -176,8 +176,8 @@ Iterable<d.Node> _report(
176176 ),
177177
178178 // problem with pub.dev
179- _block (
180- title: 'I have a problem with the pub.dev website.' ,
179+ _foldableSection (
180+ title: d. text ( 'I have a problem with the pub.dev website.' ) ,
181181 children: [
182182 d.markdown ('Security vulnerabilities may be reported through '
183183 '[goo.gl/vulnz](https://goo.gl/vulnz)' ),
@@ -235,34 +235,34 @@ Iterable<d.Node> _appeal(
235235 ];
236236}
237237
238- d.Node _block ({
239- required String title,
238+ d.Node _foldableSection ({
239+ required d. Node title,
240240 required Iterable <d.Node > children,
241- List <String >? classes ,
241+ Iterable <String >? buttonDivClasses ,
242242}) {
243243 return d.div (
244- classes: ['report-page- section' , 'foldable' , ... ? classes ],
244+ classes: ['foldable- section' , 'foldable' ],
245245 children: [
246246 d.div (
247- classes: ['report-page-section-title' , ' foldable-button' ],
247+ classes: ['foldable-button' , ... ? buttonDivClasses ],
248248 children: [
249249 d.img (
250250 classes: ['foldable-icon' ],
251251 image: d.Image (
252252 src: staticUrls
253- .getAssetUrl ('/static/img/report- foldable-icon.svg' ),
253+ .getAssetUrl ('/static/img/foldable-section -icon.svg' ),
254254 alt: 'trigger folding of the section' ,
255255 width: 13 ,
256256 height: 6 ,
257257 ),
258258 ),
259- d. text ( title) ,
259+ title,
260260 ],
261261 ),
262262 d.div (
263- classes: ['report-page-section-body' , ' foldable-content' ],
263+ classes: ['foldable-content' ],
264264 children: children,
265- )
265+ ),
266266 ],
267267 );
268268}
0 commit comments