gecko/lib/widgets/commons/intro_info.dart

55 lines
1.6 KiB
Dart
Raw Normal View History

2022-12-10 08:16:38 +01:00
import 'package:flutter/material.dart';
import 'package:gecko/globals.dart';
import 'package:gecko/models/scale_functions.dart';
2022-12-10 08:16:38 +01:00
import 'package:gecko/widgets/commons/build_image.dart';
import 'package:gecko/widgets/commons/build_progress_bar.dart';
import 'package:gecko/widgets/commons/build_text.dart';
import 'package:gecko/widgets/commons/next_button.dart';
class InfoIntro extends StatelessWidget {
const InfoIntro({
Key? key,
required this.text,
required this.assetName,
required this.buttonText,
required this.nextScreen,
required this.pagePosition,
this.isMd = false,
this.isFast = false,
this.boxHeight = 340,
2022-12-10 08:16:38 +01:00
this.imageWidth = 350,
this.textSize = 17,
2022-12-10 08:16:38 +01:00
}) : super(key: key);
final String text;
final String assetName;
final String buttonText;
final Widget nextScreen;
2023-05-24 14:37:28 +02:00
final int pagePosition;
2022-12-10 08:16:38 +01:00
final bool isMd;
final bool isFast;
final double boxHeight;
final double imageWidth;
final double textSize;
@override
Widget build(BuildContext context) {
return Column(children: <Widget>[
ScaledSizedBox(height: isTall ? 25 : 5),
2022-12-10 08:16:38 +01:00
BuildProgressBar(pagePosition: pagePosition),
ScaledSizedBox(height: isTall ? 25 : 5),
2022-12-10 08:16:38 +01:00
BuildText(text: text, size: textSize, isMd: isMd),
BuildImage(
assetName: assetName, boxHeight: boxHeight, imageWidth: imageWidth),
Expanded(
child: Align(
alignment: Alignment.bottomCenter,
child: NextButton(
text: buttonText, nextScreen: nextScreen, isFast: false),
),
),
ScaledSizedBox(height: isTall ? 40 : 5),
2022-12-10 08:16:38 +01:00
]);
}
}