mirror of
https://github.com/flutter/samples.git
synced 2025-11-12 07:48:55 +00:00
Styling revamp using CupertinoThemeData and CupertinoTextThemeData (#593)
This commit is contained in:
@@ -117,7 +117,8 @@ class VeggieCard extends StatelessWidget {
|
||||
/// Whether [veggie] falls into one of user's preferred [VeggieCategory]s
|
||||
final bool isPreferredCategory;
|
||||
|
||||
Widget _buildDetails() {
|
||||
Widget _buildDetails(BuildContext context) {
|
||||
final themeData = CupertinoTheme.of(context);
|
||||
return FrostyBackground(
|
||||
color: Color(0x90ffffff),
|
||||
child: Padding(
|
||||
@@ -127,11 +128,11 @@ class VeggieCard extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
Text(
|
||||
veggie.name,
|
||||
style: Styles.cardTitleText,
|
||||
style: Styles.cardTitleText(themeData),
|
||||
),
|
||||
Text(
|
||||
veggie.shortDescription,
|
||||
style: Styles.cardDescriptionText,
|
||||
style: Styles.cardDescriptionText(themeData),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -165,7 +166,7 @@ class VeggieCard extends StatelessWidget {
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: _buildDetails(),
|
||||
child: _buildDetails(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user