Browse Source

去除文件,调整back图片等

liukai 1 year ago
parent
commit
7f5d9a7151

BIN
assets/fonts/San-Francisco-Display-Light.otf


BIN
assets/fonts/San-Francisco-Display-Medium.ttf


BIN
assets/fonts/San-Francisco-Display-Regular.ttf


BIN
assets/fonts/San-Francisco-Display-Semibold.otf


BIN
assets/fonts/Times-New-Roman.ttf


BIN
assets/images/black_back.png


BIN
assets/images/white_back.png


+ 0 - 10
lib/comm/constants/font_constants.dart

@@ -1,10 +0,0 @@
-class FontConstants {
-  //字体time new 字体
-  static const FONT_FAMILY_TIME_NEW = "time_new";
-
-  //SanFrancisco字体
-  static const FONT_FAMILY_SC_LIGHT = "sc_light";
-  static const FONT_FAMILY_SC_REGULAR = "sc_regular";
-  static const FONT_FAMILY_SC_MEDIUM = "sc_medium";
-  static const FONT_FAMILY_SC_BOLD = "sc_bold";
-}

+ 4 - 3
lib/comm/widget/common_widget.dart

@@ -1,4 +1,5 @@
 import 'package:flutter/material.dart';
+import 'package:ftrecruiter/generated/assets.dart';
 import 'package:get/get.dart';
 import 'package:ftrecruiter/comm/constants/color_constants.dart';
 import 'package:ftrecruiter/comm/widget/my_load_image.dart';
@@ -18,8 +19,8 @@ class CommonWidget {
         padding: const EdgeInsets.only(top: 3.5),
         child: IconButton(
           icon: Get.isDarkMode
-              ? MyAssetImage(backPath ?? "assets/images/blue_back.png", width: 15, height: 22.5, color: Colors.white)
-              : MyAssetImage(backPath ?? "assets/images/blue_back.png", width: 15, height: 22.5),
+              ? MyAssetImage(backPath ?? Assets.imagesWhiteBack, width: 22, height: 22)
+              : MyAssetImage(backPath ?? Assets.imagesBlackBack, width: 22, height: 22),
           onPressed: () {
             if (backCallback != null) {
               backCallback();
@@ -33,7 +34,7 @@ class CommonWidget {
       centerTitle: true,
       title: Text(
         title,
-        style: TextStyle(color: Get.isDarkMode ? Colors.white : textColor, fontSize: 18,fontWeight: FontWeight.w500),
+        style: TextStyle(color: Get.isDarkMode ? Colors.white : textColor, fontSize: 18, fontWeight: FontWeight.w500),
       ),
       actions: actions,
       backgroundColor: DarkThemeUtil.multiColors(backgroundColor),

+ 20 - 14
lib/comm/widget/my_text_view.dart

@@ -1,5 +1,4 @@
 import 'package:flutter/material.dart';
-import 'package:ftrecruiter/comm/constants/font_constants.dart';
 
 // ignore: slash_for_doc_comments
 /**
@@ -47,8 +46,7 @@ class MyTextView extends StatelessWidget {
   bool? isFontRegular;
   bool? isFontMedium;
   bool? isFontBold;
-  bool? isFonTimeNew;
-  String? fontFamily;
+  FontWeight? fontWeight;
 
   MyTextView(this.content,
       {this.textColor,
@@ -73,8 +71,9 @@ class MyTextView extends StatelessWidget {
       this.isFontRegular,
       this.isFontMedium,
       this.isFontBold,
-      this.isFonTimeNew,
+      this.fontWeight,
       this.onClick}) {
+
     if (padding != null) {
       if (padding != null && padding! > 0) {
         paddingLeft = padding;
@@ -96,17 +95,25 @@ class MyTextView extends StatelessWidget {
     onClick ??= () {};
 
     if (isFontLight != null && isFontLight!) {
-      fontFamily = FontConstants.FONT_FAMILY_SC_LIGHT;
+
+       fontWeight = FontWeight.w300;
+
     } else if (isFontRegular != null && isFontRegular!) {
-      fontFamily = FontConstants.FONT_FAMILY_SC_REGULAR;
+
+      fontWeight = FontWeight.w400;
+
     } else if (isFontMedium != null && isFontMedium!) {
-      fontFamily = FontConstants.FONT_FAMILY_SC_MEDIUM;
+
+      fontWeight = FontWeight.w500;
+
     } else if (isFontBold != null && isFontBold!) {
-      fontFamily = FontConstants.FONT_FAMILY_SC_BOLD;
-    } else if (isFonTimeNew != null && isFonTimeNew!) {
-      fontFamily = FontConstants.FONT_FAMILY_TIME_NEW;
-    } else {
-      fontFamily = null;
+
+      fontWeight = FontWeight.w700;
+
+    }  else {
+
+      fontWeight = FontWeight.normal;
+
     }
   }
 
@@ -127,9 +134,8 @@ class MyTextView extends StatelessWidget {
             style: TextStyle(
               color: textColor,
               fontSize: fontSize ?? 14,
-              fontWeight: isBold ?? false ? FontWeight.bold : FontWeight.normal,
+              fontWeight: fontWeight,
               overflow: singleLine ?? false ? TextOverflow.ellipsis : TextOverflow.clip,
-              fontFamily: fontFamily,
             ),
           ),
         ));

+ 2 - 5
lib/generated/assets.dart

@@ -2,12 +2,9 @@
 class Assets {
   Assets._();
 
-  static const String fontsSanFranciscoDisplayLight = 'assets/fonts/San-Francisco-Display-Light.otf';
-  static const String fontsSanFranciscoDisplayMedium = 'assets/fonts/San-Francisco-Display-Medium.ttf';
-  static const String fontsSanFranciscoDisplayRegular = 'assets/fonts/San-Francisco-Display-Regular.ttf';
-  static const String fontsSanFranciscoDisplaySemibold = 'assets/fonts/San-Francisco-Display-Semibold.otf';
-  static const String fontsTimesNewRoman = 'assets/fonts/Times-New-Roman.ttf';
+  static const String imagesBlackBack = 'assets/images/black_back.png';
   static const String imagesBlueBack = 'assets/images/blue_back.png';
   static const String imagesSplashCenterBlueLogo = 'assets/images/splash_center_blue_logo.webp';
+  static const String imagesWhiteBack = 'assets/images/white_back.png';
 
 }

+ 0 - 23
pubspec.yaml

@@ -84,32 +84,9 @@ flutter:
     - assets/images/auth/
     - assets/images/coin/
     - assets/images/company/
-    - assets/images/home/
     - assets/images/job/
     - assets/images/talent/
     - assets/images/message/
-    - assets/fonts/
-
-  fonts:
-    - family: time_new
-      fonts:
-        - asset: assets/fonts/Times-New-Roman.ttf
-
-    - family: sc_light
-      fonts:
-        - asset: assets/fonts/San-Francisco-Display-Light.otf
-
-    - family: sc_medium
-      fonts:
-        - asset: assets/fonts/San-Francisco-Display-Medium.ttf
-
-    - family: sc_regular
-      fonts:
-        - asset: assets/fonts/San-Francisco-Display-Regular.ttf
-
-    - family: sc_bold
-      fonts:
-        - asset: assets/fonts/San-Francisco-Display-Semibold.otf
 
   # An image asset can refer to one or more resolution-specific "variants", see
   # https://flutter.dev/assets-and-images/#resolution-aware.