create tags and fix text styles

pull/2342/head
Miguel Beltran 4 months ago
parent 717ab93f3f
commit 9736a53231

@ -4,12 +4,19 @@ import 'package:google_fonts/google_fonts.dart';
class TextStyles { class TextStyles {
// Note: original Figma file uses Nikkei Maru // Note: original Figma file uses Nikkei Maru
// which is not available on GoogleFonts // which is not available on GoogleFonts
static final cardTitleStyle = GoogleFonts.anton( static final cardTitleStyle = GoogleFonts.rubik(
textStyle: const TextStyle( textStyle: const TextStyle(
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontSize: 15.0, fontSize: 15.0,
color: Colors.white, color: Colors.white,
letterSpacing: 1, letterSpacing: 1,
shadows: [
// Helps to read the text a bit better
Shadow(
blurRadius: 3.0,
color: Colors.black,
)
],
), ),
); );

@ -26,6 +26,12 @@ class TagChip extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Icon(
_iconFrom(tag),
color: Colors.white,
size: 10,
),
const SizedBox(width: 4),
Text( Text(
tag, tag,
textAlign: TextAlign.center, textAlign: TextAlign.center,
@ -39,5 +45,28 @@ class TagChip extends StatelessWidget {
); );
} }
IconData? _iconFrom(String tag) {
return switch (tag) {
'Adventure sports' => Icons.kayaking_outlined,
'Beach' => Icons.beach_access_outlined,
'City' => Icons.location_city_outlined,
'Cultural experiences' => Icons.museum_outlined,
'Foodie' || 'Food tours' => Icons.restaurant,
'Hiking' => Icons.hiking,
'Historic' => Icons.menu_book_outlined,
'Island' || 'Coastal' || 'Lake' || 'River' => Icons.water,
'Luxury' => Icons.attach_money_outlined,
'Mountain' || 'Wildlife watching' => Icons.landscape_outlined,
'Nightlife' => Icons.local_bar_outlined,
'Off-the-beaten-path' => Icons.do_not_step_outlined,
'Romantic' => Icons.favorite_border_outlined,
'Rural' => Icons.agriculture_outlined,
'Secluded' => Icons.church_outlined,
'Sightseeing' => Icons.attractions_outlined,
'Skiing' => Icons.downhill_skiing_outlined,
'Wine tasting' => Icons.wine_bar_outlined,
'Winter destination' => Icons.ac_unit,
_ => Icons.label_outlined,
};
}
} }

Loading…
Cancel
Save