createTrailing static method
KeyedSubtree?
createTrailing({
- required GlobalKey<
State< trailingKey,StatefulWidget> > - required Widget? userTrailing,
- required EdgeInsetsDirectional? padding,
Implementation
static KeyedSubtree? createTrailing({
required GlobalKey trailingKey,
required Widget? userTrailing,
required EdgeInsetsDirectional? padding,
}) {
if (userTrailing == null) {
return null;
}
return KeyedSubtree(
key: trailingKey,
child: Padding(
padding: EdgeInsetsDirectional.only(
end: padding?.end ?? 0,
),
child: IconTheme.merge(
data: const IconThemeData(
size: 32.0,
),
child: userTrailing,
),
),
);
}