build method

  1. @override
dynamic build(
  1. dynamic context,
  2. dynamic ref
)

Implementation

@override
Widget build(BuildContext context, WidgetRef ref) {
  final client = ref.watch(alwaysClientProvider);
  final hasSpaces = ref.watch(hasSpacesProvider);
  return InDashboard(
    child: SafeArea(
      child: Scaffold(
        appBar: _buildDashboardAppBar(context, client),
        body: Padding(
          padding: const EdgeInsets.only(top: 20, left: 20, right: 20),
          child: SingleChildScrollView(
            child: hasSpaces
                ? Column(
                    children: [
                      searchWidget(context),
                      featuresNav(context),
                      const SizedBox(height: 20),
                      const MyEventsSection(
                        eventFilters: EventFilters.ongoing,
                      ),
                      const SizedBox(height: 12),
                      const MyTasksSection(limit: 5),
                      const SizedBox(height: 20),
                      const MyEventsSection(
                        limit: 3,
                        eventFilters: EventFilters.upcoming,
                      ),
                      const MySpacesSection(limit: 5),
                    ],
                  )
                : emptyState(context),
          ),
        ),
      ),
    ),
  );
}