Skip to main content

Questions tagged [dart]

Dart is a class-based, statically(& strongly)-typed programming language for building web and mobile applications. Dart compiles to modern JavaScript to run in the browser and compiles to native code to run on mobile platforms like Android and iOS. Dart also runs on the command-line for scripting and server-side apps.

0 votes
2 answers
40 views

Can't figure out how to delete the numbers that I have generated with onPressed

I made a simple program with a Plus Button and a Minus Button that generates numbers successively. Generating the numbers with the Plus Button works fine but, I tried to delete the numbers with the ...
7 votes
2 answers
8k views

Clearing the terminal screen in a command-line Dart app

This one don't work (on Windows in a Cmd-Box): import 'dart:io'; void main() { print("Hello, World!"); Process.start('cls', [], runInShell: true).then((process) { stdout.addStream(...
0 votes
0 answers
9 views

Horizontal tree indent guides is missing

I am using Android Studio . but I am unable to see this tree indent guides (like the fig. 2) Please help me how to enable this option. I've tried to check the option in Settings -> Languages & ...
-1 votes
0 answers
9 views

My screen is blank when I start the application. It's a flutter app made using bloc cubit and custom backend using Node

https://github.com/varun-wahi/LeafNotes/tree/243eda07f55cf18537c0ad51d650abf1d9c167cd if someone is willing to run and check the code. Or just give me tips where the error could be producing from. I ...
1 vote
3 answers
8k views

Flutter how to share PDF files?

I'm trying to implement some new functionalities to my Flutter app such as sharing PDF files with people. So I got 10 different pages and 10 different PDF files. On each page I want to implement a ...
2 votes
0 answers
311 views

Fabric.js Canvas equivalent widget in flutter

Is there any flutter widget like fabric.js canvas? We want to do image editing like multiple images drag and drop inside the canvas, freetransforming the image and entire canvas should be zoom in, ...
4 votes
4 answers
22k views

Flutter Scrollbar in vertical and horizontal axis

I have two scrollbars in my flutter project for scrolling the data table. Here are the codes. Widget build(BuildContext context) { return Scaffold( body: Center( child: ...
1 vote
2 answers
9k views

Unable to install dart-sdk?

I want to get stated with flutter-web so I am trying to install dart-sdk. I tried to install it by ... choco install dart-sdk and its setup ... but it just doesn't install. Instead, a script gives ...
0 votes
4 answers
1k views

How to put a Divider between DropdownMenu items in Flutter

I have a DropdownMenu and I want to draw a horizontal divider(line) between DropDownMenuEntries. 'dropdownMenuEntries' property only expects a List of DropDownMenuEntry Widgets. Any help would be ...
0 votes
2 answers
45 views

Access ThemeData property inside ThemeData definition

In my Flutter app I declare ThemeData with a colorSchemeSeed: return MaterialApp( ... theme: ThemeData( useMaterial3: true, visualDensity: VisualDensity.adaptivePlatformDensity, ...
11 votes
2 answers
2k views

HTTP3 Client for flutter

Is There a HTTP3 client for dart? There is Flupke in Java, Aioqic in python but I didn't find one for dart as well as flutter
3 votes
2 answers
2k views

How to throttle events in bloc?

How to throttle events in bloc? Let's say, I want to trigger file save on user input, but perform file system access not more often than once per 100ms? Example bloc event handler: on<StoreFile>(...
0 votes
0 answers
17 views

Flutter PDF Content on New Page Even if Space Above

I am trying to my _contentFooter() to break into page. When there are 4 row in _contentTable() It come exactly Bellow the table, but more row it comes on second page. Using flutter package https://pub....
0 votes
0 answers
24 views

Using FirebaseAuth stateChanges to switch pageView index

I am trying to write an app and I have a section to display the users profile and a login/register prompt if they aren't signed in yet. I am using a pageView to switch between the 2 as I want to keep ...
0 votes
1 answer
14 views

List inside in two column show overflow issue

I have a overflow issue. I have list view inside of 2 column which show overflow issue. Widget getViewMethod() { return Column(children: [ Container(color: ColorConst.whiteColor, height: 40), ...
0 votes
0 answers
11 views

How to correctly handle dynamic content height with SliverOverlapAbsorber in NestedScrollView?

I’m working on a Flutter application where I’m using a NestedScrollView with a SliverAppBar, SliverList, and a SliverPersistentHeader that contains a TabBar. My goal is to manage overlapping content ...
0 votes
1 answer
20 views

Update of didChangeDependencies (Flutter)

I have a Dashboard homepage that allows me to access another page called Brand. GoRoute( name: DashboardPage.routeName, path: DashboardPage.routeName, builder: (context,...
0 votes
0 answers
28 views

How can I design piano buttons in dart?

I'm trying to design some piano buttons in Dart like in the image below. I also want the piano keys to be horizontally scrollable. I don't want to have a specific width or height for the piano ...
0 votes
1 answer
13 views

how to set persian language to flutter_tts package

I am going to change the text to voice in flutter and I'm installed flutterTts package so its just read English text and its unable to read Persian language. I also set the language to flutterTts....
9 votes
4 answers
16k views

Clear state in providers when using Flutter and Riverpod

How can I clear the current state of my Riverpod providers manually in my Flutter app? The use case I have is when a user signs out of my app then signs up as a new/different user the previous users ...
4 votes
3 answers
13k views

ValueNotifier not updating the widget on updating the list

import 'package:flutter/material.dart'; import '../../Data/Globalvariable.dart' as global; class MenuBar extends StatefulWidget { final key = UniqueKey(); // final pin; // MenuBar({this.pin='...
0 votes
2 answers
53 views
+50

Flutter fixed component with scrollable widgets are all scrolling

I'm learning flutter and trying to implement a screen with a fixed component and the rest scrollable. The SingleChildScrollView class looks like what I want but I cannot get it to work. This is a ...
7 votes
2 answers
6k views

Flutter folder picker

I have a button on screen, when you click button I need to open some folder picker. I have searched for package, but I didn't found any package that also support Android and iOS. Does someone knows ...
1 vote
1 answer
232 views

flutter : Your project requires a newer version of the Kotlin Gradle plugin

I am trying to build my app after some modification but I get error as shown below .gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/META-INF/...
0 votes
1 answer
24 views

Flutter Open Specific page upon Notification Click

Iam using oneSignal and want to navigate to a specific page in my app when clicking on the recived notification the problem the code can't find context this probably from the fact that iam declaring ...
18 votes
5 answers
13k views

Bottom navigation bar is reloading all the widgets each time I press a navigation item

The following code is almost a copy-paste from the official flutter GitHub example for the bottom navigation bar. The problem is, at the opening of the widget containing the views, everything is ...
0 votes
0 answers
18 views

kIsWasm always return false / How to compile for WebAssembly support?

Following the official Flutter Wasm documentation (https://docs.flutter.dev/platform-integration/web/wasm) I tried to compile my Flutter Web App for Wasm-support, but constant kIsWasm returns always ...
0 votes
0 answers
27 views

type 'Null' is not a subtype of type 'String' with shared_preferences

import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:shared_preferences/...
0 votes
2 answers
39 views

Title: TypeError in Flutter Test: Null is not a subtype of Future<String>

I'm writing a Flutter test where I'm trying to mock a method that calculates the BMI. Despite using when(...).thenReturn(...) to return a future value, I'm encountering the following error: ══╡ ...
0 votes
1 answer
22 views

Calling parent class methods using the implements keyword

Using extends and implements keyword in Dart. Trying to call methods of the base class from the child class using both extends and implements keyword. void main() { Dog d = Dog(); d.walking(); ...
0 votes
0 answers
23 views

Why is the onClose Button Not Working on My Subscription Banner?

I'm creating a promotional banner for my customers to encourage subscription purchases. This banner includes a button at the top intended to close the banner. Despite multiple attempts and various ...
13 votes
7 answers
12k views

stripe_android:compileReleaseJavaWithJavac'. error: invalid source release: 17

I am facing this issue while running my flutter project on VS code, after multiple attepmts still stuck here. Anyone please help me to resolve this issue. Even i have updated the java version by ...
2 votes
1 answer
536 views

How can I make a camera application using flutter desktop? [closed]

I want to make a custom camera application using the flutter desktop but unfortunately I'm not able to find any suitable plugin for that. Is there a way to make a custom plugin that would help me ...
6 votes
1 answer
849 views

Dart uuid can't be extended

I updated dependencies by dart pub upgrade, but here i thought due to some cache already there causing this error. i have tried dart clean cache but problem is still there. kindly take this issue ...
0 votes
0 answers
8 views

I want to send parameters to a GraphQL query from my flutter application

I want to send parameters to a GraphQL query from my flutter application, but it doesn't work. I declared a variable and write to it when I select by which criteria I am going to sort the query. Query ...
0 votes
0 answers
15 views

How do I make Ffmpeg work for subtitles in flutter?

I'm trying to burn subtitles in a video. I'm going to show you the manual command I used: String newCmd = '-i /storage/emulated/0/ffmpeg/video.avi -vf subtitles=\'/storage/emulated/0/ffmpeg/...
1 vote
0 answers
13 views

Dartfrog websocket broadcast message

i was digging inside of dart_frog to know it capabilities , it sounds awesome until i've started using websocket , i've implemented it like this way final handler = webSocketHandler( (channel, ...
10 votes
6 answers
10k views

Alternative to popUntil in go router in flutter

I was wonder if there is alternative to Navigator's popUntil() method, or any workaround to achieve the same. If i were to use Navigator. I would use like so: void _logout() { Navigator.popUntil(...
0 votes
1 answer
204 views

Flutter: Text to Speech - No Sound in İOS

I'm using flutter_tts package for text to speech. In android, everything is okay. It's works. But no sound in İOS. I don't know why. There is no error in console. It's very interesting i think. Here ...
-6 votes
0 answers
33 views

How to optimally allocate stocks to fulfill multiple requirements? [closed]

I'm trying to solve a problem where I have multiple stocks and requirements. Each requirement needs to be fulfilled by the available stocks. The goal is to minimize the remaining requirements while ...
-1 votes
2 answers
1k views

Flutter AppBar leading and actions buttons should have the exact same size

the fist IconButton in leading and the second IconButton in actions. Have different sizes although i have explicitly specified the same sizes. (width: 56, height: 56) this is how it looks i want to ...
1 vote
1 answer
6k views

How to embed a powerbi report within a flutter android application?

I'm creating an android application using flutter where I need to embed a powerbi report within the app itself. I could not find a single resource to aid me with this task. I've already created a web ...
0 votes
0 answers
16 views

How To Insert query in Flutter with PostgreSQL new package? postgres: ^3.2.1

How To Insert query in Flutter with PostgreSQL new package? postgres: ^3.2.1 all the other documentation are old, deprecated and not working anymore, could you someone please help on this..? How to ...
1 vote
1 answer
546 views

Quran App a surah view like uthmanic quran 15 line how to make it like quran for android app

I want to make a full Islamic app but I have an issue I want to make the surah view like the "Quran for Android" application I can make it in qcf font but it is too long way. I found an ...
4 votes
1 answer
1k views

Is there any way to run a Flutter app through background on macOS or Windows desktop?

I want to make a clipboard application for macOS operating system. For this, the application I wrote with Flutter should continue to work in the background without dying. I've looked at a few ...
17 votes
13 answers
31k views

'flutterfire configure' command not working, I need to set firebase in my flutter project

I followed "https://firebase.flutter.dev/docs/overview" instruction to set firebase in my flutter project. step i took: "flutter pub add firebase_core" then dependencies were ...
0 votes
1 answer
29 views

Riverpod - share data between providers

What's the canonical way to share data between two providers created with riverpod? In addition those two providers might only be very loosely connected logically speaking... Let's assume we've got an ...
1 vote
3 answers
1k views

Expanded widget not taking entire width or height

I was learning about Expanded widget in Flutter. What I understand is that Expanded widget takes entire width/height depending or Row / Column. So,this is the code I used for Row: class DicePage ...
42 votes
3 answers
9k views

Is it possible to make characters in Flutter to have the same width?

As you can see in the picture below, the texts have the same amount of characters, but since the number "1" is slimmer than the "5" and "2", both texts get a different ...
1 vote
1 answer
24 views

Unable to pass required argument to parent class using super

After super method in the child class, I am unable to pass a parameter value to the parent class. void main() { MobilePhone mp = new MobilePhone(modelName: "7T", brandName: "...

15 30 50 per page
1
2 3 4 5
1914