68 lines
2.0 KiB
Dart
68 lines
2.0 KiB
Dart
import 'package:auto_size_text/auto_size_text.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:gascom/widgets/app_button.dart';
|
|
import 'package:gascom/widgets/bottom_nav.dart';
|
|
|
|
class SuccessScreen extends StatelessWidget {
|
|
const SuccessScreen({
|
|
super.key,
|
|
required this.title,
|
|
required this.subtitle,
|
|
});
|
|
|
|
final String title;
|
|
final String subtitle;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: SafeArea(
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(20),
|
|
child: Center(
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Icon(
|
|
Icons.check_rounded,
|
|
size: 100.0,
|
|
color: Theme.of(context).textTheme.bodyLarge?.color,
|
|
),
|
|
const SizedBox(height: 20.0),
|
|
AutoSizeText(
|
|
title,
|
|
maxLines: 2,
|
|
textAlign: TextAlign.center,
|
|
style: Theme.of(context).textTheme.titleLarge,
|
|
),
|
|
const SizedBox(height: 10.0),
|
|
AutoSizeText(
|
|
subtitle,
|
|
maxLines: 2,
|
|
textAlign: TextAlign.center,
|
|
style: Theme.of(context).textTheme.bodyMedium,
|
|
),
|
|
const SizedBox(height: 40.0),
|
|
SizedBox(
|
|
width: 200,
|
|
child: AppButton(
|
|
onPressed: () {
|
|
Navigator.pushAndRemoveUntil(
|
|
context,
|
|
MaterialPageRoute(builder: (context) => const BottomNav()),
|
|
(_) => false
|
|
);
|
|
},
|
|
label: "تم",
|
|
isElevated: true,
|
|
),
|
|
),
|
|
const SizedBox(height: 40.0),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |