2020年1月8日

摘要: 代码: import 'package:flutter/material.dart'; void main() => runApp(MyTestApp()); class MyTestApp extends StatelessWidget{ @override Widget build(BuildC 阅读全文
posted @ 2020-01-08 17:18 pp/ing 阅读(184) 评论(0) 推荐(0) 编辑
 
摘要: 代码: import 'package:flutter/material.dart'; void main() => runApp(MyTestApp()); class MyTestApp extends StatelessWidget{ Widget build(BuildContext con 阅读全文
posted @ 2020-01-08 17:18 pp/ing 阅读(217) 评论(0) 推荐(0) 编辑
 
摘要: 代码: body: Center( child: Container( child: new Text('哈哈哈哈哈哈哈哈哈哈哈哈哈哈或哈哈哈哈哈哈哈',style: TextStyle(fontSize: 35)), alignment: Alignment.topLeft, width: 550 阅读全文
posted @ 2020-01-08 17:18 pp/ing 阅读(657) 评论(0) 推荐(0) 编辑
 
摘要: 代码: child: Container( child: new Image.network( 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1578312966654&di=09a975b6c05a1447 阅读全文
posted @ 2020-01-08 17:18 pp/ing 阅读(511) 评论(0) 推荐(0) 编辑
 
摘要: 代码 var stack = new Stack( alignment: const FractionalOffset(0.5, 0.8), children: <Widget>[ new CircleAvatar( backgroundImage: new NetworkImage('https: 阅读全文
posted @ 2020-01-08 17:17 pp/ing 阅读(333) 评论(0) 推荐(0) 编辑
 
摘要: 代码: Center(child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Text('xxxxxx 阅读全文
posted @ 2020-01-08 17:17 pp/ing 阅读(238) 评论(0) 推荐(0) 编辑
 
摘要: 代码: new Row( children: <Widget>[ new RaisedButton( onPressed: (){}, color: Colors.red, child: new Text('红色按钮'), ), Expanded(child: new RaisedButton( o 阅读全文
posted @ 2020-01-08 17:17 pp/ing 阅读(217) 评论(0) 推荐(0) 编辑
 
摘要: 代码: new GridView( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 3, crossAxisSpacing: 2.0, mainAxisSpacing: 2.0, childAspect 阅读全文
posted @ 2020-01-08 17:17 pp/ing 阅读(110) 评论(0) 推荐(0) 编辑
 
摘要: 代码: import 'package:flutter/material.dart'; void main() => runApp(MyTestApp( items:new List<String>.generate(100, (i)=>"计数 $i") )); class MyTestApp ex 阅读全文
posted @ 2020-01-08 17:17 pp/ing 阅读(214) 评论(0) 推荐(0) 编辑
 
摘要: 代码: var card = new Card( child: Column( children: <Widget>[ ListTile( title: Text('算力的经发局围殴放假哦啊接违法',style: TextStyle(fontWeight: FontWeight.w500),), s 阅读全文
posted @ 2020-01-08 17:17 pp/ing 阅读(208) 评论(0) 推荐(0) 编辑
 
摘要: 代码: import 'package:flutter/material.dart'; void main() { runApp(MaterialApp( title: '导航演示', home: new FirstScreen() )); } class FirstScreen extends S 阅读全文
posted @ 2020-01-08 17:17 pp/ing 阅读(287) 评论(0) 推荐(0) 编辑
 
摘要: 代码: import 'package:flutter/material.dart'; class Product{ final String title;//标题 final String desciption;//描述 Product(this.title,this.desciption);// 阅读全文
posted @ 2020-01-08 17:17 pp/ing 阅读(197) 评论(0) 推荐(0) 编辑
 
摘要: 代码: Image.asset('images/huoying.jpg') 总结 //添加本地图片 1.创建文件夹名称XX,并把本地资源图片移到XX下 2.在pubspec.yaml 文件中把 本地资源图片名称下载assets下 ,并拼好路径 3.在图片控件中使用 也是写的文件路径 //添加本地图片 阅读全文
posted @ 2020-01-08 17:16 pp/ing 阅读(331) 评论(0) 推荐(0) 编辑
 
摘要: 转载自:https://www.jspang.com/detailed?id=44#toc221 配置APP的图标 想配置APP的图片,你需要找到下面的目录: 项目根目录/android/app/src/main/res/ 进入之后你会看到很多mipmap-为前缀命名的文件夹,后边的是像素密度,可以 阅读全文
posted @ 2020-01-08 17:16 pp/ing 阅读(1051) 评论(0) 推荐(0) 编辑
 
摘要: 代码: import 'package:flutter/material.dart'; void main(List<String> args) { runApp(MaterialApp( title: '导航返回数据', home: FirstPage(), )); } class FirstPa 阅读全文
posted @ 2020-01-08 17:16 pp/ing 阅读(206) 评论(0) 推荐(0) 编辑