-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
c: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
Description
The Scaffold implementation uses a function to return a Widget here which is both:
- Not needed, because the function is used only once (in the
buildmethod) and nowhere else - Using functions to return widgets is a bad practice as stated by the official docs here, here and here.
This
child: _wrapBottomSheet(
BottomSheet(
...
),
),should become
child: Semantics(
container: true,
onDismiss: close,
child: NotificationListener<DraggableScrollableNotification>(
onNotification: extentChanged,
child: BottomSheet(
...
),
),
);werainkhatri
Metadata
Metadata
Assignees
Labels
c: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.