mirror of https://github.com/flutter/samples.git
parent
c6ccc231b9
commit
717ab93f3f
@ -1,7 +1,8 @@
|
||||
import 'dart:ui';
|
||||
|
||||
class AppColors {
|
||||
static const grey1 = Color(0xFFF2F2F2);
|
||||
static const black1 = Color(0xFF101010);
|
||||
static const white1 = Color(0xFFFFF7FA);
|
||||
static const grey1 = Color(0xFFF2F2F2);
|
||||
static const grey2 = Color(0xFF4D4D4D); // Figma rgba(255, 255, 255, 0.3)
|
||||
}
|
@ -1,13 +1,26 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
// Note: original Figma file uses Nikkei Maru
|
||||
// which is not available on GoogleFonts
|
||||
final cardTitleStyle = GoogleFonts.anton(
|
||||
textStyle: const TextStyle(
|
||||
fontWeight: FontWeight.w800,
|
||||
fontSize: 15.0,
|
||||
color: Colors.white,
|
||||
letterSpacing: 1,
|
||||
),
|
||||
);
|
||||
class TextStyles {
|
||||
// Note: original Figma file uses Nikkei Maru
|
||||
// which is not available on GoogleFonts
|
||||
static final cardTitleStyle = GoogleFonts.anton(
|
||||
textStyle: const TextStyle(
|
||||
fontWeight: FontWeight.w800,
|
||||
fontSize: 15.0,
|
||||
color: Colors.white,
|
||||
letterSpacing: 1,
|
||||
),
|
||||
);
|
||||
|
||||
// Note: original Figma file uses Google Sans
|
||||
// which is not available on GoogleFonts
|
||||
static final chipTagStyle = GoogleFonts.openSans(
|
||||
textStyle: const TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 10,
|
||||
color: Colors.white,
|
||||
textBaseline: TextBaseline.alphabetic,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -0,0 +1,43 @@
|
||||
import 'package:compass_app/common/themes/colors.dart';
|
||||
import 'package:compass_app/common/themes/text_styles.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TagChip extends StatelessWidget {
|
||||
const TagChip({
|
||||
super.key,
|
||||
required this.tag,
|
||||
});
|
||||
|
||||
final String tag;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ClipRRect(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
child: DecoratedBox(
|
||||
decoration: const BoxDecoration(
|
||||
color: AppColors.grey2,
|
||||
),
|
||||
child: SizedBox(
|
||||
height: 20.0,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 6.0),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
tag,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyles.chipTagStyle,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in new issue