workouttest_app/lib/view/customer_welcome_page.dart

104 lines
3.8 KiB
Dart

import 'package:aitrainer_app/library/button_animations.dart';
import 'package:aitrainer_app/util/trans.dart';
import 'package:aitrainer_app/widgets/app_bar_min.dart';
import 'package:flutter/material.dart';
import 'package:flutter_fadein/flutter_fadein.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:percent_indicator/circular_percent_indicator.dart';
// ignore: must_be_immutable
class CustomerWelcomePage extends StatefulWidget {
late _CustomerWelcomePageState _state;
_CustomerWelcomePageState createState() {
_state = _CustomerWelcomePageState();
return _state;
}
}
class _CustomerWelcomePageState extends State<CustomerWelcomePage> with Trans {
@override
Widget build(BuildContext context) {
setContext(context);
return Scaffold(
appBar: AppBarMin(
back: true,
),
body: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('asset/image/WT_welcome.jpg'),
fit: BoxFit.fill,
alignment: Alignment.center,
),
),
child: SafeArea(
bottom: false,
child: Center(
child: Column(
children: [
SizedBox(
height: 200,
),
CircularPercentIndicator(
radius: 250.0,
animation: true,
animationDuration: 4800,
lineWidth: 20.0,
percent: 0.98,
curve: Curves.bounceInOut,
backgroundWidth: 4,
center: Text(
t("Training Plan Generation"),
textAlign: TextAlign.center,
style: GoogleFonts.archivoBlack(
fontWeight: FontWeight.bold,
fontSize: 28.0,
color: Colors.white,
shadows: <Shadow>[
Shadow(
offset: Offset(5.0, 5.0),
blurRadius: 12.0,
color: Colors.black54,
),
Shadow(
offset: Offset(-3.0, 3.0),
blurRadius: 12.0,
color: Colors.black54,
),
],
),
),
circularStrokeCap: CircularStrokeCap.round,
progressColor: Color(0xffb4f500),
backgroundColor: Colors.black,
),
SizedBox(
height: 90,
),
FadeIn(
child: Container(
width: 160,
height: 80,
child: GestureDetector(
onTap: () => Navigator.of(context).popAndPushNamed("home"),
child: Stack(
alignment: Alignment.center,
children: [
Image.asset('asset/icon/gomb_orange_a.png', width: 140, height: 80),
Text(
t("Next"),
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.white),
),
],
),
)),
duration: Duration(seconds: 6),
),
],
),
))),
);
}
}