-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathbackup_success_screen.dart
More file actions
76 lines (73 loc) · 2.4 KB
/
Copy pathbackup_success_screen.dart
File metadata and controls
76 lines (73 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import 'package:bb_mobile/core/themes/app_theme.dart';
import 'package:bb_mobile/core/widgets/buttons/button.dart';
import 'package:bb_mobile/core/widgets/text/text.dart';
import 'package:bb_mobile/features/wallet/presentation/bloc/wallet_bloc.dart';
import 'package:bb_mobile/features/wallet/ui/wallet_router.dart';
import 'package:bb_mobile/generated/flutter_gen/assets.gen.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:bull_ui/bull_ui.dart' show Gap;
import 'package:gif/gif.dart';
import 'package:go_router/go_router.dart';
class BackupSuccessScreen extends StatelessWidget {
const BackupSuccessScreen({
super.key,
required this.title,
required this.message,
required this.buttonLabel,
});
final String title;
final String message;
final String buttonLabel;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisAlignment: .spaceBetween,
children: <Widget>[
const Spacer(),
Column(
children: [
SizedBox(
height: 200,
width: 200,
child: Gif(
image: AssetImage(Assets.animations.successTick.path),
autostart: Autostart.once,
height: 200,
width: 200,
),
),
const Gap(8),
BBText(title, style: context.font.headlineLarge),
const Gap(8),
BBText(
message,
style: context.font.bodyMedium,
textAlign: .center,
),
],
),
const Spacer(flex: 2),
Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).size.height * 0.05,
),
child: BBButton.big(
label: buttonLabel,
bgColor: context.appColors.secondary,
textColor: context.appColors.onSecondary,
onPressed: () {
context.read<WalletBloc>().add(const VerifyBackupStatus());
context.goNamed(WalletRoute.walletHome.name);
},
),
),
],
),
),
);
}
}