[Flutter]开发记录

网友投稿 1001 2022-10-08

[flutter]开发记录

[Flutter]开发记录

1.官网:the ​​flutter​​ tool to your path:[macOS]设置全局命令

open ~/.bash_profile

export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH

source ~/.bash_profile

brew update$ brew install --HEAD libimobiledevice$ brew install ideviceinstaller ios-deploy cocoapods$ pod setup

brew doctor可以看到错误和建议

5.Android studio 安装dart & flutter插件.先安装dart,要不可能报错

5.flutter doctor检查

补充完插件\IDE等等

6.Android studio new file->new flutter project

7.Use an external package

In pubspec.yaml, add english_words (3.1.0 or higher) to the dependencies list. Add the highlighted line below:

dependencies: flutter: sdk: flutter cupertino_icons: ^0.1.0 english_words: ^3.1.0

While viewing the pubspec in Android Studio’s editor view, click

Packages get.

In lib/main.dart, import the new package:

import 'package:flutter/material.dart';import 'package:english_words/english_words.dart';void main() => runApp(MyApp());class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { final wordPair = WordPair.random(); return MaterialApp( title: 'Welcome to Flutter', home: Scaffold( appBar: AppBar( title: Text('Welcome to Flutter'), ), body: Center( //child: Text('Hello World'), // Replace the highlighted text... child: Text(wordPair.asPascalCase), // With this highlighted text. ), ), ); }}

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:jpshop- 微商城小程序(jpshoppers)
下一篇:新年春联小程序(大春联小春联)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~