56 lines
1.7 KiB
Dart
56 lines
1.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:sf_app_platform/payments/view/screens/core/activity_list.dart';
|
|
import 'package:sf_app_platform/payments/view/screens/core/line_graph.dart';
|
|
|
|
import '../../domain/ports/theme_port.dart';
|
|
|
|
class ActivityScreen extends StatefulWidget{
|
|
const ActivityScreen({super.key});
|
|
|
|
@override
|
|
State<ActivityScreen> createState() => ActivityScreenState();
|
|
}
|
|
|
|
class ActivityScreenState extends State<ActivityScreen>{
|
|
final activity = [
|
|
{"type": "goal"},
|
|
{"type": "wage", "amount": 5},
|
|
{"type": "lock"},
|
|
{"type": "lock"}
|
|
];
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
ThemePort theme = context.read<ThemePort>();
|
|
|
|
final content = [
|
|
Text("Movimientos recientes", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30),),
|
|
Row(
|
|
spacing: 20,
|
|
children: [
|
|
FilledButton(onPressed: ()=>{}, child: Text("Hoy")),
|
|
Spacer(),
|
|
TextButton(onPressed: ()=>{}, child: Text("Última semana")),
|
|
TextButton(onPressed: ()=>{}, child: Text("Mes"))
|
|
],
|
|
),
|
|
SizedBox(height: 200, child: LineGraph()),
|
|
ActivityList(activity: activity, edit: false)
|
|
];
|
|
|
|
return Scaffold(
|
|
backgroundColor: theme.getColorFor(ThemeCode.background_secondary),
|
|
body: Container(
|
|
margin: EdgeInsets.fromLTRB(30, 30, 30, 0),
|
|
child: Center(child: ListView.separated(
|
|
itemBuilder: (BuildContext context, int index) {return content[index];},
|
|
separatorBuilder: (BuildContext context, int index) {
|
|
return Divider(color: Colors.transparent, height: 30);
|
|
},
|
|
itemCount: content.length)
|
|
)
|
|
)
|
|
);
|
|
}
|
|
} |