build method
dynamic
build( - dynamic context,
- dynamic ref
)
Implementation
@override
Widget build(BuildContext context, WidgetRef ref) {
final canPostNews = ref
.watch(
hasSpaceWithPermissionProvider('CanPostNews'),
)
.valueOrNull ==
true;
return Scaffold(
extendBodyBehindAppBar: true,
appBar: AppBar(
elevation: 0,
backgroundColor: Colors.transparent,
centerTitle: true,
actions: <Widget>[
Visibility(
visible: canPostNews,
child: PlusIconWidget(
onPressed: () => context.pushNamed(Routes.actionAddUpdate.name),
),
),
],
),
body: const NewsWidget(),
);
}