Flutter

Changing Flutter TextField proportions

吃可爱长大的小学妹 提交于 2021-02-11 13:41:46
问题 I'm starting to transition my code from using standard Android libraries, into Flutter, so I can rapidly deploy onto iOS devices as well, but I just have a concern about the proportions of the TextField; namely that the proportions of Flutter's TextField differs from the EditText of Android. To compare, here's Android's EditText: and here's Flutter's TextField: Is there a way to make the Flutter TextField look more like the Android EditText? The space between the underline and the placeholder

Why can't I reach the variable inside an initState in flutter?

只谈情不闲聊 提交于 2021-02-11 13:37:27
问题 I am trying to use a variable that I got from firestore by using a void finction and when I print it in the same function or another function it gets it but when I use it in an initState it gives me null HELP! the var I want is userType. code : getuserData form firebase: void getUserData() async { try { firestoreInstance .collection('Users') .document(usernameController.text) .get() .then((value) { setState(() { email = (value.data)['email']; password = (value.data)['password']; gender =

Add images taken with camera package to pdf

人盡茶涼 提交于 2021-02-11 13:33:09
问题 I am using camera package in order to take images from my phone. Now I want to convert those images to one single pdf file by clicking on a button. For that I am using pdf package. The problem is, when I take an image/images and click on the button I am always getting this exception: Exception: This widget created more than 20 pages. This may be an issue in the widget or the document I have read many suggestions here: #145, #146 and here stack but nothing helped in my case. Only case where I

Verify a user's email address before confirming registration, with Flutter and Firebase

女生的网名这么多〃 提交于 2021-02-11 13:33:07
问题 I've created a login and registration screen that works with my Flutter app, using Firebase as the backend authentication service. I'm able to switch between the login, registration and reset password screens well. The Issue At the moment, the registration screen accepts any email address that is entered, whether or not it is real. For example, if I were to type in gvevg@gverwbgw.com, it would allow the user to register. This is obviously an issue, when it comes to fake accounts and spam etc.

自由软件基金会庆祝成立35周年

心已入冬 提交于 2021-02-11 13:28:50
美国东部时间 10 月 4 日,自由软件基金会(Free Software Foundation,FSF)在官网 发文庆祝 ”其为争取软件自由而奋斗的第 35 年“。 1985 年 10 月,自由软件运动的主要发起人 RMS(Richard Matthew Stallman)创办了这一非营利性组织,旨在推广自由软件及其理念。35 年后的今天,FSF 现任主席 Greg Farough 称他们的使命仍在继续,”直到每位计算机用户都能完全自由地践行所有数字任务后,我们的工作才算完成……自由软件的斗争仍在继续,没有你们,我们就不会在这里。“ FSF 计划用整整一周时间来做庆祝。其中,美国东部时间 10 月 9 日 12:00 至 17:00 将举行在线周年纪念活动,包括现场直播和预先录制的视频。因此,他们号召用户上传两分钟以内的简短视频,分享对自由软件或 FSF 的记忆片段,以及对软件自由的未来期盼。 除此之外,该基金会还提供了一些可行的庆祝方式,提议大家参与其中,包括但不限于: 为 FSF 捐款 35 美元; 尝试完全自由的 GNU/Linux 发行版; 下载并尝试使用 GNU 操作系统最古老的部分之一,即 GNU Emacs 文本编辑器; 用自由的程序替换一个非自由程序,例如使用 LibreOffice 而不是 Microsoft Office;

Flutter Just Audio playbackEvent

有些话、适合烂在心里 提交于 2021-02-11 13:27:17
问题 I am using a package called Just Audio in my Flutter app. It provides an playBackEvent: playbackEvent.currentPosition which shows the time position that has been played in the Audio file. However I'm a little new to Dart and don't really understand how to subscribe a listener to this event so that I can do something with the changing values. What I want to do is run a function which sets state when the value changes so I can show the progress and let the users know how far through the Audio

get value from nested json array and check if it is empty or not in flutter

半世苍凉 提交于 2021-02-11 13:26:57
问题 My json array looks like: [ { "sub_categories": [], "category_id": "82", "catgory_name": "Andrew Murray 1 Month", "parent_cat_id": "1" }, { "sub_categories": [ { "category_id": "177", "catgory_name": "2 Samuel", "parent_cat_id": "167" } ], "category_id": "167", "catgory_name": "The Bible ASV", "parent_cat_id": "1" }, ] First i want to display "catgory_name" in listview and if that catgory_name has sub_categories array than i need to display it in another list , so how can i achieve this. i

Flutter Just Audio playbackEvent

徘徊边缘 提交于 2021-02-11 13:25:30
问题 I am using a package called Just Audio in my Flutter app. It provides an playBackEvent: playbackEvent.currentPosition which shows the time position that has been played in the Audio file. However I'm a little new to Dart and don't really understand how to subscribe a listener to this event so that I can do something with the changing values. What I want to do is run a function which sets state when the value changes so I can show the progress and let the users know how far through the Audio

get value from nested json array and check if it is empty or not in flutter

荒凉一梦 提交于 2021-02-11 13:25:24
问题 My json array looks like: [ { "sub_categories": [], "category_id": "82", "catgory_name": "Andrew Murray 1 Month", "parent_cat_id": "1" }, { "sub_categories": [ { "category_id": "177", "catgory_name": "2 Samuel", "parent_cat_id": "167" } ], "category_id": "167", "catgory_name": "The Bible ASV", "parent_cat_id": "1" }, ] First i want to display "catgory_name" in listview and if that catgory_name has sub_categories array than i need to display it in another list , so how can i achieve this. i

flutter: 加载与运行Dart

半腔热情 提交于 2021-02-11 13:17:45
环境: flutter sdk v1.7.8+hotfix.3 @stable 对应 flutter engine: 54ad777fd29b031b87c7a68a6637fb48c0932862 在建立异步线程与消息循环之后,自然就是运行应用脚本,也就是dart文件。这一部分感觉很庞大而且千头万绪:对dart不同模式的编译,不同参数的配置,从代码看还有热加载(hot reload)的机制,从里到外都是一团乱麻;有这种感觉只是因为不熟悉,刚刚接触陌生环境产生的畏惧,只要熟悉啥都不是事。所以先不贸然进入热加载之类的细节,以目前了解的通信与异步为基础,渐次深入对象关联关系为上。 在 FlutterActivityDelegate.onCreate 的最后容易发现一个比较重要的调用 runBundle ,深入的调用序列如下: FlutterActivity.onCreate FlutterActivityDelegate.onCreate FlutterActivityDelegate.runBundle FlutterView.runFromBundle FlutterView.preRun FlutterNativeView.runFromBundle FlutterNativeView.runFromBundleInternal FlutterJNI