2020-08-28 20:04:48 +00:00
|
|
|
import 'package:cake_wallet/src/screens/dashboard/widgets/filter_widget.dart';
|
2020-09-25 15:32:44 +00:00
|
|
|
import 'package:cake_wallet/utils/show_pop_up.dart';
|
2020-07-23 12:20:52 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:cake_wallet/generated/i18n.dart';
|
|
|
|
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
|
|
|
|
|
|
|
|
class HeaderRow extends StatelessWidget {
|
|
|
|
HeaderRow({this.dashboardViewModel});
|
|
|
|
|
|
|
|
final DashboardViewModel dashboardViewModel;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2020-08-19 17:57:06 +00:00
|
|
|
final filterIcon = Image.asset('assets/images/filter_icon.png',
|
|
|
|
color: Theme.of(context).textTheme.caption.decorationColor);
|
|
|
|
|
2020-07-23 12:20:52 +00:00
|
|
|
return Container(
|
|
|
|
height: 52,
|
|
|
|
color: Colors.transparent,
|
|
|
|
padding: EdgeInsets.only(left: 24, right: 24),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
Text(
|
|
|
|
S.of(context).transactions,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 20,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
color: Colors.white
|
|
|
|
),
|
|
|
|
),
|
2020-08-28 20:04:48 +00:00
|
|
|
GestureDetector(
|
|
|
|
onTap: () {
|
2020-09-25 15:32:44 +00:00
|
|
|
showPopUp<void>(
|
2020-08-28 20:04:48 +00:00
|
|
|
context: context,
|
|
|
|
builder: (context) => FilterWidget(dashboardViewModel: dashboardViewModel)
|
|
|
|
);
|
|
|
|
},
|
2020-07-23 12:20:52 +00:00
|
|
|
child: Container(
|
|
|
|
height: 36,
|
|
|
|
width: 36,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
shape: BoxShape.circle,
|
2020-08-19 17:57:06 +00:00
|
|
|
color: Theme.of(context).textTheme.overline.color
|
2020-07-23 12:20:52 +00:00
|
|
|
),
|
|
|
|
child: filterIcon,
|
|
|
|
),
|
2020-08-28 20:04:48 +00:00
|
|
|
)
|
2020-07-23 12:20:52 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|