Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

363
Visualizações
Why can i not create a Connex object with js in my flutter project

Im currently developing a dApp and want to connect it with the sync2 wallet. Since there is no support for dart im trying to use js functions in a js file in in the web-folder like this:

function checkBalance(value) {
    const connex = new Connex({
        node: 'http://3.71.71.72:8669/',
        network: 'test'
    })

    const queryAcc = value
    const acc = connex.thor.account(queryAcc)
    acc.get().then(accInfo => {


        const vet = accInfo.balance / 1e18 // +" VET"
        return vet
    })

}

I then call it in flutter with

              var a = js.context.callMethod("checkBalance",
                  ["0x70aE85A2fF6030366F512DbcD60Be3828139b498"]);

The problem is (as far as i can tell) that i cant create the Connex Object ("Could not find name 'Connex'. Did you mean 'connex'?ts(2570)" if i hover over Connex)

I have included connex in index.html like this:

<script src="https://unpkg.com/@vechain/connex@2" ></script>

Why does that not work?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda