Category "flutter"

Flutter web app is missing firebase.json and shows "Welcome Firebase Hosting Setup Complete" when deployed to firebase hosting

Background I am using Android Studio to create a Flutter web app. The app runs successfully on localhost in Google Chrome. When I deploy it to Firebase hosting,

How to read and write a text file in Flutter

How do you read text from a file and write text to a file? I've been learning about how to read and write text to and from a file. I found another question abo

Flutter The argument type 'String' can't be assigned to the parameter type 'Map<String, dynamic>'

I got the problem when I want to fetch Data from PONS API. import 'package:eng_it_translator/model/model.dart'; import 'package:http/http.dart'; import 'dart:co

Error: Try adding an initializer expression, or add a field initializer in this constructor, or mark it 'late'

void main() { Car c1 = new Car('E1001'); } class Car { String engine; Car(String engine) { this.engine = engine; print("The engine is : ${engine}

TabView inside CustomScrollView

Wrapping TabBarView with SliverFillRemaining (fill remaining empty space like Expanded) gives the following error output. flutter: A RenderPositionedBox expect

Flutter - remove a firebase document onTap()

I have a ListView, filled with Firebase collection as chat messages. When the user long press a ListTile (an item on the list), I show a BottomSheet. When the

Set height of DropdownButtonFormField list

In Flutter, DropdownButtonFormField's modal list keeps growing to fill some height limit that seems to be ~90% of the screen (or possibly, and more likely, the

Flutter DropdownButton - expand outside of parent element

I need the flutter dropdownbutton to be expanded much more out of its parent so all dropdown menu items would fit into it. Now I'm using Row > Expanded >

Flutter : No ScaffoldMessenger widget found

I am trying to create a snackbar on the click of a button in flutter, but getting exception that No ScaffoldMessenger widget found. The same code seems to work

How to print a message in the console between the times form 9.00 AM to 16.30 PM in Flutter?

I want to print a message in the console every hour between the times from 9.00 AM to 16.30 PM using flutter.

FlutterError: Unable to load asset

This is the folder structure of my app .idea .vscode android build fonts Oxygen-Bold.tff Oxygen-Light.tff Oxygen-Regular.tff images pizza0.png pizza1.png i

Flutter Webview two way communication with Javascript

I have an html file that I am loading in Flutter webview using flutter_webview_plugin. I am using evalJavascript to call function in my javascript code, meaning

module 'audio_session' not found

I try to build an existing flutter project on a new Mac with M1 chip. I face the following error in regards that the audio_session module is missing. Launching

How to Widget test Share package using widget test

I have an issue with trying to test Share package. My code looks like this: IconButton( key: Key('share-button'), icon: Icon(Platform.isAndroid ? Icons.shar

Flutter: Add custom color to existing theme

I am using Flutters built-in themes like this: return MaterialApp( theme: ThemeData.light().copyWith( primaryColor: const Color(0xFF5E975

Multiple commands produce flutter GoogleUtilities

I am trying to build for app store. using command flutter build ipa and getting below error. Although the build works (when I run from Android studio)on debug m

Flutter for linux build fail

A linux build of any flutter application with linux enabled, results in the following error: flutter run -d linux Launching lib/main.dart on Linux in debug mode

NDK is not installed

When building a flutter app, I get an error stating FAILURE: Build failed with an exception.

How to dispose of and recreate some state

Please, consider the below code. A textController is created during initState. If a button is pressed, another textController is created, inside of setState:

Converting DateTime to time ago in Dart/Flutter

The question is how to format a Dart DateTime as a string stating the time elapsed similar to the way you see times displayed on Stack Overflow. Is there any b