Skip to content

Commit

Permalink
refactor: improve layout and styling in description and dynamic panel…
Browse files Browse the repository at this point in the history
… widgets (#1322)
  • Loading branch information
Sembauke authored Feb 8, 2025
1 parent 5c74342 commit 1d77a9f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,47 +40,33 @@ class DescriptionView extends StatelessWidget {
Row(
children: [
Padding(
padding: const EdgeInsets.only(left: 12, bottom: 32),
padding: const EdgeInsets.only(left: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
context.t.instructions,
style: const TextStyle(
fontSize: 28,
fontSize: 24,
fontWeight: FontWeight.bold,
fontFamily: 'Inter',
),
),
isMultiStepChallenge
? Text(
context.t.step_count(
splitTitle[1],
maxChallenges.toString(),
),
style: const TextStyle(
fontSize: 14,
fontFamily: 'Inter',
color: Colors.white70,
),
)
: Container(),
if (isMultiStepChallenge)
Text(
context.t.step_count(
splitTitle[1],
maxChallenges.toString(),
),
style: const TextStyle(
fontSize: 14,
fontFamily: 'Inter',
color: Colors.white70,
),
)
],
),
),
Expanded(
child: Container(
padding: const EdgeInsets.only(bottom: 32),
alignment: Alignment.centerRight,
child: IconButton(
onPressed: () {
challengeModel.setShowPanel = false;
},
icon: const Icon(Icons.clear_sharp),
iconSize: 40,
),
),
)
],
),
Expanded(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ class DynamicPanel extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
height: MediaQuery.of(context).size.height * 0.75,
height: MediaQuery.of(context).size.height * 0.45,
color: const Color(0xFF0a0a23),
child: Padding(
padding: const EdgeInsets.fromLTRB(16, 12, 16, 16),
padding: const EdgeInsets.fromLTRB(0, 5, 0, 16),
child: panelHandler(panel),
),
);
Expand Down

0 comments on commit 1d77a9f

Please sign in to comment.