Refactoring: remove magic constants

This commit is contained in:
Ming Ming 2021-09-08 16:18:55 +08:00
parent 458ef2f733
commit 9256d19518
2 changed files with 3 additions and 1 deletions

1
lib/help_utils.dart Normal file
View file

@ -0,0 +1 @@
const mainUrl = "https://gitlab.com/nkming2/nc-photos/-/wikis/home";

View file

@ -5,6 +5,7 @@ import 'package:kiwi/kiwi.dart';
import 'package:nc_photos/account.dart';
import 'package:nc_photos/app_localizations.dart';
import 'package:nc_photos/event/event.dart';
import 'package:nc_photos/help_utils.dart' as help_utils;
import 'package:nc_photos/pref.dart';
import 'package:nc_photos/theme.dart';
import 'package:nc_photos/widget/account_picker_dialog.dart';
@ -114,7 +115,7 @@ class HomeSliverAppBar extends StatelessWidget {
Navigator.of(context).pushNamed(Settings.routeName,
arguments: SettingsArguments(account));
} else if (option == _menuValueHelp) {
launch("https://gitlab.com/nkming2/nc-photos/-/wikis/home");
launch(help_utils.mainUrl);
}
}
},