font changes
parent
6b96b6fc9e
commit
23fc89b40a
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16.3951 9.46315C16.6916 9.6815 16.7549 10.0988 16.5366 10.3953C16.367 10.6256 16.1974 10.8445 16.0486 11.0351C15.7516 11.4157 15.3427 11.9254 14.8985 12.437C14.4571 12.9453 13.9677 13.4708 13.5109 13.8745C13.2832 14.0757 13.0479 14.2607 12.8185 14.399C12.6073 14.5263 12.3172 14.6666 11.9998 14.6666C11.6823 14.6666 11.3922 14.5263 11.181 14.399C10.9516 14.2607 10.7163 14.0757 10.4886 13.8745C10.0318 13.4708 9.54242 12.9453 9.10106 12.437C8.65682 11.9254 8.24794 11.4157 7.95093 11.0351C7.80215 10.8445 7.63252 10.6256 7.46293 10.3953C7.24458 10.0988 7.30791 9.6815 7.60437 9.46315C7.72355 9.37538 7.86225 9.33314 7.99972 9.33325L15.9998 9.33325C16.1373 9.33314 16.276 9.37538 16.3951 9.46315Z" fill="#2E3039"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 827 B |
@ -0,0 +1,3 @@
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.67813 26.7442C4.67813 26.7442 5.79663 26.7362 6.58579 26.7362L12.5626 26.765C13.2772 26.765 13.8707 26.0068 13.9036 24.9121L13.9101 19.9214C13.9101 18.8573 14.3861 18.0246 15.124 17.9771L16.9571 17.9622C17.6959 18.0075 18.2033 18.8483 18.2033 19.908L18.1983 24.9267C18.2294 26.0208 18.7284 26.7355 19.4455 26.7355L27.4924 26.7576L27.5074 20.5883C27.5074 19.5274 26.9969 18.703 26.2546 18.6568L23.0234 18.6403C22.3088 18.6403 21.7461 17.8861 21.7144 16.7901L21.7017 15.1219C21.7374 14.0278 22.3026 13.2752 23.0191 13.2752L26.2686 13.2845C27.0068 13.237 27.4884 12.3654 27.4884 11.3064L27.4962 3.60826C27.4962 3.60826 26.6598 5.07839 25.0066 5.16378L19.5411 5.15881C18.829 5.15881 18.2325 5.93502 18.2002 7.02854V11.9727C18.1666 13.0653 17.6074 13.8381 16.8915 13.8381L15.238 13.8253C14.5209 13.8253 13.9474 13.0777 13.9151 11.9885L13.9194 6.98973C13.8884 5.89497 13.3192 5.15788 12.6036 5.15788L4.67254 5.1616L4.67036 11.3092C4.67036 12.371 5.16748 13.2218 5.90724 13.2708L9.1571 13.2571C9.89221 13.3053 10.4129 14.1811 10.4129 15.2374L10.403 16.6607C10.403 17.7219 9.90059 18.5714 9.16238 18.6198L5.90724 18.6121C5.16685 18.6624 4.67036 19.5031 4.67036 20.5622L4.67813 26.7442ZM32 3.17482V28.8897C31.9599 30.6237 30.4879 31.9669 28.6923 31.9998H3.29336C2.44731 32.0095 1.63063 31.6901 1.01602 31.109C0.401403 30.5279 0.03705 29.7307 0 28.8859L0.0021713 3.12235C0.0399629 2.27665 0.404663 1.4786 1.01948 0.896227C1.63429 0.313857 2.45125 -0.00738898 3.29833 0.00012904L28.6737 0.010996C29.5284 0.01137 30.3503 0.339958 30.9694 0.928816C31.5885 1.51767 31.9574 2.32176 32 3.17482Z" fill="#EC1C2B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,8 @@
|
||||
<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.39199 13.22H5.50801C3.43601 13.22 1.75 11.538 1.75 9.47002L1.75 5.5C1.75 3.432 3.43601 1.75 5.50801 1.75L19.492 1.75C21.564 1.75 23.25 3.432 23.25 5.5L23.25 9.62998C23.25 10.044 22.914 10.38 22.5 10.38C22.086 10.38 21.75 10.044 21.75 9.62998L21.75 5.5C21.75 4.259 20.737 3.25 19.492 3.25L5.50801 3.25C4.26301 3.25 3.25 4.259 3.25 5.5L3.25 9.47002C3.25 10.711 4.26301 11.72 5.50801 11.72H8.39199C8.80599 11.72 9.14199 12.056 9.14199 12.47C9.14199 12.884 8.80599 13.22 8.39199 13.22Z" fill="#161616"/>
|
||||
<path d="M6.44824 7.5C6.44824 8.052 6.90025 8.5 7.45225 8.5C8.00425 8.5 8.45322 8.052 8.45322 7.5C8.45322 6.948 8.00522 6.5 7.45322 6.5H7.44424C6.89124 6.5 6.44824 6.948 6.44824 7.5Z" fill="#161616"/>
|
||||
<path d="M12.4522 8.5C11.9002 8.5 11.4482 8.052 11.4482 7.5C11.4482 6.948 11.8912 6.5 12.4442 6.5H12.4532C13.0052 6.5 13.4532 6.948 13.4532 7.5C13.4532 8.052 13.0042 8.5 12.4522 8.5Z" fill="#161616"/>
|
||||
<path d="M16.4482 7.5C16.4482 8.052 16.9002 8.5 17.4522 8.5C18.0042 8.5 18.4532 8.052 18.4532 7.5C18.4532 6.948 18.0052 6.5 17.4532 6.5H17.4442C16.8912 6.5 16.4482 6.948 16.4482 7.5Z" fill="#161616"/>
|
||||
<path d="M15.1212 19.25H15.1582C15.4212 19.25 15.6662 19.111 15.8022 18.884L15.804 18.881C15.8372 18.8262 16.3112 18.0432 16.9722 17.2C17.8102 16.132 18.5922 15.422 19.1742 15.201C19.5612 15.054 19.7562 14.621 19.6092 14.234C19.4622 13.847 19.0292 13.652 18.6422 13.799C17.2942 14.311 15.9432 16.0009 15.1642 17.1179C14.6062 16.4859 14.0932 16.421 13.9082 16.421C13.4942 16.421 13.1582 16.757 13.1582 17.171C13.1582 17.551 13.4412 17.8649 13.8082 17.9139C13.8692 17.9449 14.1482 18.115 14.4792 18.82C14.5972 19.071 14.8442 19.236 15.1212 19.25Z" fill="#161616"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.71582 16.5C9.71582 20.222 12.7518 23.25 16.4828 23.25C20.2138 23.25 23.2488 20.222 23.2488 16.5C23.2488 12.778 20.2138 9.75 16.4828 9.75C12.7518 9.75 9.71582 12.778 9.71582 16.5ZM11.2158 16.5C11.2158 13.605 13.5788 11.25 16.4828 11.25C19.3868 11.25 21.7488 13.605 21.7488 16.5C21.7488 19.395 19.3868 21.75 16.4828 21.75C13.5788 21.75 11.2158 19.395 11.2158 16.5Z" fill="#161616"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
@ -0,0 +1,29 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class NationalityCountries {
|
||||
String? id;
|
||||
String? name;
|
||||
String? nameN;
|
||||
|
||||
NationalityCountries({
|
||||
this.id,
|
||||
this.name,
|
||||
this.nameN,
|
||||
});
|
||||
|
||||
factory NationalityCountries.fromRawJson(String str) => NationalityCountries.fromJson(json.decode(str));
|
||||
|
||||
String toRawJson() => json.encode(toJson());
|
||||
|
||||
factory NationalityCountries.fromJson(Map<String, dynamic> json) => NationalityCountries(
|
||||
id: json["ID"],
|
||||
name: json["Name"],
|
||||
nameN: json["NameN"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"ID": id,
|
||||
"Name": name,
|
||||
"NameN": nameN,
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,148 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:hmg_patient_app/core/viewModels/project_view_model.dart';
|
||||
|
||||
/// Font utility class to manage consistent font selection across the app
|
||||
class FontUtils {
|
||||
/// Get the appropriate font family based on the current language
|
||||
static bool getFontFamily(BuildContext context) {
|
||||
final projectViewModel = Provider.of<ProjectViewModel>(context, listen: false);
|
||||
return projectViewModel.isArabic ? true : false;
|
||||
}
|
||||
|
||||
/// Get the appropriate font family for a specific language
|
||||
static String getFontFamilyForLanguage(bool isArabic) {
|
||||
return isArabic ? 'Cairo' : 'Poppins';
|
||||
}
|
||||
}
|
||||
|
||||
extension DynamicTextStyleExtension on BuildContext {
|
||||
TextStyle dynamicTextStyle(
|
||||
{double? fontSize,
|
||||
FontWeight? fontWeight,
|
||||
Color? color,
|
||||
double? letterSpacing,
|
||||
double? wordSpacing,
|
||||
double? height,
|
||||
List<Shadow>? shadows,
|
||||
Color? backgroundColor,
|
||||
TextDecoration? decoration,
|
||||
Color? decorationColor,
|
||||
TextDecorationStyle? decorationStyle,
|
||||
double? decorationThickness,
|
||||
Locale? locale,
|
||||
TextBaseline? textBaseline,
|
||||
FontStyle? fontStyle,
|
||||
bool isLanguageSwitcher = false}) {
|
||||
final family = FontUtils.getFontFamily(this);
|
||||
|
||||
return isLanguageSwitcher
|
||||
? (family
|
||||
? GoogleFonts.poppins(
|
||||
fontSize: fontSize,
|
||||
fontWeight: fontWeight,
|
||||
color: color,
|
||||
letterSpacing: letterSpacing,
|
||||
wordSpacing: wordSpacing,
|
||||
height: height,
|
||||
shadows: shadows,
|
||||
backgroundColor: backgroundColor,
|
||||
decoration: decoration,
|
||||
decorationColor: decorationColor,
|
||||
decorationStyle: decorationStyle,
|
||||
decorationThickness: decorationThickness,
|
||||
locale: locale ?? Localizations.localeOf(this),
|
||||
textBaseline: textBaseline,
|
||||
fontStyle: fontStyle,
|
||||
)
|
||||
: GoogleFonts.cairo(
|
||||
fontSize: fontSize,
|
||||
fontWeight: fontWeight,
|
||||
color: color,
|
||||
letterSpacing: letterSpacing,
|
||||
wordSpacing: wordSpacing,
|
||||
height: height,
|
||||
shadows: shadows,
|
||||
backgroundColor: backgroundColor,
|
||||
decoration: decoration,
|
||||
decorationColor: decorationColor,
|
||||
decorationStyle: decorationStyle,
|
||||
decorationThickness: decorationThickness,
|
||||
locale: locale ?? Localizations.localeOf(this),
|
||||
textBaseline: textBaseline,
|
||||
fontStyle: fontStyle,
|
||||
))
|
||||
: (family
|
||||
? GoogleFonts.cairo(
|
||||
fontSize: fontSize,
|
||||
fontWeight: fontWeight,
|
||||
color: color,
|
||||
letterSpacing: letterSpacing,
|
||||
wordSpacing: wordSpacing,
|
||||
height: height,
|
||||
shadows: shadows,
|
||||
backgroundColor: backgroundColor,
|
||||
decoration: decoration,
|
||||
decorationColor: decorationColor,
|
||||
decorationStyle: decorationStyle,
|
||||
decorationThickness: decorationThickness,
|
||||
locale: locale ?? Localizations.localeOf(this),
|
||||
textBaseline: textBaseline,
|
||||
fontStyle: fontStyle,
|
||||
)
|
||||
: GoogleFonts.poppins(
|
||||
fontSize: fontSize,
|
||||
fontWeight: fontWeight,
|
||||
color: color,
|
||||
letterSpacing: letterSpacing,
|
||||
wordSpacing: wordSpacing,
|
||||
height: height,
|
||||
shadows: shadows,
|
||||
backgroundColor: backgroundColor,
|
||||
decoration: decoration,
|
||||
decorationColor: decorationColor,
|
||||
decorationStyle: decorationStyle,
|
||||
decorationThickness: decorationThickness,
|
||||
locale: locale ?? Localizations.localeOf(this),
|
||||
textBaseline: textBaseline,
|
||||
fontStyle: fontStyle,
|
||||
));
|
||||
|
||||
// return family
|
||||
// ? GoogleFonts.cairo(
|
||||
// fontSize: fontSize,
|
||||
// fontWeight: fontWeight,
|
||||
// color: color,
|
||||
// letterSpacing: letterSpacing,
|
||||
// wordSpacing: wordSpacing,
|
||||
// height: height,
|
||||
// shadows: shadows,
|
||||
// backgroundColor: backgroundColor,
|
||||
// decoration: decoration,
|
||||
// decorationColor: decorationColor,
|
||||
// decorationStyle: decorationStyle,
|
||||
// decorationThickness: decorationThickness,
|
||||
// locale: locale ?? Localizations.localeOf(this),
|
||||
// textBaseline: textBaseline,
|
||||
// fontStyle: fontStyle,
|
||||
// )
|
||||
// : GoogleFonts.poppins(
|
||||
// fontSize: fontSize,
|
||||
// fontWeight: fontWeight,
|
||||
// color: color,
|
||||
// letterSpacing: letterSpacing,
|
||||
// wordSpacing: wordSpacing,
|
||||
// height: height,
|
||||
// shadows: shadows,
|
||||
// backgroundColor: backgroundColor,
|
||||
// decoration: decoration,
|
||||
// decorationColor: decorationColor,
|
||||
// decorationStyle: decorationStyle,
|
||||
// decorationThickness: decorationThickness,
|
||||
// locale: locale ?? Localizations.localeOf(this),
|
||||
// textBaseline: textBaseline,
|
||||
// fontStyle: fontStyle,
|
||||
// );
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue