Flutter

Build Failing with an exception when adding firebase_auth or cloud_firestore in the pubspec.yaml file (firebase_core is working):

冷暖自知 提交于 2021-01-29 05:51:05
问题 From the run terminal of android studio: FAILURE: Build failed with an exception. Where: Script 'C:\Flutter\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 362 What went wrong: A problem occurred configuring project ':cloud_firestore_web'. Could not find method implementation() for arguments [project ':firebase_core'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. Try: Run with --stacktrace option to get the stack trace. Run with

Flutter Podfile and Firebase

▼魔方 西西 提交于 2021-01-29 05:50:46
问题 Where in the Podfile should pod 'Firebase/Core' be placed? It's obvious when the Podfile looks like this: # Uncomment this line to define a global platform for your project # platform :ios, '9.0' target 'Runner' do # Uncomment this line if you're using Swift or would like to use dynamic frameworks # use_frameworks! # Pods for Runner pod 'MaterialControls', '~> 1.2.2' end But the default Podfile for my project looks like this: # Uncomment this line to define a global platform for your project

java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: DefaultDispatcher-worker-2

有些话、适合烂在心里 提交于 2021-01-29 05:50:33
问题 I'm quite new about flutter and kotlin. I'm doing flutter version up(from 1.0.0 to 1.7.8+hotfix4) recently. After I upgrade kotlin version to 1.3.10, my flutter app came into crash when I try to start it. And the error shows like this : [ +521 ms] E/AndroidRuntime( 2726): FATAL EXCEPTION: DefaultDispatcher-worker-2 [+1 ms] E/AndroidRuntime( 2726): Process: XXXXXXXXXXXX, PID: 2726 [ ] E/AndroidRuntime( 2726): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the

Flutter how to show single value from List?

守給你的承諾、 提交于 2021-01-29 05:43:17
问题 I am trying to filter data from array and then need to just a single value from data. Its showing filtered data but need to know how can i show a single value from that data ? class _ViewPostScreenState extends State<ViewPostScreen> { List showPost; String data; @override void initState(){ super.initState(); print(widget.id); showPost = posts.where((i) => i.id == widget.id).toList(); data = showPost.toString(); print(data); } The response or print output of data is this I/flutter ( 7374): [

Anyway to cancel currently dragging widget in flutter?

不打扰是莪最后的温柔 提交于 2021-01-29 05:41:54
问题 I have a ternary operator in my home_screen: CircleData2.dk1 == 0 ? Padding(child: Center(child: Container(height: 50, width: 50, color: Colors.pink,)), padding: EdgeInsets.all(40),) : Try2(id: 1, reload: reload,), I want when CircleData.dk1 not equals 0 (it starts off equaling 1) to drop the current object that's dragging (Try2 is a custom widget that is a draggable, I'll show it in a moment) and just replace it with the: Padding(child: Center(child: Container(height: 50, width: 50, color:

how to disable tooltip dynamcically in flutter?

爷,独闯天下 提交于 2021-01-29 05:30:45
问题 I can disable the tooltip statically. But I want to disable tooltip dynamically when i click flatbutton.But Couldnt disable dynamically and i have no idea to do that. This is my code: import 'package:flutter/material.dart'; void main(){ runApp(MaterialApp(home: HelloWorld(),debugShowCheckedModeBanner: false,)); } class HelloWorld extends StatefulWidget { @override _HelloWorldState createState() => _HelloWorldState(); } class _HelloWorldState extends State<HelloWorld> { bool check = false;

Android studio - flutter: No Connected Devices

痴心易碎 提交于 2021-01-29 05:28:41
问题 I have just started with mobile development using flutter, and there is this error when trying to run the default flutter program. No connected devices found; please connect a device, or see flutter.dev/setup for getting started instructions. This is a Windows 10 x64 machine. Installed Android Studio in - D:\Program Files\Android\Android Studio1 Installed Android SDK from Android Studio in - D:\Android\android-sdk Set these system environment variables ANDROID_HOME - D:\Android\android-sdk;D:

Firestore text search containing keyword Flutter

我只是一个虾纸丫 提交于 2021-01-29 05:24:55
问题 i was planning to have a full text search feature for the String name field of my document, but from the research i have done , it seems like searching text with firestore is not possible, then i come up with solution which is creating a new array field to store keyword in document, like this and then i called it using arracVontains, with searchedKeyword as the inputted text from user _firestore .collection(itemOrderPath) .where("keyword", arrayContains:searchedKeyword) Now, i'm quite

Flutter Web: Implemented solution using HtmlElementView, IFrameElement, registerViewFactory is not working in ios

折月煮酒 提交于 2021-01-29 05:22:07
问题 I have implemented a solution to integrate an online payment gateway in my flutter web project till now i have not found any other solution except this one. The link for the solution I have implemented in my flutter web project is This for refrence, now the problem is, this works fine in android web but it is not working in iOS web i don't know why. can anyone help me with what is the problem with this or why it is not working in iOS?, or any other solution for implementing payment gateway in

How to set height,width and color for RenderBox in flutter?

╄→гoц情女王★ 提交于 2021-01-29 05:17:59
问题 I have created canvas using RenderBox. class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => new _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(), body: Column( children: <Widget>[ Container(color:Colors.yellow,height:50,child: Center(child: Text("Canvas"))), Expanded( child: PageView( children: <Widget>[ Container( color: Colors.red, child: CanvasWidget(),