From 96f6752bbedc94ec70ff4f49a558cf28fcee97eb Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 10 Dec 2024 00:21:32 +0800 Subject: [PATCH] :iphone Fix responsive issue on large screen of home page --- lib/screens/home.dart | 7 ++++++- pubspec.yaml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/screens/home.dart b/lib/screens/home.dart index 05b4d90..a118a0d 100644 --- a/lib/screens/home.dart +++ b/lib/screens/home.dart @@ -1,4 +1,5 @@ import 'dart:math' as math; +import 'dart:ui'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; @@ -73,7 +74,7 @@ class _HomeScreenState extends State { child: Column( mainAxisAlignment: constraints.maxWidth > 640 ? MainAxisAlignment.center : MainAxisAlignment.start, children: [ - if (constraints.maxWidth <= 640) const Gap(8), + const Gap(8), _HomeDashSpecialDayWidget().padding(top: 8, horizontal: 8), StaggeredGrid.count( crossAxisCount: 2, @@ -448,6 +449,10 @@ class _HomeDashRecommendationPostWidgetState extends State<_HomeDashRecommendati ).tr().padding(horizontal: 20, top: 16, bottom: 8), Expanded( child: PageView.builder( + scrollBehavior: ScrollConfiguration.of(context).copyWith(dragDevices: { + PointerDeviceKind.mouse, + PointerDeviceKind.touch, + }), itemCount: _posts?.length ?? 0, itemBuilder: (context, index) { return SingleChildScrollView( diff --git a/pubspec.yaml b/pubspec.yaml index 2626742..c989a0c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 2.0.0+18 +version: 2.0.0+19 environment: sdk: ^3.5.4