全屏浏览
缩小浏览
回到页首

随笔分类 -  flutter

flutter learn
摘要:flutter---->阿里云oss的插件目前为止,阿里云官方并没有dart版本的oss sdk,所以才开发了这个插件flutter_oss_aliyun提供对oss sdk的支持。 flutter_oss_aliyun 一个访问阿里云oss并且支持STS临时访问凭证访问OSS的flutter库,基本上涵盖阿里云oss sdk的所有功能。⭐ 阅读全文
posted @ 2023-03-26 19:00 huhx 阅读(1818) 评论(0) 推荐(1)
摘要:reference: https://www.filledstacks.com/snippet/managing-quick-actions-in-flutter/ code import 'dart:io'; import 'package:flutter/material.dart'; impo 阅读全文
posted @ 2020-07-30 21:48 huhx 阅读(777) 评论(0) 推荐(0)
摘要:Get the orientation 1. Media Query import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @over 阅读全文
posted @ 2020-07-24 20:15 huhx 阅读(911) 评论(0) 推荐(0)
摘要:####1. string type main(List<String> args) { String name = "huhx"; changIt(name); print('after: $name'); // after: huhx } void changIt(String name) { 阅读全文
posted @ 2020-07-23 15:57 huhx 阅读(666) 评论(0) 推荐(0)
摘要:At least, there are three ways to create the singleton object with dart. 1. factory constructor class SingletonOne { SingletonOne._privateConstructor( 阅读全文
posted @ 2020-07-23 09:00 huhx 阅读(686) 评论(0) 推荐(0)
摘要:copy text to clipboard Clipboard.setData(ClipboardData(text: string)); since Flutter1.9, you can use SelectableText, it enable the copy feature. get t 阅读全文
posted @ 2020-07-03 09:46 huhx 阅读(647) 评论(0) 推荐(0)
摘要:整理一下比较有意思的类QQ的UI实现。Nothing that has meaning is easy. Easy doesn’t enter into grown-up life. darken the background image 很多场景下,我们需要背景图片上面显示文字。如果是白色字体的话 阅读全文
posted @ 2020-07-03 09:36 huhx 阅读(647) 评论(0) 推荐(0)
摘要:当我们想showSnackBar的时候,需要通过Scaffold.of(context)得到Scaffold。但是如果这个context用错的话,flutter就会抛出错误。下面我们通过代码仔细看一下。 issue code import 'package:flutter/material.dart 阅读全文
posted @ 2020-06-29 16:30 huhx 阅读(898) 评论(0) 推荐(0)
摘要:在Flutter中说起Button,floatingActionButton用的也非常的多。今天我们就来学习一下。 Simple Example import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class 阅读全文
posted @ 2020-06-29 12:21 huhx 阅读(75) 评论(0) 推荐(0)
摘要:如果你想灵活控制Flex容器(Row, Column)中子组件中的间隔,可以考虑使用Spacer。下面以Row为例子,来为它的子组件添加间距。 ####use Spacer import 'package:flutter/material.dart'; void main() => runApp(M 阅读全文
posted @ 2020-06-29 11:07 huhx 阅读(147) 评论(0) 推荐(0)
摘要:应用中切换深色主题和暗色主题是比较常见的操作,今天我们就来学习一下Flutter中动态的切换主题。 Simple Theme import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp ext 阅读全文
posted @ 2020-06-03 22:18 huhx 阅读(463) 评论(0) 推荐(0)