Skip to content

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

@imamulakhyar93

Description

@imamulakhyar93

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions