feat: Disable swipe on calendar view
This commit is contained in:
@@ -103,6 +103,7 @@ class CalendarPageState extends State<CalendarPage> {
|
|||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final anime = data[day]![index];
|
final anime = data[day]![index];
|
||||||
return GridItem(
|
return GridItem(
|
||||||
|
enableDrag: false,
|
||||||
child: AnimeCoverImage(
|
child: AnimeCoverImage(
|
||||||
url: anime.thumbnailUrl,
|
url: anime.thumbnailUrl,
|
||||||
hero: 'calendar_${anime.id}',
|
hero: 'calendar_${anime.id}',
|
||||||
@@ -191,58 +192,63 @@ class CalendarPageState extends State<CalendarPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
drawer: getDrawer(context),
|
drawer: getDrawer(context),
|
||||||
body: CustomScrollView(
|
body: Padding(
|
||||||
slivers: [
|
padding: const EdgeInsetsGeometry.symmetric(
|
||||||
// Render all available weekdays
|
horizontal: 12,
|
||||||
..._renderWeekdayList(
|
),
|
||||||
context,
|
child: CustomScrollView(
|
||||||
Weekday.unknown,
|
slivers: [
|
||||||
airingAnimeMap,
|
// Render all available weekdays
|
||||||
),
|
..._renderWeekdayList(
|
||||||
..._renderWeekdayList(
|
context,
|
||||||
context,
|
Weekday.unknown,
|
||||||
Weekday.monday,
|
airingAnimeMap,
|
||||||
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,
|
|
||||||
),
|
),
|
||||||
),
|
..._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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user