switched to local git instance

This commit is contained in:
Nico
2024-03-07 22:20:36 +01:00
commit 75083f2237
154 changed files with 11663 additions and 0 deletions

69
lib/intro_screen.dart Normal file
View File

@@ -0,0 +1,69 @@
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
class IntroScreen extends StatefulWidget {
const IntroScreen({super.key});
@override
State<IntroScreen> createState() => _IntroScreenState();
}
class _IntroScreenState extends State<IntroScreen> {
TextEditingController nameVornameC = TextEditingController();
TextEditingController bLandC = TextEditingController();
Future<void> _saveData() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
await prefs.setString('nameVorname', nameVornameC.text);
await prefs.setString('bLand', bLandC.text);
await prefs.setBool('isFirstLaunch', false);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('FFOrte'),
),
body: Center(
child: Container(
padding: const EdgeInsets.all(31),
child: Column(
children: [
TextField(
decoration: InputDecoration(
hintText: AppLocalizations.of(context)!.namevorname),
controller: nameVornameC,
onChanged: (value) => setState(() {
nameVornameC.text = value;
}),
),
const SizedBox(
height: 15,
),
TextField(
decoration: InputDecoration(
hintText: AppLocalizations.of(context)!.bland),
controller: bLandC,
onChanged: (value) => setState(() {
bLandC.text = value;
}),
),
const SizedBox(
height: 15,
),
ElevatedButton(
onPressed: () {
_saveData();
Navigator.pushNamedAndRemoveUntil(
context, '/home', (route) => false);
},
child: Text(AppLocalizations.of(context)!.continueB))
],
),
),
),
);
}
}