![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Flutter 实例
Flutter 实例
兰叶书
这个作者很懒,什么都没留下…
展开
-
Fluttle Image(图片)
Image 用于展示图片的组件。静态函数:new Image.asset - 用于从资源目录的显示图片 new Image.network - 用于从网络上显示图片 new Image.file - 用于从文件里显示图片 new Image.memory - 用于从内存里(Uint8List)显示图片// 资源图片new Image.asset('images/pic1.jpg...原创 2020-08-27 11:42:34 · 273 阅读 · 0 评论 -
Flutter 表单组件(实例)
文件结构:内容承接:https://blog.csdn.net/u013227399/article/details/103893948routes.dartimport 'package:flutter/material.dart';import '../pages/tabs.dart';import '../pages/TextField.dart';import '....原创 2020-01-09 13:44:42 · 711 阅读 · 1 评论 -
Flutter 表单组件
文件结构内容承接:https://blog.csdn.net/u013227399/article/details/103787189routes.dartimport 'package:flutter/material.dart';import '../pages/tabs.dart';import '../pages/TextField.dart';import '.....原创 2020-01-08 20:44:08 · 245 阅读 · 0 评论 -
Flutter 按钮组件
文件结构:内容承接:https://blog.csdn.net/u013227399/article/details/103787189routes.dartimport 'package:flutter/material.dart';import '../pages/tabs.dart';import '../pages/Button.dart';final route...原创 2020-01-08 15:33:02 · 597 阅读 · 0 评论 -
Flutter 侧边栏(UserAccountsDrawerHeader)
文件结构内容承接:https://blog.csdn.net/u013227399/article/details/103787189user.dartimport 'package:flutter/material.dart';class UserPage extends StatelessWidget { const UserPage({Key key}) : sup...原创 2020-01-07 20:02:52 · 1370 阅读 · 0 评论 -
Flutter 侧边栏(DrawerHeader)
文件结构:内容承接:https://blog.csdn.net/u013227399/article/details/103787189tabs.dartimport 'package:flutter/material.dart';import 'tabs/home.dart';import 'tabs/category.dart';import 'tabs/user.da...原创 2020-01-07 17:18:36 · 1494 阅读 · 0 评论 -
Flutter 自定义顶部导航栏(方法二)
文件结构:routes.dartimport 'package:flutter/material.dart';import '../pages/tabs.dart';import '../pages/AppBarDemo.dart';import '../pages/TabBarController.dart';final routes = { '/': (contex...原创 2020-01-07 16:20:56 · 2048 阅读 · 0 评论 -
Flutter 自定义顶部导航栏(方法一)
文件结构:内容承接:https://blog.csdn.net/u013227399/article/details/103787189main.dartimport 'package:flutter/material.dart';import 'routes/Routes.dart';void main() => runApp(new MyApp());clas...原创 2020-01-07 14:48:06 · 3490 阅读 · 2 评论 -
Flutter 返回到根路由(小实例:注册)
文件结构:内容承接:https://blog.csdn.net/u013227399/article/details/103861618login.dartimport 'package:flutter/material.dart';class LoginPage extends StatelessWidget { const LoginPage({Key key}) :...原创 2020-01-06 20:36:12 · 750 阅读 · 0 评论 -
Flutter 命名路由传值(有状态)
文件结构:内容承接:https://blog.csdn.net/u013227399/article/details/103859886home.dartimport 'package:flutter/material.dart';class HomePage extends StatefulWidget { HomePage({Key key}) : super(key...原创 2020-01-06 17:53:38 · 692 阅读 · 0 评论 -
Flutter 命名路由传值(无状态)
文件结构:内容承接https://blog.csdn.net/u013227399/article/details/103858613main.dartimport 'package:flutter/material.dart';import 'routes/Routes.dart';void main() => runApp(new MyApp());clas...原创 2020-01-06 16:37:38 · 448 阅读 · 0 评论 -
Flutter 基础路由传值
文件结构:内容承接https://blog.csdn.net/u013227399/article/details/103787189home.dartimport 'package:flutter/material.dart';import '../Search.dart';import '../From.dart';class HomePage extends S...原创 2020-01-06 15:42:12 · 198 阅读 · 0 评论 -
Flutter 自定义底部导航栏
文件结构:main.dartimport 'package:flutter/material.dart';import 'pages/tabs.dart';void main() => runApp(new MyApp());class MyApp extends StatelessWidget { @override Widget build(BuildCo...原创 2019-12-31 18:01:49 · 1405 阅读 · 0 评论 -
Flutter 有状态组件
import 'dart:io';import 'package:flutter/material.dart';void main() => runApp(new MyApp());class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return...原创 2019-12-31 17:26:11 · 404 阅读 · 0 评论 -
Flutter wrap组件与自定义组件
import 'package:flutter/material.dart';void main() => runApp(new MyApp());class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( ...原创 2019-12-31 16:40:25 · 307 阅读 · 0 评论 -
Flutter 内容页布局
import 'package:flutter/material.dart';void main() { runApp(MyApp());}class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( hom...原创 2019-12-25 18:04:41 · 149 阅读 · 0 评论 -
Flutter url获取数据
import 'dart:async';import 'dart:convert';import 'package:flutter/material.dart';import 'package:http/http.dart' as http;//发起网络请求Future<Post> fetchPost() async{ final response = await ...原创 2019-12-18 14:11:11 · 1983 阅读 · 1 评论 -
Flutter 页面跳转返回数据
import 'package:flutter/material.dart';class Product{ final String title; final String description; //描述 Product(this.title,this.description);}void main(){ runApp(MaterialApp( title:...原创 2019-12-17 11:04:46 · 637 阅读 · 0 评论 -
Flutter 列表-详情
import 'package:flutter/material.dart';class Product{ final String title; final String description; //描述 Product(this.title,this.description);}void main(){ runApp(MaterialApp( title:...原创 2019-12-16 20:25:12 · 431 阅读 · 0 评论 -
Flutter 导航父子页面跳转返回
import 'package:flutter/material.dart';void main(){ runApp(MaterialApp( title:'导航演示01', home:new FirstScreen() ));}class FirstScreen extends StatelessWidget{ @override Widget bui...原创 2019-12-16 19:56:22 · 268 阅读 · 0 评论 -
Flutter 卡片布局
import 'package:flutter/material.dart';void main() => runApp(MyApp());class MyApp extends StatelessWidget{ @override Widget build(BuildContext context){ var card = new Card( chi...原创 2019-12-16 18:14:16 · 907 阅读 · 0 评论 -
Flutter 层叠布局
1、StackWidget布局import 'package:flutter/material.dart';void main() => runApp(MyApp());class MyApp extends StatelessWidget{ @override Widget build(BuildContext context){ var stack = n...原创 2019-12-16 17:38:00 · 237 阅读 · 0 评论 -
Flutter 水平/垂直方向布局
import 'package:flutter/material.dart';void main() => runApp(new MyApp());class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( ...原创 2019-12-16 16:46:47 · 329 阅读 · 0 评论 -
Flutter 动态调用列表
///lib/main.dartimport 'package:flutter/material.dart';void main() => runApp(MyApp( //传递参数 items:new List<String>.generate(100, (i)=>"Item $i")));class MyApp extends StatelessW...原创 2019-12-16 16:14:49 · 294 阅读 · 0 评论 -
Flutter应用实例
myapp/lib/main.dartimport 'package:flutter/material.dart';import 'package:english_words/english_words.dart';void main() => runApp(new MyApp());class MyApp extends StatelessWidget { @overr...原创 2019-11-19 14:51:47 · 309 阅读 · 0 评论