niku
niku copied to clipboard
Bug Reusable Style: The widget of previous style are same with the last one
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
https://user-images.githubusercontent.com/46627919/212573430-b847e733-ccc0-4729-b64e-9494c67a31b1.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