fix: The modal should overlay the Scaffold as well

This commit is contained in:
PapaTutuWawa 2023-07-16 17:43:16 +02:00
parent f081bd7c43
commit a01e8602e5

View File

@ -82,7 +82,6 @@ class CalendarPageState extends State<CalendarPage> {
SliverToBoxAdapter( SliverToBoxAdapter(
child: Padding( child: Padding(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
left: 0,
right: 16, right: 16,
top: 20, top: 20,
bottom: 4, bottom: 4,
@ -168,78 +167,83 @@ class CalendarPageState extends State<CalendarPage> {
setState(() {}); setState(() {});
} }
}, },
child: Scaffold( child: WillPopScope(
appBar: AppBar( onWillPop: () async => !context.read<CalendarBloc>().state.refreshing,
title: Text(t.calendar.calendar), child: Stack(
actions: [
IconButton(
onPressed: () {
context.read<CalendarBloc>().add(RefreshPerformedEvent());
},
icon: const Icon(Icons.refresh),
),
],
),
drawer: getDrawer(context),
body: Stack(
children: [ children: [
Positioned( Positioned(
left: 8, left: 8,
right: 8, right: 8,
top: 0, top: 0,
bottom: 0, bottom: 0,
child: CustomScrollView( child: Scaffold(
slivers: [ appBar: AppBar(
// Render all available weekdays title: Text(t.calendar.calendar),
..._renderWeekdayList( actions: [
context, IconButton(
Weekday.unknown, onPressed: () {
airingAnimeMap, context
), .read<CalendarBloc>()
..._renderWeekdayList( .add(RefreshPerformedEvent());
context, },
Weekday.monday, icon: const Icon(Icons.refresh),
airingAnimeMap,
),
..._renderWeekdayList(
context,
Weekday.tuesday,
airingAnimeMap,
),
..._renderWeekdayList(
context,
Weekday.wednesday,
airingAnimeMap,
),
..._renderWeekdayList(
context,
Weekday.thursday,
airingAnimeMap,
),
..._renderWeekdayList(
context,
Weekday.friday,
airingAnimeMap,
),
..._renderWeekdayList(
context,
Weekday.saturday,
airingAnimeMap,
),
..._renderWeekdayList(
context,
Weekday.sunday,
airingAnimeMap,
),
// Provide a nice bottom padding, while keeping the elastic effect attached
// to the bottom-most edge.
const SliverToBoxAdapter(
child: SizedBox(
height: 16,
), ),
), ],
], ),
drawer: getDrawer(context),
body: CustomScrollView(
slivers: [
// Render all available weekdays
..._renderWeekdayList(
context,
Weekday.unknown,
airingAnimeMap,
),
..._renderWeekdayList(
context,
Weekday.monday,
airingAnimeMap,
),
..._renderWeekdayList(
context,
Weekday.tuesday,
airingAnimeMap,
),
..._renderWeekdayList(
context,
Weekday.wednesday,
airingAnimeMap,
),
..._renderWeekdayList(
context,
Weekday.thursday,
airingAnimeMap,
),
..._renderWeekdayList(
context,
Weekday.friday,
airingAnimeMap,
),
..._renderWeekdayList(
context,
Weekday.saturday,
airingAnimeMap,
),
..._renderWeekdayList(
context,
Weekday.sunday,
airingAnimeMap,
),
// Provide a nice bottom padding, while keeping the elastic effect attached
// to the bottom-most edge.
const SliverToBoxAdapter(
child: SizedBox(
height: 16,
),
),
],
),
), ),
), ),
Positioned( Positioned(