Skip to content

Commit 2177bf2

Browse files
chrisbobbesm-sayedi
authored andcommitted
action_sheet: Implement BottomSheetEmptyContentPlaceholder, to use soon
1 parent bdbaf2d commit 2177bf2

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

lib/widgets/action_sheet.dart

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,39 @@ class BottomSheetHeader extends StatelessWidget {
181181
}
182182
}
183183

184+
/// A "no content here" message for when a bottom sheet has no content to show.
185+
///
186+
/// Show this below a [BottomSheetHeader] if present.
187+
///
188+
/// See also:
189+
/// * [PageBodyEmptyContentPlaceholder], for a similar element to use in
190+
/// pages on the home screen.
191+
// TODO(design) we don't yet have a design for this;
192+
// it was ad-hoc and modeled on [PageBodyEmptyContentPlaceholder].
193+
class BottomSheetEmptyContentPlaceholder extends StatelessWidget {
194+
const BottomSheetEmptyContentPlaceholder({super.key, required this.message});
195+
196+
final String message;
197+
198+
@override
199+
Widget build(BuildContext context) {
200+
final designVariables = DesignVariables.of(context);
201+
202+
return Padding(
203+
padding: EdgeInsets.fromLTRB(24, 48, 24, 16),
204+
child: Align(
205+
alignment: Alignment.topCenter,
206+
child: Text(
207+
textAlign: TextAlign.center,
208+
style: TextStyle(
209+
color: designVariables.labelSearchPrompt,
210+
fontSize: 17,
211+
height: 23 / 17,
212+
).merge(weightVariableTextStyle(context, wght: 500)),
213+
message)));
214+
}
215+
}
216+
184217
/// A button in an action sheet.
185218
///
186219
/// When built from server data, the action sheet ignores changes in that data;

0 commit comments

Comments
 (0)