Split into multiple files
This commit is contained in:
30
lib/widgets/big_card.dart
Normal file
30
lib/widgets/big_card.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
library;
|
||||
|
||||
import 'package:english_words/english_words.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BigCard extends StatelessWidget {
|
||||
const BigCard({
|
||||
super.key,
|
||||
required this.pair,
|
||||
});
|
||||
|
||||
final WordPair pair;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final style = theme.textTheme.displayMedium!.copyWith(
|
||||
color: theme.colorScheme.onPrimary,
|
||||
);
|
||||
|
||||
return Card(
|
||||
color: theme.colorScheme.primary,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Text(pair.asLowerCase,
|
||||
semanticsLabel: "${pair.first} ${pair.second}", style: style),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user