haufen ide zeugs (nich mit abgerechnet) u fix android
This commit is contained in:
@@ -1,15 +1,73 @@
|
||||
class ExcursionMain extends StatelessWidget {
|
||||
import 'package:animations/animations.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class ExcursionMain extends StatefulWidget {
|
||||
const ExcursionMain({super.key});
|
||||
|
||||
@override
|
||||
State<ExcursionMain> createState() => _ExcursionMainState();
|
||||
}
|
||||
|
||||
class _ExcursionMainState extends State<ExcursionMain> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
List<Step> getSteps() => [
|
||||
Step(
|
||||
title: const Text("step1"),
|
||||
content: const Column(
|
||||
children: [
|
||||
Text("data"),
|
||||
],
|
||||
)),
|
||||
const Step(title: Text("step2"), content: Text("data"))
|
||||
];
|
||||
|
||||
int currentStep = 0;
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text("Titlebar")
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
|
||||
]
|
||||
)
|
||||
);
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.excursion),
|
||||
),
|
||||
body: PageTransitionSwitcher(
|
||||
duration: const Duration(microseconds: 800),
|
||||
transitionBuilder: (Widget child, Animation<double> animation,
|
||||
Animation<double> secondaryAnimation) {
|
||||
return SharedAxisTransition(
|
||||
animation: animation,
|
||||
secondaryAnimation: secondaryAnimation,
|
||||
transitionType: SharedAxisTransitionType.vertical,
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
child: Stepper(
|
||||
key: ValueKey(currentStep),
|
||||
steps: getSteps(),
|
||||
currentStep: currentStep,
|
||||
onStepTapped: (value) {
|
||||
setState(() {
|
||||
currentStep = value;
|
||||
});
|
||||
},
|
||||
onStepContinue: () async {
|
||||
final bool isLastStep = currentStep == getSteps().length - 1;
|
||||
|
||||
if (!isLastStep) {
|
||||
setState(() {
|
||||
currentStep += 1;
|
||||
});
|
||||
}
|
||||
},
|
||||
onStepCancel: () {
|
||||
if (currentStep == 0) {
|
||||
Navigator.pop(context);
|
||||
} else {
|
||||
setState(() {
|
||||
currentStep -= 1;
|
||||
});
|
||||
}
|
||||
},
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user