- 博客(15)
- 收藏
- 关注
原创 flutter 全面屏适配方法
flutter 全面屏适配方法1、使用SafeArea2、使用MediaQuery.of(content).padding3、使用Scaffold 的 appbar 和 bottomNavigationBar安卓全面屏适配额外配置:添加 android.max_aspect<meta-data android.name = "android.max_aspect" and...
2019-06-19 14:05:54
3944
翻译 flutter TabView切换时,页面如何不销毁?
简单叙述原理:每一个Tab页 with AutomaticKeepAliveClientMixin, 就是将页面存入内存中,慎用。import 'package:flutter/material.dart';void main() => runApp(MyApp());class MyApp extends StatelessWidget { @override Widge...
2019-06-19 13:54:09
3879
原创 Flutter---Sliver集合
import 'package:flutter/material.dart';import 'dart:math' as math;void main() => runApp(MyApp());class MyApp extends StatelessWidget { // This widget is the root of your application. @over...
2019-06-12 14:49:09
5946
5
原创 flutter ---TextField 之 输入类型、长度限制
TextField想要实现输入类型、长度限制需要先引入import ‘package:flutter/services.dart’;例如import 'package:flutter/services.dart';TextField( keyboardType: TextInputType.number,//键盘类型,数字键盘 style: TextStyle(...
2019-06-11 09:45:29
15656
3
原创 Flutter踩坑之video_player无法在Android9上播放
video_player在Android9上的兼容问题具体问题我当前flutter版本1.2,video_player0.10.0+2,在安卓7-8版本中测试暂无问题,但是在安卓9版本手机上无法播放URL地址的视频。问题原因安卓上从9.0(API level28)开始,明文通信支持默认是被禁用的,官方说法是不安全。因为我们播放的视频源是http协议,所以无法播放。解决方法修改Andro...
2019-06-11 09:30:51
7915
5
原创 flutter --- DropdownButton 关于二级联动的一点心得体验
在使用DropdownButton 做二级联动的时候,遇到了些问题,在此记录下一级DropdownButton在onCange事件里需要改变本身的value还有二级DropdownButton的value,先1后2,多级联动依此类推Container( padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setW...
2019-04-02 19:03:07
3458
原创 flutter --- 自定义路由动画
自定义路由翻转,渐变,左右滑动方法如下:首先继承 PageRouteBuilder ,重写方法将MaterialPageRoute改为showSearch具体代码如下:import 'package:flutter/material.dart';class animation_route extends PageRouteBuilder { final Widget wi...
2019-03-25 21:58:01
2678
原创 flutter --- app启动页动画
flutter App 启动页动画代码如下import 'package:flutter/material.dart';import 'page.dart';void main() { runApp( MaterialApp( home: MyHome(), ) );}class MyHome extends StatefulWidget {...
2019-03-25 21:04:02
5727
原创 flutter---上拉加载 下拉刷新 插件篇 flutter_easyrefresh
插件地址传送门github传送门本文仅介绍 flutter_easyrefresh 插件的简单使用小例子, 详细了解请点击传送门直接撸代码import 'dart:async';import 'package:flutter/material.dart';import 'package:flutter_easyrefresh/easy_refresh.dart';import 'p...
2019-03-20 17:59:08
8785
3
转载 flutter---上拉加载 下拉刷新
转自https://blog.csdn.net/u011272795/article/details/82719640import 'package:flutter/material.dart';void main() => runApp(MaterialApp( home: MyHomePage(),));class MyHomePage extends Statefu...
2019-03-20 17:19:32
585
原创 flutter---drawer + bottomNavigationBar + tabbar + tabbarview 全家桶
import 'package:flutter/material.dart';void main() => runApp(MyApp());class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildCon...
2019-03-20 13:59:49
733
原创 flutter---抽屉Drawer and endDrawer
import 'package:flutter/material.dart';void main() => runApp(MyApp());class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildCon...
2019-03-20 10:39:26
2882
转载 flutter TabBar+PageView联动
**flutter TabBar+PageView联动**转自 https://www.jianshu.com/p/7f5b7e7d3c9aimport 'dart:io';import 'package:flutter/services.dart';void main() { runApp(new MyApp()); if (Platform.isAndroid) { ...
2019-03-19 09:55:35
2839
转载 flutter控件之DropdownButton
**flutter控件之DropdownButton **import 'package:flutter/material.dart';class LearnDropdownButton extends StatefulWidget{ @override State&lt;StatefulWidget&gt; createState() { return _LearnDropd...
2019-03-06 13:17:46
7413
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人