2021-02-28 07:12:10 +01:00
import ' dart:ui ' ;
2021-02-28 02:38:52 +01:00
import ' package:flutter/services.dart ' ;
import ' package:flutter/material.dart ' ;
2021-03-08 00:32:18 +01:00
import ' package:gecko/globals.dart ' ;
2021-02-28 02:38:52 +01:00
import ' package:gecko/screens/commonElements.dart ' ;
2021-03-08 06:21:04 +01:00
import ' package:gecko/screens/onBoarding/7.dart ' ;
2021-02-28 02:38:52 +01:00
// ignore: must_be_immutable
class OnboardingStepEight extends StatelessWidget {
TextEditingController tplController = TextEditingController ( ) ;
2021-03-08 01:08:26 +01:00
final int progress = 6 ;
2021-02-28 02:38:52 +01:00
@ override
Widget build ( BuildContext context ) {
SystemChrome . setPreferredOrientations ( [ DeviceOrientation . portraitUp ] ) ;
2021-03-01 04:48:28 +01:00
CommonElements common = CommonElements ( ) ;
2021-02-28 02:38:52 +01:00
return Scaffold (
extendBodyBehindAppBar: true ,
body: SafeArea (
child: Column ( children: < Widget > [
2021-03-08 17:23:56 +01:00
common . onboardingProgressBar (
context , ' Ma phrase de restauration ' , progress ) ,
2021-03-01 04:48:28 +01:00
common . bubbleSpeak (
" J’ ai généré votre phrase de restauration ! \n Tâchez de la garder bien secrète, car elle permet à quiconque la connaît d’ accéder à tous vos portefeuilles. " ,
2021-02-28 02:38:52 +01:00
) ,
2021-03-08 00:32:18 +01:00
SizedBox ( height: isTall ? 61 : 31 ) ,
// SizedBox(height: 30),
2021-02-28 07:12:10 +01:00
sentanceArray ( context ) ,
// ),
2021-02-28 02:38:52 +01:00
Expanded (
child: Align (
alignment: Alignment . bottomCenter ,
child: SizedBox (
2021-03-01 04:48:28 +01:00
width: 400 ,
height: 62 ,
2021-02-28 02:38:52 +01:00
child: ElevatedButton (
style: ElevatedButton . styleFrom (
elevation: 5 ,
primary: Color ( 0xffD28928 ) ,
onPrimary: Colors . white , // foreground
) ,
onPressed: ( ) {
Navigator . push (
context ,
2021-03-08 06:21:04 +01:00
FaderTransition (
page: OnboardingStepNine ( ) , isFast: false ) ,
2021-02-28 02:38:52 +01:00
) ;
} ,
child: Text ( " Afficher ma phrase " ,
style: TextStyle ( fontSize: 20 ) ) ) ,
) ) ) ,
SizedBox ( height: 80 ) ,
] ) ,
) ) ;
}
}
2021-02-28 07:12:10 +01:00
Widget sentanceArray ( BuildContext context ) {
return Container (
padding: EdgeInsets . symmetric ( horizontal: 12 ) ,
child: Container (
decoration: BoxDecoration (
border: Border . all ( color: Colors . black ) ,
color: Colors . grey [ 300 ] ,
borderRadius: BorderRadius . all (
const Radius . circular ( 10 ) ,
) ) ,
// color: Colors.grey[300],
padding: EdgeInsets . all ( 20 ) ,
child: Column (
mainAxisAlignment: MainAxisAlignment . center ,
mainAxisSize: MainAxisSize . max ,
crossAxisAlignment: CrossAxisAlignment . center ,
children: < Widget > [
Row ( children: < Widget > [
arrayCell ( " 1:exquis " ) ,
arrayCell ( " 2:favori " ) ,
arrayCell ( " 3:curseur " ) ,
arrayCell ( " 4:relatif " ) ,
] ) ,
SizedBox ( height: 15 ) ,
Row ( children: < Widget > [
arrayCell ( " 5:embellir " ) ,
arrayCell ( " 6:cultiver " ) ,
arrayCell ( " 7:bureau " ) ,
arrayCell ( " 8:ossature " ) ,
] ) ,
SizedBox ( height: 15 ) ,
Row ( children: < Widget > [
arrayCell ( " 9:labial " ) ,
arrayCell ( " 10:science " ) ,
arrayCell ( " 11:théorie " ) ,
arrayCell ( " 12:Monnaie " ) ,
] ) ,
] ) ) ) ;
}
Widget arrayCell ( dataWord ) {
return Container (
2021-03-01 04:48:28 +01:00
width: 102 ,
2021-02-28 07:12:10 +01:00
child: Column (
children: < Widget > [
ImageFiltered (
2021-03-08 06:21:04 +01:00
imageFilter: ImageFilter . blur ( sigmaX: 1 , sigmaY: 1 ) ,
2021-02-28 07:12:10 +01:00
child: Text ( dataWord . split ( ' : ' ) [ 0 ] ,
2021-03-01 04:48:28 +01:00
style: TextStyle ( fontSize: 14 , color: Colors . black ) ) ,
2021-02-28 07:12:10 +01:00
) ,
SizedBox ( height: 2 ) ,
ImageFiltered (
2021-03-08 06:21:04 +01:00
imageFilter: ImageFilter . blur ( sigmaX: 4 , sigmaY: 4 ) ,
2021-02-28 07:12:10 +01:00
child: Text ( dataWord . split ( ' : ' ) [ 1 ] ,
2021-03-01 04:48:28 +01:00
style: TextStyle ( fontSize: 20 , color: Colors . black ) ) ,
2021-02-28 07:12:10 +01:00
)
] ,
) ) ;
}