dart

Flutter - Android app shows just a blank screen

谁说胖子不能爱 提交于 2020-12-15 13:55:44
问题 Android app shows just a blank screen. Below is my code import 'package:flutter/material.dart'; import 'package:camera/camera.dart'; import 'screens/home_screen.dart'; Future<void> main() async { final cameras = await availableCameras(); final camera = cameras.first; runApp(MaterialApp( title: 'DEMO', theme: ThemeData( primarySwatch: Colors.blue, ), home: HomePage( title: 'DEMO', camera: camera, ), )); } Error message D/FlutterActivity( 3535): Using the launch theme as normal theme. D

Flutter - Android app shows just a blank screen

送分小仙女□ 提交于 2020-12-15 13:53:56
问题 Android app shows just a blank screen. Below is my code import 'package:flutter/material.dart'; import 'package:camera/camera.dart'; import 'screens/home_screen.dart'; Future<void> main() async { final cameras = await availableCameras(); final camera = cameras.first; runApp(MaterialApp( title: 'DEMO', theme: ThemeData( primarySwatch: Colors.blue, ), home: HomePage( title: 'DEMO', camera: camera, ), )); } Error message D/FlutterActivity( 3535): Using the launch theme as normal theme. D

RadioListTile Inside StatefulBuilder not deselecting other options inside RadioListTile

此生再无相见时 提交于 2020-12-15 06:23:06
问题 I created a function in which I am creating different widgets in that function I am creating a radioListTile for each answer of type radio inside a question. (looping through all the answers and created radioListTile for each answer). I have wrapped this radioListtile inside a statefulBuilder so that it don't recreates or effect the whole screen and used setstate method to change/set the value. the problem is when I select any other option/value inside this radioListTile it does not deselects

how to sort json data in flutter?

▼魔方 西西 提交于 2020-12-15 06:21:26
问题 This is my Json data: call_record: [ { "machine_location":"Restaurant", "allocation_date:"2008-08-31" "status":"C", "customer_address":"pune" } { "machine_location":"Restaurant", "allocation_date:"2008-08-31" "status":"N", "customer_address":"pune" } { "machine_location":"Restaurant", "allocation_date:"2008-08-31" "status":"O", "customer_address":"pune" }] In my app i want to show data in listview whose date is allocation_date=2008-08-31 Here is my code for display data in ListView: Widget

how to sort json data in flutter?

ぐ巨炮叔叔 提交于 2020-12-15 06:21:04
问题 This is my Json data: call_record: [ { "machine_location":"Restaurant", "allocation_date:"2008-08-31" "status":"C", "customer_address":"pune" } { "machine_location":"Restaurant", "allocation_date:"2008-08-31" "status":"N", "customer_address":"pune" } { "machine_location":"Restaurant", "allocation_date:"2008-08-31" "status":"O", "customer_address":"pune" }] In my app i want to show data in listview whose date is allocation_date=2008-08-31 Here is my code for display data in ListView: Widget

How can I redirect back to Flutter App from URL?

。_饼干妹妹 提交于 2020-12-15 06:17:00
问题 I am integrating paytabs payment gateway in my flutter application. It opens a payment page in in app browser. When the transaction is completed, it redirects to a return_url. I want to redirect back to my app, so that I can do something after the payment has been processed. How can this be accomplished? 回答1: I found a solution and it worked for me! InAppWebView In flutter to open the paytabs transaction page. When the transaction is successful, it redirects me to a return_url. InAppWebView

Where can I find the cached images (path) when I use the cached_network_image Flutter package with the iOS Simulator?

。_饼干妹妹 提交于 2020-12-15 06:16:53
问题 I am exploring the cached_network_image Flutter package. https://pub.dev/documentation/cached_network_image I am on a MacBook Pro 16 2019, running macOS Catalina 10.15.7. Using Simulator iPhone 11 Pro - iOS 14. So apparently the package should cache the image. But I would actually like to see the cached image inside the iOS Simulator... Just to make sure that it actually works, and understand a little more about how it works. Of course I don't know if it's possible? I don't know if I can see

How can I redirect back to Flutter App from URL?

匆匆过客 提交于 2020-12-15 06:16:30
问题 I am integrating paytabs payment gateway in my flutter application. It opens a payment page in in app browser. When the transaction is completed, it redirects to a return_url. I want to redirect back to my app, so that I can do something after the payment has been processed. How can this be accomplished? 回答1: I found a solution and it worked for me! InAppWebView In flutter to open the paytabs transaction page. When the transaction is successful, it redirects me to a return_url. InAppWebView

Where can I find the cached images (path) when I use the cached_network_image Flutter package with the iOS Simulator?

。_饼干妹妹 提交于 2020-12-15 06:15:47
问题 I am exploring the cached_network_image Flutter package. https://pub.dev/documentation/cached_network_image I am on a MacBook Pro 16 2019, running macOS Catalina 10.15.7. Using Simulator iPhone 11 Pro - iOS 14. So apparently the package should cache the image. But I would actually like to see the cached image inside the iOS Simulator... Just to make sure that it actually works, and understand a little more about how it works. Of course I don't know if it's possible? I don't know if I can see

Flutter drop down causes error in Future while using it with API

独自空忆成欢 提交于 2020-12-15 06:01:30
问题 I'm very new to flutter. I'm using an API to which sends the data as an JSON. The format of the JSON is here. [ { "store": "AMAZON" }, { "store": "FLIPKART" }, { "store": "WALMART" }, { "store": "ALIBABA" }, ] I need to use this store values in a drop down button. There are three files dataRetrieve.dart, homePage.dart, main.dart. main.dart Points to homePage.dart homePage.dart's init state call dataRetrieve.dart to make a post request to get the data. The code of homePage.dart is here. var