flutter
溪流聚
编程小白,请大家多多关照
展开
-
Flutter 中的TabLayout,TabBar水平选项卡及视图组件
必须使用TabController。没有在TabController中使用 TabBard的报错简单的选项卡import 'package:flutter/material.dart';void main() => runApp(new MyApp());class MyApp extends StatelessWidget { @override Widg...原创 2019-04-25 19:36:03 · 4116 阅读 · 0 评论 -
Flutter BottomNavigationBar 底部导航栏
底部栏的数量 不能小于两个;import 'package:flutter/material.dart';void main() => runApp(new MyApp());class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return ...原创 2019-04-25 17:31:22 · 200 阅读 · 0 评论 -
Flutter Algin 对齐布局
import 'package:flutter/material.dart';void main() => runApp(new MaterialApp( home: new Scaffold( appBar: new AppBar( title: new Text("对齐"), ), body: ne...原创 2019-04-30 13:52:47 · 464 阅读 · 0 评论 -
Flutter 界面简单跳转示例(路由)
两种方式跳转//直接跳转 Navigator.push(context, new MaterialPageRoute(builder: (context) => new SecondPage()) );命名路由Future pushNamed(BuildContext context, String routeName)class MyApp ...原创 2019-04-23 16:34:47 · 425 阅读 · 0 评论 -
Flutter 表单组件 登录界面
import 'package:flutter/material.dart';void main() => runApp(new Login());class Login extends StatefulWidget { @override State<StatefulWidget> createState() { // TODO: implement ...原创 2019-04-23 15:16:40 · 1150 阅读 · 0 评论 -
错误:flutter Your application could not be compiled, because its dependencies could not be established
Your application could not be compiled, because its dependencies could not be established刚开始开始使用flutter 在Android studo 中新建一个widget 总是报错经过反复试验 是因为代码中的字符串有汉字,就会报这个错如果字符串是英文就没有问题之后把编码格式有GBK改为UTF-8 就...原创 2019-04-23 09:30:21 · 570 阅读 · 0 评论 -
Flutter Card示例
import 'package:flutter/material.dart';void main() => runApp(new MainAPP());enum Department { treasury, state }class MainAPP extends StatelessWidget { @override Widget build(BuildContex...原创 2019-04-26 17:43:26 · 328 阅读 · 0 评论 -
Flutter 中的 Editext TextField
import 'package:flutter/material.dart';void main() => runApp(new MainAPP());enum Department { treasury, state }class MainAPP extends StatelessWidget { @override Widget build(BuildContex...原创 2019-04-26 17:04:05 · 730 阅读 · 0 评论 -
Flutter 弹窗 Dialog ,AlertDialog,IOS风格
import 'package:flutter/material.dart';import 'package:flutter/cupertino.dart';void main() => runApp(new MainAPP());enum Department { treasury, state }class MainAPP extends StatelessWidget...原创 2019-04-26 15:51:58 · 5497 阅读 · 0 评论 -
Flutter PopupMenuButton示例 PopupWindow
import 'package:flutter/material.dart';void main() => runApp(new MyApp());enum ConferenceItem { AddMember, LockConference, ModifyLayout, TurnoffAll }class MyApp extends StatelessWidget { ...原创 2019-04-26 14:42:40 · 1696 阅读 · 1 评论 -
Flutter 侧滑菜单 Drawer抽屉组件示例
图片资源:1 创建 images目录,把图片放在目录中2 在pubspec.yaml 文件中 把assets 注释解开,并添加图片路径,注意不要在assets有多余的空格,否则报错。import 'package:flutter/material.dart';void main()=>runApp(new MyApp());class MyApp e...原创 2019-04-26 10:35:53 · 1409 阅读 · 0 评论 -
Flutter 溢出布局 OverflowBox
import 'package:flutter/material.dart';void main() => runApp(new MaterialApp( home: new Scaffold( appBar: new AppBar( title: new Text("overflowBox demo"), ), ...原创 2019-04-30 17:43:19 · 18139 阅读 · 0 评论