Skip to content

Commit d8f7a32

Browse files
committed
Fix the Bold widget did not change with widget updates
1 parent 80d8a41 commit d8f7a32

File tree

2 files changed

+83
-49
lines changed

2 files changed

+83
-49
lines changed

lib/src/widgets/blob.dart

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import 'dart:async';
22

33
import 'package:blobs/blobs.dart';
44
import 'package:blobs/src/config.dart';
5-
import 'package:blobs/src/models.dart';
6-
import 'package:blobs/src/services/blob_generator.dart';
75
import 'package:blobs/src/widgets/animated_blob.dart';
86
import 'package:blobs/src/widgets/simple_blob.dart';
97
import 'package:flutter/material.dart';
@@ -117,6 +115,23 @@ class _BlobState extends State<Blob> {
117115
}
118116
}
119117

118+
@override
119+
void didUpdateWidget(covariant Blob oldWidget) {
120+
super.didUpdateWidget(oldWidget);
121+
if (widget.size != oldWidget.size ||
122+
widget.debug != oldWidget.debug ||
123+
widget.styles != oldWidget.styles ||
124+
widget.child != oldWidget.debug ||
125+
widget.edgesCount != oldWidget.edgesCount ||
126+
widget.minGrowth != oldWidget.minGrowth ||
127+
widget.id != oldWidget.id ||
128+
widget.duration != oldWidget.duration ||
129+
widget.loop != oldWidget.loop ||
130+
widget.isAnimated != oldWidget.isAnimated) {
131+
setState(() {});
132+
}
133+
}
134+
120135
@override
121136
Widget build(BuildContext context) {
122137
if (!widget.isAnimated) {

pubspec.lock

Lines changed: 66 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,50 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
url: "https://pub.dartlang.org"
8+
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9+
url: "https://pub.dev"
910
source: hosted
10-
version: "2.6.1"
11+
version: "2.11.0"
1112
boolean_selector:
1213
dependency: transitive
1314
description:
1415
name: boolean_selector
15-
url: "https://pub.dartlang.org"
16+
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17+
url: "https://pub.dev"
1618
source: hosted
17-
version: "2.1.0"
19+
version: "2.1.1"
1820
characters:
1921
dependency: transitive
2022
description:
2123
name: characters
22-
url: "https://pub.dartlang.org"
24+
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
25+
url: "https://pub.dev"
2326
source: hosted
24-
version: "1.1.0"
25-
charcode:
26-
dependency: transitive
27-
description:
28-
name: charcode
29-
url: "https://pub.dartlang.org"
30-
source: hosted
31-
version: "1.2.0"
27+
version: "1.3.0"
3228
clock:
3329
dependency: transitive
3430
description:
3531
name: clock
36-
url: "https://pub.dartlang.org"
32+
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33+
url: "https://pub.dev"
3734
source: hosted
38-
version: "1.1.0"
35+
version: "1.1.1"
3936
collection:
4037
dependency: transitive
4138
description:
4239
name: collection
43-
url: "https://pub.dartlang.org"
40+
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
41+
url: "https://pub.dev"
4442
source: hosted
45-
version: "1.15.0"
43+
version: "1.17.2"
4644
fake_async:
4745
dependency: transitive
4846
description:
4947
name: fake_async
50-
url: "https://pub.dartlang.org"
48+
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
49+
url: "https://pub.dev"
5150
source: hosted
52-
version: "1.2.0"
51+
version: "1.3.1"
5352
flutter:
5453
dependency: "direct main"
5554
description: flutter
@@ -64,28 +63,40 @@ packages:
6463
dependency: transitive
6564
description:
6665
name: matcher
67-
url: "https://pub.dartlang.org"
66+
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
67+
url: "https://pub.dev"
6868
source: hosted
69-
version: "0.12.10"
69+
version: "0.12.16"
70+
material_color_utilities:
71+
dependency: transitive
72+
description:
73+
name: material_color_utilities
74+
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
75+
url: "https://pub.dev"
76+
source: hosted
77+
version: "0.5.0"
7078
meta:
7179
dependency: transitive
7280
description:
7381
name: meta
74-
url: "https://pub.dartlang.org"
82+
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
83+
url: "https://pub.dev"
7584
source: hosted
76-
version: "1.3.0"
85+
version: "1.9.1"
7786
path:
7887
dependency: transitive
7988
description:
8089
name: path
81-
url: "https://pub.dartlang.org"
90+
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
91+
url: "https://pub.dev"
8292
source: hosted
83-
version: "1.8.0"
93+
version: "1.8.3"
8494
pedantic:
8595
dependency: "direct dev"
8696
description:
8797
name: pedantic
88-
url: "https://pub.dartlang.org"
98+
sha256: "8f6460c77a98ad2807cd3b98c67096db4286f56166852d0ce5951bb600a63594"
99+
url: "https://pub.dev"
89100
source: hosted
90101
version: "1.11.0"
91102
sky_engine:
@@ -97,58 +108,66 @@ packages:
97108
dependency: transitive
98109
description:
99110
name: source_span
100-
url: "https://pub.dartlang.org"
111+
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
112+
url: "https://pub.dev"
101113
source: hosted
102-
version: "1.8.1"
114+
version: "1.10.0"
103115
stack_trace:
104116
dependency: transitive
105117
description:
106118
name: stack_trace
107-
url: "https://pub.dartlang.org"
119+
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
120+
url: "https://pub.dev"
108121
source: hosted
109-
version: "1.10.0"
122+
version: "1.11.0"
110123
stream_channel:
111124
dependency: transitive
112125
description:
113126
name: stream_channel
114-
url: "https://pub.dartlang.org"
127+
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
128+
url: "https://pub.dev"
115129
source: hosted
116-
version: "2.1.0"
130+
version: "2.1.1"
117131
string_scanner:
118132
dependency: transitive
119133
description:
120134
name: string_scanner
121-
url: "https://pub.dartlang.org"
135+
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
136+
url: "https://pub.dev"
122137
source: hosted
123-
version: "1.1.0"
138+
version: "1.2.0"
124139
term_glyph:
125140
dependency: transitive
126141
description:
127142
name: term_glyph
128-
url: "https://pub.dartlang.org"
143+
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
144+
url: "https://pub.dev"
129145
source: hosted
130-
version: "1.2.0"
146+
version: "1.2.1"
131147
test_api:
132148
dependency: transitive
133149
description:
134150
name: test_api
135-
url: "https://pub.dartlang.org"
151+
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
152+
url: "https://pub.dev"
136153
source: hosted
137-
version: "0.3.0"
138-
typed_data:
154+
version: "0.6.0"
155+
vector_math:
139156
dependency: transitive
140157
description:
141-
name: typed_data
142-
url: "https://pub.dartlang.org"
158+
name: vector_math
159+
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
160+
url: "https://pub.dev"
143161
source: hosted
144-
version: "1.3.0"
145-
vector_math:
162+
version: "2.1.4"
163+
web:
146164
dependency: transitive
147165
description:
148-
name: vector_math
149-
url: "https://pub.dartlang.org"
166+
name: web
167+
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
168+
url: "https://pub.dev"
150169
source: hosted
151-
version: "2.1.0"
170+
version: "0.1.4-beta"
152171
sdks:
153-
dart: ">=2.12.0 <3.0.0"
172+
dart: ">=3.1.0-185.0.dev <4.0.0"
154173
flutter: ">=0.2.5"

0 commit comments

Comments
 (0)