Code Monkey home page Code Monkey logo

Comments (11)

imtoori avatar imtoori commented on May 14, 2024 1

Hi @KieranLafferty,
I'm sorry but at the moment we have no example on Web.
The biggest problem right now is the moor library: we need to implement the web part, but I didn't look into that yet.
The good news is that web support it's in our backlog, we'll keep you updated

from stream-chat-flutter.

KieranLafferty avatar KieranLafferty commented on May 14, 2024 1

thanks @imtoori this repo has a working example of moor on web/ios/android/mac/windows/linux if you need a reference point https://github.com/rodydavis/moor_shared

from stream-chat-flutter.

imtoori avatar imtoori commented on May 14, 2024 1

@rohan20 check out this section of the readme https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat_persistence#flutter-web

I think this should work, even using the higher level package

from stream-chat-flutter.

rohan20 avatar rohan20 commented on May 14, 2024 1

@imtoori Perfect! Thank you.

I also ended up using this to fetch the 2 files instead of getting them from the release: https://github.com/rodydavis/moor_shared

from stream-chat-flutter.

goxiaoy avatar goxiaoy commented on May 14, 2024 1

The latest sdk version

  stream_chat_flutter: ^1.5.2
  stream_chat_persistence: ^1.5.1

break again in web

../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.4.0/lib/src/ffi/database_tracker.dart:1:8: Error: Not found: 'dart:ffi'
import 'dart:ffi';
       ^
../../development/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/api/database.dart:1:8: Error: Not found: 'dart:ffi'
import 'dart:ffi';
       ^
../../development/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/api/sqlite3.dart:1:8: Error: Not found: 'dart:ffi'
import 'dart:ffi';
       ^
../../development/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/api/statement.dart:1:8: Error: Not found: 'dart:ffi'
import 'dart:ffi';

from stream-chat-flutter.

shodgetts avatar shodgetts commented on May 14, 2024

Agent comment from Séni Gueye in Zendesk ticket #4510:

Hi,

Thanks for getting in touch.
I'm passing this on to our Flutter development team for more insights.
We'll get back to you shortly.

Best regards,
Seni

from stream-chat-flutter.

shodgetts avatar shodgetts commented on May 14, 2024

Agent comment from Stephen Hodgetts in Zendesk ticket #4510:

Closing ZD ticket, feature request

from stream-chat-flutter.

KieranLafferty avatar KieranLafferty commented on May 14, 2024

Just a follow up to this. I've found that simply including stream_chat_flutter as a dependency in my project breaks the entire project's ability to build/run on flutter web. Even if adding web support isn't something that will happen soon could you fix the build issues that arise from including this as a dependency on web

here's the error I get when building for web

Launching lib/main.dart on Chrome in debug mode...
Unhandled exception:
InvalidType doesn't have nullability.
#0      InvalidType.nullability  (package:kernel/ast.dart:6750:34)
#1      ProgramCompiler._mustBeNonNullable  (package:dev_compiler/src/kernel/compiler.dart:3145:14)

#2      ProgramCompiler._emitArgumentInitializers.initParameter  (package:dev_compiler/src/kernel/compiler.dart:3185:18)
#3      ProgramCompiler._emitArgumentInitializers  (package:dev_compiler/src/kernel/compiler.dart:3207:20)
#4      ProgramCompiler._emitConstructorBody  (package:dev_compiler/src/kernel/compiler.dart:1369:16)
#5      ProgramCompiler._emitConstructor.<anonymous closure>.<anonymous closure>  (package:dev_compiler/src/kernel/compiler.dart:1349:19)
#6      ProgramCompiler._superDisallowed  (package:dev_compiler/src/kernel/compiler.dart:3138:24)

#7      ProgramCompiler._emitConstructor.<anonymous closure>  (package:dev_compiler/src/kernel/compiler.dart:1348:15)

from stream-chat-flutter.

imtoori avatar imtoori commented on May 14, 2024

@KieranLafferty I'll try to do it, but it's not our first priority given that Flutter web is still in beta

from stream-chat-flutter.

imtoori avatar imtoori commented on May 14, 2024

Closing this since now the SDK builds on for web

from stream-chat-flutter.

rohan20 avatar rohan20 commented on May 14, 2024

@imtoori Can you please help figure out what I may be doing incorrectly? I have issues with moor on web and hence setUser fails.

image

I'm on stream_chat_flutter: ^0.2.21. I know stream_chat_flutter isn't compatible with Web but I assume that's only for the UI part? setUser should still work I suppose. Or should I use stream_chat_flutter_core even for setUser?

Thanks.

from stream-chat-flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.