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

Bug Reusable Style: The widget of previous style are same with the last one #33

Open
imamulakhyar93 opened this issue Jan 15, 2023 · 0 comments

Comments

@imamulakhyar93
Copy link

imamulakhyar93 commented Jan 15, 2023

Bug Description

Widget content is being replaced with the last Widget which has the same applied style. This is happening after hot reload.

Video record

Kapture.2023-01-16.at.06.21.27.mp4

Expected

Previously styled widgets are not being replaced with the last Widget which shares the same style.

Example code

class RowStyle {
  static final labelInput = n.Row(const [])
    ..px = 15
    ..pb = 18
    ..pt = 10
    ..gap = 10;
}

class TextStyleNiku {
  static final labelInput = "".n
    ..mx = 15
    ..fontSize = 13;
}

// .....
  n.Column([
    "Jual / Beli:".n
      ..apply = TextStyleNiku.labelInput.copied, // first text style
    // .....
    "Kode saham:".n
      ..apply = TextStyleNiku.labelInput.copied, // last text style
// .....

Environment

sdk: '>=2.18.5 <3.0.0'
niku: ^2.3.3
flutter: 3.3.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant