passo_mobile_app/lib/screens/sos/sos_received.dart

134 lines
4.5 KiB
Dart
Raw Normal View History

import 'package:animate_do/animate_do.dart';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:flutter_svg/svg.dart';
import 'package:unit2/theme-data.dart/btn-style.dart';
import 'package:unit2/utils/text_container.dart';
import '../../theme-data.dart/colors.dart';
import '../../utils/global.dart';
class SOSreceived extends StatelessWidget {
final Function onpressed;
const SOSreceived({required Key key, required this.onpressed})
: super(key: key);
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.symmetric(vertical: 40, horizontal: 35),
height: screenHeight,
child: Stack(
children: [
Positioned(
bottom: 0,
child: SizedBox(
width: screenWidth,
height: screenHeight / 2,
child: Opacity(
opacity: .2,
child: Image.asset(
"assets/emergency.png",
fit: BoxFit.cover,
),
),
)),
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
height: blockSizeVertical * 6,
),
Bounce(
from: 20,
infinite: true,
delay: const Duration(milliseconds: 800),
child: Stack(
alignment: AlignmentDirectional.topCenter,
children: [
Container(
margin: const EdgeInsets.only(top: 20),
child: CircleAvatar(
radius: blockSizeVertical * 8,
backgroundColor: second,
child: Container(
margin: const EdgeInsets.only(top: 25),
child: SvgPicture.asset(
'assets/sos.svg',
height: blockSizeHorizontal * 17,
color: Colors.white,
allowDrawingOutsideViewBox: true,
alignment: Alignment.bottomCenter,
),
),
),
),
Positioned(
top: blockSizeVertical * 3,
2023-01-17 07:52:31 +00:00
child: const SpinKitPulse(
color: primary,
size: 120,
),
),
],
),
),
const SizedBox(height: 16),
SlideInUp(
from: 50,
child: AutoSizeText(
2022-12-20 06:26:37 +00:00
sosReceived,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.displayMedium!.copyWith(
fontSize: 40,
color: third,
fontWeight: FontWeight.w500,
),
),
),
const SizedBox(
height: 8,
),
SlideInUp(
from: 50,
child: Container(
padding: const EdgeInsets.all(15),
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(15))),
child: AutoSizeText(
sOSReceivedMessage,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.caption!.copyWith(
fontSize: 16,
color: Colors.black87,
),
),
),
),
const SizedBox(
height: 40,
),
Expanded(child: Container()),
SlideInUp(
child: SizedBox(
height: 50,
width: 200,
child: TextButton(
style: mainBtnStyle(second, Colors.transparent, second),
onPressed: () {},
2022-12-20 06:26:37 +00:00
child: const Text(cancelRequest,
style: TextStyle(
color: Colors.white,
)),
),
),
)
],
),
],
),
);
}
}