mirror of
https://github.com/flutter/samples.git
synced 2026-05-14 02:47:42 +00:00
Adds season display to details screen. (#62)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:veggieseasons/data/veggie.dart';
|
||||
|
||||
abstract class Styles {
|
||||
@@ -87,7 +88,7 @@ abstract class Styles {
|
||||
fontWeight: FontWeight.normal,
|
||||
);
|
||||
|
||||
static const detailsShortDescriptionText = TextStyle(
|
||||
static const detailsDescriptionText = TextStyle(
|
||||
color: Color.fromRGBO(0, 0, 0, 0.9),
|
||||
fontFamily: 'NotoSans',
|
||||
fontSize: 16.0,
|
||||
@@ -95,6 +96,14 @@ abstract class Styles {
|
||||
fontWeight: FontWeight.normal,
|
||||
);
|
||||
|
||||
static const detailsBoldDescriptionText = TextStyle(
|
||||
color: Color.fromRGBO(0, 0, 0, 0.9),
|
||||
fontFamily: 'NotoSans',
|
||||
fontSize: 16.0,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.bold,
|
||||
);
|
||||
|
||||
static const detailsServingHeaderText = TextStyle(
|
||||
color: Color.fromRGBO(176, 176, 176, 1.0),
|
||||
fontFamily: 'NotoSans',
|
||||
@@ -182,6 +191,22 @@ abstract class Styles {
|
||||
Season.autumn: Color(0xff724913),
|
||||
};
|
||||
|
||||
// While handy, some of the Font Awesome icons sometimes bleed over their
|
||||
// allotted bounds. This padding is used to adjust for that.
|
||||
static const seasonIconPadding = {
|
||||
Season.winter: const EdgeInsets.only(right: 0.0),
|
||||
Season.spring: const EdgeInsets.only(right: 4.0),
|
||||
Season.summer: const EdgeInsets.only(right: 6.0),
|
||||
Season.autumn: const EdgeInsets.only(right: 0.0),
|
||||
};
|
||||
|
||||
static const seasonIconData = {
|
||||
Season.winter: FontAwesomeIcons.snowflake,
|
||||
Season.spring: FontAwesomeIcons.leaf,
|
||||
Season.summer: FontAwesomeIcons.umbrellaBeach,
|
||||
Season.autumn: FontAwesomeIcons.canadianMapleLeaf,
|
||||
};
|
||||
|
||||
static const seasonBorder = Border(
|
||||
top: BorderSide(color: Color(0xff606060)),
|
||||
left: BorderSide(color: Color(0xff606060)),
|
||||
|
||||
Reference in New Issue
Block a user