From c95c0e192eeba8817c3cf681e74aaa51a39e9e40 Mon Sep 17 00:00:00 2001 From: Siyi Guo Date: Thu, 13 Apr 2023 17:08:48 +0800 Subject: [PATCH] support show the image when back --- lib/image/image_page.dart | 4 ++-- lib/sp/sp.dart | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/image/image_page.dart b/lib/image/image_page.dart index 1f4e3fb..07fc094 100644 --- a/lib/image/image_page.dart +++ b/lib/image/image_page.dart @@ -17,8 +17,8 @@ class ImagePage extends StatefulWidget { } class _ImagePageState extends State with WindowListener { - File? image; - File? image2; + static File? image; + static File? image2; bool isImageSelected1 = true; bool isImageSelected2 = true; double opacity1 = 1; diff --git a/lib/sp/sp.dart b/lib/sp/sp.dart index 2880f56..71838da 100644 --- a/lib/sp/sp.dart +++ b/lib/sp/sp.dart @@ -14,4 +14,14 @@ class SP { static Future setDouble(String key, double value) { return prefs.setDouble(key, value); } + + static String? getString(String key) { + return prefs.getString(key); + } + + static Future setString(String key, String value) { + return prefs.setString(key, value); + } + + }