摘要:import 'package:flutter/material.dart'; void main() { runApp( MaterialApp( title: 'Flutter gesture', home: LearnListView(), )); } class LearnListView extends StatefulWidget{ @override ...
阅读全文
摘要:简单的List(纵向) 简单的List(横向) 使用长列表,自定义参数 创建不同类型子项的List 创建一个 Grid List(就是使用形如iOS的collectionview) 左右滑动删除List项 定义参数Listview cell的点击事件是通过touch实现的
阅读全文
摘要:main() { //创建时间对象,获取当前时间 DateTime now = new DateTime.now(); print("当前时间:$now"); //创建时间对象,并指定时间 DateTime victoryDay = new DateTime(1945,9,9); print("日本于${victoryDay.year}年${victoryDay.mo...
阅读全文
摘要:import 'package:flutter/material.dart'; void main() { runApp( MaterialApp( title: 'Flutter gesture', home: LearnFloatingActionButton(), )); } class LearnFloatingActionButton extends Sta...
阅读全文
摘要://main.dart文件 import 'package:flutter/material.dart'; import 'package:myapp/Tabbar.dart'; void main() => runApp(MyApp()); class MyApp extends Stateles
阅读全文
摘要:import 'package:flutter/material.dart'; void main() { runApp( MaterialApp( title: 'Flutter gesture', // home: TutorialHome(), home: LearnScaffold(), )); } class LearnScaffold extends...
阅读全文
摘要://text的主要属性有:textAlign,maxLines,overflow等。 Text( "hello flutter!", TextAlign:TextAlign.center, maxLines:1, overflow:TextOverflow.ellipsis, // 显示不完,就在后面显示点点 style:TextStyle( fontSize:30....
阅读全文
摘要:// =>是return语句的简写 add3(a, b) => a + b;
阅读全文
摘要:大家在学习Flutter的时候,刚刚开始学习布局应该会各种遇到溢出。比如在用到Row或者Column经常会遇到布局溢出的问题。 The overflowing RenderFlex has an orientation of Axis.horizontal.flutter: The edge of
阅读全文
摘要:Error connecting to the service protocol: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:53811/WcKOPFtfQvg=/
阅读全文