Skip to content

Commit

Permalink
fix(detail_screen.dart): Update styling to better match figma
Browse files Browse the repository at this point in the history
  • Loading branch information
rlperez committed Dec 29, 2021
1 parent cd0fa7f commit cb661c0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions lib/traits/detail_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,20 @@ class DetailScreenWidget extends StatelessWidget {
alignment: Alignment.center,
child: Center(
child: Column(children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: _createTraitWidget(traits.first, iconColor: Colors.white)),
_card(_createTraitWidget(traits.first)),
...traits.skip(1).map((trait) {
return Padding(
padding: const EdgeInsets.only(top: 16.0),
child: Padding(
padding: EdgeInsets.only(left: 8, right: 8),
child: _createTraitListWidget(trait)));
return _card(_createTraitListWidget(trait));
}).toList()
])));
}

Widget _card(Widget content) {
return Card(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
color: Colors.white,
child: Padding(padding: const EdgeInsets.all(8.0), child: content));
}

Widget _createTraitWidget(Trait trait,
{Color iconColor = WidgetStyleConstants.deviceDetailIconColorActive,
Color textColor = WidgetStyleConstants.deviceDetailIconColorActive}) {
Expand Down

0 comments on commit cb661c0

Please sign in to comment.