mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
[infra_ui][overlay] Change insert overlay method parameters to optional
This commit is contained in:
@ -49,6 +49,7 @@ class OverlayScreen extends StatelessWidget {
|
|||||||
size: 200,
|
size: 200,
|
||||||
),
|
),
|
||||||
'overlay_flutter_logo',
|
'overlay_flutter_logo',
|
||||||
|
null,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: const Text('Show Overlay'),
|
child: const Text('Show Overlay'),
|
||||||
|
@ -110,7 +110,11 @@ class FlowyOverlay extends StatefulWidget {
|
|||||||
class FlowyOverlayState extends State<FlowyOverlay> {
|
class FlowyOverlayState extends State<FlowyOverlay> {
|
||||||
List<Tuple3<Widget, String, FlowyOverlayDelegate?>> _overlayList = [];
|
List<Tuple3<Widget, String, FlowyOverlayDelegate?>> _overlayList = [];
|
||||||
|
|
||||||
void insert(Widget widget, String identifier, FlowyOverlayDelegate? delegate) {
|
void insert({
|
||||||
|
required Widget widget,
|
||||||
|
required String identifier,
|
||||||
|
FlowyOverlayDelegate? delegate,
|
||||||
|
}) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_overlayList.add(Tuple3(widget, identifier, delegate));
|
_overlayList.add(Tuple3(widget, identifier, delegate));
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user