Skip to content

Commit

Permalink
refactor: add trailing comma and remove unnecessary container widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Siolto committed Oct 1, 2024
1 parent 647a53d commit 66a0acc
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions packages/renderers/lib/src/request/request_item_group_renderer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,25 @@ class RequestItemGroupRenderer extends StatelessWidget {
);
}).toList();

return Container(
color: Theme.of(context).colorScheme.surfaceContainer,
child: ExpansionTile(
maintainState: true,
minTileHeight: 75,
initiallyExpanded: true,
shape: const LinearBorder(side: BorderSide.none),
// TODO: render anything else than empty string when title is not defined
title: Text(requestItemGroup.title ?? ''),
subtitle: requestItemGroup.description != null
? Text(
requestItemGroup.description!,
style: Theme.of(context).textTheme.bodyMedium,
maxLines: 2,
overflow: TextOverflow.ellipsis,
)
: null,
iconColor: Theme.of(context).colorScheme.onSurfaceVariant,
children: requestItems),
return ExpansionTile(
backgroundColor: Theme.of(context).colorScheme.surfaceContainer,
collapsedBackgroundColor: Theme.of(context).colorScheme.surfaceContainer,
maintainState: true,
minTileHeight: 75,
initiallyExpanded: true,
shape: const LinearBorder(side: BorderSide.none),
// TODO: render anything else than empty string when title is not defined
title: Text(requestItemGroup.title ?? ''),
subtitle: requestItemGroup.description != null
? Text(
requestItemGroup.description!,
style: Theme.of(context).textTheme.bodyMedium,
maxLines: 2,
overflow: TextOverflow.ellipsis,
)
: null,
iconColor: Theme.of(context).colorScheme.onSurfaceVariant,
children: requestItems,
);
}
}

0 comments on commit 66a0acc

Please sign in to comment.