Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

358
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda