我正在尝试更改网页应用程序中标题的字体,我该如何做呢?我发现pubsec.yaml与移动版本完全不同,这里的文件是:
name: projectbaseclient
description: An app built using Flutter for web
environment:
# You must be using Flutter >=1.5.0 or Dart >=2.3.0
sdk: '>=2.3.0 <3.0.0'
dependencies:
flutter_web: any
flutter_web_ui: any
我遵循了这个中的步骤,以便能够在颤振应用程序中使用我的自定义图标,但是我发现将pubspec.yaml文件配置为将.dart文件和.ttf添加到依赖项中是很棘手的,我得到了以下错误:
Error on line 45, column 4 of pubspec.yaml: A dependency specification must be a string or a mapping.
╷
45 │ ┌ - family: RechargeExpress
46 │ │ fonts:
47 │ │ - asset: fonts
我正试图为我的颤音应用程序构建一个“主题”,所以在整个项目中它是一致的。因此,我想使用字体Roboto-Regular,Roboto-Bold和Roboto-Medium。下面是我的代码
pubspec.yaml
name: customer
description: A new Flutter project.
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
现在我有一张设计图,标题是PingFangSC-Semibold,内容是PingFangSC-Regular。 如何在Flutter中使用PingFangSC-Regular和PingFangSC-Semibold? Flutter中的默认字体似乎是SF。我是否需要引入这两种字体,或者如何引入? enter image description here
我想要一个应用程序与卖家,买家和卖家的产品。 我有一个名为product的类,一个名为seller的类和一个名为products provider的类,这两个类都被写下来。我在那里写了所有的类。 类产品: import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
class Product with ChangeNotifier {
final String id;
final String rubric;
final Color rubri