name: offlinetestroom_flutter #項(xiàng)目名
description: "A new Flutter project." #項(xiàng)目描述
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1 #版本號和構(gòu)建號,打包時默認(rèn)是從pubspec.yaml中version讀取的蝴蜓。標(biāo)準(zhǔn)格式:version:A.B.C+X
environment:
sdk: '>=3.3.0 <4.0.0' #Dart sdk版本號托慨,多人開發(fā)中建議寫死
#以下是依賴的三方庫
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.6 #自帶的圖標(biāo)庫衙傀,iOS風(fēng)格
shared_preferences: ^2.2.2 #用于在設(shè)備上存儲簡單的持久化數(shù)據(jù)
dio: ^5.2.0 # HTTP 客戶端庫梢为,適用于處理復(fù)雜網(wǎng)絡(luò)請求
get: ^4.0.0 #狀態(tài)管理庫抵窒,比如導(dǎo)航弛针、狀態(tài)管理、依賴注入等
collection: ^1.18.0 #用于對數(shù)據(jù)進(jìn)行集合操作和處理
json_annotation: ^4.8.1 #生成 JSON 序列化代碼的庫李皇,配合 json_serializable 庫一起削茁,自動將json生成dart模型對象。
freezed_annotation: ^2.4.1 # 數(shù)據(jù)類生成庫掉房,用于簡化不可變數(shù)據(jù)類的定義茧跋。它與 freezed 庫一起使用,可以生成不可變對象卓囚、實(shí)現(xiàn)模式匹配瘾杭,并自動生成 copyWith、toString哪亿、hashCode粥烁、== 操作符等方法。
fluttertoast: ^8.0.7 # 提示消息的插件庫
dio_cookie_manager : ^3.1.1 #配合Dio網(wǎng)絡(luò)請求庫中管理HTTP cookie的Flutter插件
dio_http2_adapter: ^2.5.2 # Dio網(wǎng)絡(luò)請求庫中添加對HTTP/2協(xié)議的支持的Flutter插件蝇棉。
logger: ^2.2.0 #日志記錄庫
# path_provider: ^2.1.3 # 用于獲取設(shè)備上常見文件和目錄的路徑的插件庫
intl: ^0.19.0 #國際化和本地化任務(wù)讨阻,處理字符
marquee: ^2.2.3 # 顯示滾動文本的小部件,適配文字超出
dev_dependencies:
flutter_test:
sdk: flutter
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practi ces. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^3.0.0
build_runner: ^2.4.9
json_serializable: ^6.7.1
freezed: ^2.5.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# 在你的應(yīng)用里添加assets篡殷,需要按在這里添加路徑钝吮,否則無法識別文件,例如添加image或json
assets:
- assets/
- assets/images/
- assets/images/login/
- assets/images/exam/
- assets/images/home/
- assets/images/home/newslist/
- assets/images/icon/
- assets/images/icon/tabbarIcon/
- assets/images/usercenter/
- assets/data/
- assets/data/call/
- assets/data/home/
- assets/data/exam/
- assets/data/appointment/
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# 如果要在應(yīng)用中添加字體板辽,需要在這里進(jìn)行配置
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
fonts:
- family: Schyler
fonts:
- asset: fonts/Schyler-Regular.ttf
- asset: fonts/Schyler-Italic.ttf
style: italic
- family: Trajan Pro
fonts:
- asset: fonts/TrajanPro.ttf
- asset: fonts/TrajanPro_Bold.ttf
weight: 700
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages