fixes for iOS

This commit is contained in:
Myzel394 2022-08-22 20:19:01 +02:00
parent ff63d87600
commit 684de568b3
3 changed files with 10 additions and 6 deletions

View File

@ -76,6 +76,9 @@ class _MyAppState extends State<MyApp> {
darkTheme: DARK_THEME_MATERIAL,
themeMode: ThemeMode.system,
),
cupertino: (_, __) => CupertinoAppData(
theme: LIGHT_THEME_CUPERTINO,
),
localizationsDelegates: AppLocalizations.localizationsDelegates,
supportedLocales: AppLocalizations.supportedLocales,
routes: {

View File

@ -44,7 +44,7 @@ class CalendarScreen extends StatelessWidget {
: null,
trailingActions: calendar.isInSelectMode
? <Widget>[
IconButton(
PlatformIconButton(
onPressed: () async {
calendar.setIsSavingToGallery(true);
@ -52,6 +52,7 @@ class CalendarScreen extends StatelessWidget {
calendar.filterMemories(memories.memories);
final hasSavedAll = await showPlatformDialog(
barrierDismissible: true,
context: context,
builder: (_) => SaveToGalleryModal(
memories: memoriesToSave,

View File

@ -1,3 +1,5 @@
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:quid_faciam_hodie/constants/spacing.dart';
import 'package:quid_faciam_hodie/foreign_types/memory.dart';
@ -30,11 +32,9 @@ class _SaveToGalleryModalState extends State<SaveToGalleryModal> {
for (final memory in widget.memories) {
await memory.saveFileToGallery();
if (widget.memories.last != memory) {
setState(() {
currentMemory = currentMemory + 1;
});
}
setState(() {
currentMemory = min(widget.memories.length - 1, currentMemory + 1);
});
}
if (mounted) {