Flutter

Flutter: How to open PDF document with specific page range

烂漫一生 提交于 2021-02-10 23:11:38
问题 I want to open a PDF document with specific page ranges. Like if a PDF have 10 pages. then i want to open from Page 3 to Page 7. I have tried multiple packages which are available online. which are not providing this functionality. For example: flutter_full_pdf_viewer 1.0.6 flutter_plugin_pdf_viewer 1.0.7 - This provides the options, but this has a lot of dependency issues, Therefore i don't want to use this. pdf_viewer_plugin 1.0.0+2 Therefore please recommend me some library, or if somebody

Is there a way in Flutter to allow only one ExpansionTile of a dynamic generated ListView to be expanded?

丶灬走出姿态 提交于 2021-02-10 22:27:53
问题 Is there a way in Flutter to allow only one ExpansionTile of a dynamic generated ListView to be expanded? E.g. my ListView has three ExpansionTiles and I click on the first one, it expands. Now, if I tap on the second one, the second one should expand whereas the first one should close itself. In my head it should work like putting this task into the "onExpansionChanged" method but I don't know how. 回答1: you can't with Flutter's ExpansionTile but I created a CustomExpansionTile that allows

Is there a way in Flutter to allow only one ExpansionTile of a dynamic generated ListView to be expanded?

百般思念 提交于 2021-02-10 22:25:22
问题 Is there a way in Flutter to allow only one ExpansionTile of a dynamic generated ListView to be expanded? E.g. my ListView has three ExpansionTiles and I click on the first one, it expands. Now, if I tap on the second one, the second one should expand whereas the first one should close itself. In my head it should work like putting this task into the "onExpansionChanged" method but I don't know how. 回答1: you can't with Flutter's ExpansionTile but I created a CustomExpansionTile that allows

Flutter: Management of the state of multiple items in a list view using ChangeNotifierProvider

一世执手 提交于 2021-02-10 22:22:52
问题 in my Flutter app I want to display multiple items inside a listView and I want to handle their state using Provider. but how can I handle the state in a way that if I edit one item in the listview only that item get rebuild. and the entire listview get rebuild only when I change the number of items either by adding or deleting. how can I do this 回答1: This is a working solution that is very close to what you want (It still rebuilds the whole ListView when one item is edited but have no

Dart CSV Writing

拟墨画扇 提交于 2021-02-10 22:22:11
问题 Hey so I haven't really messed around with it too much, but I was wondering if there was actually a way (before I go down a neverending rabbit hole) to read and write to CSV files in Dart/Flutter? I need to write to the files, not necessarily read them, and I'm willing to go to quite extreme lengths to do so. Any library works, built-in functions are even better. Any and all help is appreciated! 回答1: Use this package csv from https://pub.dartlang.org/packages/csv. If you have a List<List

Why does it not work when I use pushNamedReplacement instead of pushReplacement?

谁都会走 提交于 2021-02-10 20:24:22
问题 I tried using named routes but it doesn't seem it work giving me an error "could not find a generator for route ("/homepage",null) for _MaterialAppState.I couldn't understand the working of namedRoutes in this case. import 'package:flutter/material.dart'; import './home.dart'; import './auth.dart'; void main() { runApp(new MyApp()); } class MyApp extends StatefulWidget { @override State<StatefulWidget> createState() { return MyAppState(); } } class MyAppState extends State<MyApp> { Widget

Customize validation & text in Firebase reset password form?

梦想的初衷 提交于 2021-02-10 20:17:14
问题 I use Firebase Authentication in my flutter app. I use PIN instead of normal password which is I strictly defined 6-digit number. In the case my user forgot their PIN, my only option (or not?) is by calling the sendPasswordResetEmail method. await firebaseAuth.sendPasswordResetEmail(email: userEmail); The problem is they can type any new password in the Firebase reset password input and breaking the rule for 6-digit numeric only. Is there any way to customize the validation, caption text, etc

VSCode intellisense appears if only space bar pressed in Flutter

会有一股神秘感。 提交于 2021-02-10 20:15:12
问题 I'm using VSCode to develop Flutter Apps, but, intellisense only shows up when I press space bar first. For instance when I create any widget within the widget tree, such as IconButton(icon:), the property 'icon' doesn't show up in intellisense when typing the first characters, like 'ic', only if I press the space bar, or after the property was completely typed and then if it is removed, the next time when typing, then the intellisense works fine. Does anyone else having the same issue? it is

Flutter WebView within ListView or CustomScrollView - Crashes on Android for large heights

て烟熏妆下的殇ゞ 提交于 2021-02-10 20:14:12
问题 Currently we've got a problem with the Flutter WebView within a ScrollView. We would like to display a WebView with article content written in HTML below an Image and other content like the title or buttons. It shouldn't be possible to just scroll the WebView. Instead, the entire content should be scrolled together. The problem is, that the WebView should scroll together with the header. Therefore the WebView needs a fixed height as far as I know. Via Javascript it's possible to get the

Flutter & Firebase : How to check if my picture is uploaded to Firebase Storage Successfully?

孤者浪人 提交于 2021-02-10 20:09:07
问题 Flutter & Firebase : How to check if my picture is uploaded to Firebase Storage Successfully? I am trying to find a way to see if the picture was upload successful so that I can start and stop my LoadingScreen() . final StorageReference firebaseStorageRef = FirebaseStorage.instance .ref() .child('$path/${userID}_${timeStamp}_${number}_${tag}.jpg'); final StorageUploadTask uploadTask = firebaseStorageRef.putFile(image); I am looking forward to hearing from all of you. Thank you in advance! 回答1