Questions tagged [flutter-exception]
27 questions
26
votes
6 answers
The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'
After running the Flutter project, I get this error. What can I do to solve it?
Error: The method 'setMockMessageHandler'
isn't defined for the class 'BasicMessageChannel'.
FAILURE: Build failed with an exception.

Aysha Hamna
- 436
- 1
- 6
- 13
6
votes
3 answers
Flutter: Flutter Video Player cannot play a video file TWICE [Video controller cannot be used after disposed]~
I'm using Official Flutter Video Player Package for my flutter app, but the displayer is totally black and I also got this error while displaying it on the screen:
E/flutter (10774): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception:…

Ryan Wang
- 418
- 7
- 23
4
votes
1 answer
Flutter “RenderFlex children have non-zero flex but incoming height constraints are unbounded.” when using Staggered Grid View~ @_@
@_@
I was thinking to make the widgets inside the GridView to have a different height according to their dynamic content height.
The widget looks like this:
Container(
decoration: BoxDecoration(
…

Ryan Wang
- 418
- 7
- 23
3
votes
0 answers
How to ignore the exception in flutter integration test & continue the test execution
I'm getting FirebaseException is CAUGHT BY FLUTTER TEST FRAMEWORK, while flutter integration test is being run.!
Can anybody help in understading how to ignore the FirebaseException in integration test and continue the rest of execution?
I tried…

Jagadeesh
- 358
- 5
- 17
3
votes
2 answers
Flutter: how to build a custom toolbar for Selectable Text~
I'm building a ChatApp, and I need a feature that can allow user to select text from the widget, and also show some of my custom actions, such as Deleting that message, Share etc.
And I found that the SelectableText widget would be helpful, but the…

Ryan Wang
- 418
- 7
- 23
2
votes
1 answer
How to handle asynchronous error in 'Add to App' Flutter android application
I am trying to use runZonedGuarded for the handling of asynchronous error in my Add to App project, but its never goes under the error handling when debugging, only showing as an unhandled exception in logs.
Future main() async…

Akash Bisariya
- 3,855
- 2
- 30
- 42
1
vote
2 answers
I want to have Navigator Widget in the CustomScrollView(CustomScrollView as a parent of Navigator) but It gives an error in my flutter app
I want to have Navigator Widget in the CustomScrollView(CustomScrollView as a parent of Navigator) but It gives an error in my flutter app:
constraints.biggest.isFinite is not true
My Code:
import 'package:flutter/material.dart';
class Example…

Mehroze Zaidi
- 125
- 1
- 9
1
vote
1 answer
Error in reading excel in flutter using excel package
Code:
filename = "xls_path/sample.xlsx";
final File file = File(filename);
List bytes = file.readAsBytesSync(); (Getting below error in this line)
var excel = Excel.decodeBytes(bytes.toList());
Extract of…

Raj
- 11
- 2
1
vote
0 answers
Flutter Image.network test fails because of exception
I use Image.network to display images of items:
Image.network(
pictureUri,
errorBuilder: (context, error, stackTrace) => Image.asset(
noPictureAssetUri,
),
);
when given item has an image, then the server returns that image, if the item…

MartinYakuza
- 60
- 1
- 12
1
vote
1 answer
A problem occurred configuring root project 'android' Flutter Failed to create jar file
I have this error can you tell me what's the solution for it?
Launching lib\main.dart on SM A325F in debug mode...
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project…

Anas Abdul-Malik
- 11
- 2
1
vote
1 answer
Flutter FlexibleSpaceBarSettings
I get this problem when I navigate to MangaScreen() page.
This page need an image.
final FlexibleSpaceBarSettings settings = context.dependOnInheritedWidgetOfExactType()!;
assert(
settings != null,
…

anikki00
- 11
- 2
1
vote
1 answer
Improperly formatted define flag: EDIT _ flutter
What is the issue below? Recently updated flutter, then got this error.
FAILURE: Build failed with an exception.
* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035
* What went wrong:
Execution failed for task…

SHAFI TPM
- 37
- 6
0
votes
0 answers
Stop execution of one method from exception thrown in another (unrelated) method?
Is there any way in Flutter to make an exception thrown in one method stop the execution of an unrelated method (i.e. a method that did not invoke the throwing method)?
It's a bit difficult to explain what I mean, but something like this:
void…

Magnus
- 17,157
- 19
- 104
- 189
0
votes
1 answer
Sentry Unhandled Exception: FormatException: Unexpected character (at character 2)
I have this
FormatException:** FormatException: Unexpected character (at character 2) {language: en, page: 1, category: news, query:null } ^ .
It showed only Sentry.
I used chopper for RQ.
For what can it be and how fix?
@Get(path:…

Tony Stark
- 3
- 2
0
votes
0 answers
How to deal with Flutter Local Storage gives a File Exception "an async operation is currently pending"?
I have the function below where i call another async function "getAnimeById( )".
Whenever I hot restart my app, i get the file exception and the set that is loaded has duplicates.
Future fetchRecommendations() async {
//grab data from…