Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to build & run #1

Open
mabDc opened this issue Apr 14, 2021 · 8 comments
Open

how to build & run #1

mabDc opened this issue Apr 14, 2021 · 8 comments
Labels
question Further information is requested

Comments

@mabDc
Copy link

mabDc commented Apr 14, 2021

it looks like requiring a specified version of flutter to build & run?

@hythl0day
Copy link
Member

hythl0day commented Apr 14, 2021

This script widget only tested on Flutter version 2.0.3 and only on the Windows platform (desktop support). I haven't given it a try on a newer version of flutter. However, it should be easy to upgrade.

And yes it has the same goal as hydrosdk, however, libraries like this always have trouble binding and importing widgets from Flutter, many libs like this heavily rely on the author's maintenance of a separate widget lib. The goal of Hetu is to make everything simple and automatic. Although it did sacrifice the language capability.

@hythl0day
Copy link
Member

hythl0day commented Apr 14, 2021

And please communicate in English here.

@mabDc mabDc changed the title 编译和运行 how to build & run Apr 14, 2021
@mabDc
Copy link
Author

mabDc commented Apr 14, 2021

gitter may be better than qq

@rockingdice rockingdice added the question Further information is requested label Apr 14, 2021
@rockingdice
Copy link

I've tested with flutter 2.0.1 and the latest version on stable channel without any issue.
Also tested on MacOS, iOS and Android. It should theoritically work on any platforms that flutter supports.
The language itself is just like other pure dart packages, so it's not picky what the version of flutter you use (But should support extension which is available from flutter SDK 2.7.0 if you are planning to generate binding codes).
The autobinding codes DO bound the version you generate from. It will generate a projection to the flutter & dart libraries, so it's kind of sensitive to the api changes.
You may want to regenerate them if you're planing to upgrade flutter to a new version.

@hythl0day
Copy link
Member

I'll try to upgrade the script widget to latest version of Flutter and Hetu later today.

@mabDc
Copy link
Author

mabDc commented Apr 15, 2021

build latest code is okay, but file example/ht-lib/main.ht need update for running error

HTError (Hetu error:
[HTErrorType.parser}]
[File: ht-lib/main.ht]
[Line: 21, Column: 16]
Unexpected identifier [[]
Call stack:

onTap: fun[ValueChangedInt](index) {
print('[TABBAR] tap tabbar ' + index.toString())
controller.index = index;
rebuild()
},

@hythl0day
Copy link
Member

hythl0day commented Apr 15, 2021

build latest code is okay, but file example/ht-lib/main.ht need update for running error

HTError (Hetu error:
[HTErrorType.parser}]
[File: ht-lib/main.ht]
[Line: 21, Column: 16]
Unexpected identifier [[]
Call stack:

and line 21 is

onTap: fun[ValueChangedInt](index) {

Yes that's a bug in the compiler of hetu. I have updated hetu package ( the latest is 0.1.1+2 ) to fix this bug. However I cannot test it till this evening.

@hythl0day
Copy link
Member

hythl0day commented Apr 15, 2021

Okay I have upgraded this widget on latest build of hetu and successfully build and run.
For now, I committed a version that use local package.
I'll update the pub.dev package later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants