Flutter共93篇 第2页
关于Flutter的文章

Flutter computer 函数

Flutter computer 函数-趙哥博客-赵哥博客
系统 API:computer 函数: 我们自己 new 一个 Isoalte 并实现通讯,多少有点麻烦,从封装的角度看其中代码基本是重复的,所以 Google 就提供了一个 API 来干这事:compute 方法 compute 方法是 ...
趙哥的头像-趙哥博客-赵哥博客趙哥2年前
098310

Flutter Path路径常用操作方法

Flutter Path路径常用操作方法-趙哥博客-赵哥博客
一、前期准备 先来看一段代码。 import 'package:flutter/material.dart'; void main() => runApp( MaterialApp( home: PathExample(), ), ); class PathExample extends StatelessWidget { ...
趙哥的头像-趙哥博客-赵哥博客趙哥2年前
09665

Flutter Getx defaultDialog对话框组件

Flutter Getx defaultDialog对话框组件-趙哥博客-赵哥博客
属性类型描述titleString标题titlePaddingEdgeInsetsGeometry标题内边距onConfirmVoidCallback(Function())确认点击事件onCancelVoidCallback (Function()) 取消 点击事件 onCustomVoidCall...
趙哥的头像-趙哥博客-赵哥博客趙哥3年前
093210

Flutter Isolate 隔离的使用

Flutter Isolate 隔离的使用-趙哥博客-赵哥博客
创建Isolate 的两种方法: Isolate.spawn[dart里面的] 和 compute()[flutter里面的] 上面的两个函数使用方法和传入的参数方式都一样,一个是dart里面的一个是flutter里面的。 第一个参数:静态方...
趙哥的头像-趙哥博客-赵哥博客趙哥2年前
09267

Flutter 滚动控件去除默认阴影

Flutter 滚动控件去除默认阴影-趙哥博客-赵哥博客
方法 1:以下 ScrollBehavior 将完全移除发光效果:创建一个类继承ScrollBehavior。class MyBehavior extends ScrollBehavior { @override Widget buildViewportChrome( BuildContext context, ...
趙哥的头像-趙哥博客-赵哥博客趙哥2年前
08478

Flutter 视频播放器 [chewie ]

Flutter 视频播放器 [chewie ]-趙哥博客-赵哥博客
video_player: ^2.3.0 chewie: ^1.3.1 用此库必须也引入video_player这个官方的库。 chewie video_player  // ChewieController({ // required this.videoPlayerController,//视频播放器控制器...
趙哥的头像-趙哥博客-赵哥博客趙哥2年前
083911

Flutter bitsdojo_window 桌面应用,窗户的设计库

Flutter bitsdojo_window 桌面应用,窗户的设计库-趙哥博客-赵哥博客
Windows窗口实例 代码实例 import 'package:bitsdojo_window/bitsdojo_window.dart'; void main() { runApp(const MyApp()); // 在下面添加此代码 //当窗口准备好时做 doWhenWindowReady(() { a...
趙哥的头像-趙哥博客-赵哥博客趙哥3年前
078813

Flutter [image_picke] 调用相机拍照丶拍摄,相册图片丶视频选择。

Flutter [image_picke] 调用相机拍照丶拍摄,相册图片丶视频选择。-趙哥博客-赵哥博客
PUb包地址:https://pub.dev/packages/image_picker 介绍:Flutter 插件,用于从 Android 和 iOS 图像库中选择图像,并使用相机拍摄新照片。 import 'dart:io'; import 'package:flutter/materi...
趙哥的头像-趙哥博客-赵哥博客趙哥2年前
075816

Flutter Color 转 MaterialColor

Flutter Color 转 MaterialColor-趙哥博客-赵哥博客
MaterialColor createMaterialColor(Color color) { List strengths = <double>[.05]; Map<int, Color> swatch = <int, Color>{}; final int r = color.red, g = color.green...
趙哥的头像-趙哥博客-赵哥博客趙哥2年前
069710

Flutter PopupMenuButton弹出菜单按钮组件

Flutter PopupMenuButton弹出菜单按钮组件-趙哥博客-赵哥博客
属性类型描述itemBuilderList<PopupMenuEntry<T>> Function(BuildContext context)在按下按钮以创建要显示在菜单中的项目时调用。initialValueT初始选中值,菜单项的值(如果有),...
趙哥的头像-趙哥博客-赵哥博客趙哥3年前
066611