Add demo mode support and demo data for various providers
This commit is contained in:
@@ -383,6 +383,25 @@ class LoginScreenState extends State<LoginScreen> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 19),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
final userProvider = Provider.of<UserProvider>(context, listen: false);
|
||||
final demoUser = User.demo();
|
||||
userProvider.addUser(demoUser);
|
||||
userProvider.setUser(demoUser.id);
|
||||
setSystemChrome(context);
|
||||
Navigator.of(context).pushReplacementNamed('login_to_navigation');
|
||||
},
|
||||
child: Text(
|
||||
'demo_login'.i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).loginSecondary,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
// privacy policy
|
||||
GestureDetector(
|
||||
onTap: () => PrivacyView.show(context),
|
||||
|
||||
@@ -34,6 +34,7 @@ extension Localization on String {
|
||||
"welcome_text_4":
|
||||
"You can also organise your notes by lesson in the built-in notebook, so you can find everything in one app.",
|
||||
"login_w_kreta_acc": "Log in with your e-KRÉTA account",
|
||||
"demo_login": "Try demo mode",
|
||||
},
|
||||
"hu_hu": {
|
||||
"username": "Felhasználónév",
|
||||
@@ -66,6 +67,7 @@ extension Localization on String {
|
||||
"welcome_text_4":
|
||||
"A beépített jegyzetfüzetbe órák szerint is rendezheted a jegyzeteidet, így mindent megtalálsz egy appban.",
|
||||
"login_w_kreta_acc": "Bejelentkezés e-KRÉTA fiókkal",
|
||||
"demo_login": "Demo mód kipróbálása",
|
||||
},
|
||||
"de_de": {
|
||||
"username": "Benutzername",
|
||||
@@ -98,6 +100,7 @@ extension Localization on String {
|
||||
"welcome_text_4":
|
||||
"You can also organise your notes by lesson in the built-in notebook, so you can find everything in one app.",
|
||||
"login_w_kreta_acc": "Mit e-KRÉTA-Konto anmelden",
|
||||
"demo_login": "Demo-Modus ausprobieren",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user