2021-10-01 15:13:10 +00:00
|
|
|
import 'package:cake_wallet/src/screens/yat/widgets/yat_bar.dart';
|
|
|
|
import 'package:cake_wallet/src/screens/yat/widgets/yat_page_indicator.dart';
|
|
|
|
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
|
|
|
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:cake_wallet/palette.dart';
|
|
|
|
import 'package:lottie/lottie.dart';
|
2021-10-05 11:43:37 +00:00
|
|
|
import 'package:cake_wallet/generated/i18n.dart';
|
2021-10-01 15:13:10 +00:00
|
|
|
|
|
|
|
class FirstIntroduction extends StatelessWidget {
|
2022-10-12 17:09:57 +00:00
|
|
|
FirstIntroduction({required this.onNext, this.onClose});
|
2021-10-01 15:13:10 +00:00
|
|
|
|
|
|
|
static const aspectRatioImage = 1.133;
|
2022-10-12 17:09:57 +00:00
|
|
|
final VoidCallback? onClose;
|
2021-10-01 15:13:10 +00:00
|
|
|
final VoidCallback onNext;
|
|
|
|
final animation = Lottie.asset('assets/animation/anim1.json');
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
final screenHeight = MediaQuery.of(context).size.height;
|
|
|
|
final screenWidth = MediaQuery.of(context).size.width;
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
height: screenHeight,
|
|
|
|
width: screenWidth,
|
|
|
|
color: Colors.white,
|
|
|
|
child: ScrollableWithBottomSection(
|
|
|
|
contentPadding: EdgeInsets.only(top: 40, bottom: 40),
|
|
|
|
content: Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
height: 45,
|
|
|
|
padding: EdgeInsets.only(left: 24, right: 24),
|
|
|
|
child: YatBar(onClose: () => Navigator.of(context).pop())
|
|
|
|
),
|
|
|
|
animation,
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.only(left: 30, right: 30),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Text(
|
2021-10-05 11:43:37 +00:00
|
|
|
S.of(context).yat_alert_title,
|
2021-10-01 15:13:10 +00:00
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 24,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontFamily: 'Lato',
|
|
|
|
color: Colors.black,
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(top: 20),
|
|
|
|
child: Text(
|
2021-10-05 11:43:37 +00:00
|
|
|
S.of(context).yat_alert_content,
|
2021-10-01 15:13:10 +00:00
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
fontFamily: 'Lato',
|
|
|
|
color: Colors.black,
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
]
|
|
|
|
)
|
|
|
|
)
|
|
|
|
]
|
|
|
|
),
|
|
|
|
bottomSectionPadding: EdgeInsets.fromLTRB(24, 0, 24, 24),
|
|
|
|
bottomSection: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
PrimaryButton(
|
2021-10-05 11:43:37 +00:00
|
|
|
text: S.of(context).restore_next,
|
2021-10-01 15:13:10 +00:00
|
|
|
textColor: Colors.white,
|
|
|
|
color: Palette.protectiveBlue,
|
|
|
|
onPressed: onNext
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(top: 24),
|
|
|
|
child: YatPageIndicator(filled: 0)
|
|
|
|
)
|
|
|
|
]
|
|
|
|
),
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|