I want to keep the view or session of some screens. For example, if I close the app, I can then go back to the last open screen.
I think this is possible using SharedPreferences, but I just know that SharedPreferences is for user data only. I would like to know some alternatives, thanks!
import 'package:flutter/material.dart';
class KeepScreen extends StatefulWidget {
CKeepScreena({Key? key}) : super(key: key);
@override
State<CKeepScreen> createState() => _CKeepScreenState();
}
class _KeepScreenState extends State<KeepScreen> {
@override
Widget build(BuildContext context) {
return Container();
}
}