@@ -3,6 +3,10 @@ import 'package:flutter/foundation.dart';
33
44const double _kVerticalOffset = 20.0 ;
55const double _kInnerPadding = 5.0 ;
6+ const Widget _kDefaultDropdownButtonTrailing = Icon (
7+ FluentIcons .chevron_down,
8+ size: 10 ,
9+ );
610
711/// A DropDownButton is a button that shows a chevron as a visual indicator that
812/// it has an attached flyout that contains more options. It has the same
@@ -203,20 +207,16 @@ class _DropDownButtonState extends State<DropDownButton>
203207 final buttonChildren = < Widget > [
204208 if (widget.leading != null )
205209 Padding (
206- padding: const EdgeInsets .only (right : 8.0 ),
210+ padding: const EdgeInsetsDirectional .only (end : 8.0 ),
207211 child: IconTheme .merge (
208212 data: const IconThemeData (size: 20.0 ),
209213 child: widget.leading! ,
210214 ),
211215 ),
212216 if (widget.title != null ) widget.title! ,
213217 Padding (
214- padding: const EdgeInsets .only (left: 8.0 ),
215- child: widget.trailing ??
216- const Icon (
217- FluentIcons .chevron_down,
218- size: 10 ,
219- ),
218+ padding: const EdgeInsetsDirectional .only (end: 8.0 ),
219+ child: widget.trailing ?? _kDefaultDropdownButtonTrailing,
220220 ),
221221 ];
222222
@@ -313,12 +313,12 @@ class DropDownButtonItem {
313313 child: Row (mainAxisSize: MainAxisSize .min, children: [
314314 if (leading != null )
315315 Padding (
316- padding: const EdgeInsets .only (right : 8.0 ),
316+ padding: const EdgeInsetsDirectional .only (end : 8.0 ),
317317 child: leading! ,
318318 ),
319319 if (title != null )
320320 Padding (
321- padding: const EdgeInsets .only (right : 8.0 ),
321+ padding: const EdgeInsetsDirectional .only (end : 8.0 ),
322322 child: title! ,
323323 ),
324324 if (trailing != null ) trailing! ,
0 commit comments