You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

93 lines
3.1 KiB

import 'package:flutter/material.dart';
import 'package:teso/util/SizeConfig.dart';
import 'package:teso/util/consts.dart';
import 'package:time_elapsed/time_elapsed.dart';
buildRefundAlert(
{BuildContext context, DateTime timestamp, Icon icons, String message}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0),
child: Material(
elevation: 10,
child: Container(
width: MediaQuery.of(context).size.width,
color: Theme.of(context).primaryColor,
// height: 50,
child: Row(
children: [
Container(
constraints: BoxConstraints(minHeight: 80, maxHeight: 150),
width: MediaQuery.of(context).size.width -
(MediaQuery.of(context).size.width) * 0.88,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
darkAccent,
accentMain,
],
),
),
child: icons,
),
Expanded(
flex: 1,
// color: Theme.of(context).primaryColor,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Wrap(
direction: Axis.horizontal,
runSpacing: 10,
children: [
Icon(
Icons.timer,
size: 15,
),
Text(
TimeElapsed.fromDateTime(timestamp),
style: (TextStyle(
color: Colors.grey,
)),
),
],
),
Container(
width: MediaQuery.of(context).size.width * 0.527,
child: Text(
message,
textAlign: TextAlign.left,
style: TextStyle(
fontSize: SizeConfig.blockSizeHorizontal * 3.2,
),
),
),
Container(),
],
),
),
),
Container(
width: (MediaQuery.of(context).size.width) * 0.08,
color: Theme.of(context).primaryColor,
child: Align(
alignment: Alignment.topCenter,
child: FadeInImage(
height: 30,
width: 30,
fit: BoxFit.fill,
image: AssetImage("assets/images/silver1.png"),
placeholder: AssetImage("assets/images/silver1.png"),
),
),
),
],
),
),
),
);
}