免费观看又色又爽又黄的小说免费_美女福利视频国产片_亚洲欧美精品_美国一级大黄大色毛片

flutter1.9,flutter20性能

flutter項目升級2.0過程填坑記錄

在此之前先推薦看大佬的: 填坑指導

創(chuàng)新互聯(lián)建站-專業(yè)網站定制、快速模板網站建設、高性價比屯留網站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式屯留網站制作公司更省心,省錢,快速模板網站建設找我們,業(yè)務覆蓋屯留地區(qū)。費用合理售后完善,10年實體公司更值得信賴。

iOS需要注意:

1、flutter2.0要求cocoapods 升級到1.9.0

詳情看這篇博客

2、原來flutter項目中的podfile文件是舊版本的ccocoapods了,刪除podfile和對應的.lock,然后flutter項目重新運行使用它自動生成的podfile文件

3、安裝CocoaPods

卸載cocoapods:sudo gem uninstall cocoapods

查看cocoapods版本:pod --version

指定版本安裝:

sudo gem install -n /usr/local/bin cocoapods -v 1.9.3(新MacOS系統(tǒng)升級)

不指定版本安裝

sudo gem install -n /usr/local/bin cocoapods

說明 :老項目sdk1.17.0===升級到2.0.1,當前所有操作基于win平臺

到此為止環(huán)境已經準備妥當,正式進入項目修改。

所有的插件都要適配到空安全,插件是否支持均會有對應說明Null safety,適配過程不確定版本的話,可以使用dio: any,適配完事后再在pubspec.lock文件中查看具體的版本修改過來,實在有部分插件沒有支持的,參考下面

部分插件在適配空安全的版本放棄維護了,得自行更新或尋找替代,如: flutter_swiper 變?yōu)?flutter_swiper_null_safety ,插件更新后要注意項目中的用法是否需要更新

2.1.1: 以前采用的是 provide 插件共享全局數(shù)據(jù),現(xiàn)在變化為 provider ,用法改變, 點擊參考 ,以防文章丟失,我重復一遍:

比如:

2.1.2: dio版本升級到4.0.0最新版后,部分用法改變

2.2.1

2.2.2

解決方案:

2.2.3

解決方案:

2.2.4

解決方案:

2.2.5

解決方案:

2.2.6

解決方案:

2.2.7

解決方案:

2.2.8

解決方案: child 換為sliver

2.2.8.1

解決方案: 項目目錄下: android--app-build.gradle --minSdkVersion改為:18 或者19

2.2.8.2

解決方案: 在pubspec.yarm管理里面添加:publish_to

2.2.8.3

解決方案: video_player升級后字段發(fā)生了變化,initialized字段更換為:isInitialized(_controller.value.isInitialized)

2.2.8.4

解決方案:

2.2.8.5

解決方案:

2.2.8.6

解決方案: 方案一:刪除ios目錄下的Podfile.lock 文件然后重新運行 pod install命令

方案二:刪除ios目錄下的Podfile.lock與Podfile文件 重新運行flutter run或flutter build ios

方案三:刪除ios目錄,重新運行 flutter create . 命令,注意有"."這個符號不要忘記

2.2.8.7

這個報錯一般對應的就是下面的報錯,注意看后面的報錯信息,看是哪個插件報錯。

解決方案: 把Podfile的版本注釋打開,改為platform :ios, '9.0' 或者是更高的版本

全局替換

1.將new List() 替換為[];

2.TextField的inputFormatters:[WhitelistingTextInputFormatter.digitsOnly] 替換為[FilteringTextInputFormatter.digitsOnly]

3.TextField的inputFormatters:[WhitelistingTextInputFormatter(RegExp("[a-z|A-Z|0-9]"))]替換為FilteringTextInputFormatter.allow(RegExp("[a-z|A-Z|0-9]"))

4.Stack組件中overflow: Overflow.visible改為 clipBehavior: Clip.none;overflow: Overflow.clip改為clipBehavior:Clip.hardEdge

5.ListWheelScrollView組件中clipToSize = false改為clipBehavior: Clip.none,clipToSize = true改為 Clip.hardEdge

6.TextField中maxLengthEnforced: true改為maxLengthEnforcement:MaxLengthEnforcement.enforced

7.FlatButton、RaisedButton、OutlineButton的變化: 官方參考

顏色的屬性發(fā)生了變化,由原來的Color 變?yōu)榱薓aterialStatePropertyColor, 這是未了解決不同狀態(tài)(pressed、hovered、focused、disabled)下按鈕顏色的變化

例如

8.出現(xiàn)如下警告

9.showSnackBar報錯誤

解決方案: Scaffold換為ScaffoldMessenger

10.textSelectionColor棄用

解決方案:

11.charts_flutter升級后屬性報錯

解決方案:

12.flutter 真機調試無法訪問網絡,dio報錯

解決方案:

android:

ios:

問題12完整參考

SSAT試題

SSAT考試真題示例

Writing Sample

Questions: 1 (essay response)

Time: 25 minutes

What is measured? Your essay will be used by admission officers to assess your writing skills. The exercise is not scored by SSAT, but a copy of your essay is forwarded to each school you request as a score recipient.

Directions: Read the following topic carefully. Take a few minutes to think about the topic and organize your thoughts before you begin writing. Use the scratch paper and pen provided. Be sure that your handwriting is legible and that you stay within the lines and margins.

Sample Topic: It is better to be safe than sorry.

Assignment: Do you agree or disagree with the topic statement?

Support your position with one or two specific examples from personal experience, the experience of others, current events, history, or literature.

Multiple-choice Test

Each question is followed by five answer choices. After you have selected your answer, find the row on the answer sheet numbered the same as the question, and fill in the circle with the same letter as your answer. Each question has only one correct answer.

Reading Comprehension

Questions: 40 (multiple-choice), based on 6-7 reading passages

Time: 40 minutes

What is measured? Your ability to read quickly and to understand what you read.

Directions: Read the passage carefully and then answer the questions (1-3) about it. For each question, decide on the basis of the passage which one of the choices best answers the question.

We had had a consuming desire to see a pony rider, but somehow or other all that passed us streaked by in the night, and so we heard only a whiz and a hail, and the swift phantom was gone.

But now the driver exclaims, "Here he comes!" Every neck is stretched and every eye strained.

Away across the endless dead level of the prairie a black speck appears against the sky. Soon it becomes a horse and rider, rising and falling, sweeping nearer and nearer, and the flutter of hoofs comes faintly to the ear. Another instant a whoop and hurrah from our upper deck, a wave of the rider's hand, but no reply, and man and horse burst past our excited faces and go winging away like a belated fragment of a storm!

1. At the driver's call, the people became more

disappointed

eager

frightened

puzzled

hysterical

2. The people waiting to see the pony rider were most probably

at a hotel

on a grandstand

on a stagecoach

at a farm

in a theater

3. The land where the people were watching was

flat and treeless

hilly and rocky

desert-like

farmland

cut by deep crevasses

Quantitative (MATH)

Questions: 50 (multiple-choice), in two sections

Time: 30 minutes per section (60 minutes total)

What is measured? Your knowledge of algebra and quantitative concepts.

Directions: Following each problem in this section, there are five suggested answers. Work each problem in your head or in the space provided (there will be space for scratchwork in your test booklet). Then look at the five suggested answers and decide which is best.

4. According to the graph, who owns the most CD's?

Bob Cheryl Linda Marion Mike

5. If 5 + 9 + __ = 6 + 8 + 1, then __ =

1 5 6 8 9

6. If 3/4 of a number is 48, then 1/4 of the same number is

12 16 24 144 192

7. What is the perimeter of an equilateral triangle if one side of the triangle has the same length as the side of a square with an area of 25?

30 20 15 10 5

Verbal

Questions: 60 (30 Synonym, 30 Analogy)

Time: 30 minutes

What is measured? The synonym questions test your vocabulary, and the analogy questions measure your ability to relate ideas to each other logically.

Directions: Each of the following questions (16-20) consists of one word followed by five words or phrases. You are to select the one word or phrase whose meaning is closest to the word in capital letters.

8.fling

rotate hurl arouse pound defy

9. rountine

legal directed unnecessary usual informative

10. prologue

pretense extension introduction

humorous play nonessential part

11. manipulate

release handle stretch make worse keep apart

12.adroit

clever retentive cooperative unhindered arid

Directions: The following questions (21-25) ask you to find relationships between words. For each question, select the answer choice that best completes the meaning of the sentence.

13. Sapling is to tree as cub is to

moose pine goat cedar bear

14. Frame is to building as

hair is to head skull is to jaw skeleton is to body

finger is to hand bone is to marrow

15. Meandering is to river as

winding is to road wandering is to wave scudding is to cloud

chugging is to train rolling is to ship

Flutter Android端集成排坑 - armeabi 適配 & FlutterBoost

Flutter可以算是當下最火熱的新技術之一,我現(xiàn)在所在團隊也準備將Flutter技術應用到線上工程中。

關于混合工程,官方文檔其實寫的已經比較清楚了,按著文檔走一般問題不大,

但是有一點值得注意的是,F(xiàn)lutter工程引入的庫的gradle的 buildTypes 要與原工程保持一致,如果不一致需要手工添加。

進入正題,現(xiàn)在Flutter官方默認只提供armeabi-v7a、arm64-v8a、x86和x86-64,其中x86和x86-64是為模擬器準備的。目前我們使用的SDK大部分只使用了armeabi架構,直接使用我們會遇見找不到 libflutter.so,libapp.so 的情況,所以我們需要對FlutterSDK做一定的改造。

首先我們要了解下Flutter編譯產物,因為不同版本產物是不同的,這里我們只針對Flutter 1.9.1-hotfixes來說。除了資源文件之外,F(xiàn)lutter打包會生成兩個非常重要的so庫,他們分別是 libflutter.so,libapp.so 。其中 libflutter.so 是Flutter的SDK產物而 libapp.so 正是我們編寫的dart文件的產物。默認情況下,這兩個文件都會出現(xiàn)在armeabi-v7a中,因此我們要作出對應的改造。

libflutter.so 位于FlutterSDK中,這里順帶提一句,除了這對不同CPU架構,它還分為Debug版和Release版,它們的區(qū)別在于Debug是為JIT編譯方式打造的,體積較大而Release是為AOT編譯方式打造的,體積很小。對 libflutter.so 的改造,只要將其移動文件路徑即可,運行以下腳本即可,此腳本來自美團分享的Flutter文章。

移動完了 libflutter.so 之后我們打包發(fā)現(xiàn), libapp.so 仍然會出現(xiàn)在armeabi-v7a中,所以第二部我們就是移動 libapp.so 。這個需要更改 flutter.gradle ,我們在 flutter.gradle 的45行可以看到如下定義,它定義了我們的環(huán)境。

在524行我們可以看到,abiValue的取值就是根據(jù)上述定義值。

所以結論很簡單,只要將

private static final String ARCH_ARM32 = "armeabi-v7a";

改為

private static final String ARCH_ARM32 = "armeabi";

就可以完成對與 libflutter.so 的移動。

前期工作我們都做好了,打成aar就非常簡單了

直接使用 flutter build aar --target-platform android-arm

打出來后可以解壓檢查下 libflutter.so,libapp.so 是否都在armeabi文件夾下即可。

說完了armeabi適配問題,這里下說下有關于有關于FlutterBoost的接入。這個東西接入有兩點要注意。

在主app內加上即可,常規(guī)操作,強制統(tǒng)一support包的版本號

注釋flutter.gradle第655行。因為編譯過程中,會去初始化插件項目的buildType下面的debug配置,而插件項目下并未配置debug,導致報錯。

如果發(fā)現(xiàn)文章中有錯誤或者有更好的解決方案歡迎指正留言,當然如果本篇文章幫助你解決了問題,也不要吝嗇你的感謝。謝謝各位。

Flutter打包產物

基于flutter版本1.9.1,低版本區(qū)別對待。

lib目錄,libflutter.so文件,三個目錄armeabi-v7a,x86_64和x86,支持arm平臺32和x86的32和64。

asset目錄,新增flutter_asset目錄,三個文件,dart產物。

lib目錄,libflutter.so文件,兩個目錄armeabi-v7,arm64-v8a,支持arm平臺32和64。

asset目錄,新增flutter_asset目錄。

在release模式,libapp.so替代flutter老版本的一些dart產物,如下。

flutter命令打包生成產物,flutter命令腳本會調用dart命令。

dart的編譯模式:

kernel snapshot 模式,開發(fā)階段,isolate_snapshot_data,vm_snapshot_data,kernel_blob_bin是業(yè)務數(shù)據(jù)。

core jit,

生產階段,dart的一種二進制模式,這是一種aot模式,vm和isolate。

任重而道遠

創(chuàng)建flutter項目語言選擇

在升級flutter1.9+之后,flutter默認的iOS項目為swift,Android的默認項目為kotlin

在創(chuàng)建時選擇語言

分享標題:flutter1.9,flutter20性能
新聞來源:http://m.newbst.com/article42/phhehc.html

成都網站建設公司_創(chuàng)新互聯(lián),為您提供外貿網站建設網站維護網站導航App開發(fā)軟件開發(fā)自適應網站

廣告

聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

網站優(yōu)化排名