新网创想网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

flutter1.17,flutter22

记录flutter-folio开源项目启动报错Method not found

下载了一个开源项目flutter-folio

六合网站制作公司哪家好,找成都创新互联!从网页设计、网站建设、微信开发、APP开发、响应式网站开发等网站项目制作,到程序开发,运营维护。成都创新互联公司2013年成立到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选成都创新互联

编译的时候一直在说方法找不到。

Error: Method not found:

是cloud_firebase_web跳转找firebase_core的某个方法的时候说找不到。

按照网上说的在firebase包定义前面添加关键字dependency_overrides:也不行。

开始的时候尝试着自己修改方法名让它能够找到,一直搞不定。总感觉这个是系统自带的类库,不应该发生这么低级的错误了。

最后仔细看了一下他们的版本不对应,有可能是版本问题,cloud_firebase_web是1.0.7,使用工具跳转到firebase_core的时候是1.17.0

然后就尝试着手动修改firebase_core关联的包,不要让它自动匹配版本,而是强制使用某一个固定版本。

比如之前是这么写的:firebase_core: ^1.0.1,^含义是找到大于1.0.1小于2.0.0的最高版本

修改成:firebase_core: 1.4.0

具体有哪些版本可以去这个网站上找:

然后就可以了。

事后分析原因是:firebase_core虽然没有修改大版本号,当前依然是1.17.0。但是里面做了不兼容的改动,删除了某些方法,导致了找不到。而cloud_firebase_web当前的最高版本已经是3点几了,因此对应firebase_core版本的cloud_firebase_web在2或者3才兼容。

所以包管理真的是一件比较麻烦的事情。

Flutter Module 打包aar

Flutter 版本1.17.1

flutter build aar

这种方式打出来的aar包并没有把第三方插件打入aar中,只是将第三方插件依赖到本地的仓库,所以不太适用共同开发

使用Fat-aar插件可以将第三方的插件和flutter 相关的东西合并到一个aar中

japan的英语介绍

Japan Profiles:

Name: Japan (Japan)

State Comment: Sunrise country.

Area: 377,748 square kilometers.

Capital: Tokyo

Flag: sun flag was rectangular, long and the width ratio of 3:2. The flag of white, with a red center. White symbolizes purity and integrity, sincerity and dedication red symbol.

The Japanese word meaning "sunrise of the country" Japan is the Apollo legends created by the emperor is the son of Helios, the sun from the flag.

Emblem: Circular, 16 painted yellow chrysanthemum petals pictorial. Royal chrysanthemum pattern is the Royal coat patterns.

The national anthem: "Kimigayo substituting"

Exponents: cherry, Fitch said - cherry country (there are more than 300 cherry varieties).

State bird: Green Pheasant

The stone: small grain

Currency: yen, 1 yen = 100 money.

District: East Region 9, Greenwich than nine hours earlier.

Population: About 100 million 27.45 million (as at February 2003), the world's largest population density in the world. Japan MHLW in September 2003 announced figures show that the

As of September 1, more than 100 of the Japanese archipelago, has reached 20,561 elderly people.

National: The main group of Japan, Hokkaido region about 24,000 Ainu people. GM Japanese, in a minority of Hokkaido Ainu language will be.

Religion: predominantly Buddhist and Taoist god, the population profess religious population accounted for 49.6% and 44.8%.

Japanese politics:

Japan is a constitutional monarchy, the Japanese Constitution, the emperor is the symbol of national unity. The government legislative, executive and judicial system of separation of powers, and a bicameral parliament. The Council is responsible for the administrative bodies, including one by the Prime Minister and Cabinet Ministers formed. The Prime Minister must be members of parliament, elected by the other members. The majority of cabinet members must also be members of Parliament. The legislature elected by the people, including the 480-seat House of Representatives. House members a four-year term, the Prime Minister to dissolve the House of Representatives. The Senate has 252 seats, a six-year term, half elected every three years, not the middle of the dissolution.

State symbols: Emperor Akihito, enthroned in January 1989, the years "Heisei."

Constitutional and political: the "Constitution of Japan" in the May 3, 1947 implementation. The Constitution, the state legislative, judicial and administrative basis for the separation of the parliamentary cabinet system; The Emperor of Japan and Japan's overall national symbol of the right to participate in the governance; "Forever renounce the use of state power to wage war, the threat of force or exercise of force as means of settling international disputes to this end, Japan will not maintain land, sea and air forces and other war, does not recognize the right of belligerency of the state "(No. 9). Pan said the Congress Parliament by the Representatives and the House of composition, the highest authority and the only legislature. House Capacity 480 for a term of four years. Congress through the Cabinet no-confidence vote, the right to the Prime Minister early dissolution of the House of Representatives re-election. Power in the House than the Senate. Each year in January to the Congress are usually held in June, duration of 150 days, the other time under the Provisional Congress and the need to convene parliament. The Cabinet is the highest executive responsible for the Congress, by the Prime Minister of the Cabinet (Prime Minister) and in charge of ministries (ministries) ministers. Prime Minister nominated by the Congress, appointed emperor, other Cabinet members appointed by the Prime Minister, the emperor certification. The Japanese government to implement administrative reforms, the government agency for the agencies to 12. Japan judicial power belongs to the Supreme Court and subordinate courts at all levels. The "three-four system." Supreme Court to the Court of Final Appeal hearing "unconstitutional" and other cat-flutter. Love Life Center for instance, a total of four nationwide. All are, Road House, are located in District 1 (Hokkaido for four) for the first trial. There is also throughout the Summary Court and Family Court for civil fines and penalties of not more than criminal proceedings. Supreme Court Chief Executive (President) nominated by the Cabinet, appointed emperor, 14-matter (judges) appointed by the Cabinet, subject to review national vote. Other levels of the judges of the Court of the Supreme Court nomination, the cabinet appointed for a term of 10 years, renewable. Judges at all levels of non-formal impeachment shall not be removed from office. Four prosecutors and the courts should be relative, divided into the maximum Prosecutor's Office, Higher Prosecutor's Office, the local prosecutor's office, district (town) Office. Prosecutors divided into chief procurator (Attorney General), long the seizure, the seizure of things (Higher Attorney director), seized things (local prosecutors seized thing is that director), the seizure of such things. The Minister of the chief procurator has the right to command.

Japan's political parties: Japan's postwar implementation of "political parties", representatives of different classes and strata of various political parties have been restored or established. Congress currently participating in the activities of main political parties are the Liberal Democratic Party, the Democratic Party, the Komeito Party, the Japanese Communist Party and Social Democratic Party, the New Party and conservative.

The current national leaders: Prime Minister Junichiro Koizumi, in April 2001 representation; Foreign Minister Yoriko Kawaguchi, in February 2002 represented. Senate Speaker of the LDP wide, in April 2002 representation. House Speaker Mian Fu Guan China, in July 2000 serving.

The Japanese news media:

Kyodo News Service is Japan's largest news agency, Kyodo short. Jiji News Agency, Japan's second-largest agency, or social events. Integrated, a newspaper 121. The influential newspapers, commonly known as Six newspaper: "Asahi Shimbun", "Yomiuri Shimbun", "Daily News", "Japan's Sankei Shimbun," "Tokyo", "Japan Economic News." The three major national issue for the local newspaper: "Day News," "Hokkaido", "West Japan Press." More influential magazine: "central importance", "Japanese Economy", "The Economist", "Bungei Shunju." Radio, television nearly 200. National television and radio company: Japan Broadcasting Association (NHK), established in 1952, is a semi-official nature; Tokyo Broadcasting System (TBS), set up in 1951; Japanese television networks (NTV), established in 1953. Japan Broadcasting Association, other television companies are private.

Japan Administrative divisions:

The 47 one of the SAR: one is, one, two House, 43 counties. The Japanese have, Road House, the county is a parallel to the SAR, directly under the central government, but all are, Road House, counties have autonomy. His office called "Office", which means "all Office," "Road Office," "House Chamber," "County Office", the Chief Executive called "governor." Each are, Road House, the county under several cities, towns (equivalent to the town), the village. His office said "the service" or "municipal office", "Machimura by the easement," "Village by the easements", the Chief Executive called the "mayor", "Machimura long", "village chief."

Japan's political map after the remark.

Hokkaido Island (1) - Hokkaido

The Island (34)

Northeast (6) - Aomori - Iwate - Miyagi - Akita - Yamagata County - County Fukushima

Kanto (8) - Tokyo - Kanagawa Prefecture - Saitama County - Chiba Prefecture - Ibaraki Prefecture - Tochigi Wood County - County-MA - Yamanashi prefecture

Letter land that is the central North Vietnam (5) - Niigata prefecture - Nagano Prefecture - Fu Shan County - Ishikawa Prefecture - Fukui prefecture

East (4) - Aichi - Gifu County - Shizuoka Prefecture - Mie Prefecture

Kinki (6) - Kyoto House - Osaka - Hyogo - Shiga - Nara County - and Wakayama

China (5) - Tottori County - Shimane Prefecture - Okayama Prefecture - Hiroshima Prefecture - Yamaguchi Prefecture

Shikoku Island (4) - Germany Island County - County-chuan - Ehime - Kochi

Kyushu (7) - Fukuoka - Saga County - Nagasaki Prefecture - Kumamoto Prefecture - Oita Prefecture - Miyazaki Prefecture - Kagoshima Prefecture

Okinawa Islands (1) - Okinawa Prefecture

Japan's geographical:

In the Pacific West Bank, is an extension of the northeast to southwest island arc. West at the East China Sea, Yellow Sea, the Korea Strait, the Sea of Japan and China, North Korea, South Korea, Russia sea. The land area of 377,748 square kilometers, including Hokkaido, Honshu (area of 227,414 square kilometers), Shikoku, Kyushu four major islands and more than 6,800 other small islands. Waters area of 310,000 square kilometers. Sea area of 1.06 million square kilometers, Seto area of 9,500 square kilometers Utsumi households. The long tortuous coastline, multi Harbor, in the rugged mountains, valleys staggered. Mountains and hills of the total area of 80%. Block the country's more than 160 volcanoes, of which more than 50 are active volcanoes, volcanic earthquake described as a state. Mount Fuji is the country's highest peak, elevation 3,776 meters. Spa across all parts of the country. In many short rivers, abundant water. The longest Shinano River about 367 km. Tonegawa watershed area 16,840 square kilometers. Many small and concentrated fire and deep lagoon, the largest Lake Biwa area of 672.8 square kilometers. As located surrounded by the sea, an ocean of moderate humid monsoon climate, outlast mild and humid, with cold winter, the intense heat of summer. Summer and fall (August through October) and more typhoons, the rainy season in June and more. The average temperature in January in northern -6 ° C, 16 ° C south; July 17 ° C in northern, southern 28 ℃. Annual precipitation 700-3500 mm, a maximum of 4,000 mm and above. Of the total forest area of 66%. Geothermal and rich fishery resources. With the Russian presence "islands" (Russia, "the South Kurile Islands") territorial dispute with South Korea existence of Bamboo Island (South Korea called "Dokdo") territorial dispute.

Japan's economy:

Japan is the world's economic powers. Lack of mineral resources, mineral resources, small reserves. Apart from coal, zinc reserves, to a certain extent, the majority rely on imports. Major resources relied on imports to the extent that: coal 95.2%, 99.7% of oil and natural gas 96.4%, iron ore 100%, 99.8% copper, bauxite 100%, 94.9% of lead ore, nickel ore 100% phosphate rock 100%, 85.2% zinc ores.

Industrial highly developed, is the main pillar of the national economy. Industrial system integrity, the industrial structure to a knowledge and technology-intensive. Industrial output accounts for around 40% of GDP, mainly concentrated in the Pacific region, Beijing creek, Kobe, Beijing and Kitakyushu four major traditional industrial areas in the north after the Kanto, Chiba, Seto households and Chun River Utsumi emerging industrial zone. Maritime transport, aviation, railways, highways are very developed, the chief of 47,000 km railway, highway chief of 1.17 million kilometers (1995).

Forest area of 25.26 million hectares, accounting for 66% of the total land area, but 55.1% dependent on imported timber, is the world's largest import timber country. Rich in waterpower resources, the total hydropower generating capacity of about 12%. Offshore rich fishery resources, fisheries developed, the highest in the world of fishing. A mechanized agricultural commodity production, product mainly of rice, wheat.

Japan from the 1950s began to establish a trading nation, approach to development. "WTO", the Japanese started to other Parties and the same equal status. In accordance with the basic principles of the GATT MFN, with the majority of countries and areas of free trade, the Japanese scale of the continuing expansion of foreign trade to create a favorable international market conditions. Since then, the rapid growth of Japan's foreign trade, major trade partners for the United States, Asian countries and the EU countries. Japan's fiscal year from April 1 to March 31 the following year. 2002 gross domestic product of about 4. 2 trillion US dollars and per capita GDP of about 32,900 US dollars.

Japan's major cities:

Tokyo: The Japanese capital. Honshu Island in the southern tip of the Kanto Plain, the Northwest Gulf of Tonkin. The political, economic and cultural center and transportation hub. Suburban population includes about 12.29 million (February 2003). Tokyo is one of the world's largest cities, world-renowned modern metropolis. Industries steel, shipbuilding, machinery, electrical equipment, chemicals, textiles, food processing, publishing and printing, precision instruments, electronics, electrical, rubber, leather most developed. Including the University of Tokyo, by more than 100 institutions of higher learning and many scientific research institutions. Tokyo is the country's largest industrial and commercial city, and the Japanese Bridge Ginza area is the most bustling commercial district. Tourism is the famous palace, the Meiji Jingu, Akasaka palace, Ueno Park, Hibiya Park, and Disneyland. Jichibu Tama, the Meiji high-end Fuji Hakone Izu and Ogasawara for the outskirts of the four small natural park. Tsukuba Science City, 60 km from Tokyo. (Tsukuba: Japan's Science City. Located in the northeast of Tokyo, Ibaraki Prefecture, according to the North Hill Tsukuba, are Xiapu Lake. One is about 18 km north-south strip, an area of about 2,700 hectares. Here on the 45 research institutes, two universities and eight private research institutions. " wisdom City "and its). Tokyo, the annual average temperature in January 3 ℃, August average temperature of 25 ° C. Tokyo International Airport (Haneda Airport) and the New Tokyo International Airport (Narita Airport) is the world's major airports.

Remarks of the Tokyo metropolitan area behind.

Yokohama: Located in the southeastern island of Honshu. Population 2.841 million. The famous industrial city, the country's second largest city and the harbor is one of the world's leading port.

Osaka: Located in the southwest of Honshu Island. Population 2.65 million. The country's third largest city, an important commercial and industrial center and transport hub, the western cultural center, Kobe core industrial area. Osaka International Airport is the world's major airports.

Nagoya: Located in the south-central island of Honshu. Population 2.092 million. Trade is an important center of the wool textile industry and advanced ceramics. World famous harbor.

Kyoto: in the central and western Honshu Island. Population 1.48 million. Formerly States, Japan's ancient capital and the famous cultural, tourist and industrial city. The textile production, art ceramics and other handicrafts goods famous.

Kobe: Located in the southwest of Honshu Island. Population 1.375 million. It is important industrial and commercial city and one of the nation's largest harbor, the world's major container ports.

Chiba: Gulf of Tonkin in the West Bank. Population 900,000. World famous harbor.

Kitakyushu: Located in the northern part of Kyushu. Population 1.07 million. Former Moji, eight streamers and small stores, if loose, households and fields, five of merger of two Machimura, the largest port city and northern Kyushu industrial and transport center. Recapped Shimonoseki Strait,

Elevated Railway and Harbor Tieqiao Shimonoseki same with the other side. World famous harbor.

Famous Japanese tunnel:

Letter 53.85-km tunnel built in 1984

The 22.28 km water tunnel built in 1979

New closed 18.70 km tunnel built in 1975

Liujia 16.25 km tunnel built in 1972

Haruna 15.35 km tunnel built in 1982

Zhongshan 14.90 km tunnel built in 1982

Japanese culture:

Japan's unique geographical conditions and a long history, and carries a unique Japanese culture. Cherry, kimono (traditional national costumes), and samurai Haiku, Sake, a Taoist god of the traditional aspects of Japan's two - Chrysanthemum and the Sword. In Japan the famous "three" is the Japanese Tea Ceremony civil, classes, books Road.

Tea Ceremony: also called tea (tea), has since ancient times as an aesthetic ceremony by the upper class sectors of the immense love. Now, the tea ceremony was used for training on the spirit of ritual behavior or for the general public widely accepted. Japan has many schools teach the techniques of tea ceremony schools, many hotels also have a teahouse, can easily appreciate the tea ceremony and performance.

The display of the rules and methods of different classes can be divided into more than 20 schools in Japan, many of the schools teach classes techniques schools. In addition, hotels, department stores, public facilities such as the hall premises, can appreciate the beautiful decorative floral art.

Sumo: from the Japanese Shinto religious ceremony. People in the harvest god of the Parthenon held game, and I look forward to bring good harvests. In the Nara period and safe, sumo is a court spectator sports, and the Kamakura to the Warring States Period, sumo warrior training to become a part of. The 18th century rise of the professional sumo campaign, and now it's very similar to sumo competition. Shinto ceremony that sumo campaign, the stamp ceremony before the game (around) the purpose of the site is to take more Goblins, also play a role in muscle relaxation. The site also spreading salt to achieve the purpose of purifying, because Shinto teachings of salt that can disperse stone. Sumo Competition on the table. The entire table for the square, a central circle, its diameter is 4.55 meters. Competition, as two Guinness beam comb, a pocket of the lower body belt, almost naked power game. Competition in the Guinness except the soles of his feet may not touch any part of the table surface, but also from beyond the circle. Competition in January 2 minutes or even a few seconds can decide the winner and loser. Sumo magistrates composed of a total of six. Referee fans by holding "OK Secretary" of the stage, the remaining five were positive in the east, west and at the magistrate. Hercules is the highest level, "Wang Gang." Below are the barrier, threatening clearance, Summary, the former neck, the four grades called "screen", belonging to the top of the soil.

Japanese Education:

The primary system for six years, three years junior high school three years, four years of college two years to three years. A nine-year compulsory education. University National University, public and private universities. Japan is a country attached great importance to education, the status of teachers is very high, the famous University of Tokyo National University there, Kyoto University, Waseda University and Keio University,.

Japan's major festivals:

The emperor's birthday: the National Day, December 23 (Emperor Akihito was born on December 23, 1933).

Statehood Day: Festival era (the start of Japan's era) on February 11.

Royal Cherry Blossoms Festival:-April.

Japanese history:

Traditional Japanese legend tells us that the first generation of Japanese Emperor smart emperor in 660 BC in Japan and the establishment of the imperial throne. In Year 5 and 6 of the century, (sent to Tang) and the China Buddhism began writing text spread to Japan, Japan in a very long time have been deeper impact on Chinese culture. In the meantime, although Japan is the emperor of Japan's rulers, the real power often lies in the strength of nobility or warlords ( "General") hands.

By the 16th century, Portugal, the Netherlands, Britain and Spain, businessmen and missionaries arrived in Japan. The early 17th century

flutter项目升级2.0过程填坑记录

在此之前先推荐看大佬的: 填坑指导

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系统升级)

不指定版本安装

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

说明 :老项目sdk1.17.0===升级到2.0.1,当前所有操作基于win平台

到此为止环境已经准备妥当,正式进入项目修改。

所有的插件都要适配到空安全,插件是否支持均会有对应说明Null safety,适配过程不确定版本的话,可以使用dio: any,适配完事后再在pubspec.lock文件中查看具体的版本修改过来,实在有部分插件没有支持的,参考下面

部分插件在适配空安全的版本放弃维护了,得自行更新或寻找替代,如: flutter_swiper 变为 flutter_swiper_null_safety ,插件更新后要注意项目中的用法是否需要更新

2.1.1: 以前采用的是 provide 插件共享全局数据,现在变化为 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升级后字段发生了变化,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的变化: 官方参考

颜色的属性发生了变化,由原来的Color 变为了MaterialStatePropertyColor, 这是未了解决不同状态(pressed、hovered、focused、disabled)下按钮颜色的变化

例如

8.出现如下警告

9.showSnackBar报错误

解决方案: Scaffold换为ScaffoldMessenger

10.textSelectionColor弃用

解决方案:

11.charts_flutter升级后属性报错

解决方案:

12.flutter 真机调试无法访问网络,dio报错

解决方案:

android:

ios:

问题12完整参考


网站题目:flutter1.17,flutter22
浏览地址:http://wjwzjz.com/article/dsdcccc.html
在线咨询
服务热线
服务热线:028-86922220
TOP