import 'package:alubank/components/box_card.dart';
import 'package:alubank/components/color_dot.dart';
import 'package:alubank/components/content_division.dart';
import 'package:alubank/themes/theme_colors.dart';
import 'package:flutter/material.dart';
class AccountPoints extends StatelessWidget {
const AccountPoints({super.key});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(bottom: 16.0),
child: Text(
'Pontos da Conta',
style: Theme.of(context).textTheme.titleMedium,
),
),
BoxCard(
boxContent: _AccountPointsContent(),
),
],
),
);
}
}
class _AccountPointsContent extends StatelessWidget {
const _AccountPointsContent({super.key});
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Pontos totais:'),
Text(
'3000',
style: Theme.of(context).textTheme.bodyLarge,
),
Padding(
padding: const EdgeInsets.only(top: 8.0, bottom: 8.0),
child: ContentDivision(),
),
Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: Text(
'Objetivos:',
style: Theme.of(context).textTheme.titleMedium,
),
),
Row(
children: [
Padding(
padding: const EdgeInsets.only(right: 8.0),
child: ColorDot(
color: ThemeColors.recentActivity['delivery'],
),
),
Text(
'Entrega grátis: 15000pts',
),
],
),
Row(
children: [
Padding(
padding: const EdgeInsets.only(right: 8.0),
child: ColorDot(
color: ThemeColors.recentActivity['streaming'],
),
),
Text(
'1 mês de streaming: 30000pts',
),
],
),
],
);
}
}
class Home extends StatelessWidget {
const Home({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: ListView(
children: const [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Header(),
RecentActivity(),
AccountActions(),
AccountPoints(),
],
),
],
),
);
}
}