Giter Club home page Giter Club logo

Comments (9)

TatankaConCube avatar TatankaConCube commented on June 16, 2024

hello @vaima75, for resolving your issue just provide access on retrieving users via API. For it go to your admin panel by path Admin panel -> Your app -> Users -> Setting and in the section 'PRIVACY AND SAFETY' tick needed checkboxes.

from connectycube-flutter-samples.

vaima75 avatar vaima75 commented on June 16, 2024

Hi @TatankaConCube, I've enabled both of them but my issue isn't with the system but to convert Future CubeUser instances while I require CubeUser Instances from getUserBy* and getUsersBy* methods using createSession() [which itself is future instance].

from connectycube-flutter-samples.

vaima75 avatar vaima75 commented on June 16, 2024

In your demo, you are using "configs.dart" which has alias records from demo app database. For this app to work properly, I've to add user records in my app database and create an alias record [list user = [ CubeUser(), CubeUser(), .... ]] in "configs.dart". This file is used to create sessions to perform certain operations. My query is "how to get user data dynamically and perform those operations?". Every time I try to implement get* methods or when I create a session (app session not user) I don't know how to use that session to fetch user data as it shows 401 error.

from connectycube-flutter-samples.

vaima75 avatar vaima75 commented on June 16, 2024

If possible, kindly provide implementation sample for reference.

from connectycube-flutter-samples.

TatankaConCube avatar TatankaConCube commented on June 16, 2024

here is a simple example, how to create an empty session, then get the user by login, then create a session with this got user:

createSession().then((value) {
    return getUserByLogin("marvin188").then((userFromServer) {
        userFromServer.password = "supersecurepwd";
        return createSession(user).then((session) {
            log(value.toString());
        });
    }).catchError((error) {
        log(error.toString());
   });
});

Now we are developing a simple Chat sample and it will contain sign up logic for using chat options.

from connectycube-flutter-samples.

vaima75 avatar vaima75 commented on June 16, 2024

Hi @TatankaConCube, thanks for sharing the sample. I'm able to get the CubeUser and list of CubeUsers with get* methods. One small favor, how to display such values on Widget or access them through a variable. I tried one sample here

'vcinfo.dart'

var name;
void foo(){
  createSession().then((value) {
    return getUsersByTags({'Doc'}).then((userFromServer) {
      name = userFromServer;
    }).catchError((error) {
      log(error.toString());
    });
  });
}

Accessing the variable in main.dart

import 'vcinfo.dart' as vcinfo;

  @override
  void initState() {
    super.initState();
    init(
      vcinfo.appId,
      vcinfo.authKey,
      vcinfo.authSecret,
    );
    vcinfo.foo();
  }
......
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            **Text(vcinfo.name),**
            Text(
              'You have pushed the button this many times:',
            ),

I tried the same with Id and Login get methods but the return value is null.

from connectycube-flutter-samples.

vaima75 avatar vaima75 commented on June 16, 2024

Is it Holiday going!!!

from connectycube-flutter-samples.

TatankaConCube avatar TatankaConCube commented on June 16, 2024

sorry @vaima75, but your latest questions not related to ConnectyCube API or SDK. Please search how to add items to flutter widgets on Flutter cookbook or other sources.

from connectycube-flutter-samples.

TatankaConCube avatar TatankaConCube commented on June 16, 2024

@vaima75 happy to inform you, today we released our realization of a simple example of a Chatting app which demonstrates, how to use ConnectyCube Flutter SDK for the implementation chat functionality in your app.

from connectycube-flutter-samples.

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.