From 1a3e92483fe7e90ba4f42f30bc5578d9563cff1f Mon Sep 17 00:00:00 2001 From: Oeyuu Date: Fri, 7 Jun 2024 20:43:03 +0200 Subject: [PATCH] added macos support and changed gridview count for iphone and macos --- lib/screens/gameboard.dart | 7 ++++--- macos/Runner.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/screens/gameboard.dart b/lib/screens/gameboard.dart index cc211b2..4e65cdc 100644 --- a/lib/screens/gameboard.dart +++ b/lib/screens/gameboard.dart @@ -58,14 +58,15 @@ class _PlayerGridViewState extends State { body: Container( color: isNight ? const Color(0xff2d2d2d) - : Color.fromARGB(255, 194, 216, 225), + : const Color.fromARGB(255, 194, 216, 225), padding: const EdgeInsets.only(left: 15, right: 15), child: Column( children: [ Expanded( child: GridView.builder( - gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 2, + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: + MediaQuery.of(context).size.shortestSide < 600 ? 2 : 4, mainAxisSpacing: 10, crossAxisSpacing: 10, ), diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index f94ac01..9d7c278 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -227,7 +227,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C80D4294CF70F00263BE5 = { diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index abe930c..8597b91 100644 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@