Skip to content

Commit

Permalink
style: added responsive flashcard width
Browse files Browse the repository at this point in the history
  • Loading branch information
SethCohen committed Mar 26, 2023
1 parent c25211b commit fe06a77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/widgets/flashcard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ class _FlashcardState extends State<Flashcard> {
@override
Widget build(BuildContext context) {
final bool isEmptyInstructions = widget.card.instructions == '';
double screenWidth = MediaQuery.of(context).size.width;
double cardWidth = screenWidth * 0.15;

return SizedBox(
width: 300, // TODO make responsive
width: cardWidth,
child: Card(
child: Column(
mainAxisSize: MainAxisSize.min,
Expand Down

0 comments on commit fe06a77

Please sign in to comment.