tedcrimson / firebase_chat Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hello,
i have problem with sending images.
When i try to send edited photo, app freezes and the error apears.
I/flutter (13938): Picture saved to /data/user/0/com.dominik_ilski.people_craft/app_flutter/Pictures/flutter_test/1610888362001.jpg
E/flutter (13938): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: type '_Uint8ArrayView' is not a subtype of type 'DrawPage' of 'result'
E/flutter (13938): #0 LocalHistoryRoute.didPop (package:flutter/src/widgets/routes.dart)
package:flutter/…/widgets/routes.dart:1
E/flutter (13938): #1 _RouteEntry.pop
package:flutter/…/widgets/navigator.dart:2483
E/flutter (13938): #2 NavigatorState.pop
package:flutter/…/widgets/navigator.dart:3825
E/flutter (13938): #3 _DrawPageState.build.<anonymous closure>
package:draw_page/src/draw_page.dart:275
E/flutter (13938): <asynchronous suspension>
E/flutter (13938): #4 _DrawPageState.build.<anonymous closure> (package:draw_page/src/draw_page.dart)
package:draw_page/src/draw_page.dart:1
E/flutter (13938): #5 _InkResponseState._handleTap
package:flutter/…/material/ink_well.dart:993
E/flutter (13938): #6 _InkResponseState.build.<anonymous closure>
package:flutter/…/material/ink_well.dart:1111
E/flutter (13938): #7 GestureRecognizer.invokeCallback
package:flutter/…/gestures/recognizer.dart:183
E/flutter (13938): #8 TapGestureRecognizer.handleTapUp
package:flutter/…/gestures/tap.dart:598
E/flutter (13938): #9 BaseTapGestureRecognizer._checkUp
package:flutter/…/gestures/tap.dart:287
E/flutter (13938): #10 BaseTapGestureRecognizer.handlePrimaryPointer
package:flutter/…/gestures/tap.dart:222
E/flutter (13938): #11 PrimaryPointerGestureRecognizer.handleEvent
package:flutter/…/gestures/recognizer.dart:476
E/flutter (13938): #12 PointerRouter._dispatch
package:flutter/…/gestures/pointer_router.dart:77
E/flutter (13938): #13 PointerRouter._dispatchEventToRoutes.<anonymous closure>
package:flutter/…/gestures/pointer_router.dart:122
E/flutter (13938): #14 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
E/flutter (13938): #15 PointerRouter._dispatchEventToRoutes
package:flutter/…/gestures/pointer_router.dart:120
E/flutter (13938): #16 PointerRouter.route
package:flutter/…/gestures/pointer_router.dart:106
E/flutter (13938): #17 GestureBinding.handleEvent
package:flutter/…/gestures/binding.dart:358
E/flutter (13938): #18 GestureBinding.dispatchEvent
package:flutter/…/gestures/binding.dart:338
E/flutter (13938): #19 RendererBinding.dispatchEvent
package:flutter/…/rendering/binding.dart:267
E/flutter (13938): #20 GestureBinding._handlePointerEvent
package:flutter/…/gestures/binding.dart:295
E/flutter (13938): #21 GestureBinding._flushPointerEventQueue
package:flutter/…/gestures/binding.dart:240
E/flutter (13938): #22 GestureBinding._handlePointerDataPacket
package:flutter/…/gestures/binding.dart:213
E/flutter (13938): #23 _rootRunUnary (dart:async/zone.dart:1206:13)
E/flutter (13938): #24 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (13938): #25 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter (13938): #26 _invoke1 (dart:ui/hooks.dart:265:10)
E/flutter (13938): #27 _dispatchPointerDataPacket (dart:ui/hooks.dart:174:5)
E/flutter (13938):
The differences in my code compared to the example are:
@override
Future getImage() async {
List<Uint8List> images;
// Coming soon
// if (kIsWeb) {
// var file = await FilePicker.getFile();
// if (file != null) {
// var g = await _getHtmlFileContent(file);
// images = [g];
// }
// } else {
images = await Navigator.of(context).push<List<Uint8List>>(
MaterialPageRoute(builder: (context) => CameraPage()));
if (images != null && images.length == 1) {
var image = await Navigator.of(context)
.push(MaterialPageRoute<DrawPage>(builder: (context)
=> DrawPage(
imageData: images[0] as Uint8List, loadingWidget: loadingWidget)
));
if (image == null) return null;
images = <Uint8List>[image.imageData];
// }
}
if (images != null) {
for (var image in images) {
await sendImage(image);
}
}
}
I am using analysis_options in my projest, so thats why i had to give lists a type
analyzer:
strong-mode:
implicit-casts: false
implicit-dynamic: false
Bump up dependency to intl from ^0.16.1 to ^0.17.0
Blocking updates to all other packages that depend on intl.
Is there any method for notification when someone send message other one get notified.
The following _CastError was thrown building ChatActivityWidget(dirty):
Null check operator used on a null value
The relevant error-causing widget was:
ChatActivityWidget ChatActivityWidget:file:///Users/jenn/Programs/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_chat-0.0.6+1/lib/presentation/base_chat_page.dart:129:12
When the exception was thrown, this was the stack:
#0 ChatActivityWidget.build (package:firebase_chat/presentation/widgets/chat_content.dart:71:31)
Here is the log of the error:
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following NoSuchMethodError was thrown building TypingSection(dirty, state:
_TypingSectionState#966cc):
The getter 'id' was called on null.
Receiver: null
Tried calling: id
The relevant error-causing widget was:
TypingSection
file:///Users/ibrahimbroachwala/Documents/Files/DevTools/flutter_stable/.pub-cache/hosted/pub.dartlang.org/firebase_chat-0.0.4/lib/presentation/base_chat_p
age.dart:171:12
When the exception was thrown, this was the stack:
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
#1 _TypingSectionState.build.<anonymous closure> (package:firebase_chat/presentation/widgets/typing/typing_section.dart:58:36)
#2 MappedListIterable.elementAt (dart:_internal/iterable.dart:412:31)
#3 ListIterator.moveNext (dart:_internal/iterable.dart:341:26)
#4 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:188:27)
#5 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#6 new List.of (dart:core-patch/array_patch.dart:50:28)
#7 ListIterable.toList (dart:_internal/iterable.dart:212:44)
#8 _TypingSectionState.build (package:firebase_chat/presentation/widgets/typing/typing_section.dart:65:12)
#9 StatefulElement.build (package:flutter/src/widgets/framework.dart:4691:27)
#10 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4574:15)
#11 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4746:11)
#12 Element.rebuild (package:flutter/src/widgets/framework.dart:4267:5)
#13 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2582:33)
#14 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:875:21)
#15 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:328:5)
#16 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144:15)
#17 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1082:9)
#18 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:998:5)
#22 _invoke (dart:ui/hooks.dart:163:10)
#23 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:259:5)
#24 _drawFrame (dart:ui/hooks.dart:126:31)
(elided 3 frames from dart:async)
════════════════════════════════════════════════════════════════════════════════════════════════════
Blocking upgrades of Firestore.
Hello,
Would you have any firestore security rules?
Eg that only the auth user can create a chat entry in their name etc.
======== Exception caught by widgets library =======================================================
The following _CastError was thrown building TypingSection(dirty, state: _TypingSectionState#0057b):
Null check operator used on a null value
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.