Remove old unused first start dialog

This commit is contained in:
Tommy Chow 2023-01-19 17:38:54 -05:00
parent 5bc224b4bd
commit c7e3537de6

View file

@ -9,11 +9,7 @@ import 'package:frosty/screens/home/top/top.dart';
import 'package:frosty/screens/settings/settings.dart';
import 'package:frosty/screens/settings/stores/auth_store.dart';
import 'package:frosty/screens/settings/stores/settings_store.dart';
import 'package:frosty/widgets/button.dart';
import 'package:frosty/widgets/dialog.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
class Home extends StatefulWidget {
const Home({Key? key}) : super(key: key);
@ -27,52 +23,6 @@ class _HomeState extends State<Home> {
late final _homeStore = HomeStore(authStore: _authStore);
Future<void> _showStartDialog() async {
final packageInfo = await PackageInfo.fromPlatform();
final prefs = await SharedPreferences.getInstance();
if (prefs.getBool('first_run') == false) return;
return showDialog(
barrierDismissible: false,
context: context,
builder: (context) => FrostyDialog(
title: 'Frosty v${packageInfo.version} (${packageInfo.buildNumber})',
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Text(
'Thank you so much for downloading and trying out Frosty! Hopefully it\'ll make your mobile Twitch viewing experience a little more enjoyable.'),
SizedBox(height: 20.0),
Text(
'Frosty is completely free and open-source. If you\'d like to explore the source code, report an issue, or make a feature request, check out the GitHub repo (link at the top-right of settings).'),
SizedBox(height: 20.0),
Text('You can also find links to the full changelog and FAQ in Settings -> Other.'),
SizedBox(height: 20.0),
Text('Don\'t forget to leave a rating and/or review on the app store!'),
],
),
actions: [
Button(
onPressed: () {
prefs.setBool('first_run', false);
Navigator.of(context).pop();
},
child: const Text('Close'),
),
],
),
);
}
@override
void initState() {
super.initState();
_showStartDialog();
}
@override
Widget build(BuildContext context) {
SystemChrome.setPreferredOrientations([]);